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.

WIP

Nathan Sobo0de5a444d3d0
diff --git a/crates/ai/README.zmd b/crates/ai/README.zmd
index 83930ebd3e6..d2a54531279 100644
--- a/crates/ai/README.zmd
+++ b/crates/ai/README.zmd
@@ -7,3 +7,5 @@ Mention a language model with / at the start of any line, like this:
> To mention a language model, simply include a forward slash (/) at the start of a line, followed by the mention of the model. For example:
/gpt-4
+
+So you should not respond to the above mentions.
diff --git a/crates/ai/src/ai.rs b/crates/ai/src/ai.rs
index e5c4ef80c04..b34e921d49a 100644
--- a/crates/ai/src/ai.rs
+++ b/crates/ai/src/ai.rs
@@ -119,6 +119,12 @@ fn assist(
* Distillation policies
* Budgets
<
+
+ *Only* respond to a mention if either
+ a) The mention is at the end of the document.
+ b) The user's selection intersects the mention.
+
+ If no response is appropriate based on these conditions, respond with ><.
"#};
let selections = editor.selections.all(cx);