teapot-coding-agent 0.34.1 → 0.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/agent.js +28 -3
- package/package.json +1 -1
- package/public/assets/index-B7JtKmn4.js +30 -0
- package/public/assets/index-B7JtKmn4.js.map +1 -0
- package/public/assets/index-CvhIT1Kw.css +1 -0
- package/public/assets/{shiki-8HjyUj3y.js → shiki-BysF_oOw.js} +2 -2
- package/public/assets/{shiki-8HjyUj3y.js.map → shiki-BysF_oOw.js.map} +1 -1
- package/public/index.html +2 -2
- package/public/assets/index-BcwNDq29.css +0 -1
- package/public/assets/index-Dlx6rD0p.js +0 -30
- package/public/assets/index-Dlx6rD0p.js.map +0 -1
package/dist/agent/agent.js
CHANGED
|
@@ -977,8 +977,20 @@ export class Agent {
|
|
|
977
977
|
return false;
|
|
978
978
|
this.parkedByTool = true;
|
|
979
979
|
this.preParkedStatus = { status: this.status, reason: this.statusReason };
|
|
980
|
-
|
|
981
|
-
|
|
980
|
+
/**
|
|
981
|
+
* `waiting`, NOT `idle`.
|
|
982
|
+
*
|
|
983
|
+
* A parked loop is alive and will resume by itself, so showing "idle" contradicted the
|
|
984
|
+
* stop button beside it: the badge read idle while the header offered ■ stop, and the
|
|
985
|
+
* operator reasonably concluded the UI was broken. `live` was already true for exactly this
|
|
986
|
+
* reason (a parked tool counts as work in flight), so only the DISPLAYED status was wrong.
|
|
987
|
+
*
|
|
988
|
+
* The two park reasons are named separately because they mean different things to the
|
|
989
|
+
* operator: a `wait_children` park resumes when a sub-agent settles, and a background-shell
|
|
990
|
+
* park resumes when a `wait_children`/round-end wakes it.
|
|
991
|
+
*/
|
|
992
|
+
this.status = "waiting";
|
|
993
|
+
this.statusReason = `${reason} — send a message to take over; resumes by itself`;
|
|
982
994
|
bus.emit("update", { kind: "agent-update", agentId: this.opts.id });
|
|
983
995
|
return true;
|
|
984
996
|
}
|
|
@@ -1696,7 +1708,20 @@ export class Agent {
|
|
|
1696
1708
|
snapshot() {
|
|
1697
1709
|
return {
|
|
1698
1710
|
id: this.opts.id,
|
|
1699
|
-
|
|
1711
|
+
/**
|
|
1712
|
+
* The DISPLAYED status, which must never contradict `live`.
|
|
1713
|
+
*
|
|
1714
|
+
* MEASURED report: "バックグラウンドbash待ちで finish_reason: stop でAIが止まると表示は
|
|
1715
|
+
* idle なのにコントロールは stop ボタンが表示されてて微妙" — and the same for
|
|
1716
|
+
* `wait_children`. `live` was already true for both (a parked tool and a running
|
|
1717
|
+
* background shell are work in flight, and stop() ends them), so only the badge was
|
|
1718
|
+
* wrong: it said idle while the header offered ■ stop.
|
|
1719
|
+
*
|
|
1720
|
+
* Rather than patch each site, the contradiction is fixed HERE: if there is work in
|
|
1721
|
+
* flight that stop would stop, the status says "waiting", never "idle". Callers that
|
|
1722
|
+
* need the raw state for logic use `live`, which is unchanged.
|
|
1723
|
+
*/
|
|
1724
|
+
status: this.status === "idle" && this.isLive() ? "waiting" : this.status,
|
|
1700
1725
|
statusReason: this.statusReason,
|
|
1701
1726
|
/**
|
|
1702
1727
|
* Is there work in flight that `stop` would actually stop?
|