Dismiss and restore operator shell commands per chat
chat_shell_dismiss hides finished runs from every readback and pushes a dismissal frame to every watcher; chat_shell_restore undoes it within a 30 s window, after which the command, output and error are purged and only a tombstone remains, reported by chat_shell_runs for clients that missed the event.
This commit is contained in:
@@ -76,6 +76,8 @@ type ChatShellRunRequest struct {
|
||||
Rows int `json:"rows,omitempty"`
|
||||
Data string `json:"data,omitempty"`
|
||||
After int64 `json:"after,omitempty"`
|
||||
// RunIDs names the runs of chat_shell_dismiss and chat_shell_restore.
|
||||
RunIDs []string `json:"run_ids,omitempty"`
|
||||
}
|
||||
|
||||
// ChatShellRunRecord is one operator command and what it produced. Output is
|
||||
@@ -116,7 +118,7 @@ type ChatShellRunRecord struct {
|
||||
|
||||
// ChatShellRunEventFrame is one live change to a run. A lifecycle frame sets
|
||||
// Run (without output); an output frame sets Output covering absolute bytes
|
||||
// [Offset, End). A client whose own copy ends before Offset missed output and
|
||||
// [Offset, End); a dismissal frame sets Dismissed (the card goes away). A client whose own copy ends before Offset missed output and
|
||||
// shows that gap rather than joining unrelated text.
|
||||
type ChatShellRunEventFrame struct {
|
||||
SessionID string `json:"session_id"`
|
||||
@@ -125,4 +127,5 @@ type ChatShellRunEventFrame struct {
|
||||
Output string `json:"output,omitempty"`
|
||||
Offset int64 `json:"offset,omitempty"`
|
||||
End int64 `json:"end,omitempty"`
|
||||
Dismissed bool `json:"dismissed,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user