Make slash command output streamable (#19632)
This PR adds support for streaming output from slash commands In this PR we are focused primarily on the interface of the `SlashCommand` trait to support streaming the output. We will follow up later with support for extensions and context servers to take advantage of the streaming nature. Release Notes: - N/A --------- Co-authored-by: David Soria Parra <davidsp@anthropic.com> Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: David <david@anthropic.com> Co-authored-by: Antonio <antonio@zed.dev> Co-authored-by: Max <max@zed.dev> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com> Co-authored-by: Will <will@zed.dev>
This commit is contained in:
parent
f6fbf662b4
commit
b129e18396
14 changed files with 1130 additions and 501 deletions
|
@ -2251,10 +2251,14 @@ message ContextOperation {
|
|||
InsertMessage insert_message = 1;
|
||||
UpdateMessage update_message = 2;
|
||||
UpdateSummary update_summary = 3;
|
||||
SlashCommandFinished slash_command_finished = 4;
|
||||
BufferOperation buffer_operation = 5;
|
||||
SlashCommandStarted slash_command_started = 6;
|
||||
SlashCommandOutputSectionAdded slash_command_output_section_added = 7;
|
||||
SlashCommandCompleted slash_command_completed = 8;
|
||||
}
|
||||
|
||||
reserved 4;
|
||||
|
||||
message InsertMessage {
|
||||
ContextMessage message = 1;
|
||||
repeated VectorClockEntry version = 2;
|
||||
|
@ -2275,13 +2279,26 @@ message ContextOperation {
|
|||
repeated VectorClockEntry version = 4;
|
||||
}
|
||||
|
||||
message SlashCommandFinished {
|
||||
message SlashCommandStarted {
|
||||
LamportTimestamp id = 1;
|
||||
AnchorRange output_range = 2;
|
||||
repeated SlashCommandOutputSection sections = 3;
|
||||
string name = 3;
|
||||
repeated VectorClockEntry version = 4;
|
||||
}
|
||||
|
||||
message SlashCommandOutputSectionAdded {
|
||||
LamportTimestamp timestamp = 1;
|
||||
SlashCommandOutputSection section = 2;
|
||||
repeated VectorClockEntry version = 3;
|
||||
}
|
||||
|
||||
message SlashCommandCompleted {
|
||||
LamportTimestamp id = 1;
|
||||
LamportTimestamp timestamp = 3;
|
||||
optional string error_message = 4;
|
||||
repeated VectorClockEntry version = 5;
|
||||
}
|
||||
|
||||
message BufferOperation {
|
||||
Operation operation = 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue