Display default prompts more elaborately (#16471)

Show them under `User` role instead of a `System` one, and insert them
expanded.

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2024-08-19 18:44:52 +03:00 committed by GitHub
parent bac8e81e73
commit 69aae2037d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 32 additions and 4 deletions

View file

@ -295,6 +295,7 @@ pub enum ContextEvent {
output_range: Range<language::Anchor>,
sections: Vec<SlashCommandOutputSection<language::Anchor>>,
run_commands_in_output: bool,
expand_result: bool,
},
Operation(ContextOperation),
}
@ -774,6 +775,7 @@ impl Context {
cx.emit(ContextEvent::SlashCommandFinished {
output_range,
sections,
expand_result: false,
run_commands_in_output: false,
});
}
@ -1396,6 +1398,7 @@ impl Context {
command_range: Range<language::Anchor>,
output: Task<Result<SlashCommandOutput>>,
ensure_trailing_newline: bool,
expand_result: bool,
cx: &mut ModelContext<Self>,
) {
self.reparse_slash_commands(cx);
@ -1469,6 +1472,7 @@ impl Context {
output_range,
sections,
run_commands_in_output: output.run_commands_in_text,
expand_result,
},
)
});