f2520a09b8
A dismissed run keeps its command, status, times and output within the usual history bounds. chat_shell_runs lists dismissed runs apart (chat_shell_dismissed_runs), chat_shell_run_output still reads them, and the purge timer and startup purge are gone. Rows an older server purged are listed with purged set and cannot be restored.
27 lines
1.4 KiB
Go
27 lines
1.4 KiB
Go
package protocol
|
|
|
|
// Dismissing operator shell commands. Dismissal is per chat, for every client:
|
|
// a dismissed run leaves the transcript (chat_shell_runs' ChatShellRuns) and
|
|
// every watcher receives a chat_shell_run_event with Dismissed set. A running
|
|
// command cannot be dismissed. A dismissed run is kept, command, status, times
|
|
// and output included, within the same history and output bounds as any other
|
|
// run: chat_shell_runs lists it in ChatShellDismissedRuns (flagged Dismissed)
|
|
// so clients can show it collapsed, chat_shell_run_output still reads it, and
|
|
// chat_shell_restore puts it back at any time. Runs dismissed by an older
|
|
// server had their command and output purged; they are listed with Purged set
|
|
// and cannot be restored.
|
|
const (
|
|
// ChatShellDismiss dismisses the finished runs named in
|
|
// ChatShellRunRequest.RunIDs; the reply lists those it dismissed in
|
|
// ChatShellDismissed (running, unknown and already dismissed runs are
|
|
// skipped).
|
|
ChatShellDismiss = "chat_shell_dismiss"
|
|
// ChatShellRestore undoes a dismissal; the reply carries the restored runs
|
|
// (with their list output tail) in ChatShellRuns, and every watcher
|
|
// receives their lifecycle frames. There is no time limit; a purged run
|
|
// cannot be restored.
|
|
ChatShellRestore = "chat_shell_restore"
|
|
// ChatShellDismissLimit bounds the run ids of one request.
|
|
ChatShellDismissLimit = 200
|
|
)
|