Files
pipelines/internal/protocol/chat_shell_dismiss.go
T
alan f2520a09b8 Keep dismissed shell commands and restore them without a time limit
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.
2026-11-09 23:29:25 +00:00

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
)