mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 14:17:02 +00:00
Stop silently appending a system prompt for edit formatting (#12407)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
We should reintroduce this as part of the prompt library. Release Notes: - Removed an over-eager system prompt from the assistant that was causing misbehavior. Going forward, our intent is to always let you observe and edit text before we send it. --------- Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
parent
30e498a1c1
commit
c03600c55e
1 changed files with 4 additions and 10 deletions
|
@ -2103,16 +2103,10 @@ impl Conversation {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn to_completion_request(&self, cx: &mut ModelContext<Conversation>) -> LanguageModelRequest {
|
fn to_completion_request(&self, cx: &mut ModelContext<Conversation>) -> LanguageModelRequest {
|
||||||
let edits_system_prompt = LanguageModelRequestMessage {
|
let messages = self
|
||||||
role: Role::System,
|
.messages(cx)
|
||||||
content: include_str!("./system_prompts/edits.md").to_string(),
|
.filter(|message| matches!(message.status, MessageStatus::Done))
|
||||||
};
|
.map(|message| message.to_request_message(self.buffer.read(cx)));
|
||||||
|
|
||||||
let messages = Some(edits_system_prompt).into_iter().chain(
|
|
||||||
self.messages(cx)
|
|
||||||
.filter(|message| matches!(message.status, MessageStatus::Done))
|
|
||||||
.map(|message| message.to_request_message(self.buffer.read(cx))),
|
|
||||||
);
|
|
||||||
|
|
||||||
LanguageModelRequest {
|
LanguageModelRequest {
|
||||||
model: self.model.clone(),
|
model: self.model.clone(),
|
||||||
|
|
Loading…
Reference in a new issue