From f576bd3aaf4426e9f70a9a047a839e0cc76655b8 Mon Sep 17 00:00:00 2001 From: Kyle Kelley Date: Fri, 3 May 2024 16:17:56 -0700 Subject: [PATCH] Clean up some stray todos (#11380) Quick little todo comment cleanups, either because they aren't needed or a comment will suffice. Release Notes: - N/A --- crates/assistant2/src/assistant2.rs | 5 +---- crates/assistant2/src/attachments.rs | 1 - crates/collab/src/db/queries/projects.rs | 1 - crates/supermaven/src/supermaven_completion_provider.rs | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/crates/assistant2/src/assistant2.rs b/crates/assistant2/src/assistant2.rs index dc777e42b0..66c4251ab0 100644 --- a/crates/assistant2/src/assistant2.rs +++ b/crates/assistant2/src/assistant2.rs @@ -110,7 +110,6 @@ impl AssistantPanel { let user_store = app_state.user_store.clone(); cx.new_view(|cx| { - // todo!("this will panic if the semantic index failed to load or has not loaded yet") let project_index = cx.update_global(|semantic_index: &mut SemanticIndex, cx| { semantic_index.project_index(project.clone(), cx) }); @@ -819,9 +818,7 @@ impl AssistantChat { }); for tool_call in tool_calls { - // todo!(): we should not be sending when the tool is still running / has no result - // For now I'm going to have to assume we send an empty string because otherwise - // the Chat API will break -- there is a required message for every tool call by ID + // Every tool call _must_ have a result by ID, otherwise OpenAI will error. let content = match &tool_call.result { Some(result) => result.format(&tool_call.name), None => "".to_string(), diff --git a/crates/assistant2/src/attachments.rs b/crates/assistant2/src/attachments.rs index b5e73d6177..790158ec49 100644 --- a/crates/assistant2/src/attachments.rs +++ b/crates/assistant2/src/attachments.rs @@ -160,7 +160,6 @@ impl Render for FileAttachmentView { }) .into_any_element() } - // todo!(): show a better error view when the file attaching didn't work Err(err) => div().child(err.to_string()).into_any_element(), } } diff --git a/crates/collab/src/db/queries/projects.rs b/crates/collab/src/db/queries/projects.rs index 34033593a7..b9e917bbbc 100644 --- a/crates/collab/src/db/queries/projects.rs +++ b/crates/collab/src/db/queries/projects.rs @@ -78,7 +78,6 @@ impl Database { .await?; // todo! check user is a project-collaborator - let room = self.get_room(room_id, &tx).await?; return Ok((project.id, room)); } diff --git a/crates/supermaven/src/supermaven_completion_provider.rs b/crates/supermaven/src/supermaven_completion_provider.rs index 8dc06bfac0..978f4baf00 100644 --- a/crates/supermaven/src/supermaven_completion_provider.rs +++ b/crates/supermaven/src/supermaven_completion_provider.rs @@ -74,7 +74,6 @@ impl InlineCompletionProvider for SupermavenCompletionProvider { _direction: Direction, _cx: &mut ModelContext, ) { - // todo!("cycling") } fn accept(&mut self, _cx: &mut ModelContext) {