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.

agent: Add icon for Zed's max mode (#29610)

Danilo Leala376038803a8
diff --git a/assets/icons/zed_max_mode.svg b/assets/icons/zed_max_mode.svg
new file mode 100644
index 00000000000..969785a83ff
--- /dev/null
+++ b/assets/icons/zed_max_mode.svg
@@ -0,0 +1,14 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_2489_484)">
+<path d="M11 8.9V11C8.51716 11 7.48284 11 5 11V10.4L11 5.6V5H5V7.1" stroke="black" stroke-width="1.5"/>
+<path d="M1.5 5.5V1.5H5" stroke="black" stroke-opacity="0.5" stroke-width="1.5"/>
+<path d="M14.5 5.5V1.5H11" stroke="black" stroke-opacity="0.5" stroke-width="1.5"/>
+<path d="M1.5 10.5V14.5H5" stroke="black" stroke-opacity="0.5" stroke-width="1.5"/>
+<path d="M14.5 10.5V14.5H11" stroke="black" stroke-opacity="0.5" stroke-width="1.5"/>
+</g>
+<defs>
+<clipPath id="clip0_2489_484">
+<rect width="16" height="16" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/crates/agent/src/message_editor.rs b/crates/agent/src/message_editor.rs
index f2c2685a5a3..6ab4e899bc3 100644
--- a/crates/agent/src/message_editor.rs
+++ b/crates/agent/src/message_editor.rs
@@ -413,7 +413,7 @@ impl MessageEditor {
let active_completion_mode = thread.completion_mode();
Some(
- IconButton::new("max-mode", IconName::SquarePlus)
+ IconButton::new("max-mode", IconName::ZedMaxMode)
.icon_size(IconSize::Small)
.toggle_state(active_completion_mode == Some(CompletionMode::Max))
.on_click(cx.listener(move |this, _event, _window, cx| {
@@ -424,7 +424,7 @@ impl MessageEditor {
});
});
}))
- .tooltip(Tooltip::text("Max Mode"))
+ .tooltip(Tooltip::text("Toggle Max Mode"))
.into_any_element(),
)
}
diff --git a/crates/icons/src/icons.rs b/crates/icons/src/icons.rs
index fc19181c2bb..9a19109444c 100644
--- a/crates/icons/src/icons.rs
+++ b/crates/icons/src/icons.rs
@@ -247,6 +247,7 @@ pub enum IconName {
XCircle,
ZedAssistant,
ZedAssistantFilled,
+ ZedMaxMode,
ZedPredict,
ZedPredictDisabled,
ZedPredictDown,