@songsid/agend 2.4.0-beta.15 → 2.4.0-beta.17

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 (217) hide show
  1. package/dist/accounts-profiles.d.ts +1 -1
  2. package/dist/accounts-view.d.ts +3 -0
  3. package/dist/accounts-view.js.map +1 -1
  4. package/dist/auth-api.js +6 -0
  5. package/dist/auth-api.js.map +1 -1
  6. package/dist/backend/claude-code.d.ts +15 -1
  7. package/dist/backend/claude-code.js +64 -8
  8. package/dist/backend/claude-code.js.map +1 -1
  9. package/dist/backend/kiro.js +6 -1
  10. package/dist/backend/kiro.js.map +1 -1
  11. package/dist/backend/types.d.ts +8 -0
  12. package/dist/backend/types.js.map +1 -1
  13. package/dist/backend-command.d.ts +4 -2
  14. package/dist/backend-command.js +3 -0
  15. package/dist/backend-command.js.map +1 -1
  16. package/dist/browser-backend-signins.d.ts +1 -0
  17. package/dist/browser-backend-signins.js +3 -1
  18. package/dist/browser-backend-signins.js.map +1 -1
  19. package/dist/build-provenance.json +1 -1
  20. package/dist/classic-channel-manager.d.ts +1 -0
  21. package/dist/classic-channel-manager.js +4 -1
  22. package/dist/classic-channel-manager.js.map +1 -1
  23. package/dist/claude-credential-change.d.ts +22 -0
  24. package/dist/claude-credential-change.js +47 -0
  25. package/dist/claude-credential-change.js.map +1 -0
  26. package/dist/claude-credential-launch.d.ts +63 -0
  27. package/dist/claude-credential-launch.js +315 -0
  28. package/dist/claude-credential-launch.js.map +1 -0
  29. package/dist/claude-credential-runner.d.ts +1 -0
  30. package/dist/claude-credential-runner.js +56 -0
  31. package/dist/claude-credential-runner.js.map +1 -0
  32. package/dist/claude-credential-vault.d.ts +57 -0
  33. package/dist/claude-credential-vault.js +277 -0
  34. package/dist/claude-credential-vault.js.map +1 -0
  35. package/dist/claude-request-observation.d.ts +7 -0
  36. package/dist/claude-request-observation.js +26 -0
  37. package/dist/claude-request-observation.js.map +1 -0
  38. package/dist/claude-setup-token-transport.d.ts +9 -0
  39. package/dist/claude-setup-token-transport.js +82 -0
  40. package/dist/claude-setup-token-transport.js.map +1 -0
  41. package/dist/claude-setup-token.d.ts +51 -0
  42. package/dist/claude-setup-token.js +83 -0
  43. package/dist/claude-setup-token.js.map +1 -0
  44. package/dist/cli-audited.js +15 -12
  45. package/dist/cli-audited.js.map +1 -1
  46. package/dist/command-report.d.ts +11 -0
  47. package/dist/command-report.js +2 -0
  48. package/dist/command-report.js.map +1 -0
  49. package/dist/config-validator.js +9 -0
  50. package/dist/config-validator.js.map +1 -1
  51. package/dist/config.js +4 -2
  52. package/dist/config.js.map +1 -1
  53. package/dist/daemon.d.ts +5 -0
  54. package/dist/daemon.js +65 -3
  55. package/dist/daemon.js.map +1 -1
  56. package/dist/fleet-level-config.d.ts +1 -1
  57. package/dist/fleet-level-config.js +1 -0
  58. package/dist/fleet-level-config.js.map +1 -1
  59. package/dist/fleet-manager.d.ts +53 -2
  60. package/dist/fleet-manager.js +511 -22
  61. package/dist/fleet-manager.js.map +1 -1
  62. package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -1
  63. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +25 -6
  64. package/dist/host-monitoring-config.d.ts +15 -0
  65. package/dist/host-monitoring-config.js +36 -0
  66. package/dist/host-monitoring-config.js.map +1 -0
  67. package/dist/host-monitoring-history-files.d.ts +2 -0
  68. package/dist/host-monitoring-history-files.js +16 -0
  69. package/dist/host-monitoring-history-files.js.map +1 -0
  70. package/dist/host-monitoring-history-policy.d.ts +55 -0
  71. package/dist/host-monitoring-history-policy.js +93 -0
  72. package/dist/host-monitoring-history-policy.js.map +1 -0
  73. package/dist/host-monitoring-history-store.d.ts +52 -0
  74. package/dist/host-monitoring-history-store.js +176 -0
  75. package/dist/host-monitoring-history-store.js.map +1 -0
  76. package/dist/host-monitoring-history-worker.d.ts +1 -0
  77. package/dist/host-monitoring-history-worker.js +50 -0
  78. package/dist/host-monitoring-history-worker.js.map +1 -0
  79. package/dist/host-monitoring-history.d.ts +71 -0
  80. package/dist/host-monitoring-history.js +265 -0
  81. package/dist/host-monitoring-history.js.map +1 -0
  82. package/dist/host-monitoring-platform.d.ts +73 -0
  83. package/dist/host-monitoring-platform.js +273 -0
  84. package/dist/host-monitoring-platform.js.map +1 -0
  85. package/dist/host-monitoring-runtime.d.ts +34 -0
  86. package/dist/host-monitoring-runtime.js +80 -0
  87. package/dist/host-monitoring-runtime.js.map +1 -0
  88. package/dist/host-monitoring-settings-store.d.ts +5 -0
  89. package/dist/host-monitoring-settings-store.js +49 -0
  90. package/dist/host-monitoring-settings-store.js.map +1 -0
  91. package/dist/host-monitoring.d.ts +106 -0
  92. package/dist/host-monitoring.js +157 -0
  93. package/dist/host-monitoring.js.map +1 -0
  94. package/dist/hub/group-policy/resources.d.ts +1 -1
  95. package/dist/instance-config-impact.js +1 -1
  96. package/dist/instance-config-impact.js.map +1 -1
  97. package/dist/instructions.js +1 -0
  98. package/dist/instructions.js.map +1 -1
  99. package/dist/locale.d.ts +2 -0
  100. package/dist/locale.js +13 -1
  101. package/dist/locale.js.map +1 -1
  102. package/dist/office-share-page.js +1 -1
  103. package/dist/office-share-page.js.map +1 -1
  104. package/dist/profile-signins.d.ts +1 -0
  105. package/dist/profile-signins.js +3 -1
  106. package/dist/profile-signins.js.map +1 -1
  107. package/dist/public-web-gateway.js +6 -0
  108. package/dist/public-web-gateway.js.map +1 -1
  109. package/dist/public-web-link.d.ts +21 -2
  110. package/dist/public-web-link.js +22 -2
  111. package/dist/public-web-link.js.map +1 -1
  112. package/dist/runtime-cli-install.js +17 -16
  113. package/dist/runtime-cli-install.js.map +1 -1
  114. package/dist/settings-api.d.ts +15 -0
  115. package/dist/settings-api.js +154 -8
  116. package/dist/settings-api.js.map +1 -1
  117. package/dist/settings-baseline.d.ts +1 -0
  118. package/dist/settings-baseline.js +5 -4
  119. package/dist/settings-baseline.js.map +1 -1
  120. package/dist/settings-change.js +10 -0
  121. package/dist/settings-change.js.map +1 -1
  122. package/dist/settings-effect.d.ts +2 -0
  123. package/dist/settings-effect.js +15 -1
  124. package/dist/settings-effect.js.map +1 -1
  125. package/dist/topic-commands.d.ts +7 -1
  126. package/dist/topic-commands.js +98 -88
  127. package/dist/topic-commands.js.map +1 -1
  128. package/dist/transcript-monitor.d.ts +1 -0
  129. package/dist/transcript-monitor.js +18 -0
  130. package/dist/transcript-monitor.js.map +1 -1
  131. package/dist/types.d.ts +2 -0
  132. package/dist/ui/accounts-view.js +16 -8
  133. package/dist/ui/backend-signin.js +3 -1
  134. package/dist/ui/chat-commands.js +2 -0
  135. package/dist/ui/chat-popout-transport.js +49 -19
  136. package/dist/ui/chat-popout.js +15 -1
  137. package/dist/ui/chat-store.js +1 -1
  138. package/dist/ui/claude-credentials.js +123 -0
  139. package/dist/ui/claude-setup-token.js +36 -0
  140. package/dist/ui/contact-auth-client.js +7 -2
  141. package/dist/ui/contact-auth-strings.js +45 -14
  142. package/dist/ui/contact-authorizations.js +47 -26
  143. package/dist/ui/contact-needs.js +4 -4
  144. package/dist/ui/fleet-canvas.js +3 -2
  145. package/dist/ui/fleet-office-card.js +414 -41
  146. package/dist/ui/fleet-office-dialogue.js +3 -3
  147. package/dist/ui/fleet-office-pack.d.ts +67 -1
  148. package/dist/ui/fleet-office-pack.js +412 -18
  149. package/dist/ui/fleet-office-play.js +401 -3
  150. package/dist/ui/fleet-office-skin.js +133 -21
  151. package/dist/ui/fleet-office-store.js +41 -0
  152. package/dist/ui/fleet-office-zones.js +34 -9
  153. package/dist/ui/fleet-office.js +513 -62
  154. package/dist/ui/host-health-model.js +42 -0
  155. package/dist/ui/host-health.js +74 -0
  156. package/dist/ui/office-share-page.js +5 -1
  157. package/dist/ui/panel-chat.js +146 -46
  158. package/dist/ui/panel-fleet.js +24 -11
  159. package/dist/ui/panel-hub.js +5 -1
  160. package/dist/ui/panel-settings.js +5 -4
  161. package/dist/ui/preview-popout.js +134 -0
  162. package/dist/ui/reply-file-preview.js +1 -1
  163. package/dist/ui/search-dialog.js +8 -1
  164. package/dist/ui/settings-capabilities.js +2 -0
  165. package/dist/ui/settings-host-monitoring.js +69 -0
  166. package/dist/ui/settings-registry.js +4 -1
  167. package/dist/ui/settings-shared.js +3 -2
  168. package/dist/ui/shared/accounts.css +8 -4
  169. package/dist/ui/shared/agent-sheet.js +5 -2
  170. package/dist/ui/shared/app-route.js +1 -1
  171. package/dist/ui/shared/app.css +248 -27
  172. package/dist/ui/shared/app.js +8 -1
  173. package/dist/ui/shared/chat-strings.js +10 -4
  174. package/dist/ui/shared/chat-thread.js +42 -10
  175. package/dist/ui/shared/info-tip.js +64 -0
  176. package/dist/ui/shared/instance-nav.js +47 -5
  177. package/dist/ui/shared/jump-idle.js +36 -0
  178. package/dist/ui/shared/office-dialogue.css +12 -0
  179. package/dist/ui/shared/preview-panel.js +44 -18
  180. package/dist/ui/shared/preview-popout.css +11 -0
  181. package/dist/ui/shared/theme.js +15 -1
  182. package/dist/ui/shared/ui-menu.js +17 -11
  183. package/dist/ui/shared/usage-dialog.js +9 -34
  184. package/dist/ui/shared/view-strings.js +2 -0
  185. package/dist/usage/i18n-keys.d.ts +1 -1
  186. package/dist/usage/i18n-keys.js +1 -1
  187. package/dist/usage/i18n-keys.js.map +1 -1
  188. package/dist/usage/providers.d.ts +1 -0
  189. package/dist/usage/providers.js +14 -1
  190. package/dist/usage/providers.js.map +1 -1
  191. package/dist/usage/usage-api.js +5 -2
  192. package/dist/usage/usage-api.js.map +1 -1
  193. package/dist/web-api.d.ts +6 -1
  194. package/dist/web-api.js +83 -9
  195. package/dist/web-api.js.map +1 -1
  196. package/dist/web-chat-history.d.ts +7 -1
  197. package/dist/web-chat-history.js +19 -3
  198. package/dist/web-chat-history.js.map +1 -1
  199. package/dist/web-claude-credentials.d.ts +31 -0
  200. package/dist/web-claude-credentials.js +138 -0
  201. package/dist/web-claude-credentials.js.map +1 -0
  202. package/dist/web-commands.d.ts +5 -2
  203. package/dist/web-commands.js +4 -2
  204. package/dist/web-commands.js.map +1 -1
  205. package/dist/web-office-skins.d.ts +7 -2
  206. package/dist/web-office-skins.js +42 -16
  207. package/dist/web-office-skins.js.map +1 -1
  208. package/dist/web-session.d.ts +20 -1
  209. package/dist/web-session.js +27 -0
  210. package/dist/web-session.js.map +1 -1
  211. package/dist/web-shell-routes.d.ts +1 -1
  212. package/dist/web-shell-routes.js +1 -1
  213. package/dist/web-shell-routes.js.map +1 -1
  214. package/dist/web-terminal.d.ts +4 -0
  215. package/dist/web-terminal.js +16 -1
  216. package/dist/web-terminal.js.map +1 -1
  217. package/package.json +1 -1
@@ -0,0 +1,64 @@
1
+ // M-3443 (the user, 11-20): the one info icon (ⓘ) of the web UI — docs/design/ui-style-guide.md, "Info icons". Before it
2
+ // there were three: Settings' InfoTip (a bordered "i"), and the usage dialog's ⓘ, as a button in a full card and as a
3
+ // hover-only image (role=img) in a compact row that a keyboard could not reach and a phone could only tap by luck.
4
+ //
5
+ // For secondary detail only — what a field is for, what a choice leaves out, where something lives — never information the
6
+ // person needs to act, a warning, or an action. Its words are a sentence or two.
7
+ //
8
+ // One button: its detail on a hover (where the pointer can hover), a keyboard focus, or a tap or click (which keeps it open
9
+ // until the next tap); Esc, a click elsewhere, a scroll or the focus leaving it closes it (and unpins it: a later Esc
10
+ // elsewhere is never taken). A hover covers the ⓘ and its bubble: the pointer may cross the gap into the bubble (to read or
11
+ // select its words) without it closing; it closes LEAVE_MS after the pointer has left both. On a touch screen its box
12
+ // is the --tap size (44px) while it draws 18px (negative margins keep the row's layout). The bubble is fixed to the window
13
+ // (no rounded group's overflow clips it), placed by CSS custom properties (the page allows no style attribute), hidden while
14
+ // closed — always the button's description (aria-describedby), so a screen reader says it on focus. Inside a <label> a press
15
+ // opens it, never toggles the label's control.
16
+ import { html, useEffect, useLayoutEffect, useRef, useState } from "./app-html.js";
17
+ import { Icon } from "./ui-icons.js";
18
+
19
+ let seq = 0;
20
+ const BUBBLE_MAX = 280;
21
+ const LEAVE_MS = 150;
22
+
23
+ /** `text`: the detail. `label`: the button's name ("About <what it explains>"). `cls`: a class for its place. */
24
+ export function InfoTip({ text, label, cls = "" }) {
25
+ const [at, setAt] = useState(null);
26
+ const [pinned, setPinned] = useState(false);
27
+ const btn = useRef(null), bubble = useRef(null), id = useRef(null), wrap = useRef(null), leaving = useRef(null);
28
+ if (!id.current) id.current = `info-tip-${++seq}`;
29
+ const show = () => {
30
+ // Beside the ⓘ as drawn (on a touch screen the button's box is the larger tap target around it).
31
+ const mark = btn.current && (btn.current.querySelector?.("svg") || btn.current);
32
+ const r = mark && mark.getBoundingClientRect ? mark.getBoundingClientRect() : null;
33
+ const w = (typeof window !== "undefined" && window.innerWidth) || 0, h = (typeof window !== "undefined" && window.innerHeight) || 0;
34
+ if (!r || !w) { setAt({ x: 8, y: 8, above: false }); return; }
35
+ const above = !!h && r.bottom + 120 > h;
36
+ const width = Math.min(BUBBLE_MAX, w - 16);
37
+ setAt({ x: Math.round(Math.max(8, Math.min(r.left - 8, w - width - 8))), y: Math.round(above ? h - r.top + 6 : r.bottom + 6), above });
38
+ };
39
+ const stay = () => { if (leaving.current) { clearTimeout(leaving.current); leaving.current = null; } };
40
+ const hide = () => { stay(); setAt(null); setPinned(false); };
41
+ useEffect(() => () => stay(), []);
42
+ useLayoutEffect(() => {
43
+ const b = bubble.current;
44
+ if (b && b.style && at) { b.style.setProperty("--tip-x", `${at.x}px`); b.style.setProperty("--tip-y", `${at.y}px`); }
45
+ }, [at]);
46
+ useEffect(() => {
47
+ if (!at) return undefined;
48
+ // Esc closes this bubble only: a dialog it sits in stays open (a native <dialog> cancels on the key's default action).
49
+ const esc = (e) => { if (e.key === "Escape") { e.stopPropagation(); e.preventDefault(); hide(); } };
50
+ const away = (e) => { if (wrap.current && !wrap.current.contains(e.target)) hide(); };
51
+ document.addEventListener("keydown", esc, true); document.addEventListener("click", away); window.addEventListener("scroll", hide, true);
52
+ return () => { document.removeEventListener("keydown", esc, true); document.removeEventListener("click", away); window.removeEventListener("scroll", hide, true); };
53
+ }, [!!at]);
54
+ // A hover shows it unless the screen says it has none (a phone's tap also sends a mouseenter; the tap then pins it).
55
+ const canHover = () => typeof matchMedia !== "function" || !matchMedia("(hover: none)").matches;
56
+ const press = (e) => { e.stopPropagation(); e.preventDefault(); if (pinned) hide(); else { show(); setPinned(true); } };
57
+ // The hover is the whole tip's (the ⓘ, its bubble, the gap between): leaving starts a short wait that coming back cancels.
58
+ const enter = () => { stay(); if (!at && canHover()) show(); };
59
+ const leave = () => { if (pinned) return; stay(); leaving.current = setTimeout(() => { leaving.current = null; setAt(null); }, LEAVE_MS); };
60
+ return html`<span class=${`info-tip${cls ? ` ${cls}` : ""}`} ref=${wrap} onMouseEnter=${enter} onMouseLeave=${leave}><button type="button" class="info-tip-btn" ref=${btn} aria-label=${label}
61
+ aria-expanded=${at ? "true" : "false"} aria-describedby=${id.current}
62
+ onFocus=${show} onBlur=${hide} onClick=${press}><${Icon} name="info" size=${14} /></button><span
63
+ id=${id.current} ref=${bubble} role="tooltip" class=${`info-tip-body${at && at.above ? " above" : ""}`} hidden=${!at}>${text}</span></span>`;
64
+ }
@@ -25,8 +25,8 @@ import { identityClasses, identityOf, paintIdentity, useIdentityColors } from ".
25
25
 
26
26
  // Keep new copy beside its caller: a retained view-strings.js still links and renders the menu.
27
27
  register("agentRow", {
28
- en: { actions: "Actions for {0}", add: "Add to favorites", remove: "Remove from favorites" },
29
- "zh-TW": { actions: "{0} 的操作", add: "加入最愛", remove: "移出最愛" },
28
+ en: { actions: "Actions for {0}", add: "Add to favorites", remove: "Remove from favorites", contextAdd: "Add to favorites", contextRemove: "Remove from favorites" },
29
+ "zh-TW": { actions: "{0} 的操作", add: "加入最愛", remove: "移出最愛", contextAdd: "加到我的最愛", contextRemove: "從我的最愛移除" },
30
30
  });
31
31
 
32
32
  /** view.* text with named values. */
@@ -36,6 +36,7 @@ function tn(key, values = {}) {
36
36
  return s;
37
37
  }
38
38
  const stored = (k) => { try { return localStorage.getItem(k); } catch { return null; } };
39
+ const contextNow = () => globalThis.performance?.now?.() ?? Date.now();
39
40
  /** A row's instance name: `name` (status frames) or `instance_name` (View's roster). */
40
41
  const nameOf = (it) => (it && (it.name != null ? it.name : it.instance_name)) || "";
41
42
 
@@ -593,7 +594,44 @@ function SortMenu({ sort, phone = false }) {
593
594
  */
594
595
  export function InstanceNav({ route, items, loaded = true, exec = {}, awaiting = {}, viewOnly = false, onPick, onNew = null }) {
595
596
  const nav = useStore(navStore);
596
- const workspace = useStore(appStore).chatWorkspace;
597
+ const app = useStore(appStore), workspace = app.chatWorkspace;
598
+ const [context, setContext] = useState(null);
599
+ const hold = useRef(null), heldClick = useRef(null), contextId = useRef(0);
600
+ const cancelHold = () => { if (hold.current) clearTimeout(hold.current.timer); hold.current = null; };
601
+ useLayoutEffect(() => {
602
+ const scroll = () => cancelHold();
603
+ window.addEventListener("scroll", scroll, true);
604
+ return () => { cancelHold(); window.removeEventListener("scroll", scroll, true); };
605
+ }, []);
606
+ useLayoutEffect(() => { cancelHold(); setContext(null); }, [route?.panel, route?.instance, viewOnly]);
607
+ const contextAllowed = () => !viewOnly && !guestPage() && typeof app.sidebarChatMenu === "function";
608
+ const openContext = (name, event) => {
609
+ if (!contextAllowed()) return false;
610
+ event.preventDefault(); event.stopPropagation(); cancelHold();
611
+ const row = event.currentTarget.closest?.("[data-agent-row]") || event.currentTarget;
612
+ const anchor = row.querySelector("a.inst");
613
+ if (!anchor) return false;
614
+ anchor.focus({ preventScroll: true });
615
+ setContext({name, anchor, id: ++contextId.current}); return true;
616
+ };
617
+ const contextEvents = name => ({
618
+ onContextMenu: event => openContext(name, event),
619
+ onKeyDown: event => { if (event.key === "Escape" && event.target.closest?.("dialog[open]")) { event.stopPropagation(); return; } if (event.key === "ContextMenu" || (event.key === "F10" && event.shiftKey)) openContext(name, event); },
620
+ onPointerDown: event => {
621
+ cancelHold();
622
+ if (!contextAllowed() || event.pointerType !== "touch" || (event.button != null && event.button !== 0) || event.target.closest?.("button")) return;
623
+ const currentTarget = event.currentTarget, x = event.clientX, y = event.clientY;
624
+ hold.current = {name, x, y, pointerId:event.pointerId, timer:setTimeout(() => {
625
+ hold.current = null;
626
+ if (!currentTarget.isConnected || !contextAllowed()) return;
627
+ heldClick.current = {name, pointerId:event.pointerId, until:contextNow()+1000};
628
+ openContext(name, {currentTarget, preventDefault(){}, stopPropagation(){}});
629
+ }, 500)};
630
+ },
631
+ onPointerMove: event => { const h = hold.current; if (h && (Math.abs(event.clientX-h.x)>8 || Math.abs(event.clientY-h.y)>8)) cancelHold(); },
632
+ onPointerUp: cancelHold, onPointerCancel: cancelHold, onDragStart: cancelHold,
633
+ onClickCapture: event => { if (heldClick.current?.name === name && contextNow() < heldClick.current.until && (!event.target.closest?.("[role=menu],dialog") || event.pointerId === heldClick.current.pointerId)) { heldClick.current=null; event.preventDefault(); event.stopPropagation(); } },
634
+ });
597
635
  const styledMenus = typeof getComputedStyle === "function" && getComputedStyle(document.documentElement).getPropertyValue?.("--agent-menu-version")?.trim() === "1";
598
636
  const names = useStore(namesStore); // #1722: which name leads
599
637
  const compact = useStore(sidebarDensityStore).value === "compact";
@@ -771,7 +809,10 @@ export function InstanceNav({ route, items, loaded = true, exec = {}, awaiting =
771
809
  onSelect: () => { if (!shown.active && !favsSorted) { focusRow.current = name; moveFavorite(name, 1, known); } } },
772
810
  ] : []),
773
811
  ].filter(Boolean);
774
- return html`<li key=${name} data-agent-row=${name} class=${`v-li${!compact && two ? " two-line" : ""}`}><a class=${`inst v-inst${on ? " active" : ""}${starred ? " inst-favorite" : ""}${fade > 0 ? " replied" : ""}${mins != null && mins < 1 ? " just" : ""} ${identityClasses(id)}`}
812
+ const favorite = menuItems.find(item => item.key === "favorite");
813
+ const contextFavorite = favorite ? { ...favorite, label: t(`agentRow.${starred ? "contextRemove" : "contextAdd"}`),
814
+ onSelect: () => { setContext(null); favorite.onSelect(); } } : null;
815
+ return html`<li key=${name} data-agent-row=${name} class=${`v-li${!compact && two ? " two-line" : ""}`} ...${contextEvents(name)}><a class=${`inst v-inst${on ? " active" : ""}${starred ? " inst-favorite" : ""}${fade > 0 ? " replied" : ""}${mins != null && mins < 1 ? " just" : ""} ${identityClasses(id)}`}
775
816
  ref=${(el) => { paintIdentity(el, id); paintReply(el, fade); }} href=${rowPath(name)} title=${instanceTooltip(it)}
776
817
  aria-label=${compact ? [...new Set([label, name, labelOf(it)])].join(" · ") : undefined}
777
818
  aria-current=${on ? "page" : undefined} onClick=${onPick} ...${dragProps({ type: "instance", name, group: g }, !fav)}>
@@ -787,7 +828,8 @@ export function InstanceNav({ route, items, loaded = true, exec = {}, awaiting =
787
828
  </a>${menuItems.length ? html`<${Menu} cls=${`inst-workspace inst-row-menu agent-menu${starred ? " is-favorite" : ""}`} fit=${true} topLayer=${true}
788
829
  ownerKey=${name} label=${t("agentRow.actions", label)} items=${menuItems}
789
830
  trigger=${styledMenus ? html`<span class="inst-menu-star" aria-hidden="true">${starred ? html`<${Icon} name="star" size=${14} />` : null}</span><span class="inst-menu-more" aria-hidden="true"><${Icon} name="more" size=${16} /></span>` : undefined} />`
790
- : starred ? html`<span class="inst-favorite-mark" aria-hidden="true"><${Icon} name="star" size=${14} /></span>` : null}</li>`;
831
+ : starred ? html`<span class="inst-favorite-mark" aria-hidden="true"><${Icon} name="star" size=${14} /></span>` : null}
832
+ ${contextAllowed() && context?.name === name ? html`<${app.sidebarChatMenu} key=${context.id} inst=${it} context=${context} favorite=${contextFavorite} onClose=${() => setContext(null)} />` : null}</li>`;
791
833
  };
792
834
  // #2401: an open list of two or more lines leaves room under the count for "shown" and Clear (stacked); otherwise compact.
793
835
  const facetSet = f.status.length > 0 || f.cli.length > 0;
@@ -0,0 +1,36 @@
1
+ // M-3492 (the user) / M-3493: 最新 (scroll to latest) shows while the reader scrolls and fades out JUMP_IDLE_MS after
2
+ // the last scroll, so it never sits over a bubble in a still view (a screenshot); the next scroll brings it back. One
3
+ // behaviour for the Fleet chat (panel-chat.js) and every Hub conversation (panel-hub.js): the Hub copies the Fleet chat.
4
+ // Faded (.is-idle in app.css), taps pass through it; it stays in the tab order and the accessibility tree, and keyboard
5
+ // focus shows it again. Whether it has focus is read from the button there when the timer fires, never latched: an
6
+ // activated 最新 goes away without a blur. A timer runs only while it is shown, owned by the conversation too (a thread
7
+ // reused for another one with 最新 still up arms anew).
8
+ import { useEffect, useRef, useState } from "/assets/app-html.js";
9
+
10
+ /** How long 最新 stays after the last scroll before it fades out (the user asked for about 2–3 s). */
11
+ export const JUMP_IDLE_MS = 2500;
12
+
13
+ /**
14
+ * scroller: the thread's scrolling element (a ref); show: whether 最新 is drawn; owner: what the thread shows (a chat's
15
+ * name, a room's store). Returns what the button takes: `idle` (add .is-idle), `ref`, `onFocus`, `onBlur`.
16
+ */
17
+ export function useJumpIdle(scroller, show, owner) {
18
+ const [idle, setIdle] = useState(false);
19
+ const timer = useRef(0), button = useRef(null), shown = useRef(false);
20
+ shown.current = !!show;
21
+ const rest = () => {
22
+ clearTimeout(timer.current);
23
+ timer.current = setTimeout(() => { const b = button.current; if (!b || b.ownerDocument.activeElement !== b) setIdle(true); }, JUMP_IDLE_MS);
24
+ };
25
+ useEffect(() => {
26
+ const sc = scroller.current; if (!sc) return undefined;
27
+ const wake = () => { setIdle(false); if (shown.current) rest(); };
28
+ sc.addEventListener("scroll", wake, { passive: true });
29
+ setIdle(false);
30
+ return () => { sc.removeEventListener("scroll", wake); clearTimeout(timer.current); };
31
+ }, [owner]);
32
+ useEffect(() => {
33
+ if (show) { setIdle(false); rest(); } else clearTimeout(timer.current);
34
+ }, [!!show, owner]);
35
+ return { idle, ref: button, onFocus: () => { clearTimeout(timer.current); setIdle(false); }, onBlur: rest };
36
+ }
@@ -0,0 +1,12 @@
1
+ /* The Office map, zone navigation and dialogue have independent layout rows, including cached shells. */
2
+ .oo > .oo-zone-pills { position: relative; left: auto; bottom: auto; z-index: auto; flex: 0 0 auto; }
3
+ .oo > .oo-zone-pills .btn { min-height: var(--tap); }
4
+ .oo > canvas.oo-dialogue-canvas, .oo.phone > canvas.oo-dialogue-canvas { display: block; flex: 0 0 auto; width: 100%; height: clamp(120px, 20dvh, 180px); margin: 0;
5
+ background: var(--surface); border-top: 1px solid var(--border); touch-action: manipulation; }
6
+ .oo.has-dialogue .oo-stage { min-height: 200px; }
7
+ .oo-dialogue-canvas[role="button"] { cursor: pointer; }
8
+ .oo-dialogue-canvas:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
9
+ .oo.fs > canvas.oo-dialogue-canvas { display: block; }
10
+ @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
11
+ .oo.fs > .oo-zone-pills { display: flex; }
12
+ }
@@ -14,6 +14,7 @@ import { html, useEffect, useRef, useState } from "/assets/app-html.js";
14
14
  import { t } from "/assets/app-i18n.js";
15
15
  import { Icon } from "/assets/ui-icons.js";
16
16
  import { Skeleton } from "/assets/ui-states.js";
17
+ import { Dialog } from "/assets/ui-dialog.js";
17
18
  import "/assets/chat-render.js";
18
19
  import "/assets/preview.js";
19
20
  import { loadHtmlAttachment } from "/assets/html-attachment.js";
@@ -24,6 +25,31 @@ import { pagesOf, pageIdOf } from "./preview-pages.js";
24
25
  import { drawMarkdown, TEXT_CARD_MAX } from "/assets/chat-thread.js";
25
26
  import "/assets/chat-md-strings.js"; // M-2448: the Markdown panel's own words (an older cached chat-strings.js lacks them)
26
27
 
28
+ /** Secondary phone controls use the app's focus-trapped options sheet, keeping the toolbar one row. */
29
+ function PreviewToolbar({ owner, versions, views, width, reload, run, fullscreen, actions }) {
30
+ const query = "(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)";
31
+ const [narrow, setNarrow] = useState(() => !!globalThis.matchMedia?.(query).matches);
32
+ const [more, setMore] = useState(false);
33
+ useEffect(() => {
34
+ const media = globalThis.matchMedia?.(query);
35
+ const changed = () => { setNarrow(!!media?.matches); setMore(false); };
36
+ media?.addEventListener?.("change", changed);
37
+ return () => media?.removeEventListener?.("change", changed);
38
+ }, []);
39
+ useEffect(() => { setMore(false); }, [owner]);
40
+ return html`<div class="pv-panel-bar">
41
+ ${narrow ? html`${views}${run}${fullscreen}
42
+ <button type="button" class="icon-btn pv-toolbar-more" title=${t("chat.pvMenu")} aria-label=${t("chat.pvMenu")}
43
+ aria-haspopup="dialog" aria-expanded=${more ? "true" : "false"} onClick=${() => setMore(true)}><${Icon} name="more" size=${18} /></button>
44
+ ${more ? html`<div class="pv-toolbar-dialog" onKeyDown=${e => e.stopPropagation()}>
45
+ <${Dialog} title=${t("chat.pvMenu")} onClose=${() => setMore(false)}>
46
+ ${versions}${width ? html`<label class="field"><span>${t("chat.pvWidth")}</span>${width}</label>` : null}
47
+ ${reload}${actions}
48
+ </${Dialog}>
49
+ </div>` : null}` : html`${versions}${views}<span class="grow"></span>${width}${reload}${run}${fullscreen}${actions}`}
50
+ </div>`;
51
+ }
52
+
27
53
  export { htmlTitle };
28
54
 
29
55
  const R = () => globalThis.AgendChatRender;
@@ -38,6 +64,7 @@ const P = () => globalThis.AgendPreview;
38
64
  let state = { open: null, run: 0 };
39
65
  let runs = 0, version = 0, claims = 0;
40
66
  const subs = new Set();
67
+ export const previewHostReady = name => hosts.has(name);
41
68
  const hosts = new Map(); // instance → mounted host token; an older cleanup cannot close its successor
42
69
 
43
70
  function set(next) { state = next; version++; for (const fn of [...subs]) { try { fn(state); } catch { /* one listener's error stops no other */ } } }
@@ -181,7 +208,7 @@ const timeOf = (ts) => (ts ? chatTime(ts, { yesterday: (hm) => t("chat.yesterday
181
208
  * reveal(msgKey) (the thread shows that message), download(code).
182
209
  */
183
210
  /** allow(commit): this device's opt-in through the chat's one path (setPreviewOptIn: the confirm, then commit(setOptIn)) → the choice. */
184
- export function PreviewPanel({ name, split, msgs, subscribe, keyOf, reveal, download, allow }) {
211
+ export function PreviewPanel({ name, split, msgs, subscribe, keyOf, reveal, download, allow, popout }) {
185
212
  const [st, setSt] = useState(state);
186
213
  const [view, setView] = useState("preview");
187
214
  const [run, setRun] = useState({ state: "idle", reason: "" });
@@ -470,31 +497,30 @@ export function PreviewPanel({ name, split, msgs, subscribe, keyOf, reveal, down
470
497
  <button type="button" class="pv-source" title=${source} onClick=${() => { if (window.matchMedia && window.matchMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)").matches) closePanel(); reveal(open.msgKey); }}>${source}</button></div>
471
498
  ${pages.length > 1 ? html`<button type="button" class=${`btn btn-sm pv-pages-toggle${listing ? " on" : ""}`} aria-pressed=${listing ? "true" : "false"} title=${t("chat.pvPagesTitle")}
472
499
  onClick=${() => setListing(v => !v)}><${Icon} name="file" size=${14} />${t("chat.pvPagesCount", pages.length)}</button>` : null}
500
+ ${typeof popout === "function" ? html`<button type="button" class="icon-btn pv-panel-popout" aria-label=${t("chat.pvPopout")} title=${t("chat.pvPopout")} onClick=${() => popout(open)}><${Icon} name="external" size=${18} /></button>` : null}
473
501
  <button type="button" class="icon-btn only-wide pv-panel-close" title=${t("chat.pvClose")} aria-label=${t("chat.pvClose")} onClick=${closePanel}><${Icon} name="close" size=${18} /></button>
474
502
  </div>
475
- <div class="pv-panel-bar">
476
- ${vers.list.length > 1 && vers.index >= 0 ? html`<div class="pv-ver" role="group" aria-label=${t("chat.pvVersions")}>
503
+ <${PreviewToolbar} owner=${open.key}
504
+ versions=${html`${vers.list.length > 1 && vers.index >= 0 ? html`<div class="pv-ver" role="group" aria-label=${t("chat.pvVersions")}>
477
505
  <button type="button" class="icon-btn pv-ver-prev" title=${t("chat.pvVerPrev")} aria-label=${t("chat.pvVerPrev")} disabled=${vers.index === 0} onClick=${() => step(-1)}><${Icon} name="prev" size=${16} /></button>
478
506
  <span class="pv-ver-at" aria-live="polite" title=${t("chat.pvVerLong", vers.index + 1, vers.list.length)} aria-label=${t("chat.pvVerLong", vers.index + 1, vers.list.length)}>${t("chat.pvVer", vers.index + 1, vers.list.length)}</span>
479
507
  <button type="button" class="icon-btn pv-ver-next" title=${t("chat.pvVerNext")} aria-label=${t("chat.pvVerNext")} disabled=${vers.index === vers.list.length - 1} onClick=${() => step(1)}><${Icon} name="next" size=${16} /></button>
480
- </div>` : null}
481
- <div class="seg-inline" role="group" aria-label=${t("chat.pvPanel")}>
508
+ </div>` : null}`}
509
+ views=${html`<div class="seg-inline" role="group" aria-label=${t("chat.pvPanel")}>
482
510
  <button type="button" class=${`btn btn-sm${shown === "preview" ? " on" : ""}`} aria-pressed=${shown === "preview" ? "true" : "false"} title=${t("chat.pvPage")} onClick=${() => pickView("preview")}><${Icon} name="eye" size=${14} /><span class="lbl">${t("chat.pvPage")}</span></button>
483
511
  <button type="button" class=${`btn btn-sm${shown === "code" ? " on" : ""}`} aria-pressed=${shown === "code" ? "true" : "false"} title=${t("chat.pvCode")} onClick=${() => pickView("code")}><${Icon} name="code" size=${14} /><span class="lbl">${t("chat.pvCode")}</span></button>
484
512
  ${prev ? html`<button type="button" class=${`btn btn-sm pv-changes${shown === "changes" ? " on" : ""}`} aria-pressed=${shown === "changes" ? "true" : "false"} title=${t("chat.pvChanges")} onClick=${() => pickView("changes")}><${Icon} name="diff" size=${14} /><span class="lbl">${t("chat.pvChanges")}</span></button>` : null}
485
- </div>
486
- <span class="grow"></span>
487
- ${shown === "preview" ? html`<select class="pv-width" aria-label=${t("chat.pvWidth")} title=${t("chat.pvWidth")} value=${device} onChange=${(e) => setDevice(e.currentTarget.value)}>
488
- <option value="full">${t("chat.pvWidthFull")}</option><option value="tablet">${t("chat.pvWidthTablet")}</option><option value="phone">${t("chat.pvWidthPhone")}</option></select>` : null}
489
- ${going ? html`<button type="button" class="btn btn-sm pv-panel-reload" title=${t("chat.pvReload")} onClick=${() => { stop(); start(true); }}><${Icon} name="restart" size=${14} /><span class="lbl">${t("chat.pvReload")}</span></button>
490
- <button type="button" class="btn btn-sm pv-panel-stop" title=${t("chat.pvStop")} onClick=${stop}><${Icon} name="stop" size=${14} /><span class="lbl">${t("chat.pvStop")}</span></button>`
513
+ </div>`}
514
+ width=${html`${shown === "preview" ? html`<select class="pv-width" aria-label=${t("chat.pvWidth")} title=${t("chat.pvWidth")} value=${device} onChange=${(e) => setDevice(e.currentTarget.value)}>
515
+ <option value="full">${t("chat.pvWidthFull")}</option><option value="tablet">${t("chat.pvWidthTablet")}</option><option value="phone">${t("chat.pvWidthPhone")}</option></select>` : null}`}
516
+ reload=${html`${going ? html`<button type="button" class="btn btn-sm pv-panel-reload" title=${t("chat.pvReload")} onClick=${() => { stop(); start(true); }}><${Icon} name="restart" size=${14} /><span class="lbl">${t("chat.pvReload")}</span></button>` : null}`}
517
+ run=${html`${going ? html`<button type="button" class="btn btn-sm pv-panel-stop" title=${t("chat.pvStop")} onClick=${stop}><${Icon} name="stop" size=${14} /><span class="lbl">${t("chat.pvStop")}</span></button>`
491
518
  : run.state === "large" ? html`<button type="button" class="btn btn-sm btn-primary pv-panel-anyway" title=${t("chat.pvAnyway")} disabled=${!a.ok} onClick=${() => start(true)}><${Icon} name="play" size=${14} /><span class="lbl">${t("chat.pvAnyway")}</span></button>`
492
- : html`<button type="button" class="btn btn-sm btn-primary pv-panel-run" title=${t("chat.pvPreview")} disabled=${!a.ok} onClick=${() => start()}><${Icon} name="play" size=${14} /><span class="lbl">${t("chat.pvPreview")}</span></button>`}
493
- <button type="button" class=${`btn btn-sm only-wide pv-panel-fs${fs ? " on" : ""}`} aria-pressed=${fs ? "true" : "false"} title=${t(fs ? "chat.pvFsExit" : "chat.pvFs")} aria-label=${t(fs ? "chat.pvFsExit" : "chat.pvFs")}
494
- onClick=${() => (fs ? leaveFs() : enterFs())}><${Icon} name=${fs ? "fullscreenexit" : "fullscreen"} size=${14} /></button>
495
- <${PanelActions} open=${open} name=${name} run=${run} view=${view} />
496
- <button type="button" class="btn btn-sm pv-panel-dl" title=${t("chat.pvDownload")} onClick=${() => download(open.code, fileName)}><${Icon} name="download" size=${14} /><span class="lbl">${t("chat.pvDownload")}</span></button>
497
- </div>
519
+ : html`<button type="button" class="btn btn-sm btn-primary pv-panel-run" title=${t("chat.pvPreview")} disabled=${!a.ok} onClick=${() => start()}><${Icon} name="play" size=${14} /><span class="lbl">${t("chat.pvPreview")}</span></button>`}`}
520
+ fullscreen=${html`<button type="button" class=${`icon-btn pv-panel-fs${fs ? " on" : ""}`} aria-pressed=${fs ? "true" : "false"} title=${t(fs ? "chat.pvFsExit" : "chat.pvFs")} aria-label=${t(fs ? "chat.pvFsExit" : "chat.pvFs")}
521
+ onClick=${() => (fs ? leaveFs() : enterFs())}><${Icon} name=${fs ? "fullscreenexit" : "fullscreen"} size=${14} /></button>`}
522
+ actions=${html`<${PanelActions} open=${open} name=${name} run=${run} view=${view} />
523
+ <button type="button" class="btn btn-sm pv-panel-dl" title=${t("chat.pvDownload")} onClick=${() => download(open.code, fileName)}><${Icon} name="download" size=${14} /><span class="lbl">${t("chat.pvDownload")}</span></button>`} />
498
524
  ${newer && newer.key !== open.key ? html`<div class="pv-newer" role="status"><span>${t("chat.pvNewer", timeOf(newer.ts))}</span>
499
525
  <button type="button" class="btn btn-sm pv-newer-show" onClick=${showNewer}>${t("chat.pvNewerShow")}</button>${newerNote ? newerNote.loading
500
526
  ? html`<${Skeleton} variant="inline" lines=${1} label=${t("chat.pvLoading")} />` : html`<span class="pv-newer-note">${newerNote}</span>` : null}</div>` : null}
@@ -533,7 +559,7 @@ function MarkdownPanel({ open, name, md, view, setView, plain, body, panel, fs,
533
559
  <button type="button" class=${`btn btn-sm${view === "source" ? " on" : ""}`} aria-pressed=${view === "source" ? "true" : "false"} title=${t("chat.pvMdSource")} onClick=${() => setView("source")}><${Icon} name="code" size=${14} /><span class="lbl">${t("chat.pvMdSource")}</span></button>
534
560
  </div>
535
561
  <span class="grow"></span>
536
- <button type="button" class=${`btn btn-sm only-wide pv-panel-fs${fs ? " on" : ""}`} aria-pressed=${fs ? "true" : "false"} title=${t(fs ? "chat.pvFsExit" : "chat.pvFs")} aria-label=${t(fs ? "chat.pvFsExit" : "chat.pvFs")}
562
+ <button type="button" class=${`icon-btn pv-panel-fs${fs ? " on" : ""}`} aria-pressed=${fs ? "true" : "false"} title=${t(fs ? "chat.pvFsExit" : "chat.pvFs")} aria-label=${t(fs ? "chat.pvFsExit" : "chat.pvFs")}
537
563
  onClick=${() => (fs ? leaveFs() : enterFs())}><${Icon} name=${fs ? "fullscreenexit" : "fullscreen"} size=${14} /></button>
538
564
  ${open.att ? html`<a class="btn btn-sm pv-panel-dl" href=${`/ui/file/${open.att.id}`} download=${open.att.name} title=${t("chat.pvDownload")}><${Icon} name="download" size=${14} /><span class="lbl">${t("chat.pvDownload")}</span></a>` : null}
539
565
  </div>
@@ -0,0 +1,11 @@
1
+ /* Presentation only: the already-mounted chat keeps its store, live stream and preview owner. */
2
+ [data-preview-window="1"] .p-chat > .panel-head,
3
+ [data-preview-window="1"] .p-chat > .chat-card,
4
+ [data-preview-window="1"] .p-chat > .aw-chat_header,
5
+ [data-preview-window="1"] .p-chat .chat-split > .chat-main,
6
+ [data-preview-window="1"] .p-chat .pv-divider { display: none; }
7
+ [data-preview-window="1"] .p-chat .chat-split { width: 100%; min-width: 0; }
8
+ [data-preview-window="1"] .p-chat .pv-panel:not(.pv-fs) { flex: 1; width: 100%; max-width: none; min-width: 0; position: relative; inset: auto; }
9
+ @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
10
+ .pv-panel-popout { min-width: var(--tap); min-height: var(--tap); }
11
+ }
@@ -140,7 +140,21 @@
140
140
  window.addEventListener("pageshow", schedule);
141
141
  // Page palettes are applied to the shell; routes replace headers. Coalesce paints and
142
142
  // ignore content attributes so updating this meta element cannot trigger itself.
143
- new MutationObserver(schedule).observe(document.documentElement, {
143
+ // M-3455: the split view's grid (.ws-geometry) changes only its size and drag state on these attributes — never a colour;
144
+ // M-3486: nor does a text box's height.
145
+ // A divider drag writes them every frame; re-reading the header colours then forced a layout and style walk per frame.
146
+ function relevant(records) {
147
+ if (!records || !records.length) return true;
148
+ for (var i = 0; i < records.length; i++) {
149
+ var r = records[i];
150
+ if (r.type !== "attributes") return true;
151
+ // M-3486: a text box's own height (the composer grows with its text: a style write each time it is measured).
152
+ if (r.attributeName === "style" && r.target.tagName === "TEXTAREA") continue;
153
+ if (!r.target.classList || !r.target.classList.contains("ws-geometry")) return true;
154
+ }
155
+ return false;
156
+ }
157
+ new MutationObserver(function (records) { if (relevant(records)) schedule(); }).observe(document.documentElement, {
144
158
  subtree: true, childList: true, attributes: true, attributeFilter: ["class", "style", "data-theme", "data-palette", "data-agent"],
145
159
  });
146
160
  })();
@@ -8,24 +8,28 @@ import { t } from "./app-i18n.js";
8
8
  * items: [{ key, label, icon?, onSelect, danger?, disabled? }] (falsy entries are skipped). `checked` makes a radio item;
9
9
  * `checkbox: true` with `checked` a checkbox item (#2217 hotfix: the chat's card menu), which toggles and keeps the menu
10
10
  * open. `active`: the button shows a pressed look (what it controls is on), without changing its role.
11
+ * `context`: optional {id, anchor, onClose}; opens without a second button and returns focus to that row.
11
12
  * Optional `trigger` and `triggerClass` customize the button content and styling; `label` remains its accessible name.
12
13
  */
13
- export function Menu({ items, label, icon = "more", cls = "", active = false, trigger, triggerClass = "icon-btn", disabled = false, fit = false, topLayer = false, ownerKey, inactive = false, onOpen, leading }) {
14
+ export function Menu({ items, label, icon = "more", cls = "", active = false, trigger, triggerClass = "icon-btn", disabled = false, fit = false, topLayer = false, ownerKey, inactive = false, onOpen, leading, context }) {
14
15
  const [open, setOpen] = useState(false);
15
16
  const [placement,setPlacement] = useState("");
16
17
  const btn = useRef(null), list = useRef(null);
17
18
  const shown = (items || []).filter(Boolean);
19
+ const anchor = () => context?.anchor || btn.current;
20
+ const close = () => { setOpen(false); context?.onClose?.(); };
18
21
  const anchored = topLayer && open && typeof getComputedStyle === "function" && getComputedStyle(document.documentElement).getPropertyValue?.("--agent-menu-version")?.trim() === "1";
19
22
  useLayoutEffect(() => { setOpen(false); }, [ownerKey]);
23
+ useLayoutEffect(() => { if (context) setOpen(true); }, [context?.id]);
20
24
  useLayoutEffect(() => { if (inactive) setOpen(false); }, [inactive]);
21
25
  useLayoutEffect(() => {
22
- if (!open || !fit || !btn.current?.getBoundingClientRect || !list.current) return;
26
+ if (!open || !fit || !anchor()?.getBoundingClientRect || !list.current) return;
23
27
  const menu = list.current;
24
28
  if (anchored) menu.showPopover?.(); // escape the sidebar's scrolling clip; the same Menu keeps focus/ownership
25
29
  const place = () => {
26
- if (!btn.current || !list.current) return;
27
- const rect = btn.current.getBoundingClientRect();
28
- const boundary = btn.current.closest?.(".dlg-body")?.getBoundingClientRect();
30
+ if (!anchor() || !list.current) return;
31
+ const rect = anchor().getBoundingClientRect();
32
+ const boundary = anchor().closest?.(".dlg-body")?.getBoundingClientRect();
29
33
  const top = Math.max(0,boundary?.top || 0), bottom = Math.min(window.innerHeight,boundary?.bottom || window.innerHeight);
30
34
  const above = rect.top-top-8, below = bottom-rect.bottom-8;
31
35
  const up = below < Math.min(list.current.scrollHeight || 280,280) && above > below;
@@ -52,7 +56,7 @@ export function Menu({ items, label, icon = "more", cls = "", active = false, tr
52
56
  if (!open || disabled) { if (open && disabled) setOpen(false); return undefined; }
53
57
  const first = list.current && list.current.querySelector("[role=menuitem]:not([disabled]), [role=menuitemradio]:not([disabled]), [role=menuitemcheckbox]:not([disabled])");
54
58
  if (first) first.focus({ preventScroll: true });
55
- const outside = (e) => { if (list.current && !list.current.contains(e.target) && btn.current && !btn.current.contains(e.target)) setOpen(false); };
59
+ const outside = (e) => { if (list.current && !list.current.contains(e.target) && anchor() && !anchor().contains(e.target)) close(); };
56
60
  document.addEventListener("pointerdown", outside, true);
57
61
  return () => document.removeEventListener("pointerdown", outside, true);
58
62
  }, [open, disabled]);
@@ -61,19 +65,19 @@ export function Menu({ items, label, icon = "more", cls = "", active = false, tr
61
65
  if (e.target.closest?.("[role=menu]") !== list.current) return; // a nested card menu owns its own keys
62
66
  const all = [...list.current.querySelectorAll("[role=menuitem]:not([disabled]), [role=menuitemradio]:not([disabled]), [role=menuitemcheckbox]:not([disabled])")];
63
67
  const i = all.indexOf(document.activeElement);
64
- if (e.key === "Escape") { e.preventDefault(); e.stopPropagation(); setOpen(false); btn.current && btn.current.focus({ preventScroll: true }); }
68
+ if (e.key === "Escape") { e.preventDefault(); e.stopPropagation(); anchor()?.focus({ preventScroll: true }); close(); }
65
69
  else if (e.key === "Enter" || e.key === " ") { e.preventDefault(); document.activeElement?.click(); }
66
70
  else if (e.key === "ArrowDown") { e.preventDefault(); (all[(i + 1) % all.length] || all[0])?.focus(); }
67
71
  else if (e.key === "ArrowUp") { e.preventDefault(); (all[(i - 1 + all.length) % all.length] || all[0])?.focus(); }
68
72
  else if (e.key === "Home") { e.preventDefault(); all[0]?.focus(); }
69
73
  else if (e.key === "End") { e.preventDefault(); all[all.length - 1]?.focus(); }
70
- else if (e.key === "Tab") setOpen(false);
74
+ else if (e.key === "Tab") close();
71
75
  }
72
- function choose(item) { if (disabled || item.disabled) return; setOpen(false); btn.current && btn.current.focus({ preventScroll: true }); item.onSelect(); }
76
+ function choose(item) { if (disabled || item.disabled) return; anchor()?.focus({ preventScroll: true }); close(); item.onSelect(); }
73
77
  return html`<div class=${`menu ${cls}`}>
74
- <button ref=${btn} type="button" class=${`${triggerClass}${active ? " active" : ""}`} aria-haspopup="menu" aria-expanded=${open ? "true" : "false"} disabled=${disabled}
78
+ ${context ? null : html`<button ref=${btn} type="button" class=${`${triggerClass}${active ? " active" : ""}`} aria-haspopup="menu" aria-expanded=${open ? "true" : "false"} disabled=${disabled}
75
79
  aria-label=${label || t("app.more")} title=${label || t("app.more")} onClick=${() => { if (!disabled) { if (!open) onOpen?.(); setOpen(!open); } }}
76
- onKeyDown=${(e) => { if (!disabled && (e.key === "ArrowDown" || e.key === "ArrowUp")) { e.preventDefault(); onOpen?.(); setOpen(true); } }}>${trigger === undefined ? html`<${Icon} name=${icon} />` : trigger}</button>
80
+ onKeyDown=${(e) => { if (!disabled && (e.key === "ArrowDown" || e.key === "ArrowUp")) { e.preventDefault(); onOpen?.(); setOpen(true); } }}>${trigger === undefined ? html`<${Icon} name=${icon} />` : trigger}</button>`}
77
81
  ${open && !disabled ? html`<div data-trust="menu" ref=${list} popover=${anchored ? "manual" : undefined} class=${`menu-list${anchored ? " menu-anchored" : ""}${fit ? placement : ""}`} role="menu" aria-label=${label || t("app.more")} onKeyDown=${onKey}>
78
82
  ${leading || null}
79
83
  ${shown.map(item => item.heading
@@ -91,3 +95,5 @@ export function Menu({ items, label, icon = "more", cls = "", active = false, tr
91
95
  </div>`;
92
96
  }
93
97
  Menu.workspaceVersion = 1;
98
+
99
+ Menu.contextVersion = 1;
@@ -10,6 +10,7 @@ import { readStream } from "./read-stream.js";
10
10
  import { Dialog } from "./ui-dialog.js";
11
11
  import { ErrorState, Skeleton } from "./ui-states.js";
12
12
  import { Icon } from "./ui-icons.js";
13
+ import { InfoTip } from "./info-tip.js";
13
14
  import "./view-strings.js";
14
15
  import { CompactMeter, level, resetClock, resetText, tn, usageClock, usageDuration, usageText, windowTag } from "./usage-meter.js";
15
16
  // What this file exported before the meter moved out of it (#3321), for what imports it from here.
@@ -203,43 +204,17 @@ function rowNote(p) {
203
204
  }
204
205
  /**
205
206
  * M-3248 (the user): a login no agent uses said 「此帳號目前沒有 Agent」 as a line of text beside its name. It is a quiet ⓘ
206
- * there now (the muted text colour, never a warning's), its words on a hover, a focus or a tap, in the settings pages' tip
207
- * bubble (.s-tipbody). The bubble is fixed to the window, so the group's rounded clip (.u-cgroup, overflow: hidden) never
208
- * cuts it, and is only in the page while shown. In a compact row (itself a button that opens the login's card) the mark
209
- * is not a second button: an image named by the words — the row reads "wii, No agents on this profile" — and a tap on it
210
- * shows them without opening the row. In the full card it is a button, reached with Tab.
207
+ * there now (the muted text colour, never a warning's). In the full card it is the shared info icon (info-tip.js: its words
208
+ * on a hover, a focus or a tap, in a bubble fixed to the window, so the group's rounded clip never cuts it). In a compact
209
+ * row (itself a button that opens the login's card) the mark is only drawn and its words are part of the row's name — the
210
+ * row reads "wii, No agents on this profile" — and a tap opens the card, where the ⓘ is (M-3443: no hover-only mark).
211
211
  */
212
212
  function NoAgentsMark({ inRow = false }) {
213
213
  const words = tn("usage.no_agents");
214
- const [at, setAt] = useState(null);
215
- const [pinned, setPinned] = useState(false);
216
- const mark = useRef(null), bubble = useRef(null);
217
- const show = () => {
218
- const r = mark.current && mark.current.getBoundingClientRect ? mark.current.getBoundingClientRect() : null;
219
- const w = window.innerWidth || 0, hgt = window.innerHeight || 0;
220
- if (!r || !w) { setAt({ x: 8, y: 8, above: false }); return; }
221
- const above = r.bottom + 72 > hgt;
222
- // Pushed sideways to stay inside the window (a custom property: the page allows no style attribute).
223
- setAt({ x: Math.round(Math.max(8, Math.min(r.left - 8, w - Math.min(260, w - 16) - 8))), y: Math.round(above ? hgt - r.top + 6 : r.bottom + 6), above });
224
- };
225
- const hide = () => { setAt(null); setPinned(false); };
226
- useLayoutEffect(() => {
227
- const b = bubble.current;
228
- if (b && b.style && at) { b.style.setProperty("--tip-x", `${at.x}px`); b.style.setProperty("--tip-y", `${at.y}px`); }
229
- }, [at]);
230
- useEffect(() => {
231
- if (!at) return undefined;
232
- const esc = (e) => { if (e.key === "Escape") { e.stopPropagation(); hide(); } };
233
- const away = (e) => { if (mark.current && !mark.current.contains(e.target)) hide(); };
234
- document.addEventListener("keydown", esc, true); document.addEventListener("click", away); window.addEventListener("scroll", hide, true);
235
- return () => { document.removeEventListener("keydown", esc, true); document.removeEventListener("click", away); window.removeEventListener("scroll", hide, true); };
236
- }, [!!at]);
237
- const tap = (e) => { e.stopPropagation(); e.preventDefault(); if (pinned) hide(); else { show(); setPinned(true); } };
238
- const leave = () => { if (!pinned) hide(); };
239
- const tip = at ? html`<span ref=${bubble} class=${`s-tipbody u-na-tip${at.above ? " above" : ""}`} aria-hidden="true">${words}</span>` : null;
240
- return inRow
241
- ? html`<span ref=${mark} class="u-na" role="img" aria-label=${words} onMouseEnter=${show} onMouseLeave=${leave} onClick=${tap}><${Icon} name="info" size=${14} />${tip}</span>`
242
- : html`<button ref=${mark} type="button" class="u-na" aria-label=${words} onMouseEnter=${show} onMouseLeave=${leave} onFocus=${show} onBlur=${hide} onClick=${tap}><${Icon} name="info" size=${14} />${tip}</button>`;
214
+ // M-3443: the full card's ⓘ is the shared info icon (a button: hover, focus, tap). A compact row is itself a button that
215
+ // opens that card, so there it is no second control: the words are in the row's name (read with it), the mark only drawn.
216
+ if (inRow) return html`<span class="u-na" aria-hidden="true"><${Icon} name="info" size=${14} /></span><span class="sr-only">${words}</span>`;
217
+ return html`<${InfoTip} text=${words} label=${words} cls="u-na-tip" />`;
243
218
  }
244
219
  /**
245
220
  * A login in three short lines, under its provider's name (the user's pick, 2026-10-22): its name and plan; then its
@@ -149,6 +149,7 @@ register("view", {
149
149
  "usage.hint.grok_no_login": "auth.json has no usable login. Run `grok login`.",
150
150
  "usage.hint.login_kiro": "Log in with the Kiro CLI (`kiro-cli`).",
151
151
  "usage.hint.kiro_signed_out": "Signed out — run `kiro-cli` to log in.",
152
+ "usage.hint.claude_managed_source": "Saved credentials have no subscription meters. Manage this connection in Settings → AI accounts & keys → Accounts.",
152
153
  "usage.hint.claude_profile_signed_out": "Not connected — connect it in Settings → AI accounts & keys → Accounts.",
153
154
  "usage.hint.claude_profile_signed_out_chat": "Not connected — connect it in Settings → AI accounts & keys → Accounts, or with `{0}`.",
154
155
  "usage.hint.token_refreshing": "Token refreshing — try again in a moment.",
@@ -434,6 +435,7 @@ register("view", {
434
435
  "usage.hint.grok_no_login": "auth.json 沒有可用的登入資料。請執行 `grok login`。",
435
436
  "usage.hint.login_kiro": "請使用 Kiro CLI(`kiro-cli`)登入。",
436
437
  "usage.hint.kiro_signed_out": "目前已登出;請執行 `kiro-cli` 登入。",
438
+ "usage.hint.claude_managed_source": "保存的憑證不提供訂閱額度表。請到設定 →「AI 帳號與金鑰」→「帳號」管理連接。",
437
439
  "usage.hint.claude_profile_signed_out": "尚未連接;請到設定 →「AI 帳號與金鑰」→「帳號」連接 AI 帳號。",
438
440
  "usage.hint.claude_profile_signed_out_chat": "尚未連接;請到設定 →「AI 帳號與金鑰」→「帳號」連接 AI 帳號,或用 `{0}` 連接。",
439
441
  "usage.hint.token_refreshing": "Token 更新中 — 請稍候再試。",
@@ -3,5 +3,5 @@
3
3
  * Keep this list explicit: the parity test rejects a key missing from either
4
4
  * locale surface before a mixed-language release can ship.
5
5
  */
6
- export declare const USAGE_I18N_KEYS: readonly ["usage.title", "usage.title_plain", "usage.empty_active", "usage.not_logged_in", "usage.default_login", "usage.no_agents", "usage.error_fallback", "usage.no_data", "usage.reset.in", "usage.reset.soon", "usage.duration.days_hours", "usage.duration.hours_minutes", "usage.duration.minutes", "usage.metric.session", "usage.metric.weekly", "usage.metric.monthly", "usage.metric.days_window", "usage.metric.named", "usage.metric.named_session", "usage.metric.named_weekly", "usage.metric.named_monthly", "usage.metric.named_days", "usage.metric.extra_usage", "usage.metric.rate_limit_resets", "usage.ticket_expiry", "usage.metric.credits", "usage.metric.weekly_limit", "usage.metric.pay_as_you_go", "usage.metric.bonus_credits", "usage.metric.overage_charges", "usage.metric.pay_per_use", "usage.unit.available", "usage.unit.credits", "usage.metric.usage_monthly", "usage.note.used_limit_unit", "usage.note.bonus_codes", "usage.value.disabled", "usage.value.cap", "usage.value.unlimited", "usage.hint.q_developer_monthly_limit", "usage.note.binding", "usage.note.binding_severity", "usage.note.busiest_model", "usage.note.busiest_models", "usage.metric.agy_claude_others", "usage.metric.agy_claude_others_session", "usage.metric.agy_claude_others_weekly", "usage.hint.statusline_now", "usage.hint.statusline_minutes", "usage.hint.claude_api_key", "usage.hint.login_claude", "usage.hint.login_agy", "usage.hint.no_quota", "usage.hint.login_codex", "usage.hint.codex_no_oauth", "usage.hint.login_grok", "usage.hint.grok_no_login", "usage.hint.login_kiro", "usage.hint.kiro_signed_out", "usage.hint.claude_profile_signed_out", "usage.hint.claude_profile_signed_out_chat", "usage.hint.token_refreshing", "usage.hint.subscription_no_credit", "usage.hint.no_quota_account", "usage.error.unreachable", "usage.error.token_rejected", "usage.error.rate_limited", "usage.error.rate_limited_transient", "usage.stale_rate_limited", "usage.stale.expired", "usage.stale.transient", "usage.stale.error", "usage.metric.reset_since", "usage.error.http", "usage.error.billing_http", "usage.error.invalid_response", "usage.error.invalid_billing_response", "usage.error.invalid_kiro_response", "usage.error.claude_token_expired", "usage.error.codex_token_expired", "usage.error.grok_expired", "usage.error.grok_response_changed", "usage.error.agy_cap", "usage.error.agy_no_refresh", "usage.error.agy_token_expired", "usage.error.agy_login_expired", "usage.error.agy_refresh_empty", "usage.error.grok_auth_readonly", "usage.error.grok_no_refresh", "usage.error.grok_refresh_unreachable", "usage.error.grok_invalid_refresh", "usage.error.grok_persist", "usage.capacity.line", "usage.capacity.line_tokens", "usage.capacity.not_enough", "usage.capacity.only_agend", "usage.capacity.mixed", "usage.capacity.best_fit_api", "usage.capacity.best_fit_output", "usage.capacity.best_fit_all"];
6
+ export declare const USAGE_I18N_KEYS: readonly ["usage.title", "usage.title_plain", "usage.empty_active", "usage.not_logged_in", "usage.default_login", "usage.no_agents", "usage.error_fallback", "usage.no_data", "usage.reset.in", "usage.reset.soon", "usage.duration.days_hours", "usage.duration.hours_minutes", "usage.duration.minutes", "usage.metric.session", "usage.metric.weekly", "usage.metric.monthly", "usage.metric.days_window", "usage.metric.named", "usage.metric.named_session", "usage.metric.named_weekly", "usage.metric.named_monthly", "usage.metric.named_days", "usage.metric.extra_usage", "usage.metric.rate_limit_resets", "usage.ticket_expiry", "usage.metric.credits", "usage.metric.weekly_limit", "usage.metric.pay_as_you_go", "usage.metric.bonus_credits", "usage.metric.overage_charges", "usage.metric.pay_per_use", "usage.unit.available", "usage.unit.credits", "usage.metric.usage_monthly", "usage.note.used_limit_unit", "usage.note.bonus_codes", "usage.value.disabled", "usage.value.cap", "usage.value.unlimited", "usage.hint.q_developer_monthly_limit", "usage.note.binding", "usage.note.binding_severity", "usage.note.busiest_model", "usage.note.busiest_models", "usage.metric.agy_claude_others", "usage.metric.agy_claude_others_session", "usage.metric.agy_claude_others_weekly", "usage.hint.statusline_now", "usage.hint.statusline_minutes", "usage.hint.claude_api_key", "usage.hint.login_claude", "usage.hint.login_agy", "usage.hint.no_quota", "usage.hint.login_codex", "usage.hint.codex_no_oauth", "usage.hint.login_grok", "usage.hint.grok_no_login", "usage.hint.login_kiro", "usage.hint.kiro_signed_out", "usage.hint.claude_managed_source", "usage.hint.claude_profile_signed_out", "usage.hint.claude_profile_signed_out_chat", "usage.hint.token_refreshing", "usage.hint.subscription_no_credit", "usage.hint.no_quota_account", "usage.error.unreachable", "usage.error.token_rejected", "usage.error.rate_limited", "usage.error.rate_limited_transient", "usage.stale_rate_limited", "usage.stale.expired", "usage.stale.transient", "usage.stale.error", "usage.metric.reset_since", "usage.error.http", "usage.error.billing_http", "usage.error.invalid_response", "usage.error.invalid_billing_response", "usage.error.invalid_kiro_response", "usage.error.claude_token_expired", "usage.error.codex_token_expired", "usage.error.grok_expired", "usage.error.grok_response_changed", "usage.error.agy_cap", "usage.error.agy_no_refresh", "usage.error.agy_token_expired", "usage.error.agy_login_expired", "usage.error.agy_refresh_empty", "usage.error.grok_auth_readonly", "usage.error.grok_no_refresh", "usage.error.grok_refresh_unreachable", "usage.error.grok_invalid_refresh", "usage.error.grok_persist", "usage.capacity.line", "usage.capacity.line_tokens", "usage.capacity.not_enough", "usage.capacity.only_agend", "usage.capacity.mixed", "usage.capacity.best_fit_api", "usage.capacity.best_fit_output", "usage.capacity.best_fit_all"];
7
7
  export type UsageI18nKey = typeof USAGE_I18N_KEYS[number];
@@ -20,7 +20,7 @@ export const USAGE_I18N_KEYS = [
20
20
  "usage.hint.statusline_now", "usage.hint.statusline_minutes", "usage.hint.claude_api_key",
21
21
  "usage.hint.login_claude", "usage.hint.login_agy", "usage.hint.no_quota",
22
22
  "usage.hint.login_codex", "usage.hint.codex_no_oauth", "usage.hint.login_grok",
23
- "usage.hint.grok_no_login", "usage.hint.login_kiro", "usage.hint.kiro_signed_out", "usage.hint.claude_profile_signed_out", "usage.hint.claude_profile_signed_out_chat",
23
+ "usage.hint.grok_no_login", "usage.hint.login_kiro", "usage.hint.kiro_signed_out", "usage.hint.claude_managed_source", "usage.hint.claude_profile_signed_out", "usage.hint.claude_profile_signed_out_chat",
24
24
  "usage.hint.token_refreshing", "usage.hint.subscription_no_credit", "usage.hint.no_quota_account",
25
25
  "usage.error.unreachable", "usage.error.token_rejected", "usage.error.rate_limited", "usage.error.rate_limited_transient", "usage.stale_rate_limited",
26
26
  "usage.stale.expired", "usage.stale.transient", "usage.stale.error", "usage.metric.reset_since",
@@ -1 +1 @@
1
- {"version":3,"file":"i18n-keys.js","sourceRoot":"","sources":["../../src/usage/i18n-keys.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,aAAa,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,iBAAiB;IACzH,sBAAsB,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB;IAC7E,2BAA2B,EAAE,8BAA8B,EAAE,wBAAwB;IACrF,sBAAsB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,0BAA0B;IACjG,oBAAoB,EAAE,4BAA4B,EAAE,2BAA2B;IAC/E,4BAA4B,EAAE,yBAAyB,EAAE,0BAA0B;IACnF,gCAAgC,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,2BAA2B;IAC5G,4BAA4B,EAAE,4BAA4B,EAAE,8BAA8B;IAC1F,0BAA0B,EAAE,sBAAsB,EAAE,oBAAoB;IACxE,4BAA4B,EAAE,4BAA4B,EAAE,wBAAwB;IACpF,sBAAsB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,sCAAsC,EAAE,oBAAoB;IAChI,6BAA6B,EAAE,0BAA0B,EAAE,2BAA2B;IACtF,gCAAgC,EAAE,wCAAwC,EAAE,uCAAuC;IACnH,2BAA2B,EAAE,+BAA+B,EAAE,2BAA2B;IACzF,yBAAyB,EAAE,sBAAsB,EAAE,qBAAqB;IACxE,wBAAwB,EAAE,2BAA2B,EAAE,uBAAuB;IAC9E,0BAA0B,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,sCAAsC,EAAE,2CAA2C;IACtK,6BAA6B,EAAE,mCAAmC,EAAE,6BAA6B;IACjG,yBAAyB,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,oCAAoC,EAAE,0BAA0B;IACrJ,qBAAqB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,0BAA0B;IAC/F,kBAAkB,EAAE,0BAA0B,EAAE,8BAA8B;IAC9E,sCAAsC,EAAE,mCAAmC;IAC3E,kCAAkC,EAAE,iCAAiC;IACrE,0BAA0B,EAAE,mCAAmC,EAAE,qBAAqB;IACtF,4BAA4B,EAAE,+BAA+B,EAAE,+BAA+B;IAC9F,+BAA+B,EAAE,gCAAgC,EAAE,6BAA6B;IAChG,sCAAsC,EAAE,kCAAkC,EAAE,0BAA0B;IACtG,4CAA4C;IAC5C,qBAAqB,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,sBAAsB;IACrI,6BAA6B,EAAE,gCAAgC,EAAE,6BAA6B;CACtF,CAAC"}
1
+ {"version":3,"file":"i18n-keys.js","sourceRoot":"","sources":["../../src/usage/i18n-keys.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,aAAa,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,iBAAiB;IACzH,sBAAsB,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB;IAC7E,2BAA2B,EAAE,8BAA8B,EAAE,wBAAwB;IACrF,sBAAsB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,0BAA0B;IACjG,oBAAoB,EAAE,4BAA4B,EAAE,2BAA2B;IAC/E,4BAA4B,EAAE,yBAAyB,EAAE,0BAA0B;IACnF,gCAAgC,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,2BAA2B;IAC5G,4BAA4B,EAAE,4BAA4B,EAAE,8BAA8B;IAC1F,0BAA0B,EAAE,sBAAsB,EAAE,oBAAoB;IACxE,4BAA4B,EAAE,4BAA4B,EAAE,wBAAwB;IACpF,sBAAsB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,sCAAsC,EAAE,oBAAoB;IAChI,6BAA6B,EAAE,0BAA0B,EAAE,2BAA2B;IACtF,gCAAgC,EAAE,wCAAwC,EAAE,uCAAuC;IACnH,2BAA2B,EAAE,+BAA+B,EAAE,2BAA2B;IACzF,yBAAyB,EAAE,sBAAsB,EAAE,qBAAqB;IACxE,wBAAwB,EAAE,2BAA2B,EAAE,uBAAuB;IAC9E,0BAA0B,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,kCAAkC,EAAE,sCAAsC,EAAE,2CAA2C;IAC1M,6BAA6B,EAAE,mCAAmC,EAAE,6BAA6B;IACjG,yBAAyB,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,oCAAoC,EAAE,0BAA0B;IACrJ,qBAAqB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,0BAA0B;IAC/F,kBAAkB,EAAE,0BAA0B,EAAE,8BAA8B;IAC9E,sCAAsC,EAAE,mCAAmC;IAC3E,kCAAkC,EAAE,iCAAiC;IACrE,0BAA0B,EAAE,mCAAmC,EAAE,qBAAqB;IACtF,4BAA4B,EAAE,+BAA+B,EAAE,+BAA+B;IAC9F,+BAA+B,EAAE,gCAAgC,EAAE,6BAA6B;IAChG,sCAAsC,EAAE,kCAAkC,EAAE,0BAA0B;IACtG,4CAA4C;IAC5C,qBAAqB,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,sBAAsB;IACrI,6BAA6B,EAAE,gCAAgC,EAAE,6BAA6B;CACtF,CAAC"}
@@ -187,6 +187,7 @@ export interface ClaudeUsageScope {
187
187
  * with the line that signs it in, and never shows the shared account's numbers. Without it: the shared login as
188
188
  * always; beside profiles (`besideProfiles`), its statusline fallback leaves the profiles' instances out.
189
189
  */
190
+ export declare function redactManagedClaudeUsage(provider: ProviderUsage): ProviderUsage;
190
191
  export declare function fetchClaudeUsage(storeHome?: string, scope?: ClaudeUsageScope): Promise<Omit<ProviderUsage, "id" | "name">>;
191
192
  /**
192
193
  * The agy CLI version AgEnD names itself as, in agy's own User-Agent (`antigravity/cli/<version> (aidev_client; …)`, as