@songsid/agend 2.3.5-beta.2 → 2.3.5-beta.4

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.
Files changed (154) hide show
  1. package/dist/agent-cli-instructions.md +2 -2
  2. package/dist/auth-api.d.ts +2 -0
  3. package/dist/auth-api.js +5 -1
  4. package/dist/auth-api.js.map +1 -1
  5. package/dist/backend/claude-code.d.ts +2 -0
  6. package/dist/backend/claude-code.js +16 -3
  7. package/dist/backend/claude-code.js.map +1 -1
  8. package/dist/backend/cli-env-probe.js +6 -2
  9. package/dist/backend/cli-env-probe.js.map +1 -1
  10. package/dist/backend/codex.d.ts +5 -3
  11. package/dist/backend/codex.js +31 -13
  12. package/dist/backend/codex.js.map +1 -1
  13. package/dist/backend/kiro.js +1 -1
  14. package/dist/backend/kiro.js.map +1 -1
  15. package/dist/backend/types.d.ts +5 -1
  16. package/dist/backend/types.js.map +1 -1
  17. package/dist/bundled-tmux-guard.d.ts +4 -0
  18. package/dist/bundled-tmux-guard.js +7 -0
  19. package/dist/bundled-tmux-guard.js.map +1 -1
  20. package/dist/cache-service.d.ts +6 -0
  21. package/dist/cache-service.js +105 -0
  22. package/dist/cache-service.js.map +1 -1
  23. package/dist/channel/mcp-tools.js +2 -2
  24. package/dist/channel/mcp-tools.js.map +1 -1
  25. package/dist/cli.js +28 -1
  26. package/dist/cli.js.map +1 -1
  27. package/dist/daemon.d.ts +3 -0
  28. package/dist/daemon.js +17 -2
  29. package/dist/daemon.js.map +1 -1
  30. package/dist/fleet-manager.d.ts +71 -0
  31. package/dist/fleet-manager.js +393 -92
  32. package/dist/fleet-manager.js.map +1 -1
  33. package/dist/fleet-process-handlers.d.ts +1 -1
  34. package/dist/fleet-process-handlers.js +3 -2
  35. package/dist/fleet-process-handlers.js.map +1 -1
  36. package/dist/general-knowledge/skills/concepts/SKILL.md +11 -12
  37. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +9 -1
  38. package/dist/general-knowledge/skills/fleet-config/SKILL.md +12 -0
  39. package/dist/general-knowledge/skills/fleet-health/SKILL.md +1 -1
  40. package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +4 -0
  41. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +16 -11
  42. package/dist/instance-lifecycle.d.ts +1 -1
  43. package/dist/instance-lifecycle.js +16 -1
  44. package/dist/instance-lifecycle.js.map +1 -1
  45. package/dist/instructions.js +29 -6
  46. package/dist/instructions.js.map +1 -1
  47. package/dist/kiro-history-scan.d.ts +26 -0
  48. package/dist/kiro-history-scan.js +141 -0
  49. package/dist/kiro-history-scan.js.map +1 -0
  50. package/dist/kiro-history-worker.d.ts +1 -0
  51. package/dist/kiro-history-worker.js +9 -0
  52. package/dist/kiro-history-worker.js.map +1 -0
  53. package/dist/kiro-history.d.ts +20 -0
  54. package/dist/kiro-history.js +96 -0
  55. package/dist/kiro-history.js.map +1 -0
  56. package/dist/kiro-usage-run.d.ts +2 -0
  57. package/dist/kiro-usage-run.js +4 -1
  58. package/dist/kiro-usage-run.js.map +1 -1
  59. package/dist/locale.js +69 -67
  60. package/dist/locale.js.map +1 -1
  61. package/dist/login-flows.d.ts +4 -0
  62. package/dist/login-flows.js +8 -4
  63. package/dist/login-flows.js.map +1 -1
  64. package/dist/office-levels.d.ts +4 -3
  65. package/dist/office-levels.js +3 -3
  66. package/dist/office-levels.js.map +1 -1
  67. package/dist/outbound-handlers.js +32 -12
  68. package/dist/outbound-handlers.js.map +1 -1
  69. package/dist/outbound-schemas.d.ts +14 -0
  70. package/dist/outbound-schemas.js +4 -0
  71. package/dist/outbound-schemas.js.map +1 -1
  72. package/dist/setup-i18n.js +4 -4
  73. package/dist/setup-i18n.js.map +1 -1
  74. package/dist/subagent-records.d.ts +45 -0
  75. package/dist/subagent-records.js +214 -0
  76. package/dist/subagent-records.js.map +1 -0
  77. package/dist/subagent-service.d.ts +27 -0
  78. package/dist/subagent-service.js +199 -0
  79. package/dist/subagent-service.js.map +1 -0
  80. package/dist/tool-permissions.d.ts +2 -3
  81. package/dist/tool-permissions.js +3 -3
  82. package/dist/tool-permissions.js.map +1 -1
  83. package/dist/ui/backend-signin.js +62 -62
  84. package/dist/ui/chat-commands.js +7 -0
  85. package/dist/ui/chat-msg-actions.js +50 -4
  86. package/dist/ui/chat-quote.js +256 -0
  87. package/dist/ui/chat-render.js +17 -5
  88. package/dist/ui/chat-store.js +9 -4
  89. package/dist/ui/chat-strings.js +18 -18
  90. package/dist/ui/fleet-cache.js +3 -3
  91. package/dist/ui/fleet-canvas.js +2 -2
  92. package/dist/ui/fleet-office-editor.js +1 -1
  93. package/dist/ui/fleet-office.js +1 -1
  94. package/dist/ui/fleet-org.js +2 -2
  95. package/dist/ui/fleet-task-card.js +1 -1
  96. package/dist/ui/fleet-task-common.js +7 -7
  97. package/dist/ui/model-picker.js +64 -0
  98. package/dist/ui/panel-chat.js +81 -17
  99. package/dist/ui/panel-fleet.js +8 -8
  100. package/dist/ui/panel-needs.js +3 -3
  101. package/dist/ui/panel-settings.js +16 -6
  102. package/dist/ui/settings-catalog.js +19 -4
  103. package/dist/ui/settings-dialogs.js +25 -8
  104. package/dist/ui/settings-guests.js +1 -1
  105. package/dist/ui/settings-registry.js +3 -1
  106. package/dist/ui/settings-strings.js +30 -26
  107. package/dist/ui/settings-update.js +69 -0
  108. package/dist/ui/shared/app-i18n.js +8 -4
  109. package/dist/ui/shared/app-shell.js +15 -2
  110. package/dist/ui/shared/app-update.js +215 -0
  111. package/dist/ui/shared/app.css +58 -6
  112. package/dist/ui/shared/instance-nav.js +1 -1
  113. package/dist/ui/shared/model-picker.css +21 -0
  114. package/dist/ui/shared/setup-host-text.js +4 -4
  115. package/dist/ui/shared/signin.js +32 -16
  116. package/dist/ui/shared/subagent-row.css +15 -0
  117. package/dist/ui/shared/usage-dialog.js +28 -16
  118. package/dist/ui/shared/view-strings.js +18 -18
  119. package/dist/ui/structured-signin.js +26 -26
  120. package/dist/ui/subagent-row.js +72 -0
  121. package/dist/ui/web-terminal/terminal.js +9 -9
  122. package/dist/update-launch.js +4 -1
  123. package/dist/update-launch.js.map +1 -1
  124. package/dist/update-marker.d.ts +2 -2
  125. package/dist/update-marker.js +4 -3
  126. package/dist/update-marker.js.map +1 -1
  127. package/dist/update-npm-env.d.ts +70 -0
  128. package/dist/update-npm-env.js +128 -0
  129. package/dist/update-npm-env.js.map +1 -0
  130. package/dist/usage/format-rich.js +1 -1
  131. package/dist/usage/format-rich.js.map +1 -1
  132. package/dist/usage/providers.js +2 -2
  133. package/dist/usage/providers.js.map +1 -1
  134. package/dist/usage/usage-api.d.ts +8 -2
  135. package/dist/usage/usage-api.js +12 -5
  136. package/dist/usage/usage-api.js.map +1 -1
  137. package/dist/usage-rollup.d.ts +3 -0
  138. package/dist/usage-rollup.js +2 -0
  139. package/dist/usage-rollup.js.map +1 -1
  140. package/dist/web-api.d.ts +14 -0
  141. package/dist/web-api.js +216 -2
  142. package/dist/web-api.js.map +1 -1
  143. package/dist/web-auth.js +2 -1
  144. package/dist/web-auth.js.map +1 -1
  145. package/dist/web-channel-echo.js +3 -1
  146. package/dist/web-channel-echo.js.map +1 -1
  147. package/dist/web-commands.d.ts +8 -0
  148. package/dist/web-commands.js +6 -0
  149. package/dist/web-commands.js.map +1 -1
  150. package/dist/web-update.d.ts +77 -0
  151. package/dist/web-update.js +104 -0
  152. package/dist/web-update.js.map +1 -0
  153. package/launcher/agend-install.cjs +16 -3
  154. package/package.json +2 -2
@@ -0,0 +1,256 @@
1
+ // M-2789 (the user, 11-09): answer a long, multi-part message passage by passage. Select text in ONE message of the thread
2
+ // → a small 「引用」 pill → the passage goes into the composer as a Markdown quote ("> …") at the caret, on its own lines,
3
+ // the caret left on the next line for the answer. Repeatable: quote, answer, quote the next passage, answer…
4
+ //
5
+ // - Desktop: the pill is anchored to where the selection ends (a pointer at the exact spot), above that line — or below
6
+ // it when that covers less of the neighbouring lines' text (the passage itself never counts). After a quote the
7
+ // composer takes the focus.
8
+ // - Phone (a coarse pointer): the pill 「引用選取的文字」 docks above the composer's whole box inside the 16-px gutter — clear
9
+ // of the system's own copy toolbar (above a selection) and of the finger — or at the top of the thread when the
10
+ // passage sits there. The keyboard does NOT open after a quote (the user's choice): more passages can be selected;
11
+ // the composer's own scroller shows the caret and the newest quote.
12
+ // - No pill for a selection across messages, outside the thread, or on a page that can't send; no keyboard shortcut
13
+ // (the user's choice). The whole-message Reply (#2272) is unchanged, and so is the browser's menu on selected text.
14
+ // - What is sent is the composer's text as typed: the agent reads the "> " lines as written; the web renders them as
15
+ // blockquotes (chat-render.js); Discord's mirror shows them as quotes, Telegram's as the same plain lines.
16
+ //
17
+ // Its own words and drawing (a page that loaded an older chat-strings.js or ui-icons.js still draws it), CSSOM only
18
+ // (no style attribute: #1300), the shared popover look (.msg-menu) with the shared border and shadow tokens.
19
+ import { register, t } from "/assets/app-i18n.js";
20
+
21
+ register("chatQuote", {
22
+ en: { quote: "Quote", quotePhone: "Quote selection", label: "Quote the selected text in your message" },
23
+ "zh-TW": { quote: "引用", quotePhone: "引用選取的文字", label: "把選取的文字引用到你的訊息裡" },
24
+ });
25
+ const tq = (k) => t(`chatQuote.${k}`);
26
+
27
+ /**
28
+ * Where the person's caret was in the composer when it last lost the focus — what a quote goes in at. A field's own
29
+ * selectionStart can't be trusted after the page's selection moved into the thread (Chrome resets it), so it is kept
30
+ * here, with the text it belongs to (a caret for another text is no caret).
31
+ */
32
+ const remembered = new WeakMap();
33
+ export function composerCaret(field, value) {
34
+ if (!field) return value.length;
35
+ const r = remembered.get(field);
36
+ if (r && r.value === value) return r.caret;
37
+ const doc = field.ownerDocument;
38
+ if (doc && doc.activeElement === field && field.value === value) return field.selectionStart ?? value.length;
39
+ return value.length;
40
+ }
41
+
42
+ /** The passage as Markdown quote lines: each line "> line" (an empty one "> " keeps the quote one block). */
43
+ export function quoteBlock(text) {
44
+ const lines = String(text ?? "").replace(/\r\n?/g, "\n").replace(/ /g, " ").split("\n").map((l) => l.replace(/\s+$/, ""));
45
+ while (lines.length && !lines[0].trim()) lines.shift();
46
+ while (lines.length && !lines[lines.length - 1].trim()) lines.pop();
47
+ // A run of empty lines inside the passage becomes one quoted empty line.
48
+ const out = [];
49
+ for (const l of lines) { if (!l.trim() && out.length && out[out.length - 1] === ">") continue; out.push(l.trim() ? `> ${l}` : ">"); }
50
+ return out.join("\n");
51
+ }
52
+
53
+ /**
54
+ * Put the passage into `value` at `caret`, on its own lines: a blank line before it when text precedes on the line or
55
+ * just above, the caret on the line after it (for the answer), and a line break before any text that follows.
56
+ * Returns { value, caret }, or null for a passage with nothing to quote.
57
+ */
58
+ export function insertQuote(value, caret, text) {
59
+ const block = quoteBlock(text);
60
+ if (!block) return null;
61
+ const v = String(value ?? "");
62
+ const at = Math.max(0, Math.min(Number.isInteger(caret) ? caret : v.length, v.length));
63
+ const before = v.slice(0, at), after = v.slice(at);
64
+ const lead = !before ? "" : before.endsWith("\n\n") ? "" : before.endsWith("\n") ? "\n" : "\n\n";
65
+ const head = before + lead + block + "\n";
66
+ // Text after the caret starts its own line below the answer's (its leading spaces dropped with the break).
67
+ const tail = after && !after.startsWith("\n") ? "\n" + after.replace(/^[ \t]+/, "") : after;
68
+ return { value: head + tail, caret: head.length };
69
+ }
70
+
71
+ /** The selected passage when it lies inside one message's text of `list`, else null. { text, el, rects }. */
72
+ export function selectedPassage(list, sel) {
73
+ if (!sel || sel.isCollapsed || !sel.rangeCount) return null;
74
+ const text = String(sel.toString() || "");
75
+ if (!text.trim()) return null;
76
+ const msg = (n) => { const e = n && (n.nodeType === 1 ? n : n.parentElement); return e && e.closest ? e.closest(".msg[data-key]") : null; };
77
+ // The message's own words, not its header (sender, time) or its action strip.
78
+ const inBody = (n) => { const e = n && (n.nodeType === 1 ? n : n.parentElement); return !!(e && e.closest && e.closest(".body, .md") && !e.closest(".meta, .msg-actions")); };
79
+ // Every range of the selection (a browser may keep several: #3555 review P3) in the same message's words — what is
80
+ // quoted is the whole selection's text.
81
+ const range = sel.getRangeAt(0), a = msg(range.startContainer);
82
+ if (!a || !list.contains(a)) return null;
83
+ for (let i = 0; i < sel.rangeCount; i++) {
84
+ const rg = sel.getRangeAt(i);
85
+ if (msg(rg.startContainer) !== a || msg(rg.endContainer) !== a || !inBody(rg.startContainer) || !inBody(rg.endContainer)) return null;
86
+ }
87
+ return { text, el: a, range };
88
+ }
89
+
90
+ /**
91
+ * Where the composer's caret sits, in px from the top of its text (a mirror of the field's text box up to the caret).
92
+ * Used to show the caret without focusing the field (a phone: the keyboard stays down).
93
+ */
94
+ export function caretTop(field, pos) {
95
+ const doc = field.ownerDocument, win = doc.defaultView;
96
+ if (!win || !win.getComputedStyle) return 0;
97
+ const cs = win.getComputedStyle(field);
98
+ const m = doc.createElement("div");
99
+ for (const p of ["box-sizing", "width", "padding-top", "padding-right", "padding-bottom", "padding-left", "border-top-width", "border-right-width",
100
+ "border-bottom-width", "border-left-width", "font-family", "font-size", "font-weight", "font-style", "line-height", "letter-spacing", "word-spacing", "tab-size"]) {
101
+ m.style.setProperty(p, cs.getPropertyValue(p));
102
+ }
103
+ for (const [k, v] of [["position", "absolute"], ["visibility", "hidden"], ["top", "0"], ["left", "-9999px"], ["white-space", "pre-wrap"], ["overflow-wrap", "break-word"], ["height", "auto"]]) m.style.setProperty(k, v);
104
+ m.textContent = field.value.slice(0, pos);
105
+ const mark = doc.createElement("span"); mark.textContent = "​"; m.append(mark);
106
+ doc.body.append(m);
107
+ const y = mark.offsetTop, h = mark.offsetHeight;
108
+ m.remove();
109
+ return { y, h };
110
+ }
111
+
112
+ /** Scroll the field's own scroller so the caret (and the lines just above it: the newest quote) are in view. */
113
+ export function showCaret(field, pos) {
114
+ // At the end (the usual case: the newest quote is the last thing in the box): the bottom.
115
+ if (pos >= field.value.length) { field.scrollTop = field.scrollHeight; return; }
116
+ const c = caretTop(field, pos);
117
+ if (!c || typeof c !== "object") { field.scrollTop = field.scrollHeight; return; }
118
+ const view = field.clientHeight;
119
+ if (c.y + c.h > field.scrollTop + view) field.scrollTop = Math.max(0, c.y + c.h - view + 4);
120
+ else if (c.y < field.scrollTop) field.scrollTop = Math.max(0, c.y - 4);
121
+ }
122
+
123
+ // The quote mark: two marks on the shared 24-px grid, 2-px stroke, currentColor (as ui-icons.js draws).
124
+ const ICON = "M4 11h5v6H4v-6zm0 0c0-3 1.5-5 4-6M14 11h5v6h-5v-6zm0 0c0-3 1.5-5 4-6";
125
+ function iconEl(doc) {
126
+ const NS = "http://www.w3.org/2000/svg";
127
+ const svg = doc.createElementNS(NS, "svg");
128
+ for (const [k, v] of [["class", "icon"], ["width", "16"], ["height", "16"], ["viewBox", "0 0 24 24"], ["fill", "none"], ["stroke", "currentColor"], ["stroke-width", "2"],
129
+ ["stroke-linecap", "round"], ["stroke-linejoin", "round"], ["aria-hidden", "true"], ["focusable", "false"]]) svg.setAttribute(k, v);
130
+ const p = doc.createElementNS(NS, "path"); p.setAttribute("d", ICON); svg.append(p);
131
+ return svg;
132
+ }
133
+
134
+ const overlap = (a, z) => Math.max(0, Math.min(a.right, z.right) - Math.max(a.left, z.left)) * Math.max(0, Math.min(a.bottom, z.bottom) - Math.max(a.top, z.top));
135
+
136
+ /**
137
+ * Install the pill on `list` (the thread element). `deps`:
138
+ * field() → the composer's text field (marked data-touched once it has had the focus: its caret is the person's);
139
+ * canQuote() → boolean (a page that can send); insert(text) (the composer's side: see panel-chat.js);
140
+ * phone() → boolean (a coarse pointer); composerBox() → the composer's whole box (Element) or null; threadBox() → Element.
141
+ * Returns a function that removes everything.
142
+ */
143
+ export function installQuoteSelection(list, deps) {
144
+ const doc = list.ownerDocument, win = doc.defaultView;
145
+ let pop = null, timer = null, down = false, current = null, drawnFor = "";
146
+
147
+ function hide() {
148
+ current = null; drawnFor = "";
149
+ if (!pop) return;
150
+ pop.remove(); pop = null;
151
+ }
152
+ function place(passage) {
153
+ const phone = !!deps.phone?.();
154
+ if (!pop) {
155
+ pop = doc.createElement("div");
156
+ pop.className = "msg-menu quote-pop";
157
+ pop.setAttribute("role", "toolbar"); pop.setAttribute("data-trust", "menu"); pop.setAttribute("aria-label", tq("label"));
158
+ const b = doc.createElement("button");
159
+ b.type = "button"; b.className = "menu-item quote-pick";
160
+ b.append(iconEl(doc));
161
+ const span = doc.createElement("span"); b.append(span);
162
+ // A press on the pill must not collapse the selection it is about (mousedown's default does, pointerdown's
163
+ // preventDefault alone doesn't); the passage is the one the pill was drawn for, whatever the selection did since.
164
+ b.addEventListener("pointerdown", (e) => { e.preventDefault(); });
165
+ b.addEventListener("mousedown", (e) => { e.preventDefault(); });
166
+ b.addEventListener("click", (e) => { e.preventDefault(); const text = drawnFor; hide(); if (text) { deps.insert(text); doc.getSelection?.()?.removeAllRanges?.(); } });
167
+ pop.append(b);
168
+ doc.body.append(pop);
169
+ }
170
+ pop.classList.toggle("is-phone", phone);
171
+ const label = pop.querySelector(".quote-pick span"); label.textContent = tq(phone ? "quotePhone" : "quote");
172
+ pop.querySelector(".quote-tip")?.remove();
173
+ const pr = pop.getBoundingClientRect();
174
+ const vw = win?.innerWidth ?? 1024;
175
+ const rects = [...(passage.range.getClientRects?.() ?? [])].filter((x) => x.width > 0);
176
+ if (!rects.length) { hide(); return; }
177
+ const last = rects[rects.length - 1];
178
+ let left, top, tip = null;
179
+ if (!phone) {
180
+ // The other lines of the message (the passage's own never count as covered).
181
+ const lines = [];
182
+ if (typeof doc.createTreeWalker === "function" && typeof doc.createRange === "function") {
183
+ const w = doc.createTreeWalker(passage.el, 4 /* text */);
184
+ while (w.nextNode()) {
185
+ const rg = doc.createRange(); rg.selectNodeContents(w.currentNode);
186
+ for (const z of rg.getClientRects()) if (z.width > 0 && !rects.some((q) => overlap(q, z) > 0)) lines.push(z);
187
+ }
188
+ }
189
+ left = Math.max(8, Math.min(last.right - pr.width / 2, vw - pr.width - 8));
190
+ const above = { left, right: left + pr.width, top: last.top - pr.height - 10, bottom: last.top - 10 };
191
+ const below = { left, right: left + pr.width, top: last.bottom + 10, bottom: last.bottom + 10 + pr.height };
192
+ const cover = (a) => lines.reduce((n, z) => n + overlap(a, z), 0);
193
+ const under = cover(below) < cover(above) || above.top < 4;
194
+ top = under ? below.top : above.top;
195
+ tip = { side: under ? "up" : "down", x: Math.max(10, Math.min(last.right - left - 5, pr.width - 20)) };
196
+ } else {
197
+ const box = deps.composerBox?.()?.getBoundingClientRect?.();
198
+ left = Math.max(16, vw - 16 - pr.width);
199
+ top = box ? box.top - pr.height - 12 : (win?.innerHeight ?? 800) - pr.height - 120;
200
+ const at = { left, right: left + pr.width, top: top - 8, bottom: top + pr.height + 8 };
201
+ if (rects.some((q) => overlap(at, q) > 0)) {
202
+ const th = deps.threadBox?.()?.getBoundingClientRect?.();
203
+ top = Math.max(th ? th.top : 0, 0) + 12;
204
+ }
205
+ }
206
+ if (tip) {
207
+ const s = doc.createElement("span"); s.className = `quote-tip ${tip.side}`; s.setAttribute("aria-hidden", "true");
208
+ s.style.setProperty("left", `${tip.x}px`);
209
+ pop.append(s);
210
+ }
211
+ pop.style.setProperty("left", `${Math.round(left)}px`);
212
+ pop.style.setProperty("top", `${Math.round(top)}px`);
213
+ }
214
+ function check() {
215
+ timer = null;
216
+ if (down || deps.canQuote?.() === false) { hide(); return; }
217
+ const passage = selectedPassage(list, doc.getSelection?.());
218
+ if (!passage) { hide(); return; }
219
+ current = passage; drawnFor = passage.text;
220
+ place(passage);
221
+ }
222
+ function soon() { if (timer) clearTimeout(timer); timer = setTimeout(check, 120); }
223
+ const onSelection = () => soon();
224
+ const onDown = (e) => { if (pop && pop.contains(e.target)) return; down = true; hide(); };
225
+ // A gesture the browser took over (a touch scroll: pointerdown → pointercancel, no pointerup — #3555 review P2-1)
226
+ // ends the press as a pointerup does; the selection then decides.
227
+ const onUp = () => { if (!down) return; down = false; soon(); };
228
+ const onKey = (e) => { if (e.key === "Escape" && pop) { hide(); } };
229
+ const onScroll = () => { if (pop && current) place(current); };
230
+ const onFocusIn = (e) => { const f = deps.field?.(); if (f && e.target === f) f.dataset.touched = "1"; };
231
+ // The caret as the person leaves it: kept on every move inside the composer and when it loses the focus.
232
+ const keep = (e) => { const f = deps.field?.(); if (f && e.target === f) remembered.set(f, { value: f.value, caret: f.selectionStart ?? f.value.length }); };
233
+ const KEEP = ["focusout", "input", "keyup", "mouseup", "select"];
234
+ doc.addEventListener("focusin", onFocusIn);
235
+ for (const k of KEEP) doc.addEventListener(k, keep, true);
236
+ doc.addEventListener("selectionchange", onSelection);
237
+ list.addEventListener("pointerdown", onDown);
238
+ doc.addEventListener("pointerup", onUp);
239
+ doc.addEventListener("pointercancel", onUp);
240
+ doc.addEventListener("keydown", onKey);
241
+ win?.addEventListener("scroll", onScroll, true);
242
+ win?.addEventListener("resize", onScroll);
243
+ return () => {
244
+ if (timer) clearTimeout(timer);
245
+ hide();
246
+ doc.removeEventListener("focusin", onFocusIn);
247
+ for (const k of KEEP) doc.removeEventListener(k, keep, true);
248
+ doc.removeEventListener("selectionchange", onSelection);
249
+ list.removeEventListener("pointerdown", onDown);
250
+ doc.removeEventListener("pointerup", onUp);
251
+ doc.removeEventListener("pointercancel", onUp);
252
+ doc.removeEventListener("keydown", onKey);
253
+ win?.removeEventListener("scroll", onScroll, true);
254
+ win?.removeEventListener("resize", onScroll);
255
+ };
256
+ }
@@ -122,13 +122,16 @@
122
122
  var MAX_TABLE_COLUMNS = 20;
123
123
 
124
124
  /** Leading whitespace as columns: a tab counts four. */
125
+ var LIST_ITEM = /^([ \t]*)([-*+]|\d{1,9}[.)])\s+(.*)$/;
125
126
  function indentOf(ws) { var n = 0; for (var i = 0; i < ws.length; i++) n += ws[i] === "\t" ? 4 : 1; return n; }
126
127
 
127
128
  /**
128
129
  * A run of list items as nested lists. An item indented deeper than the one before opens a list inside that
129
130
  * item; a shallower one closes lists back to its level; at the same level a change of kind (- vs 1.) starts a
130
131
  * new list. Every tag is the renderer's own; item text goes through inline() like any other text.
132
+ * M-2811: a numbered list keeps its first number ("3." after a paragraph reads 3 — `start`, digits only).
131
133
  */
134
+ function openList(it) { return it.tag === "ol" && it.num > 1 ? '<ol start="' + it.num + '">' : "<" + it.tag + ">"; }
132
135
  function renderList(items, store) {
133
136
  var html = "";
134
137
  var stack = []; // { indent, tag }
@@ -137,10 +140,10 @@
137
140
  while (stack.length && it.indent < stack[stack.length - 1].indent) html += "</li></" + stack.pop().tag + ">";
138
141
  var top = stack[stack.length - 1];
139
142
  if (!top || (it.indent > top.indent && stack.length < MAX_LIST_DEPTH)) {
140
- html += "<" + it.tag + ">";
143
+ html += openList(it);
141
144
  stack.push({ indent: it.indent, tag: it.tag });
142
145
  } else if (top.tag !== it.tag) {
143
- html += "</li></" + top.tag + "><" + it.tag + ">";
146
+ html += "</li></" + top.tag + ">" + openList(it);
144
147
  top.tag = it.tag;
145
148
  } else {
146
149
  html += "</li>";
@@ -211,7 +214,16 @@
211
214
  for (var i = 0; i < lines.length; i++) {
212
215
  var line = lines[i];
213
216
  var m;
214
- if (/^\s*$/.test(line)) { flushAll(); continue; }
217
+ if (/^\s*$/.test(line)) {
218
+ // M-2811: a blank line between list items (a "loose" list: "1. a\n\n2. b") keeps one list — its numbering runs
219
+ // on instead of starting at 1 again for every item.
220
+ if (list.length) {
221
+ var k = i + 1;
222
+ while (k < lines.length && /^\s*$/.test(lines[k])) k++;
223
+ if (k < lines.length && LIST_ITEM.test(lines[k])) { i = k - 1; continue; }
224
+ }
225
+ flushAll(); continue;
226
+ }
215
227
  // A table: a header row with a pipe, then a separator row with the same number of columns.
216
228
  if (line.indexOf("|") !== -1 && i + 1 < lines.length) {
217
229
  var aligns = tableAligns(lines[i + 1]);
@@ -229,9 +241,9 @@
229
241
  if ((m = /^(#{1,6})\s+(.*)$/.exec(line))) { flushAll(); var n = Math.min(m[1].length + 2, 6); out.push("<h" + n + ">" + inline(m[2], store) + "</h" + n + ">"); continue; }
230
242
  if (/^\s*(?:-{3,}|\*{3,}|_{3,})\s*$/.test(line)) { flushAll(); out.push("<hr>"); continue; }
231
243
  if ((m = /^&gt;\s?(.*)$/.exec(line))) { flushPara(); flushList(); quote.push(m[1]); continue; }
232
- if ((m = /^([ \t]*)([-*+]|\d{1,9}[.)])\s+(.*)$/.exec(line))) {
244
+ if ((m = LIST_ITEM.exec(line))) {
233
245
  flushPara(); flushQuote();
234
- list.push({ indent: indentOf(m[1]), tag: /\d/.test(m[2]) ? "ol" : "ul", text: m[3] });
246
+ list.push({ indent: indentOf(m[1]), tag: /\d/.test(m[2]) ? "ol" : "ul", num: /\d/.test(m[2]) ? parseInt(m[2], 10) : 0, text: m[3] });
235
247
  continue;
236
248
  }
237
249
  flushList(); flushQuote();
@@ -523,21 +523,26 @@ export function createChatStore(deps) {
523
523
  async function runCommand(target, command, args, opts = {}) {
524
524
  if (!target || !commandFree(target)) return;
525
525
  const alive = opts.alive || (() => true);
526
- s.commands[target] = { command, busy: true };
526
+ if (!alive()) return;
527
+ const previous = s.commands[target];
528
+ const pending = { command, busy: true, ...(opts.action && previous?.command === command ? { choices: previous.choices } : {}) };
529
+ s.commands[target] = pending;
527
530
  changed(target);
528
531
  const post = async (extra) => {
529
- try { return await api("POST", "/ui/command", { instance: target, command, ...(args ? { args } : {}), ...extra }); }
532
+ try { return await api("POST", "/ui/command", { instance: target, command, ...(args ? { args } : {}), ...(opts.action ? { action: opts.action } : {}), ...extra }); }
530
533
  catch (err) { return { error: err && err.message ? err.message : t("chat.disconnected") }; }
531
534
  };
532
535
  let r = await post({});
536
+ if (!alive() || s.commands[target] !== pending) return;
533
537
  if (r && r.confirm) {
534
538
  const yes = deps.confirm ? await deps.confirm({ title: `/${command}`, message: r.confirm.message, confirmLabel: t(command === "backend" ? "chat.cmdConfirmBackend" : "chat.cmdConfirm"), danger: true }) : false;
535
- if (!yes || !alive()) { delete s.commands[target]; changed(target); return; }
539
+ if (!yes || !alive() || s.commands[target] !== pending) { if (s.commands[target] === pending) { delete s.commands[target]; changed(target); } return; }
536
540
  r = await post({ confirm: r.confirm.token });
541
+ if (!alive() || s.commands[target] !== pending) return;
537
542
  }
538
543
  const follow = r && r.follow && r.follow.kind === "compact" ? r.follow : null;
539
544
  showCommand(target, r && r.choices ? { command, busy: false, choices: r.choices }
540
- : r && r.error ? { command, busy: false, error: r.error }
545
+ : r && r.error ? { command, busy: false, error: r.error, ...(opts.action ? { choices: pending.choices } : {}) }
541
546
  : { command, busy: false, text: (r && r.text) || "", ...(r && r.sent === true ? { sent: true } : {}), ...(follow ? { compact: follow.id ? "running" : "unknown", watch: follow.id } : {}) });
542
547
  changed(target);
543
548
  }
@@ -22,12 +22,12 @@ register("chat", {
22
22
  compactTimeout: "No sign that compaction finished within {0} minutes — check the agent's own chat.",
23
23
  compactLost: "Can't follow this compaction: the command did not reach the agent, or the agent stopped or changed backend.",
24
24
  compactNotCompacted: "kiro did not compact the conversation: it was too short, or the compaction was stopped.",
25
- cmdChoose: "Choose", cmdCurrent: "current", cmdSignIn: "Sign in", cmdSignInTo: "Sign in to {0}", chipCompact: "Compact", chipClear: "Clear…", chipContext: "Context {0}% used",
25
+ cmdChoose: "Choose", cmdCurrent: "current", cmdSignIn: "Connect account", cmdSignInTo: "Connect your {0} account", chipCompact: "Compact", chipClear: "Clear…", chipContext: "Context {0}% used",
26
26
  chipModel: "Model: {0} — choose another", chipEffort: "Effort: {0} — choose another",
27
27
  cmd_ctx: "Context use, model and effort", cmd_compact: "Compact the conversation", cmd_clear: "Clear the conversation (asks first)",
28
28
  cmd_model: "Show or switch the model", cmd_backend: "Switch the CLI backend, then model and effort (restarts)", cmd_effort: "Show or set the reasoning effort", cmd_cancel: "Stop the current reply",
29
29
  cmd_btw: "A side question that does not interrupt", cmd_steer: "Send into the current turn", cmd_pause: "Pause the instance",
30
- cmd_wake: "Wake a paused instance", cmd_save: "Save the conversation to a file",
30
+ cmd_wake: "Wake a paused instance", cmd_save: "Save the conversation to a file", cmd_update: "Update AgEnD (opens the Update dialog)",
31
31
  tourTitle: "Welcome to web chat", tourStep: "{0} of {1}", tourBack: "Back", tourNext: "Next", tourDone: "Got it", tourSkip: "Skip",
32
32
  tour1: "Pick an instance in the list to chat with it. On a phone, ☰ opens the list.",
33
33
  tour2: "This is the agent's conversation. If it also has a Telegram or Discord chat, web echo (Settings → Chat & connections) decides whether what you send here shows there too.",
@@ -150,12 +150,12 @@ register("chat", {
150
150
  waking: "正在喚醒 {0}…", retrySend: "重試傳送",
151
151
  you: "你", sending: "傳送中…", uploadingFile: "正在上傳 {0}", uploadWaiting: "等待中", uploadFailed: "失敗",
152
152
  uploadNoConnection: "上傳中斷了,請檢查網路連線", sendNoConnection: "沒有送到 AgEnD,請檢查網路連線", notSentBecause: "沒有送出:{0}", deleteUnsent: "刪除",
153
- sendFailure_wake_capacity: "目前沒有空位可喚醒這個實例。請等其他實例閒置後重試。",
154
- sendFailure_wake_credentials: "實例無法登入。請先在主機檢查它的帳號,再重試。",
155
- sendFailure_wake_timeout: "實例未能及時就緒。請重試,或在主機檢查它的狀態。",
156
- sendFailure_instance_stopped: "這個實例已停止或移除。請先在主機啟動它,再重試。",
157
- sendFailure_delivery_unavailable: "實例目前無法接收這則訊息。請在主機檢查它的狀態,再重試。",
158
- sendFailure_delivery_changed: "訊息送出前,登入或實例狀態已改變。必要時請重新登入,再重試。",
153
+ sendFailure_wake_capacity: "目前沒有空位可喚醒這個 Agent。請等其他 Agent 閒置後重試。",
154
+ sendFailure_wake_credentials: "Agent 無法登入。請先在主機檢查它的帳號,再重試。",
155
+ sendFailure_wake_timeout: "Agent 未能及時就緒。請重試,或在主機檢查它的狀態。",
156
+ sendFailure_instance_stopped: "這個 Agent 已停止或移除。請先在主機啟動它,再重試。",
157
+ sendFailure_delivery_unavailable: "Agent 目前無法接收這則訊息。請在主機檢查它的狀態,再重試。",
158
+ sendFailure_delivery_changed: "訊息送出前,登入或 Agent 狀態已改變。必要時請重新登入,再重試。",
159
159
  sendFailure_reply_gone: "你回覆的訊息已不在這個聊天裡。內容還在:可以不帶回覆直接送出,或改回覆其他訊息。",
160
160
  reply: "回覆", replyingTo: "回覆 {0}", replyCancel: "取消回覆(Esc)", replyHidden: "之前的一則訊息", replyPhoto: "[圖片]", replyFile: "[檔案]",
161
161
  replyGone: "那則訊息已不在這個聊天裡。", replyJump: "顯示被回覆的訊息", copyText: "複製文字", copyLink: "複製連結", msgMenu: "訊息",
@@ -165,17 +165,17 @@ register("chat", {
165
165
  compactTimeout: "{0} 分鐘內沒有看到壓縮完成的紀錄,請到 Agent 自己的對話確認。",
166
166
  compactLost: "無法再追蹤這次壓縮:指令沒有送到 Agent,或 Agent 已停止、換了後端。",
167
167
  compactNotCompacted: "kiro 沒有壓縮對話:對話太短,或壓縮被中止了。",
168
- cmdChoose: "選擇", cmdCurrent: "目前", cmdSignIn: "登入", cmdSignInTo: "登入 {0}", chipCompact: "壓縮", chipClear: "清空…", chipContext: "已用 {0}% 的 context",
168
+ cmdChoose: "選擇", cmdCurrent: "目前", cmdSignIn: "連接帳號", cmdSignInTo: "連接 {0} 帳號", chipCompact: "壓縮", chipClear: "清空…", chipContext: "已用 {0}% 的 context",
169
169
  chipModel: "模型:{0}——選擇其他", chipEffort: "推理強度:{0}——選擇其他",
170
170
  cmd_ctx: "context 用量、模型與推理強度", cmd_compact: "壓縮對話", cmd_clear: "清空對話(會先確認)",
171
171
  cmd_model: "查看或切換模型", cmd_backend: "切換 CLI backend,再選模型和推理強度(會重新啟動)", cmd_effort: "查看或設定推理強度", cmd_cancel: "停止目前的回覆",
172
- cmd_btw: "不打斷目前工作的旁問", cmd_steer: "送進目前這一輪", cmd_pause: "暫停 instance",
173
- cmd_wake: "喚醒已暫停的 instance", cmd_save: "把對話存成檔案",
172
+ cmd_btw: "不打斷目前工作的旁問", cmd_steer: "送進目前這一輪", cmd_pause: "暫停 Agent",
173
+ cmd_wake: "喚醒已暫停的 Agent", cmd_save: "把對話存成檔案", cmd_update: "更新 AgEnD(開啟更新對話框)",
174
174
  tourTitle: "歡迎使用網頁聊天", tourStep: "{0} / {1}", tourBack: "上一步", tourNext: "下一步", tourDone: "知道了", tourSkip: "略過",
175
- tour1: "在清單裡選一個 instance,就能跟它對話。手機上請按 ☰ 打開清單。",
175
+ tour1: "在清單裡選一個 Agent,就能跟它對話。手機上請按 ☰ 打開清單。",
176
176
  tour2: "這是這個 Agent 的對話。如果它也有 Telegram 或 Discord 聊天,在這裡送出的訊息是否也出現在那裡,由「設定 → 聊天與連線」的網頁轉發決定。",
177
177
  tour3: "按 📎 附上檔案和圖片,也可以直接貼上或拖到聊天裡。",
178
- tour4: "Agent 工作時,輸入框會出現「中止回覆」:中斷目前的回覆,instance 本身會繼續運行。",
178
+ tour4: "Agent 工作時,輸入框會出現「中止回覆」:中斷目前的回覆,Agent 本身會繼續運行。",
179
179
  tour5: "看到「等你回應」標記,表示 Agent 在終端機上等你,例如權限詢問。到它的聊天裡按按鈕回應即可。",
180
180
  a11yWorking: "{0} 開始工作", a11yIdle: "{0} 已完成", a11yReplied: "{0} 已回覆", conversationWith: "與 {0} 的對話",
181
181
  stopping: "正在中止 {0}…", awaiting: "{0} 正在等你回應", approxNote: "從終端畫面判讀,僅供參考", elapsedTitle: "從這個頁面看到它開始工作起算(約略)",
@@ -252,17 +252,17 @@ register("chat", {
252
252
  copy: "複製", copyMessage: "複製這則回覆", copied: "已複製", copyFailed: "複製失敗", wrap: "換行", showAll: "展開全部 {0} 行", showMore: "顯示更多", showLess: "收合", showAllShort: "全部 {0} 行", showMoreShort: "更多", jumpLatest: "最新", newBelow: "{0} 則新訊息",
253
253
  disconnected: "已斷線", tick_queued: "排在前一則訊息之後", tick_processing: "已交給 agent", tick_delivered: "agent 已收到", tick_failed: "未送達", tick_cancelled: "已被中止取消", reactedBy: "{0} 的回應",
254
254
  promptAnswering: "回覆中…", promptGone: "這個提示已經結束", promptTextPlaceholder: "你的回答", promptTextSend: "送出回答", promptFor: "{0}:{1}",
255
- working: "{0} 處理中…", stuck: "{0} 似乎卡住了", stopReply: "中止回覆", stopReplyTitle: "中止目前的回覆(同 Esc),並取消還在排隊的訊息。instance 會繼續運行。", stopSent: "已中止",
255
+ working: "{0} 處理中…", stuck: "{0} 似乎卡住了", stopReply: "中止回覆", stopReplyTitle: "中止目前的回覆(同 Esc),並取消還在排隊的訊息。Agent 會繼續運行。", stopSent: "已中止",
256
256
  file_empty: "空檔案", file_too_large: "超過 {0} MB", file_too_large_public: "超過 {0} MB,這是公開連結單次上傳的上限", file_too_many: "每則訊息最多 {0} 個檔案", file_too_much: "檔案合計會超過 {0} MB", removeFile: "移除", putBack: "放回輸入框",
257
257
  noMessages: "直接在下方輸入任務。",
258
258
  guestAllHidden: "這裡還沒有你能看到的訊息", guestAllHiddenHint: "這個 agent 最近只和其他 agent 往來,訪客看不到這些。有人在它的頻道說話後,對話會出現在這裡。",
259
- pick: "選一個 Agent 開始聊天。", noAgents: "先建立一個 Agent,再開始聊天。", newAgent: "新增 Agent", notFound: "沒有叫「{0}」的 instance", notFoundHint: "它可能已被刪除或改名。", backToList: "選擇 Agent",
260
- details: "Instance 詳細資料", fullWidth: "全寬", start: "啟動 instance", stopInstance: "停止 instance", restart: "重新啟動 instance", delete: "刪除 instance…",
259
+ pick: "選一個 Agent 開始聊天。", noAgents: "先建立一個 Agent,再開始聊天。", newAgent: "新增 Agent", notFound: "沒有叫「{0}」的 Agent", notFoundHint: "它可能已被刪除或改名。", backToList: "選擇 Agent",
260
+ details: "Agent 詳細資料", fullWidth: "全寬", start: "啟動 Agent", stopInstance: "停止 Agent", restart: "重新啟動 Agent", delete: "刪除 Agent…",
261
261
  started: "{0} 已啟動", stoppedInst: "{0} 已停止", restarted: "{0} 已重新啟動", instanceDeleted: "{0} 已刪除",
262
- deleteTitle: "要刪除 {0} 嗎?", deleteHelp: "這會把 instance 從 fleet 移除並停止它,並刪除它的聊天 topic(在 Discord 上是它的頻道與訊息記錄)。工作目錄會保留。請輸入「delete {0}」確認。", deleteGo: "刪除", cancel: "取消",
262
+ deleteTitle: "要刪除 {0} 嗎?", deleteHelp: "這會把 Agent 從 fleet 移除並停止它,並刪除它的聊天 topic(在 Discord 上是它的頻道與訊息記錄)。工作目錄會保留。請輸入「delete {0}」確認。", deleteGo: "刪除", cancel: "取消",
263
263
  loadFailed: "載入失敗", tour: "聊天導覽", tourBtnTitle: "在 Agent 的聊天上開啟聊天導覽", tourNoAgent: "請先選一個 Agent,再開啟聊天導覽。",
264
264
  dName: "名稱", dStatus: "狀態", dDisplay: "顯示名稱", dDescription: "說明", dDirectory: "目錄", dBackend: "Backend", dModel: "模型", dEffort: "Effort",
265
- dCost: "花費", dCostNote: "(本次 session 累計)", dContext: "Context", dRate5: "5 小時額度", dRate7: "7 天額度", dActivity: "最近活動", dInstance: "Instance", dRuntime: "執行環境",
265
+ dCost: "花費", dCostNote: "(本次 session 累計)", dContext: "Context", dRate5: "5 小時額度", dRate7: "7 天額度", dActivity: "最近活動", dInstance: "Agent", dRuntime: "執行環境",
266
266
  dConfig: "設定", dBinding: "綁定", dBindingGeneral: "{0} 的 General topic", dBindingTopic: "{0},topic {1}", dBindingNoTopic: "{0},尚未綁定 topic",
267
267
  dBindingDefault: "{0}(預設:第一個連線)", dBindingRoom: "ClassicBot 房間 #{0}({1})",
268
268
  dBindingNone: "未綁定(只用網頁)", dPrimary: "第一個連線", dTags: "標籤", dReadOnly: "這裡只能檢視——請到設定修改。",
@@ -42,7 +42,7 @@ register("cache", {
42
42
  fleetExpiry: "過期成本", fleetSaving: "保溫可省", fleetRecommended: "建議保溫", ofN: "{1} 個中的 {0} 個",
43
43
  pricesNote: "牌價查證日期:{0}。", quotaNote: "訂閱方案:Anthropic 與 OpenAI 未公布快取讀取如何計入方案額度,因此節省金額以牌價計算為準,換算成額度則是估算。",
44
44
  estimateNote: "估算:Codex 不記錄快取寫入,寫入量以該次請求未命中快取的輸入估算。",
45
- notPricedNote: "有些模型不在價目表中,這些 instance 以「輸入價格單位」比較。",
45
+ notPricedNote: "有些模型不在價目表中,這些 Agent 以「輸入價格單位」比較。",
46
46
  scanning: "仍在讀取 transcript——還剩 {0}。重新整理可看到更多。", scanningFirst: "第一次讀取 transcript 中——重新整理可看到更多。", refresh: "重新整理",
47
47
  keepWarm: "建議保溫", leaveOff: "不需保溫", estimate: "估算", notPriced: "未定價",
48
48
  requests: "請求數", pastTtl: "超過 TTL({0})", expired: "已過期(重寫)", rewritten: "重寫的 token",
@@ -56,12 +56,12 @@ register("cache", {
56
56
  costsMoreUnits: "每次過期約需送 {0} 次 ping——保溫的花費比省下的多。",
57
57
  unavailable: "不提供", creditBilled: "以 credit 計費,沒有快取資料", unsupported: "這個 CLI 沒有快取資料", noData: "尚未讀到任何請求",
58
58
  shared: "與 {0} 共用工作目錄,無法分辨各自的 transcript",
59
- empty: "沒有 instance", emptyHint: "fleet 有 instance 後會顯示在這裡。",
59
+ empty: "沒有 Agent", emptyHint: "fleet 有 Agent 後會顯示在這裡。",
60
60
  b0: "≤5分", b1: "≤30分", b2: "≤1時", b3: "≤2時", b4: "≤6時", b5: "≤24時", b6: ">24時", tokensUnit: "輸入 token 當量",
61
61
  writeMix: "快取寫入 5 分 / 1 時", effectiveTtl: "實際存活", gapMiss: "{1} 個 5–60 分鐘空檔中有 {0} 個重寫", gapMissNone: "還沒有 5–60 分鐘的空檔",
62
62
  effMeasured: "{0}(實測)", effLabel: "{0}(依寫入標記)", effUnproven: "尚無法判斷",
63
63
  fleetSwitch: "建議改用 1 小時快取",
64
- switchTo1h: "它的 5 分鐘快取確實會過期:{1} 個 5–60 分鐘空檔中有 {0} 個重寫。請為這個 instance 設定 prompt_cache_ttl: \"1h\"(backend_options.claude-code),而不是保溫。",
64
+ switchTo1h: "它的 5 分鐘快取確實會過期:{1} 個 5–60 分鐘空檔中有 {0} 個重寫。請為這個 Agent 設定 prompt_cache_ttl: \"1h\"(backend_options.claude-code),而不是保溫。",
65
65
  unproven: "以 5 分鐘 TTL 寫入,但目前只有 {0} 個 5–60 分鐘空檔,太少,無法判斷實際存活多久。保溫的數字以 5 分鐘估算。",
66
66
  },
67
67
  });
@@ -47,9 +47,9 @@ register("orgc", {
47
47
  lgWork: "in progress (until its report)", lgReturn: "done (report back)", lgStale: "no report yet",
48
48
  },
49
49
  "zh-TW": {
50
- view: "檢視", canvas: "畫布", list: "清單", office: "辦公室", find: "尋找 instance", findShort: "尋找", found: "找到 {0} 個", foundOne: "找到 1 個", noMatch: "沒有符合的",
50
+ view: "檢視", canvas: "畫布", list: "清單", office: "辦公室", find: "尋找 Agent", findShort: "尋找", found: "找到 {0} 個", foundOne: "找到 1 個", noMatch: "沒有符合的",
51
51
  zoomIn: "放大", zoomOut: "縮小", fit: "符合畫面",
52
- label: "組織圖畫布。用 Tab 或方向鍵在 instance 之間移動,Enter 開啟聊天,+ 和 − 縮放,0 顯示整個 fleet。",
52
+ label: "組織圖畫布。用 Tab 或方向鍵在 Agent 之間移動,Enter 開啟聊天,+ 和 − 縮放,0 顯示整個 fleet。",
53
53
  expand: "展開", collapse: "收合", members: "{0} 名成員", member: "1 名成員", inFolded: "找到 {0} 個 · 展開", noMembers: "沒有成員",
54
54
  openChat: "開啟聊天", minimap: "總覽:點一下移到那裡",
55
55
  live: "即時", liveOn: "隱藏即時往來", liveOff: "顯示即時往來", lgTask: "delegate_task", lgSend: "send_to_instance",
@@ -44,7 +44,7 @@ register("orge", {
44
44
  add: "新增辦公室", newName: "新辦公室", name: "名稱", styleLabel: "風格", members: "成員", membersN: "已選 {0} 個", everyone: "全部",
45
45
  picked: "指定", nobody: "沒有人(只有 NPC)", pickSome: "還沒選任何人:選人之前會顯示全部。",
46
46
  nobodyNote: "這裡不坐任何 agent,只有風格裡的 NPC。",
47
- teams: "Team", instances: "Instance", remove: "刪除", save: "儲存", cancel: "取消", saved: "辦公室已儲存。",
47
+ teams: "Team", instances: "Agent", remove: "刪除", save: "儲存", cancel: "取消", saved: "辦公室已儲存。",
48
48
  none: "還沒有辦公室:辦公室檢視會顯示整個 fleet。", nameNeeded: "每個辦公室都需要名稱。", tooMany: "最多 {0} 個辦公室。",
49
49
  changed: "有人在這期間修改了辦公室,你的編輯沒有儲存。你可以保留你的編輯(儲存時會取代對方的修改),或載入對方的版本。",
50
50
  changedUnread: "有人在這期間修改了辦公室,你的編輯沒有儲存,也無法讀取目前的清單。請再試一次。",
@@ -101,7 +101,7 @@ register("orgo", {
101
101
  tileLabel: "{0} ({1})", openOffice: "Open the office {0}", lobbyTile: "Lobby tile (in no office)", lobbyEveryone: "Everyone is in an office", overviewNoEdit: "Pick one office to edit offices or a layout",
102
102
  },
103
103
  "zh-TW": {
104
- label: "辦公室:每個 team 是一間房間,每個 instance 一張桌子;General 和未加入 team 的 instance 在大廳。拖曳平移;滾輪、雙指、+ 和 − 縮放,0 顯示整個場景,F 切換全螢幕。",
104
+ label: "辦公室:每個 team 是一間房間,每個 Agent 一張桌子;General 和未加入 team 的 Agent 在大廳。拖曳平移;滾輪、雙指、+ 和 − 縮放,0 顯示整個場景,F 切換全螢幕。",
105
105
  office: "辦公室", allOffice: "整個 fleet", show: "顯示", allTeams: "所有 team", lobby: "大廳(General、未加入 team)", lobbyRoom: "大廳",
106
106
  people: "成員", peopleN: "成員({0})", findPerson: "尋找成員", everyone: "顯示全部", nobody: "沒有符合這個篩選的成員。",
107
107
  unseated: "{0} 位沒有座位", skinUnknown: "這裡沒有它的風格「{0}」:以辦公桌顯示。", closed: "休息中", desks: "桌子", tapAgain: "再點一下開啟聊天",
@@ -23,10 +23,10 @@ register("org", {
23
23
  sending: "Sending:", queuedNote: "(queued)", workingNote: "(in progress)",
24
24
  },
25
25
  "zh-TW": {
26
- starting: "啟動中", queued: "等待啟動", title: "組織圖", general: "General", unteamed: "未加入 team", members: "{0} 名成員", member: "1 名成員", instances: "{0} 個 instance", instance: "1 個 instance",
26
+ starting: "啟動中", queued: "等待啟動", title: "組織圖", general: "General", unteamed: "未加入 team", members: "{0} 名成員", member: "1 名成員", instances: "{0} 個 Agent", instance: "1 個 Agent",
27
27
  needs: "等你回應", working: "工作中", idle: "閒置", stuck: "似乎卡住", paused: "已暫停", stopped: "已停止", crashed: "已當掉",
28
28
  missing: "不在 fleet 中", thread_discord: "Discord 討論串", thread_telegram: "Telegram topic", openChat: "開啟聊天",
29
- classic: "ClassicBot 頻道", empty: "還沒有 instance", emptyHint: "fleet 有 instance 和 team 後會顯示在這裡。",
29
+ classic: "ClassicBot 頻道", empty: "還沒有 Agent", emptyHint: "fleet 有 Agent 和 team 後會顯示在這裡。",
30
30
  noTeams: "還沒有 team——到 Fleet → Teams 定義後,組織圖會依 team 分組。", newTab: "(在新分頁開啟)",
31
31
  sending: "傳送中:", queuedNote: "(排隊中)", workingNote: "(進行中)",
32
32
  },
@@ -41,7 +41,7 @@ register("taskcard", {
41
41
  conflict: "{0} 在你編輯時被改過了。已載入最新內容,你的修改還在,再存一次就會覆蓋。",
42
42
  moveTo: "移到…", moveLabel: "改狀態", followsSubs: "有子任務,狀態會跟著子任務自動變化",
43
43
  reopen: "重新打開", cancelCard: "取消這張卡", confirmMain: "確認主任務",
44
- assignee: "負責人", nobody: "沒人負責", unassign: "(不指派)", other: "其他…", otherTitle: "指派給其他 instance", otherLabel: "instance 名稱",
44
+ assignee: "負責人", nobody: "沒人負責", unassign: "(不指派)", other: "其他…", otherTitle: "指派給其他 Agent", otherLabel: "Agent 名稱",
45
45
  change: "改…", project: "專案", priority: "優先度", size: "大小", review: "你確認", reviewBox: "做完要停在待確認,等我確認",
46
46
  reviewOn: "做完會停在待確認,等你確認", reviewOff: "做完直接完成,不等你確認",
47
47
  parent: "主任務", deps: "相依", none: "沒有", edit: "編輯", depsTitle: "{0} 的相依", depsLabel: "要先完成的卡號,用逗號或空白分開(留空=沒有相依)",
@@ -92,7 +92,7 @@ register("tasks", {
92
92
  projects: "專案", noProject: "未分類", noProjectDesc: "fleet 在專案以外開的 task",
93
93
  newProject: "新增專案", newMain: "主任務", archived: "已封存", archive: "封存", restore: "恢復",
94
94
  rename: "編輯專案", projectName: "名稱", projectDesc: "說明",
95
- projectLead: "負責的 instance", projectLeadNone: "無(General)", projectLeadHint: "這個專案裡等你處理的卡片(待確認或卡住)會在負責 instance 的頻道顯示按鈕;若卡片是某個 instance 派出的,則顯示在派出者的頻道。", projectLeadGone: "{0}(已不在 fleet 中)", projectLeadChip: "負責:{0}", create: "建立", save: "儲存", cancel: "取消",
95
+ projectLead: "負責的 Agent", projectLeadNone: "無(General)", projectLeadHint: "這個專案裡等你處理的卡片(待確認或卡住)會在負責 Agent 的頻道顯示按鈕;若卡片是某個 Agent 派出的,則顯示在派出者的頻道。", projectLeadGone: "{0}(已不在 fleet 中)", projectLeadChip: "負責:{0}", create: "建立", save: "儲存", cancel: "取消",
96
96
  projectCreated: "專案已建立", projectSaved: "專案已儲存",
97
97
  noProjects: "還沒有專案", noProjectsHint: "專案是一組相關的工作:先建立專案,再在裡面開主任務。",
98
98
  mainCount: "{0} 個主任務", mainOne: "1 個主任務", waiting: "等你確認 {0}", blockedN: "卡住 {0}", lastActivity: "最後動態 {0}",
@@ -101,9 +101,9 @@ register("tasks", {
101
101
  everyone: "全部負責人", nobody: "沒人負責", filterLabel: "依負責人篩選",
102
102
  recent: "近 7 天", all: "全部", toggleDone: "切換:只看近 7 天/全部",
103
103
  emptyBoard: "這個專案還沒有主任務", emptyFiltered: "沒有符合篩選的主任務",
104
- emptyBoardHint: "主任務是你要的成果,可大可小。指派給 instance,它會自己決定直接做,或先拆成子任務。",
104
+ emptyBoardHint: "主任務是你要的成果,可大可小。指派給 Agent,它會自己決定直接做,或先拆成子任務。",
105
105
  subProgress: "子任務 {0}/{1}", showSubs: "展開子任務", hideSubs: "收起子任務", olderSubs: "另有 {0} 張比較早完成",
106
- acceptance: "驗收條件", definition: "完成定義", waitsFor: "等 {0} 完成", comments: "留言", agentReplied: "instance 有新回覆",
106
+ acceptance: "驗收條件", definition: "完成定義", waitsFor: "等 {0} 完成", comments: "留言", agentReplied: "Agent 有新回覆",
107
107
  needsReview: "需確認", needsReviewTitle: "做完要停在待確認,等你確認", urgentTag: "緊急", highTag: "優先",
108
108
  waitingTitle: "待你處理", waitingEmpty: "沒有等你處理的事。", confirm: "確認", sendBack: "退回", answer: "回覆",
109
109
  confirmed: "已確認 {0}", sentBack: "已退回 {0}", answered: "已回覆 {0}",
@@ -116,8 +116,8 @@ register("tasks", {
116
116
  goal: "目標", goalHint: "為什麼做、做完是什麼樣子", scope: "範圍", scopeHint: "做:…/不做:…",
117
117
  definitionHint: "一行一項:能客觀判斷是否達成的條件", acceptanceHint: "一行一項",
118
118
  context: "背景", contextHint: "檔案路徑、相關卡號、已經做的決定(只放指引)",
119
- assignee: "負責人", assigneeHint: "交給哪個 instance", project: "專案", size: "大小", priority: "優先度",
120
- boardOff: "{0}(看板已關閉)", boardOffHint: "關閉任務看板的 instance 不能被派卡:它沒有 task 工具,讀不到卡片。",
119
+ assignee: "負責人", assigneeHint: "交給哪個 Agent", project: "專案", size: "大小", priority: "優先度",
120
+ boardOff: "{0}(看板已關閉)", boardOffHint: "關閉任務看板的 Agent 不能被派卡:它沒有 task 工具,讀不到卡片。",
121
121
  reviewBox: "做完要停在待確認,等我確認", created: "已開 {0}", titleRequired: "標題必填",
122
122
  search: "搜尋卡片", searchHint: "搜尋標題、各欄位、驗收條件和留言", searchEmpty: "沒有符合的卡片", inField: "在{0}",
123
123
  fieldgoal: "目標", fieldscope: "範圍", fieldcontext: "背景", fieldstate: "目前狀態", fieldresult: "產出", fieldblockedReason: "卡住原因",
@@ -134,7 +134,7 @@ register("tasks", {
134
134
  "err.too_long": "{0}太長:{1} 字,上限 {2} 字", "err.state_lines": "目前狀態最多 {0} 行(現在 {1} 行)",
135
135
  "err.acceptance_empty": "驗收條件不能是空的", "err.acceptance_max": "驗收條件最多 {0} 項",
136
136
  "err.acceptance_no_item": "驗收條件沒有第 {0} 項(共 {1} 項)", "err.project_not_found": "找不到專案「{0}」",
137
- "err.project_name_empty": "專案名稱不能是空的", "err.project_name_digits": "專案名稱不能只有數字", "err.lead_not_instance": "負責人必須是 fleet 裡的 instance",
137
+ "err.project_name_empty": "專案名稱不能是空的", "err.project_name_digits": "專案名稱不能只有數字", "err.lead_not_instance": "負責人必須是 fleet 裡的 Agent",
138
138
  "err.project_name_taken": "已經有專案叫「{0}」", "err.project_archived": "專案「{0}」已封存,不能再開主任務",
139
139
  "err.card_not_found": "找不到 {0}", "err.title_empty": "標題不能是空的", "err.scope_main_only": "範圍只用在主任務",
140
140
  "err.blocked_reason_not_blocked": "只有卡住的卡才有卡住原因", "err.block_reason": "卡住要寫原因:需要誰回答什麼",
@@ -152,7 +152,7 @@ register("tasks", {
152
152
  "note.back_to": "{0} 又有沒完成的子任務,已回到{1}", "note.deps_done": "{0} 的相依都完成了,可以開始",
153
153
  "note.deps_unmet": "提醒:{0} 還沒完成",
154
154
  // #2246 step 3:誰在做什麼(fleet-task-work.js)
155
- instances: "Instance", instancesTip: "fleet 有哪些 instance、各在做什麼", instancesHead: "{0} 個 · 工作中 {1}",
155
+ instances: "Agent", instancesTip: "fleet 有哪些 Agent、各在做什麼", instancesHead: "{0} 個 · 工作中 {1}",
156
156
  workSentBack: "被退回", workDoing: "進行中", workBlocked: "卡住", workReview: "待確認", workMain: "負責",
157
157
  workReady: "可以開始", workWaiting: "等前置", workSubs: "子任務 {0}/{1}", workClaimable: "沒人負責,可領",
158
158
  workWaitsFor: "等 {0}", workNone: "看板上沒有它的卡", workNewComments: "有它還沒看過的留言",