feat: show owners a live worker status snapshot
While a worker turn is running, the assistant prompt for the working proposal's owner includes a compact status card (elapsed time, last tool activity category with age, per-category counts) built from the ACP session/update stream the runtime already receives. Other users still see only the desensitized busy state, and raw update content never enters the assistant session.
This commit is contained in:
Vendored
+21
@@ -107,6 +107,27 @@ const app = acp.agent({ name: "fake-acp-agent" })
|
||||
}
|
||||
if (text.startsWith("Execute this confirmed proposal")) {
|
||||
const goal = ((text.split("Goal: ")[1] || "").split("\n")[0] || "").trim();
|
||||
if (goal.includes("toolhang")) {
|
||||
await client.notify(acp.methods.client.session.update, {
|
||||
sessionId: params.sessionId,
|
||||
update: { sessionUpdate: "tool_call", toolCallId: "read-1", title: "Read package.json", kind: "read", status: "in_progress" }
|
||||
});
|
||||
await client.notify(acp.methods.client.session.update, {
|
||||
sessionId: params.sessionId,
|
||||
update: { sessionUpdate: "tool_call", toolCallId: "read-2", title: "Read README.md", kind: "read", status: "in_progress" }
|
||||
});
|
||||
await client.notify(acp.methods.client.session.update, {
|
||||
sessionId: params.sessionId,
|
||||
update: { sessionUpdate: "tool_call", toolCallId: "exec-1", title: "bash npm test", kind: "execute", status: "in_progress" }
|
||||
});
|
||||
await new Promise((resolve) => {
|
||||
const done = () => resolve(undefined);
|
||||
pending.set(params.sessionId, done);
|
||||
signal.addEventListener("abort", done, { once: true });
|
||||
});
|
||||
pending.delete(params.sessionId);
|
||||
return { stopReason: "cancelled" };
|
||||
}
|
||||
if (goal.includes("hang")) {
|
||||
await new Promise((resolve) => {
|
||||
const done = () => resolve(undefined);
|
||||
|
||||
Reference in New Issue
Block a user