chore: single-source working state from agent events

This commit is contained in:
Peter Steinberger
2025-12-09 01:17:01 +01:00
parent 5b5a79b90b
commit f965e1c3ff
5 changed files with 28 additions and 73 deletions

View File

@@ -300,6 +300,7 @@ export async function agentCommand(
stream: "job",
data: {
state: "started",
startedAt,
to: opts.to,
sessionId,
isNewSession,
@@ -327,6 +328,8 @@ export async function agentCommand(
stream: "job",
data: {
state: "done",
startedAt,
endedAt: Date.now(),
to: opts.to,
sessionId,
durationMs: Date.now() - startedAt,
@@ -338,6 +341,8 @@ export async function agentCommand(
stream: "job",
data: {
state: "error",
startedAt,
endedAt: Date.now(),
to: opts.to,
sessionId,
durationMs: Date.now() - startedAt,