@songsid/agend 2.3.5-alpha.10 → 2.3.5-alpha.12

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 (319) hide show
  1. package/dist/accounts-view.d.ts +17 -0
  2. package/dist/accounts-view.js +24 -8
  3. package/dist/accounts-view.js.map +1 -1
  4. package/dist/agent-cli-instructions.md +2 -2
  5. package/dist/auth-api.d.ts +48 -16
  6. package/dist/auth-api.js +83 -32
  7. package/dist/auth-api.js.map +1 -1
  8. package/dist/authority/settings-role.d.ts +56 -0
  9. package/dist/authority/settings-role.js +48 -0
  10. package/dist/authority/settings-role.js.map +1 -0
  11. package/dist/backend/claude-code.d.ts +2 -0
  12. package/dist/backend/claude-code.js +32 -6
  13. package/dist/backend/claude-code.js.map +1 -1
  14. package/dist/backend/cli-env-probe.js +6 -2
  15. package/dist/backend/cli-env-probe.js.map +1 -1
  16. package/dist/backend/codex.d.ts +5 -3
  17. package/dist/backend/codex.js +31 -13
  18. package/dist/backend/codex.js.map +1 -1
  19. package/dist/backend/credential-profile.d.ts +18 -0
  20. package/dist/backend/credential-profile.js +46 -0
  21. package/dist/backend/credential-profile.js.map +1 -1
  22. package/dist/backend/kiro.js +1 -1
  23. package/dist/backend/kiro.js.map +1 -1
  24. package/dist/backend/muse.d.ts +3 -1
  25. package/dist/backend/muse.js +31 -1
  26. package/dist/backend/muse.js.map +1 -1
  27. package/dist/backend/types.d.ts +17 -1
  28. package/dist/backend/types.js.map +1 -1
  29. package/dist/backend-availability.d.ts +15 -0
  30. package/dist/backend-availability.js +37 -1
  31. package/dist/backend-availability.js.map +1 -1
  32. package/dist/build-provenance.json +1 -1
  33. package/dist/bundled-tmux-guard.d.ts +4 -0
  34. package/dist/bundled-tmux-guard.js +7 -0
  35. package/dist/bundled-tmux-guard.js.map +1 -1
  36. package/dist/claude-auth-status.d.ts +20 -8
  37. package/dist/claude-auth-status.js +38 -22
  38. package/dist/claude-auth-status.js.map +1 -1
  39. package/dist/cli-audited.d.ts +60 -0
  40. package/dist/cli-audited.js +84 -0
  41. package/dist/cli-audited.js.map +1 -0
  42. package/dist/cli-capability.d.ts +36 -5
  43. package/dist/cli-capability.js +2 -2
  44. package/dist/cli-capability.js.map +1 -1
  45. package/dist/cli-caps-module.d.ts +5 -1
  46. package/dist/cli-caps-module.js +4 -2
  47. package/dist/cli-caps-module.js.map +1 -1
  48. package/dist/cli-registry-check.js +16 -2
  49. package/dist/cli-registry-check.js.map +1 -1
  50. package/dist/cli-registry.d.ts +56 -4
  51. package/dist/cli-registry.js +1 -1
  52. package/dist/cli-registry.js.map +1 -1
  53. package/dist/cli-spec-antigravity.d.ts +12 -1
  54. package/dist/cli-spec-antigravity.js +13 -1
  55. package/dist/cli-spec-antigravity.js.map +1 -1
  56. package/dist/cli-spec-claude-code.d.ts +9 -0
  57. package/dist/cli-spec-claude-code.js +4 -2
  58. package/dist/cli-spec-claude-code.js.map +1 -1
  59. package/dist/cli-spec-codex.d.ts +10 -1
  60. package/dist/cli-spec-codex.js +5 -3
  61. package/dist/cli-spec-codex.js.map +1 -1
  62. package/dist/cli-spec-grok.d.ts +5 -0
  63. package/dist/cli-spec-grok.js +6 -1
  64. package/dist/cli-spec-grok.js.map +1 -1
  65. package/dist/cli-spec-kiro-cli.d.ts +7 -1
  66. package/dist/cli-spec-kiro-cli.js +7 -3
  67. package/dist/cli-spec-kiro-cli.js.map +1 -1
  68. package/dist/cli-spec-muse.d.ts +2 -0
  69. package/dist/cli-spec-muse.js +3 -1
  70. package/dist/cli-spec-muse.js.map +1 -1
  71. package/dist/cli-spec-opencode.d.ts +11 -1
  72. package/dist/cli-spec-opencode.js +7 -2
  73. package/dist/cli-spec-opencode.js.map +1 -1
  74. package/dist/cli.js +28 -1
  75. package/dist/cli.js.map +1 -1
  76. package/dist/create-host-account.d.ts +17 -0
  77. package/dist/create-host-account.js +47 -0
  78. package/dist/create-host-account.js.map +1 -0
  79. package/dist/daemon.d.ts +26 -0
  80. package/dist/daemon.js +131 -10
  81. package/dist/daemon.js.map +1 -1
  82. package/dist/delivery-outbox.js +7 -0
  83. package/dist/delivery-outbox.js.map +1 -1
  84. package/dist/fleet-context.d.ts +5 -1
  85. package/dist/fleet-manager.d.ts +363 -71
  86. package/dist/fleet-manager.js +1374 -367
  87. package/dist/fleet-manager.js.map +1 -1
  88. package/dist/fleet-process-handlers.d.ts +1 -1
  89. package/dist/fleet-process-handlers.js +3 -2
  90. package/dist/fleet-process-handlers.js.map +1 -1
  91. package/dist/general-knowledge/skills/concepts/SKILL.md +21 -14
  92. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +9 -8
  93. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +9 -1
  94. package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +1 -1
  95. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +27 -20
  96. package/dist/instance-lifecycle.js +33 -3
  97. package/dist/instance-lifecycle.js.map +1 -1
  98. package/dist/instructions.js +29 -6
  99. package/dist/instructions.js.map +1 -1
  100. package/dist/locale.js +125 -81
  101. package/dist/locale.js.map +1 -1
  102. package/dist/login-manager.d.ts +2 -2
  103. package/dist/login-manager.js +3 -2
  104. package/dist/login-manager.js.map +1 -1
  105. package/dist/native-model-catalog.d.ts +20 -0
  106. package/dist/native-model-catalog.js +107 -2
  107. package/dist/native-model-catalog.js.map +1 -1
  108. package/dist/public-web-gateway.js +1 -1
  109. package/dist/public-web-gateway.js.map +1 -1
  110. package/dist/public-web-link.d.ts +5 -0
  111. package/dist/public-web-link.js +8 -0
  112. package/dist/public-web-link.js.map +1 -1
  113. package/dist/runtime-api.d.ts +1 -1
  114. package/dist/runtime-api.js +104 -12
  115. package/dist/runtime-api.js.map +1 -1
  116. package/dist/runtime-autostart.d.ts +61 -0
  117. package/dist/runtime-autostart.js +161 -0
  118. package/dist/runtime-autostart.js.map +1 -0
  119. package/dist/runtime-background.d.ts +200 -0
  120. package/dist/runtime-background.js +480 -0
  121. package/dist/runtime-background.js.map +1 -0
  122. package/dist/runtime-build-info.js +5 -5
  123. package/dist/runtime-build-info.js.map +1 -1
  124. package/dist/runtime-cli-background.d.ts +92 -0
  125. package/dist/runtime-cli-background.js +336 -0
  126. package/dist/runtime-cli-background.js.map +1 -0
  127. package/dist/runtime-cli-install.d.ts +148 -8
  128. package/dist/runtime-cli-install.js +253 -59
  129. package/dist/runtime-cli-install.js.map +1 -1
  130. package/dist/runtime-cli.d.ts +8 -1
  131. package/dist/runtime-cli.js +206 -44
  132. package/dist/runtime-cli.js.map +1 -1
  133. package/dist/runtime-client-store.d.ts +11 -0
  134. package/dist/runtime-client-store.js +20 -5
  135. package/dist/runtime-client-store.js.map +1 -1
  136. package/dist/runtime-client.d.ts +23 -1
  137. package/dist/runtime-client.js +92 -6
  138. package/dist/runtime-client.js.map +1 -1
  139. package/dist/runtime-connection.d.ts +1 -1
  140. package/dist/runtime-connection.js +1 -1
  141. package/dist/runtime-connection.js.map +1 -1
  142. package/dist/runtime-coordinator.d.ts +95 -1
  143. package/dist/runtime-coordinator.js +344 -10
  144. package/dist/runtime-coordinator.js.map +1 -1
  145. package/dist/runtime-enroll-notice.d.ts +4 -0
  146. package/dist/runtime-enroll-notice.js +21 -0
  147. package/dist/runtime-enroll-notice.js.map +1 -0
  148. package/dist/runtime-enrollment.d.ts +21 -0
  149. package/dist/runtime-enrollment.js +52 -0
  150. package/dist/runtime-enrollment.js.map +1 -0
  151. package/dist/runtime-pane-native.js +4 -4
  152. package/dist/runtime-pane-native.js.map +1 -1
  153. package/dist/runtime-protocol.d.ts +78 -1
  154. package/dist/runtime-protocol.js +95 -5
  155. package/dist/runtime-protocol.js.map +1 -1
  156. package/dist/runtime-remote-accounts.d.ts +12 -0
  157. package/dist/runtime-remote-accounts.js +56 -5
  158. package/dist/runtime-remote-accounts.js.map +1 -1
  159. package/dist/runtime-remote-setup.d.ts +4 -1
  160. package/dist/runtime-remote-setup.js +4 -1
  161. package/dist/runtime-remote-setup.js.map +1 -1
  162. package/dist/runtime-update-controller.d.ts +11 -0
  163. package/dist/runtime-update-controller.js +56 -4
  164. package/dist/runtime-update-controller.js.map +1 -1
  165. package/dist/settings-api.d.ts +13 -1
  166. package/dist/settings-api.js +44 -20
  167. package/dist/settings-api.js.map +1 -1
  168. package/dist/settings-change.d.ts +5 -13
  169. package/dist/settings-change.js.map +1 -1
  170. package/dist/settings-confirmation.d.ts +11 -13
  171. package/dist/settings-confirmation.js +2 -6
  172. package/dist/settings-confirmation.js.map +1 -1
  173. package/dist/settings-effect.d.ts +5 -0
  174. package/dist/settings-effect.js +76 -10
  175. package/dist/settings-effect.js.map +1 -1
  176. package/dist/settings-http-confirmation.d.ts +8 -1
  177. package/dist/settings-http-confirmation.js +39 -13
  178. package/dist/settings-http-confirmation.js.map +1 -1
  179. package/dist/settings-request-capability.d.ts +7 -0
  180. package/dist/settings-request-capability.js +3 -1
  181. package/dist/settings-request-capability.js.map +1 -1
  182. package/dist/setup-i18n.js +4 -4
  183. package/dist/setup-i18n.js.map +1 -1
  184. package/dist/signin-keepalive.d.ts +25 -1
  185. package/dist/signin-keepalive.js +44 -1
  186. package/dist/signin-keepalive.js.map +1 -1
  187. package/dist/subagent-records.d.ts +45 -0
  188. package/dist/subagent-records.js +214 -0
  189. package/dist/subagent-records.js.map +1 -0
  190. package/dist/subagent-service.d.ts +27 -0
  191. package/dist/subagent-service.js +199 -0
  192. package/dist/subagent-service.js.map +1 -0
  193. package/dist/tmux-manager.d.ts +2 -2
  194. package/dist/tmux-manager.js +5 -3
  195. package/dist/tmux-manager.js.map +1 -1
  196. package/dist/ui/account-identity.js +7 -5
  197. package/dist/ui/accounts-keepalive.js +17 -17
  198. package/dist/ui/accounts-manage.js +34 -34
  199. package/dist/ui/accounts-view.js +68 -24
  200. package/dist/ui/agent-runtime-settings.js +1 -1
  201. package/dist/ui/backend-signin.js +67 -67
  202. package/dist/ui/chat-msg-actions.js +50 -4
  203. package/dist/ui/chat-quote.js +256 -0
  204. package/dist/ui/chat-store.js +9 -4
  205. package/dist/ui/cli-caps.js +7 -7
  206. package/dist/ui/credential-profile-select.js +4 -4
  207. package/dist/ui/general-location.js +1 -1
  208. package/dist/ui/host-install.js +290 -0
  209. package/dist/ui/hub-company-join-strings.js +3 -0
  210. package/dist/ui/hub-company-join.js +20 -2
  211. package/dist/ui/hub-owner-strings.js +5 -4
  212. package/dist/ui/hub-pairing-progress-strings.js +1 -1
  213. package/dist/ui/hub-quick-strings.js +4 -4
  214. package/dist/ui/hub-strings.js +6 -6
  215. package/dist/ui/machine-signin.js +4 -4
  216. package/dist/ui/model-picker.js +68 -0
  217. package/dist/ui/panel-chat.js +74 -13
  218. package/dist/ui/panel-fleet.js +8 -2
  219. package/dist/ui/panel-hub.js +8 -4
  220. package/dist/ui/panel-needs.js +2 -2
  221. package/dist/ui/panel-runtimes.js +232 -33
  222. package/dist/ui/panel-settings.js +7 -1
  223. package/dist/ui/panel-windows-cli.js +1 -1
  224. package/dist/ui/runtime-cli-install.js +99 -20
  225. package/dist/ui/runtime-commands.d.ts +2 -0
  226. package/dist/ui/runtime-commands.js +34 -1
  227. package/dist/ui/runtime-update-status.js +2 -2
  228. package/dist/ui/search-dialog.js +1 -0
  229. package/dist/ui/settings-access-overview.js +167 -0
  230. package/dist/ui/settings-access-strings.js +1 -1
  231. package/dist/ui/settings-catalog.js +19 -3
  232. package/dist/ui/settings-confirm.js +2 -2
  233. package/dist/ui/settings-devices.js +59 -25
  234. package/dist/ui/settings-dialogs.js +12 -13
  235. package/dist/ui/settings-guests.js +1 -1
  236. package/dist/ui/settings-hub-company-join.js +10 -7
  237. package/dist/ui/settings-hub-connection.js +121 -0
  238. package/dist/ui/settings-hub-membership.js +1 -1
  239. package/dist/ui/settings-hub-run.js +5 -6
  240. package/dist/ui/settings-hub-section.js +3 -6
  241. package/dist/ui/settings-hub.js +12 -7
  242. package/dist/ui/settings-layout.js +9 -7
  243. package/dist/ui/settings-outside.js +87 -19
  244. package/dist/ui/settings-registry.js +2 -1
  245. package/dist/ui/settings-revoke-strings.js +28 -0
  246. package/dist/ui/settings-strings.js +25 -25
  247. package/dist/ui/settings-web-authority.js +11 -4
  248. package/dist/ui/shared/accounts.css +11 -1
  249. package/dist/ui/shared/agend-auth.js +8 -1
  250. package/dist/ui/shared/app-i18n.js +10 -12
  251. package/dist/ui/shared/app-session.js +13 -16
  252. package/dist/ui/shared/app-shell.js +37 -37
  253. package/dist/ui/shared/app-store.js +2 -0
  254. package/dist/ui/shared/app.css +85 -14
  255. package/dist/ui/shared/chat-render.js +17 -5
  256. package/dist/ui/shared/chat-strings.js +4 -4
  257. package/dist/ui/shared/device-roles.js +27 -0
  258. package/dist/ui/shared/host-install.css +10 -0
  259. package/dist/ui/shared/hub-owner.css +6 -0
  260. package/dist/ui/shared/model-picker.css +21 -0
  261. package/dist/ui/shared/runtime-install.css +26 -1
  262. package/dist/ui/shared/setup-host-text.js +4 -4
  263. package/dist/ui/shared/signin.js +171 -64
  264. package/dist/ui/shared/subagent-row.css +15 -0
  265. package/dist/ui/shared/usage-dialog.js +28 -16
  266. package/dist/ui/shared/view-strings.js +7 -7
  267. package/dist/ui/shared/web-authorize.js +54 -4
  268. package/dist/ui/signin.html +19 -8
  269. package/dist/ui/structured-signin.js +30 -30
  270. package/dist/ui/subagent-row.js +72 -0
  271. package/dist/ui/web-terminal/terminal.js +9 -9
  272. package/dist/update-launch.js +4 -1
  273. package/dist/update-launch.js.map +1 -1
  274. package/dist/update-npm-env.d.ts +70 -0
  275. package/dist/update-npm-env.js +128 -0
  276. package/dist/update-npm-env.js.map +1 -0
  277. package/dist/usage/format-rich.js +1 -1
  278. package/dist/usage/format-rich.js.map +1 -1
  279. package/dist/usage/providers.js +2 -2
  280. package/dist/usage/providers.js.map +1 -1
  281. package/dist/usage/usage-api.d.ts +8 -2
  282. package/dist/usage/usage-api.js +12 -5
  283. package/dist/usage/usage-api.js.map +1 -1
  284. package/dist/web-api.d.ts +38 -4
  285. package/dist/web-api.js +370 -18
  286. package/dist/web-api.js.map +1 -1
  287. package/dist/web-auth.js +1 -1
  288. package/dist/web-auth.js.map +1 -1
  289. package/dist/web-backend-login.d.ts +2 -0
  290. package/dist/web-backend-login.js.map +1 -1
  291. package/dist/web-channel-echo.js +3 -1
  292. package/dist/web-channel-echo.js.map +1 -1
  293. package/dist/web-commands.d.ts +9 -1
  294. package/dist/web-commands.js +7 -1
  295. package/dist/web-commands.js.map +1 -1
  296. package/dist/web-host-install.d.ts +127 -0
  297. package/dist/web-host-install.js +165 -0
  298. package/dist/web-host-install.js.map +1 -0
  299. package/dist/web-remote-access.d.ts +194 -11
  300. package/dist/web-remote-access.js +458 -34
  301. package/dist/web-remote-access.js.map +1 -1
  302. package/dist/web-session.d.ts +11 -3
  303. package/dist/web-session.js.map +1 -1
  304. package/dist/web-signin-device.d.ts +16 -0
  305. package/dist/web-signin-device.js +81 -0
  306. package/dist/web-signin-device.js.map +1 -0
  307. package/dist/web-update.js +3 -1
  308. package/dist/web-update.js.map +1 -1
  309. package/dist/windows-cli-api.js +2 -1
  310. package/dist/windows-cli-api.js.map +1 -1
  311. package/dist/windows-cli-worker.d.ts +14 -0
  312. package/dist/windows-cli-worker.js +145 -1
  313. package/dist/windows-cli-worker.js.map +1 -1
  314. package/dist/windows-cli.d.ts +4 -0
  315. package/dist/windows-cli.js +9 -1
  316. package/dist/windows-cli.js.map +1 -1
  317. package/launcher/agend-install.cjs +16 -3
  318. package/package.json +1 -1
  319. package/templates/runtime-install/install.ps1 +219 -12
@@ -4,7 +4,12 @@
4
4
  // - Right-click on a message opens Reply / Copy text / Copy link. Shift+right-click, a right-click with text selected,
5
5
  // or one on a link, an image or a field keeps the browser's own menu.
6
6
  // - A long press (500 ms without moving) opens the same menu; the click and the browser menu it would also cause are
7
- // swallowed.
7
+ // swallowed. M-2789 (the leader's ruling A, "text wins on text"): a long press on a message's WORDS, or one when a
8
+ // selection has already started inside the message, is the browser's — it selects text (then the 「引用」 pill,
9
+ // chat-quote.js); the menu still opens from a long press anywhere else on the message (its padding, header, an empty
10
+ // part of the bubble). Android starts its selection only after contextmenu's own default, so the press's place
11
+ // decides, not only a selection already made. Native long-press selection can't be shown headless: confirmed on a
12
+ // real phone before a beta.
8
13
  // - Swipe left on a message: it follows the finger (up to 64 px); let go past 56 px and it is a reply. A mostly
9
14
  // vertical move is scrolling, never a reply. A swipe right is the phone drawer's (app-swipe.js), on a message too: the
10
15
  // two never fight.
@@ -12,7 +17,41 @@
12
17
  // order); Escape closes the menu.
13
18
 
14
19
  const LONG_PRESS_MS = 500, MOVE_TOLERANCE = 10, SWIPE_REPLY_PX = 56, SWIPE_MAX_PX = 64;
20
+ /** How long after a touch on a message's words its contextmenu is still that press's (the browser's selection). */
21
+ const WORDS_PRESS_MS = 1500;
22
+ const clock = () => (typeof performance !== "undefined" && performance.now ? performance.now() : Date.now());
15
23
 
24
+ /**
25
+ * On a message's own words: the press at (x, y) lands on a glyph of its rendered text — not on the blank part of a
26
+ * line, its padding, its header or its action strip (a paragraph's box is wider than a short line's glyphs: #3555
27
+ * review P2-2). The browser's own hit test (caretPositionFromPoint / caretRangeFromPoint), then the glyph's box
28
+ * beside that caret; without either API, not words (the menu, as before).
29
+ */
30
+ const GLYPH_SLACK = 2;
31
+ function onWords(target, x, y, doc) {
32
+ const e = target && (target.nodeType === 1 ? target : target.parentElement);
33
+ const md = e && e.closest ? e.closest(".msg[data-key] .md") : null;
34
+ if (!md || e.closest(".meta, .msg-actions") || !Number.isFinite(x) || !Number.isFinite(y)) return false;
35
+ let node = null, offset = 0;
36
+ if (typeof doc.caretPositionFromPoint === "function") { const p = doc.caretPositionFromPoint(x, y); if (p) { node = p.offsetNode; offset = p.offset; } }
37
+ else if (typeof doc.caretRangeFromPoint === "function") { const r = doc.caretRangeFromPoint(x, y); if (r) { node = r.startContainer; offset = r.startOffset; } }
38
+ if (!node || node.nodeType !== 3 || !md.contains(node) || typeof doc.createRange !== "function") return false;
39
+ // The caret sits between two characters: the press is on words when the glyph before or after it holds the point.
40
+ for (const at of [offset - 1, offset]) {
41
+ if (at < 0 || at >= node.data.length || !node.data[at].trim()) continue;
42
+ const rg = doc.createRange(); rg.setStart(node, at); rg.setEnd(node, at + 1);
43
+ for (const b of rg.getClientRects()) {
44
+ if (x >= b.left - GLYPH_SLACK && x <= b.right + GLYPH_SLACK && y >= b.top - GLYPH_SLACK && y <= b.bottom + GLYPH_SLACK) return true;
45
+ }
46
+ }
47
+ return false;
48
+ }
49
+ /** A selection already started inside `el` (a message): the browser's, never ours. */
50
+ function selectionIn(el, doc) {
51
+ const sel = doc.getSelection ? doc.getSelection() : null;
52
+ if (!sel || sel.isCollapsed || !String(sel).trim()) return false;
53
+ return !!((sel.anchorNode && el.contains(sel.anchorNode)) || (sel.focusNode && el.contains(sel.focusNode)));
54
+ }
16
55
  /** The message element an event is on (a person's or an agent's message of this thread), or null. */
17
56
  function messageEl(list, target) {
18
57
  const el = target && target.closest ? target.closest(".msg[data-key]") : null;
@@ -34,7 +73,7 @@ function keepsNativeMenu(e, doc) {
34
73
  */
35
74
  export function installMessageActions(list, deps) {
36
75
  const doc = list.ownerDocument, win = doc.defaultView;
37
- let menu = null, press = null, swipe = null, swallowClick = false;
76
+ let menu = null, press = null, swipe = null, swallowClick = false, wordsPressAt = -Infinity;
38
77
 
39
78
  function closeMenu() {
40
79
  if (!menu) return;
@@ -88,6 +127,8 @@ export function installMessageActions(list, deps) {
88
127
  cancelPress(); // Android's long press fires this itself: one menu
89
128
  const el = messageEl(list, e.target);
90
129
  if (!el || keepsNativeMenu(e, doc)) return;
130
+ // M-2789: a long press on the words (or a selection begun in this message) is the browser's — its selection.
131
+ if (selectionIn(el, doc) || (clock() - wordsPressAt < WORDS_PRESS_MS && onWords(e.target, e.clientX, e.clientY, doc))) return;
91
132
  const row = deps.messageOf(el.dataset.key);
92
133
  if (!row) return;
93
134
  e.preventDefault();
@@ -117,9 +158,14 @@ export function installMessageActions(list, deps) {
117
158
  if (!el) return;
118
159
  const t0 = e.touches[0];
119
160
  const native = keepsNativeMenu({ target: e.target, shiftKey: false }, doc); // a link, an image, code: the browser's
120
- press = native ? null : { el, x: t0.clientX, y: t0.clientY, timer: setTimeout(() => {
161
+ // M-2789: a press on the message's words is the browser's text selection, not our menu (swipe-left Reply stays).
162
+ const words = onWords(e.target, t0.clientX, t0.clientY, doc);
163
+ wordsPressAt = words ? clock() : -Infinity;
164
+ press = native || words ? null : { el, x: t0.clientX, y: t0.clientY, timer: setTimeout(() => {
121
165
  const row = deps.messageOf(el.dataset.key);
122
- press = null; cancelSwipe();
166
+ press = null;
167
+ if (selectionIn(el, doc)) return; // a selection has started here: it stays the browser's
168
+ cancelSwipe();
123
169
  if (!row) return;
124
170
  swallowClick = true; setTimeout(() => { swallowClick = false; }, 700);
125
171
  openMenu(row, t0.clientX, t0.clientY);
@@ -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
+ }
@@ -534,21 +534,26 @@ export function createChatStore(deps) {
534
534
  async function runCommand(target, command, args, opts = {}) {
535
535
  if (!target || !commandFree(target)) return;
536
536
  const alive = opts.alive || (() => true);
537
- s.commands[target] = { command, busy: true };
537
+ if (!alive()) return;
538
+ const previous = s.commands[target];
539
+ const pending = { command, busy: true, ...(opts.action && previous?.command === command ? { choices: previous.choices } : {}) };
540
+ s.commands[target] = pending;
538
541
  changed(target);
539
542
  const post = async (extra) => {
540
- try { return await api("POST", "/ui/command", { instance: target, command, ...(args ? { args } : {}), ...extra }); }
543
+ try { return await api("POST", "/ui/command", { instance: target, command, ...(args ? { args } : {}), ...(opts.action ? { action: opts.action } : {}), ...extra }); }
541
544
  catch (err) { return { error: err && err.message ? err.message : t("chat.disconnected") }; }
542
545
  };
543
546
  let r = await post({});
547
+ if (!alive() || s.commands[target] !== pending) return;
544
548
  if (r && r.confirm) {
545
549
  const yes = deps.confirm ? await deps.confirm({ title: `/${command}`, message: r.confirm.message, confirmLabel: t(command === "backend" ? "chat.cmdConfirmBackend" : "chat.cmdConfirm"), danger: true }) : false;
546
- if (!yes || !alive()) { delete s.commands[target]; changed(target); return; }
550
+ if (!yes || !alive() || s.commands[target] !== pending) { if (s.commands[target] === pending) { delete s.commands[target]; changed(target); } return; }
547
551
  r = await post({ confirm: r.confirm.token });
552
+ if (!alive() || s.commands[target] !== pending) return;
548
553
  }
549
554
  const follow = r && r.follow && r.follow.kind === "compact" ? r.follow : null;
550
555
  showCommand(target, r && r.choices ? { command, busy: false, choices: r.choices }
551
- : r && r.error ? { command, busy: false, error: r.error }
556
+ : r && r.error ? { command, busy: false, error: r.error, ...(opts.action ? { choices: pending.choices } : {}) }
552
557
  : { command, busy: false, text: (r && r.text) || "", ...(r && r.sent === true ? { sent: true } : {}), ...(follow ? { compact: follow.id ? "running" : "unknown", watch: follow.id } : {}) });
553
558
  changed(target);
554
559
  }
@@ -1,13 +1,13 @@
1
1
  // GENERATED by `npx tsx scripts/gen-cli-caps.mts` from src/cli-registry.ts. Do not edit it: tests/cli-registry-ui-caps.test.ts fails while it differs from the registry.
2
2
  // What the dashboard's scripts may ask about a CLI (see src/cli-caps-module.ts). Booleans and words only; nothing here runs anything.
3
3
  export const CLI_CAPS = Object.freeze({
4
- "claude-code": Object.freeze({ signOut: true, namedAccounts: true, carry: "carries", structuredSignIn: true, structuredNamedSignIn: true, firstRunSignIn: "browser", runtimeInstall: true, runtimeName: "Claude Code" }),
5
- "codex": Object.freeze({ signOut: true, namedAccounts: true, carry: "keeps", structuredSignIn: true, structuredNamedSignIn: false, firstRunSignIn: "browser", runtimeInstall: true, runtimeName: "Codex" }),
6
- "kiro-cli": Object.freeze({ signOut: true, namedAccounts: true, carry: "handover", structuredSignIn: true, structuredNamedSignIn: false, firstRunSignIn: "browser", runtimeInstall: false, runtimeName: null }),
7
- "antigravity": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: "console", runtimeInstall: false, runtimeName: null }),
8
- "grok": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: false, runtimeName: null }),
9
- "muse": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: false, runtimeName: null }),
10
- "opencode": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: false, runtimeName: null }),
4
+ "claude-code": Object.freeze({ signOut: true, namedAccounts: true, carry: "carries", structuredSignIn: true, structuredNamedSignIn: true, firstRunSignIn: "browser", runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: false, runtimeName: "Claude Code" }),
5
+ "codex": Object.freeze({ signOut: true, namedAccounts: true, carry: "keeps", structuredSignIn: true, structuredNamedSignIn: false, firstRunSignIn: "browser", runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: false, runtimeName: "Codex" }),
6
+ "kiro-cli": Object.freeze({ signOut: true, namedAccounts: true, carry: "handover", structuredSignIn: true, structuredNamedSignIn: false, firstRunSignIn: "browser", runtimeInstall: false, runtimeUpdate: false, runtimeUpdateLatest: false, runtimeName: null }),
7
+ "antigravity": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: "console", runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: true, runtimeName: "Antigravity" }),
8
+ "grok": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: false, runtimeUpdate: false, runtimeUpdateLatest: false, runtimeName: null }),
9
+ "muse": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: false, runtimeUpdate: false, runtimeUpdateLatest: false, runtimeName: null }),
10
+ "opencode": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: false, runtimeName: "OpenCode" }),
11
11
  });
12
12
  /** The CLIs the first-run page offers a sign-in for, in its order. */
13
13
  export const FIRST_RUN_BACKENDS = Object.freeze(["kiro-cli", "claude-code", "codex", "antigravity"]);
@@ -7,15 +7,15 @@ import { identityText } from "./account-identity.js";
7
7
  * stays on that computer, and a Runtime reports nothing but each name and whether it is signed in. No path, e-mail or token is read here.
8
8
  */
9
9
  register("claudeAccount", {
10
- en: { label:"Claude account", none:"This computer's default sign-in", default:"default", signedOut:"not signed in", unchecked:"not checked", notReported:"not reported",
10
+ en: { label:"Claude account", none:"This computer's default connection", default:"default", signedOut:"not connected", unchecked:"not checked", notReported:"not reported",
11
11
  old:"Update the Runtime on that computer to choose a Claude account for this agent.",
12
12
  empty:"No Claude accounts reported yet. On that computer run agend-runtime login claude-code NAME, then choose Detect again in that computer's CLI diagnostics (Settings → Runtime).",
13
- hint:"The account is chosen by name; its sign-in stays on that computer. A name that does not exist or is not signed in there is refused, never replaced by another account.",
13
+ hint:"The account is chosen by name; its connection stays on that computer. A name that does not exist or is not connected there is refused, never replaced by another account.",
14
14
  changeNote:"Changing the account starts a new conversation." },
15
- "zh-TW": { label:"Claude 帳號", none:"這台電腦的預設登入", default:"預設", signedOut:"尚未登入", unchecked:"未確認", notReported:"未回報",
15
+ "zh-TW": { label:"Claude 帳號", none:"這台電腦的預設連接", default:"預設", signedOut:"尚未連接", unchecked:"未確認", notReported:"未回報",
16
16
  old:"請更新那台電腦上的 Runtime,才能為這個 Agent 選擇 Claude 帳號。",
17
17
  empty:"尚未回報任何 Claude 帳號。請在那台電腦執行 agend-runtime login claude-code 名稱,再到設定 → Runtime,在該電腦的「CLI 診斷」按「重新偵測」。",
18
- hint:"帳號以名稱選擇,登入資料只保留在那台電腦。不存在或尚未登入的名稱會被拒絕,不會改用其他帳號。",
18
+ hint:"帳號以名稱選擇,連接資料只保留在那台電腦。不存在或尚未連接的名稱會被拒絕,不會改用其他帳號。",
19
19
  changeNote:"更換帳號會開始新的對話。" },
20
20
  });
21
21
  export const accountText = (key, ...values) => t(`claudeAccount.${key}`, ...values);
@@ -76,7 +76,7 @@ function LocationRow({ row, machines, attentionOnly, refresh }) {
76
76
  ${["claude-code", "codex"].map(id => html`<option value=${id} disabled=${!machine?.clis.some(item => item.id === id)}>${id}</option>`)}
77
77
  </select></div>` : null}
78
78
  </div>
79
- ${target !== "host" ? html`<${ModelSelect} value=${model} onChange=${setModel} backend=${cli} runtime="windows" machineId=${target} instance=${row.name} />` : null}
79
+ ${target !== "host" ? html`<${ModelSelect} value=${model} onChange=${setModel} backend=${cli} runtime="windows" machineId=${target} />` : null}
80
80
  <div class="general-location-actions">
81
81
  <button type="button" class="btn btn-sm" onClick=${refresh}>${t("settings.refresh")}</button>
82
82
  <button type="button" class="btn btn-primary btn-sm" disabled=${busy || row.switching || target === "host" && !row.canSwitchBack || target !== "host" && (!machine?.online || !machine.clis.some(item => item.id === cli))} onClick=${() => propose(target === "host" ? { location: "host" } : { location: "windows", machineId: target, cli, model })}>${t("settings.save")}</button>