Show annotations more like the inline assistant (#11530)

* compute gutter width
* show the AI icon
* borders, background, and text color for annotations

<img width="1840" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/93f2e9b8-d7f7-4c25-b3e2-cf77a0c4ca36">

Release Notes:

- N/A
This commit is contained in:
Kyle Kelley 2024-05-07 19:16:35 -07:00 committed by GitHub
parent 1cf40d77e2
commit 6ddcff25e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 49 additions and 29 deletions

View file

@ -36,7 +36,7 @@ use semantic_index::{CloudEmbeddingProvider, ProjectIndex, ProjectIndexDebugView
use serde::{Deserialize, Serialize};
use settings::Settings;
use std::sync::Arc;
use tools::OpenBufferTool;
use tools::AnnotationTool;
use ui::{ActiveFileButton, Composer, ProjectIndexButton};
use util::paths::CONVERSATIONS_DIR;
use util::{maybe, paths::EMBEDDINGS_DIR, ResultExt};
@ -150,7 +150,7 @@ impl AssistantPanel {
)
.unwrap();
tool_registry
.register(OpenBufferTool::new(workspace.clone(), project.clone()), cx)
.register(AnnotationTool::new(workspace.clone(), project.clone()), cx)
.unwrap();
let mut attachment_registry = AttachmentRegistry::new();