update inline generate prompt to leverage more explicit <|START| and |END|> spans

This commit is contained in:
KCaverly 2023-09-26 17:10:31 -04:00
parent 54c63063e4
commit e8dd412ac1
2 changed files with 15 additions and 15 deletions

View file

@ -544,16 +544,10 @@ impl AssistantPanel {
let multi_buffer = editor.read(cx).buffer().read(cx);
let multi_buffer_snapshot = multi_buffer.snapshot(cx);
let snapshot = if multi_buffer.all_buffers().len() > 1 {
return;
let snapshot = if multi_buffer.is_singleton() {
multi_buffer.as_singleton().unwrap().read(cx).snapshot()
} else {
multi_buffer
.all_buffers()
.iter()
.next()
.unwrap()
.read(cx)
.snapshot()
return;
};
let range = pending_assist.codegen.read(cx).range();
@ -588,6 +582,8 @@ impl AssistantPanel {
codegen_kind,
);
dbg!(&prompt);
let mut messages = Vec::new();
let mut model = settings::get::<AssistantSettings>(cx)
.default_open_ai_model