Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Clean up some stray todos (#11380)

Kyle Kelleyf576bd3aaf44
diff --git a/crates/assistant2/src/assistant2.rs b/crates/assistant2/src/assistant2.rs
index dc777e42b0e..66c4251ab04 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 b5e73d61774..790158ec490 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 34033593a77..b9e917bbbc7 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 8dc06bfac01..978f4baf00f 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<Self>,
) {
- // todo!("cycling")
}
fn accept(&mut self, _cx: &mut ModelContext<Self>) {