Expose recorded background task timing and progress metadata

This commit is contained in:
2026-11-06 15:08:34 +00:00
parent c9a4cd0bf6
commit 6421554bfe
16 changed files with 688 additions and 31 deletions
+15 -4
View File
@@ -835,11 +835,22 @@ type ChatAnswerRequest struct {
Answers map[string]any `json:"answers"`
}
// ChatShell carries only backend-recorded facts. Timing is epoch milliseconds;
// absent optional values mean unknown, never the time the list was read.
type ChatShell struct {
ID string `json:"id"`
Status string `json:"status,omitempty"`
Command string `json:"command,omitempty"`
Exit *int `json:"exit,omitempty"`
ID string `json:"id"`
Status string `json:"status,omitempty"`
Command string `json:"command,omitempty"`
Exit *int `json:"exit,omitempty"`
StartedAt int64 `json:"started_at,omitempty"`
UpdatedAt int64 `json:"updated_at,omitempty"`
TaskType string `json:"task_type,omitempty"`
Description string `json:"description,omitempty"`
Progress string `json:"progress,omitempty"`
LastTool string `json:"last_tool,omitempty"`
DurationMS *int64 `json:"duration_ms,omitempty"`
ToolCount *int64 `json:"tool_count,omitempty"`
TokenCount *int64 `json:"token_count,omitempty"`
}
// ChatShellOutputQuery names one selected shell and a bounded absolute-byte