web: background-tasks bar — running shells, capped list, bounded output (C11)
Add the background-tasks bar to an open conversation: heading
"Background tasks" plus "{n} running", shown only while at least one
shell is running. Rows are capped at 3 (BACKGROUND_TASK_VISIBLE_ROWS)
and the list scrolls beyond; each row is a play glyph, "Running", a
one-line shellCommandSummary and "Details" while selected. Tapping a
row toggles its detail pane ("Command"/"Task identity"/"Status:
running" plus the bounded output: spinner, error + "Retry",
"Output unavailable for this task.", "No output yet.", or the
monospace output and "Output is bounded to 64 KiB." with "Refresh").
Fold shell frames without ever marking the turn running, merge a blank
command from the previous frame, list only running shells (an exited
shell is never a task) and drop/relearn shells on reconnect via
chat_shells. Refresh always rereads the bounded 64 KiB page from cursor
0. Update PARITY.md C11 with its captures and the replayed-vs-real note.
Checks: node --check on every touched file; cd web && node --test test/
(456 pass).
This commit is contained in:
@@ -64,6 +64,12 @@ export const Protocol = Object.freeze({
|
||||
CHAT_PROMPT: "chat_prompt",
|
||||
CHAT_INTERRUPT: "chat_interrupt",
|
||||
CHAT_CREATE: "chat_create",
|
||||
// The background shells a chat session owns (C11). `chat_shells` lists the
|
||||
// session's currently verified shells (body: `chat_query`); `chat_shell_output`
|
||||
// reads a bounded, lazy output page from one of them (body:
|
||||
// `chat_shell_output_query`). Mirrors internal/protocol/chat.go and Message.kt.
|
||||
CHAT_SHELLS: "chat_shells",
|
||||
CHAT_SHELL_OUTPUT: "chat_shell_output",
|
||||
|
||||
SUCCESS_END: "#success",
|
||||
FAILURE_END: "#failure",
|
||||
@@ -92,6 +98,13 @@ export const ChatKeys = Object.freeze({
|
||||
PROMPT: "chat_prompt",
|
||||
CREATE: "chat_create",
|
||||
QUEUED: "chat_queued",
|
||||
// The shell commands (C11, internal/protocol/message.go). `chat_shells` carries
|
||||
// its body in `chat_query` (like the other session-scoped commands) and replies
|
||||
// in `chat_shells`; `chat_shell_output` carries `chat_shell_output_query`
|
||||
// ({session_id,shell_id,cursor,limit}) and replies in `chat_shell_output`.
|
||||
SHELLS: "chat_shells",
|
||||
SHELL_OUTPUT: "chat_shell_output",
|
||||
SHELL_OUTPUT_QUERY: "chat_shell_output_query",
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user