Prevent deploying the inline assistant when selection spans multiple excerpts

This commit is contained in:
Antonio Scandurra 2023-10-02 15:21:58 +02:00
parent df7ac9b815
commit f52200a340
2 changed files with 24 additions and 20 deletions

View file

@ -119,7 +119,7 @@ pub fn generate_content_prompt(
user_prompt: String,
language_name: Option<&str>,
buffer: &BufferSnapshot,
range: Range<language::Anchor>,
range: Range<impl ToOffset>,
kind: CodegenKind,
) -> String {
let mut prompt = String::new();
@ -131,7 +131,7 @@ pub fn generate_content_prompt(
writeln!(prompt, "You're an expert engineer.\n").unwrap();
}
let outline = summarize(buffer, range.clone());
let outline = summarize(buffer, range);
writeln!(
prompt,
"The file you are currently working on has the following outline:"