Stop silently appending a system prompt for edit formatting (#12407)

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:
Nathan Sobo 2024-05-28 20:31:58 -06:00 committed by GitHub
parent 30e498a1c1
commit c03600c55e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2103,16 +2103,10 @@ impl Conversation {
}
fn to_completion_request(&self, cx: &mut ModelContext<Conversation>) -> LanguageModelRequest {
let edits_system_prompt = LanguageModelRequestMessage {
role: Role::System,
content: include_str!("./system_prompts/edits.md").to_string(),
};
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))),
);
let messages = self
.messages(cx)
.filter(|message| matches!(message.status, MessageStatus::Done))
.map(|message| message.to_request_message(self.buffer.read(cx)));
LanguageModelRequest {
model: self.model.clone(),