Fix more failure cases of assistant edits (#19653)

* Make `description` optional (since we describe it as optional in the
prompt, and we're currently not showing it)
* Fix fuzzy location bug that neglected the cost of deleting prefixes of
the query.
* Make auto-indent work for single-line edits. Previously, auto-indent
would not occur when overwriting a single line (without inserting or
deleting a newline)

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld 2024-10-25 14:30:34 -07:00 committed by GitHub
parent c19c89e6df
commit 4325819075
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 303 additions and 173 deletions

View file

@ -288,15 +288,6 @@ fn load_config(name: &str) -> LanguageConfig {
.with_context(|| format!("failed to load config.toml for language {name:?}"))
.unwrap();
#[cfg(not(feature = "load-grammars"))]
{
config = LanguageConfig {
name: config.name,
matcher: config.matcher,
..Default::default()
}
}
config
}