@songsid/agend 2.4.0-beta.22 → 2.4.0-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-cli-instructions.md +4 -3
- package/dist/agent-cli.js +32 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-file-read.js +2 -2
- package/dist/agent-file-read.js.map +1 -1
- package/dist/agent-whats-new.js +17 -1
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.d.ts +2 -0
- package/dist/auth-api.js +5 -2
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/web-authority.d.ts +17 -3
- package/dist/authority/web-authority.js +56 -3
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/claude-code.d.ts +15 -0
- package/dist/backend/claude-code.js +8 -3
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/claude-mcp-carry.d.ts +63 -0
- package/dist/backend/claude-mcp-carry.js +242 -0
- package/dist/backend/claude-mcp-carry.js.map +1 -0
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-tools.js +15 -7
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/classic-channel-manager.d.ts +1 -1
- package/dist/classic-channel-manager.js +2 -2
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/config-validator.js +6 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/contact-auth-api.js +3 -1
- package/dist/contact-auth-api.js.map +1 -1
- package/dist/contact-auth-service.js +1 -1
- package/dist/contact-auth-service.js.map +1 -1
- package/dist/contact-auth-store.d.ts +28 -2
- package/dist/contact-auth-store.js +72 -4
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/contact-change-proposals.d.ts +18 -1
- package/dist/contact-change-proposals.js +38 -4
- package/dist/contact-change-proposals.js.map +1 -1
- package/dist/contact-state-view.d.ts +103 -0
- package/dist/contact-state-view.js +80 -0
- package/dist/contact-state-view.js.map +1 -0
- package/dist/daemon.d.ts +11 -0
- package/dist/daemon.js +66 -15
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +8 -0
- package/dist/dashboard-permissions.js +8 -0
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-outbox.d.ts +15 -1
- package/dist/delivery-outbox.js +60 -2
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-manager.d.ts +157 -15
- package/dist/fleet-manager.js +522 -78
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/admin/SKILL.md +52 -0
- package/dist/general-knowledge/skills/concepts/SKILL.md +31 -21
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +6 -0
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -3
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +3 -3
- package/dist/general-knowledge/skills/hub/SKILL.md +6 -1
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +1 -1
- package/dist/general-knowledge/skills/task-board/SKILL.md +17 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +75 -12
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
- package/dist/general-role.d.ts +1 -1
- package/dist/general-role.js +1 -0
- package/dist/general-role.js.map +1 -1
- package/dist/hub/client.js +6 -1
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +2 -1
- package/dist/hub/compose/member.js +3 -2
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.js +2 -1
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/http/compose.js +5 -0
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/protocol.d.ts +21 -0
- package/dist/hub/protocol.js +3 -0
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/question-close-model.d.ts +17 -0
- package/dist/hub/question-close-model.js +7 -0
- package/dist/hub/question-close-model.js.map +1 -0
- package/dist/hub/representative.d.ts +5 -0
- package/dist/hub/representative.js +51 -1
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/rooms/direct-view.js +1 -0
- package/dist/hub/rooms/direct-view.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +1 -1
- package/dist/hub/rooms.d.ts +3 -0
- package/dist/hub/rooms.js +27 -1
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/server.js +6 -1
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/types.d.ts +2 -2
- package/dist/human-delivery-receipts.d.ts +12 -2
- package/dist/human-delivery-receipts.js +19 -4
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +2 -0
- package/dist/instance-lifecycle.js +29 -1
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +1 -1
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +110 -12
- package/dist/locale.js.map +1 -1
- package/dist/needs-you-hub.d.ts +3 -0
- package/dist/needs-you-hub.js +31 -5
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +16 -1
- package/dist/needs-you.js +7 -1
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +2 -2
- package/dist/office-share-page.js.map +1 -1
- package/dist/office-share.js +2 -1
- package/dist/office-share.js.map +1 -1
- package/dist/outbound-handlers.d.ts +4 -0
- package/dist/outbound-handlers.js +69 -11
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +5 -1
- package/dist/outbound-schemas.js +10 -7
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +21 -0
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +2 -1
- package/dist/reply-buttons-controller.js +1 -1
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/request-context-compatibility.d.ts +20 -0
- package/dist/request-context-compatibility.js +74 -0
- package/dist/request-context-compatibility.js.map +1 -0
- package/dist/request-context-protocol.d.ts +137 -0
- package/dist/request-context-protocol.js +38 -0
- package/dist/request-context-protocol.js.map +1 -0
- package/dist/request-context-store.d.ts +25 -0
- package/dist/request-context-store.js +137 -0
- package/dist/request-context-store.js.map +1 -0
- package/dist/scheduler/db.js +26 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-text.d.ts +2 -0
- package/dist/scheduler/task-board-text.js +12 -0
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +102 -2
- package/dist/scheduler/task-board.js +242 -24
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/scheduler/task-files.d.ts +80 -0
- package/dist/scheduler/task-files.js +357 -0
- package/dist/scheduler/task-files.js.map +1 -0
- package/dist/settings-api.d.ts +2 -0
- package/dist/settings-api.js +6 -1
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +1 -0
- package/dist/settings-baseline.js +1 -1
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-effect.d.ts +2 -0
- package/dist/settings-effect.js +5 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/task-attach-client.d.ts +43 -0
- package/dist/task-attach-client.js +125 -0
- package/dist/task-attach-client.js.map +1 -0
- package/dist/task-board-tool.d.ts +12 -0
- package/dist/task-board-tool.js +107 -6
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-file-limits.d.ts +15 -0
- package/dist/task-file-limits.js +21 -0
- package/dist/task-file-limits.js.map +1 -0
- package/dist/tool-permissions.d.ts +32 -0
- package/dist/tool-permissions.js +64 -1
- package/dist/tool-permissions.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/ui/accounts-keepalive.js +2 -1
- package/dist/ui/agent-details-settings.js +7 -5
- package/dist/ui/agent-who-can-use-strings.js +125 -0
- package/dist/ui/agent-who-can-use.js +238 -0
- package/dist/ui/chat-activity.js +2 -1
- package/dist/ui/chat-pins.js +2 -1
- package/dist/ui/claude-credentials.js +2 -1
- package/dist/ui/contact-auth-strings.js +28 -17
- package/dist/ui/contact-authorizations.js +6 -4
- package/dist/ui/contact-needs.js +6 -1
- package/dist/ui/contact-permissions.js +6 -4
- package/dist/ui/contact-tool-groups.js +1 -1
- package/dist/ui/contact-verify-need.js +46 -0
- package/dist/ui/fleet-cache.js +2 -1
- package/dist/ui/fleet-office-card.js +23 -5
- package/dist/ui/fleet-office-editor.js +5 -5
- package/dist/ui/fleet-office-pack.d.ts +10 -0
- package/dist/ui/fleet-office-pack.js +65 -2
- package/dist/ui/fleet-office-skin.js +52 -14
- package/dist/ui/fleet-office-store.js +33 -2
- package/dist/ui/fleet-office-vehicles.js +130 -0
- package/dist/ui/fleet-office-zones.js +27 -10
- package/dist/ui/fleet-office.js +128 -40
- package/dist/ui/fleet-org.js +6 -1
- package/dist/ui/fleet-tab-icons.js +19 -0
- package/dist/ui/fleet-task-activity.js +11 -83
- package/dist/ui/fleet-task-archive.js +111 -0
- package/dist/ui/fleet-task-card.js +6 -4
- package/dist/ui/fleet-task-common.js +2 -2
- package/dist/ui/fleet-task-edit.js +8 -1
- package/dist/ui/fleet-task-files.js +196 -0
- package/dist/ui/fleet-task-md.js +98 -0
- package/dist/ui/fleet-task-menu.js +1 -1
- package/dist/ui/fleet-task-stats.js +2 -2
- package/dist/ui/fleet-task-view.js +14 -9
- package/dist/ui/fleet-tasks.js +42 -18
- package/dist/ui/fleet-usage.js +2 -1
- package/dist/ui/hub-admin-overview.js +2 -1
- package/dist/ui/hub-agent-intro.js +2 -1
- package/dist/ui/hub-assistant-admin.js +2 -1
- package/dist/ui/hub-directory-notices.js +2 -1
- package/dist/ui/hub-enrolment-code.js +2 -1
- package/dist/ui/hub-my-agents.js +2 -1
- package/dist/ui/hub-quick-pairing.js +2 -1
- package/dist/ui/hub-role-audit.js +2 -1
- package/dist/ui/hub-role-forms.js +3 -2
- package/dist/ui/hub-role-view.js +3 -2
- package/dist/ui/hub-roles.js +2 -1
- package/dist/ui/hub-room-agent-strings.js +2 -1
- package/dist/ui/hub-room-list.js +2 -1
- package/dist/ui/hub-room-owner-requests.js +2 -1
- package/dist/ui/hub-room-pins.js +2 -1
- package/dist/ui/hub-room-strings.js +2 -2
- package/dist/ui/hub-room-thread.js +1 -1
- package/dist/ui/log-row.js +4 -3
- package/dist/ui/office-share-dialog.js +2 -1
- package/dist/ui/office-share-page.js +2 -1
- package/dist/ui/page-share-dialog.js +3 -2
- package/dist/ui/panel-chat.js +2 -1
- package/dist/ui/panel-details.js +5 -2
- package/dist/ui/panel-fleet.js +10 -5
- package/dist/ui/panel-hub.js +2 -1
- package/dist/ui/panel-needs.js +34 -6
- package/dist/ui/panel-notices.js +2 -1
- package/dist/ui/panel-runtimes.js +2 -1
- package/dist/ui/panel-settings.js +15 -1
- package/dist/ui/panel-windows-cli.js +3 -2
- package/dist/ui/runtime-cli-install.js +2 -1
- package/dist/ui/settings-appearance.js +2 -1
- package/dist/ui/settings-guests.js +4 -3
- package/dist/ui/settings-hub-member-address.js +2 -1
- package/dist/ui/settings-hub-setup.js +2 -1
- package/dist/ui/settings-hub-web-address.js +2 -1
- package/dist/ui/settings-hub.js +2 -1
- package/dist/ui/settings-registry.js +1 -0
- package/dist/ui/settings-shared-strings.js +9 -0
- package/dist/ui/settings-shared.js +6 -1
- package/dist/ui/settings-update.js +2 -1
- package/dist/ui/settings-web-authority.js +2 -1
- package/dist/ui/shared/agent-sheet.js +2 -1
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-needs.js +8 -1
- package/dist/ui/shared/app-session.js +4 -3
- package/dist/ui/shared/app-shell.js +6 -2
- package/dist/ui/shared/app.css +93 -11
- package/dist/ui/shared/chat-strings.js +4 -4
- package/dist/ui/shared/chat-time.js +7 -4
- package/dist/ui/shared/clock-text.js +57 -0
- package/dist/ui/shared/device-roles.js +6 -5
- package/dist/ui/shared/instance-nav.js +17 -22
- package/dist/ui/shared/task-board.css +64 -0
- package/dist/ui/shared/usage-dialog.js +2 -1
- package/dist/ui/shared/view-strings.js +0 -14
- package/dist/ui/shared/web-authorize.js +3 -2
- package/dist/ui/subagent-row.js +2 -1
- package/dist/web-api.d.ts +18 -2
- package/dist/web-api.js +159 -27
- package/dist/web-api.js.map +1 -1
- package/dist/web-login.d.ts +6 -1
- package/dist/web-login.js +8 -3
- package/dist/web-login.js.map +1 -1
- package/dist/web-office-acts.d.ts +16 -0
- package/dist/web-office-acts.js +27 -9
- package/dist/web-office-acts.js.map +1 -1
- package/dist/web-office-pack-read.js +1 -1
- package/dist/web-office-pack-read.js.map +1 -1
- package/dist/web-office-skins.d.ts +5 -3
- package/dist/web-office-skins.js +20 -16
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-session-authorization.d.ts +3 -0
- package/dist/web-session-authorization.js +1 -1
- package/dist/web-session-authorization.js.map +1 -1
- package/dist/web-settings-patch.d.ts +27 -0
- package/dist/web-settings-patch.js +67 -0
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/workflow-templates/default.md +1 -0
- package/package.json +1 -1
package/dist/ui/shared/app.css
CHANGED
|
@@ -271,7 +271,9 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
|
|
|
271
271
|
.pop .devices .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
272
272
|
.pop .row { display: flex; gap: var(--s-2); flex-wrap: wrap; }
|
|
273
273
|
.pop .err { color: var(--danger); }
|
|
274
|
-
.pop .role { margin: 0; display: flex; gap: var(--s-2); align-items: baseline;
|
|
274
|
+
.pop .role { margin: 0; display: flex; gap: var(--s-2); align-items: baseline; }
|
|
275
|
+
/* M-3651: a long role ("Guest · Verified until 09:16 AM") wraps beside its label, never under a lone "Role". */
|
|
276
|
+
.pop .role strong { flex: 1; min-width: 0; }
|
|
275
277
|
.pop .webauth-rebind-form { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-1); }
|
|
276
278
|
.pop .webauth-rebind-form .note, .pop .webauth-rebind-form .err { margin: 0; }
|
|
277
279
|
.pop .webauth-rebind-field { flex: 1; min-width: 0; } /* the shared .field input (token-sized), not a one-off box */
|
|
@@ -1107,10 +1109,15 @@ html.lb-open .scroller { overflow: hidden; }
|
|
|
1107
1109
|
.pv-banner[hidden] { display: none; }
|
|
1108
1110
|
.pv-banner-text { flex: 1; min-width: 0; }
|
|
1109
1111
|
/* #1568: "I understand" hides the banner until the next sign-in; .preview-frame's border below never depends on it. */
|
|
1110
|
-
|
|
1112
|
+
/* M-3742 (Prism #4462 triage): a real flat button — its own background and a visible edge on the notice's tint, no shadow —
|
|
1113
|
+
not a ghost that reads as text; a 44 px box on a phone. Shared by the chat, the preview panel and a task card's files. */
|
|
1114
|
+
.pv-banner .pv-ack, .pv-banner .pv-ack.btn-ghost { flex: none; background: var(--bg); border-color: var(--border-strong); color: var(--text); box-shadow: none; }
|
|
1115
|
+
.pv-banner .pv-ack:hover:not(:disabled) { background: var(--surface); }
|
|
1116
|
+
@media (max-width: 899px), (pointer: coarse) { .pv-banner .pv-ack { min-height: var(--tap); } }
|
|
1111
1117
|
.pv-holder:empty { display: none; }
|
|
1112
1118
|
.pv-holder { margin-top: var(--s-2); }
|
|
1113
|
-
|
|
1119
|
+
/* M-3742: the frame's edge at least 3:1 against the page in light and dark (--warn-line alone was ~1.9:1 on white, ~2.5:1 on dark). */
|
|
1120
|
+
.preview-frame { display: block; width: 100%; border: 2px solid var(--warn-line); border-color: color-mix(in srgb, var(--warn) 85%, var(--bg)); border-radius: var(--r-sm); background: #ffffff; }
|
|
1114
1121
|
/* #1481: the preview beside the conversation. A split on a wide screen (width: --pv-w, set by the divider through
|
|
1115
1122
|
CSSOM), a full-screen sheet on a narrow one. The frame is the card's (preview.js), sized by the panel here. */
|
|
1116
1123
|
.chat-split { flex: 1; min-height: 0; display: flex; }
|
|
@@ -1443,6 +1450,8 @@ img.amb-p { object-fit: contain; }
|
|
|
1443
1450
|
.webauth-chip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); margin: var(--s-1) 0 0; font-size: var(--fs-xs); }
|
|
1444
1451
|
.webauth-chip .webauth-ok { color: var(--ok); }
|
|
1445
1452
|
.webauth-chip .btn-sm { min-height: 24px; }
|
|
1453
|
+
/* M-3710 (#4447 review): Needs you's Authorize this browser is a full touch target on a phone. */
|
|
1454
|
+
@media (pointer: coarse), (max-width: 479px) { .contact-verify-need .webauth-chip .btn-sm { min-height: var(--tap); min-width: var(--tap); } }
|
|
1446
1455
|
/* #1939 S2a: Settings → Web → Web authority. */
|
|
1447
1456
|
.s-web-authority .s-va-sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
|
|
1448
1457
|
.s-web-authority .s-va-sessions li { padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-sm); overflow-wrap: anywhere; }
|
|
@@ -1617,6 +1626,8 @@ img.amb-p { object-fit: contain; }
|
|
|
1617
1626
|
/* M-3281: the archived chat files' limit (Settings → Web dashboard): its field is a phone tap target too (its Save keeps the
|
|
1618
1627
|
section's one .btn height, as the app icon's button beside it). */
|
|
1619
1628
|
.p-settings .s-archive-files .field input { min-height: var(--tap); }
|
|
1629
|
+
/* M-3668 (ui-gate, #4428): the task board's archive-after-days field is a phone tap target too. */
|
|
1630
|
+
.p-settings #g-archive .s-hang-row input { min-height: var(--tap); }
|
|
1620
1631
|
/* AGEND-122: Owner verification's own buttons, dialog fields and switches are phone tap targets (style guide rule 7); the Devices
|
|
1621
1632
|
card's primary action beside it matches (one primary button height on the page). */
|
|
1622
1633
|
.p-settings .s-outside :is(.save-row .btn, .field input, label.check), .p-settings .s-devices .save-row .btn, .p-settings .s-web-authority .save-row .btn { min-height: var(--tap); }
|
|
@@ -2701,6 +2712,14 @@ strong.org-name { font-size: var(--fs-sm); color: var(--text); }
|
|
|
2701
2712
|
.oo-card-avatar .oo-badge { position: absolute; left: -6px; top: -6px; }
|
|
2702
2713
|
.oo-card-names { flex: 1; min-width: 0; }
|
|
2703
2714
|
.oo-card-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2715
|
+
.oo-card-name-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
|
|
2716
|
+
.oo-card-name-row .oo-card-name { min-width: 0; }
|
|
2717
|
+
.oo-card-rename-btn { flex: none; width: 24px; height: 24px; font-size: var(--fs-sm); color: var(--text-2); }
|
|
2718
|
+
.oo-card-rename { width: 100%; font: inherit; font-weight: 600; }
|
|
2719
|
+
/* A phone: the pencil keeps its size (the name's row does not grow) and no square behind it; a clear ::after reaches --tap. */
|
|
2720
|
+
.oo-card-rename-btn { position: relative; }
|
|
2721
|
+
.oo-card.sheet .oo-card-rename-btn, .oo-card.sheet .oo-card-rename-btn:hover { background: transparent; }
|
|
2722
|
+
.oo-card.sheet .oo-card-rename-btn::after { content: ""; position: absolute; inset: calc((24px - var(--tap)) / 2); z-index: 4; } /* over the grip (z 3), as the close button reaches */
|
|
2704
2723
|
/* One line, cut; a fixed line height so a CJK fallback in the mono stack doesn't make it taller. */
|
|
2705
2724
|
.oo-card-instance { height: 18px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-xs); color: var(--text-2); }
|
|
2706
2725
|
.oo-card-state { color: var(--text-2); }
|
|
@@ -2875,7 +2894,8 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
2875
2894
|
}
|
|
2876
2895
|
/* M-3253 (Argon's phone review): the Office on a phone, held upright or turned sideways (a coarse pointer in a short window,
|
|
2877
2896
|
as fleet-office.js OFFICE_PHONE_Q). Above the office two rows only: Fleet's header, then Find, the view switch and one
|
|
2878
|
-
44 px ⋯ (the Office's tools and Live in a sheet: .oo-sheet) — no wrapping bar
|
|
2897
|
+
44 px ⋯ (the Office's tools and Live in a sheet: .oo-sheet) — no wrapping bar (except under 370 px, M-3727: Find on its own
|
|
2898
|
+
row, the switch and ⋯ under it, so ⋯ stays on screen). The stage takes the rest; its zoom pill is
|
|
2879
2899
|
−, the zoom, +, fullscreen (Fit and Fill are in the sheet), 44 px each; the zone pills along its foot. */
|
|
2880
2900
|
@media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
|
|
2881
2901
|
.oc-office:has(.oo-more-btn) > .oc-bar { flex-wrap: nowrap; padding: var(--s-1) var(--s-3); }
|
|
@@ -2885,6 +2905,13 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
2885
2905
|
.oc-tools:has(.oo-more-btn) .seg-inline { flex: none; }
|
|
2886
2906
|
.oc-tools .oo-more-btn { flex: none; width: var(--tap); height: var(--tap); }
|
|
2887
2907
|
@media (hover: none) { .oc-tools .oo-more-btn:hover { background: none; } } /* a tap leaves :hover stuck on touch */
|
|
2908
|
+
/* M-3727: Find (at least 88 px), the view switch and ⋯ need about 342 px (en) — more than a 320–360 px phone has: ⋯ went
|
|
2909
|
+
off-screen. There, Find takes the first row and the switch and ⋯ (at the right) the second; every control stays whole. */
|
|
2910
|
+
@media (max-width: 369px) {
|
|
2911
|
+
.oc-office .oc-bar .oc-tools:has(.oo-more-btn) { flex-wrap: wrap; row-gap: var(--s-1); }
|
|
2912
|
+
.oc-tools:has(.oo-more-btn) .oc-find { flex: 1 0 100%; }
|
|
2913
|
+
.oc-tools .oo-more-btn { margin-left: auto; }
|
|
2914
|
+
}
|
|
2888
2915
|
.oo.phone > :not(.oo-stage):not(dialog) { margin-left: var(--s-3); margin-right: var(--s-3); }
|
|
2889
2916
|
.oo.phone .oo-stage { min-height: 160px; }
|
|
2890
2917
|
.oo.phone .oo-mini { display: none; }
|
|
@@ -4557,7 +4584,7 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
4557
4584
|
.p-settings .s-color-summary { display: grid; grid-template-columns: 112px minmax(0, 1fr) 16px; gap: 16px; align-items: center; min-height: 38px; cursor: pointer; list-style: none; }
|
|
4558
4585
|
.p-settings .s-color-summary::-webkit-details-marker { display: none; }
|
|
4559
4586
|
.p-settings .s-color-summary > .s-ap-title { margin: 0; }
|
|
4560
|
-
.p-settings .s-color-summary > svg { color: var(--text-3);
|
|
4587
|
+
.p-settings .s-color-summary > svg { color: var(--text-3); }
|
|
4561
4588
|
.p-settings .s-colors[open] > .s-color-summary > svg { transform: rotate(90deg); }
|
|
4562
4589
|
.p-settings .s-color-summary-places { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
|
|
4563
4590
|
.p-settings .s-color-summary-places > span { padding: 4px 8px; border: 1px solid var(--border); border-radius: 5px; color: var(--text-2); font-size: var(--fs-xs); line-height: 1.5; }
|
|
@@ -5066,6 +5093,43 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
5066
5093
|
/* A category's panel takes no box of its own: its cards are stacked by .s-section-layout's gap, like Settings' cards. */
|
|
5067
5094
|
.ap-panel { display: contents; }
|
|
5068
5095
|
.ap-panel[hidden] { display: none; }
|
|
5096
|
+
/* M-3734: an agent page's Who can use (agent-who-can-use.js): Web guests and Hub, each a card of the section's column. */
|
|
5097
|
+
.ap-who { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
|
|
5098
|
+
.ap-who .ap-who-admins { margin: 0; }
|
|
5099
|
+
.ap-who-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
|
|
5100
|
+
.ap-who-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--border); min-width: 0; }
|
|
5101
|
+
.ap-who-row:first-child { border-top: 0; }
|
|
5102
|
+
.ap-who-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
|
|
5103
|
+
background: var(--surface-2); color: var(--text-2); font-weight: 600; }
|
|
5104
|
+
.ap-who-id { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
|
|
5105
|
+
.ap-who-id .note { white-space: normal; }
|
|
5106
|
+
.ap-who-state { margin-top: 2px; }
|
|
5107
|
+
.ap-who-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
|
|
5108
|
+
.ap-who-actions .btn, .ap-who-derived .btn, .ap-who-hub .btn, .ap-who-guests > .field-row .btn { min-height: var(--tap); }
|
|
5109
|
+
.ap-who-add { margin-top: 16px; }
|
|
5110
|
+
.ap-who-add > summary { min-height: var(--tap); display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; list-style: none; }
|
|
5111
|
+
.ap-who-add > summary::-webkit-details-marker { display: none; }
|
|
5112
|
+
.ap-who-add > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
|
|
5113
|
+
.ap-who-add[open] > summary::before { transform: rotate(45deg); }
|
|
5114
|
+
.ap-who-derived { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 8px 0; }
|
|
5115
|
+
.ap-who-derived > .note { margin: 0; }
|
|
5116
|
+
.ap-who-derived .btn { margin-top: 4px; }
|
|
5117
|
+
.ap-who-go { white-space: nowrap; }
|
|
5118
|
+
.ap-who-guests > .field-row { margin: 4px 0 8px; }
|
|
5119
|
+
.ap-who-actions .ap-who-remove { margin-left: 16px; }
|
|
5120
|
+
.ap-who-confirm-note { margin-top: 4px; }
|
|
5121
|
+
.ap-who-add .input { width: 100%; max-width: 420px; min-height: var(--tap); margin: 8px 0; }
|
|
5122
|
+
.ap-who-off { padding: 2px 0 2px 10px; border-left: 3px solid var(--warn); color: var(--text); }
|
|
5123
|
+
.ap-who-hub-state { margin: 8px 0; font-weight: 600; }
|
|
5124
|
+
.ap-who-hub[data-hub-state="shared"] .ap-who-hub-state { color: var(--ok); }
|
|
5125
|
+
.ap-who .err { color: var(--danger); }
|
|
5126
|
+
.ap-who .field-row { flex-wrap: wrap; }
|
|
5127
|
+
.ap-who .field-row .btn { white-space: normal; text-align: center; max-width: 100%; }
|
|
5128
|
+
@media (max-width: 599px) {
|
|
5129
|
+
.ap-who .field-row { flex-direction: column; align-items: stretch; }
|
|
5130
|
+
.ap-who-actions { margin-left: calc(32px + 12px); width: 100%; }
|
|
5131
|
+
.ap-who-actions .ap-who-remove { margin-left: auto; }
|
|
5132
|
+
}
|
|
5069
5133
|
.p-details .d-actions .field-row { flex-wrap: wrap; }
|
|
5070
5134
|
/* The sidebar's ⚙: one step to an agent's settings — on hover or focus on a desktop and on the open row, always on a touch screen. */
|
|
5071
5135
|
.inst-gear { flex: none; width: 28px; height: 28px; padding: 0; color: var(--text-3); display: inline-grid; place-items: center; }
|
|
@@ -5156,16 +5220,31 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
5156
5220
|
.sidebar.fleet-side .side-new { position: absolute; top: calc(var(--header-h) + max(var(--s-1), env(safe-area-inset-top))); right: var(--s-2); width: var(--tap); height: var(--tap); padding: 0; justify-content: center; }
|
|
5157
5221
|
.sidebar.fleet-side .side-new .grow { display: none; }
|
|
5158
5222
|
.sidebar.fleet-side .inst-row-menu, .sidebar.fleet-side .av-cli, .sidebar.fleet-side .v-group-kind, .sidebar.fleet-side .v-meta { display: none !important; }
|
|
5159
|
-
.p-fleet > .panel-head .sb-search, .p-fleet > .panel-head .panel-
|
|
5160
|
-
/*
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
.p-fleet > .panel-head
|
|
5223
|
+
.p-fleet > .panel-head .sb-search, .p-fleet > .panel-head .panel-actions { display: none !important; }
|
|
5224
|
+
/* M-3722: two rows — ☰ and this page's name (a host-memory warning, its subtitle, under it, #4008 review), then every tab
|
|
5225
|
+
as an icon across the whole width, each a full touch target: eight no longer fit beside ☰ at 390 px. A tab's name stays
|
|
5226
|
+
its accessible name (visually hidden). */
|
|
5227
|
+
.p-fleet > .panel-head { flex-wrap: wrap; }
|
|
5228
|
+
.p-fleet > .panel-head .panel-title { flex: 1 1 0; min-width: 0; }
|
|
5229
|
+
.p-fleet > .panel-head .panel-title h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
5164
5230
|
.p-fleet > .panel-head .panel-title .panel-sub:has(.host-mem) { flex: 1 1 auto; width: auto; }
|
|
5165
|
-
.p-fleet > .panel-head .fleet-phone-tabs { flex: 1;
|
|
5231
|
+
.p-fleet > .panel-head .fleet-phone-tabs { order: 20; flex: 1 0 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; min-width: 0; padding: 0; margin: 0; overflow: visible; }
|
|
5232
|
+
.p-fleet > .panel-head .fleet-phone-tabs .seg-item { min-height: var(--tap); min-width: 0; padding: 0; justify-content: center; }
|
|
5233
|
+
/* The tab you are on: a flat accent-tinted pill and the accent icon (≥ 3:1: the cue). The grey tile alone was about 1.2:1; a
|
|
5234
|
+
line under it read as a raised key (the user, #4453). No line, border or shadow; the same in dark. */
|
|
5235
|
+
.p-fleet > .panel-head .fleet-phone-tabs .seg-item.active { color: var(--accent); background: var(--surface-2); background: color-mix(in srgb, var(--accent) 14%, var(--bg)); box-shadow: none; border-color: transparent; }
|
|
5236
|
+
.p-fleet > .panel-head .fleet-phone-tabs .seg-item span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
5166
5237
|
.p-fleet .oc-bar > span:first-child, .p-fleet .oc-bar .org-counts { display: none; }
|
|
5167
5238
|
.p-fleet .oc-bar .oc-tools { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
|
|
5168
5239
|
}
|
|
5240
|
+
/* M-3722 (#4453 review): eight 44 px tabs need 352 px. Under 384 px (the gutters would leave less: 360 px phones, 375 px
|
|
5241
|
+
ones) the row runs edge to edge; under 352 px it is two rows of four. Every tab stays a 44 × 44 target. */
|
|
5242
|
+
@media (max-width: 383px) {
|
|
5243
|
+
.p-fleet > .panel-head .fleet-phone-tabs { margin-left: calc(-1 * max(var(--s-4), env(safe-area-inset-left))); margin-right: calc(-1 * max(var(--s-4), env(safe-area-inset-right))); }
|
|
5244
|
+
}
|
|
5245
|
+
@media (max-width: 351px) {
|
|
5246
|
+
.p-fleet > .panel-head .fleet-phone-tabs { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
5247
|
+
}
|
|
5169
5248
|
/* M-3166 (Argon 2, the user's OK of round 2): on a phone a toast (an agent waiting for you, a result) is one line — a pill that a
|
|
5170
5249
|
tap puts away — and none shows while the keyboard is up. */
|
|
5171
5250
|
@media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
|
|
@@ -5392,3 +5471,6 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
5392
5471
|
.p-fleet :is(.tb-head-actions, .tb-title, .tb-stats) .btn { min-height: var(--tap); }
|
|
5393
5472
|
.p-fleet .tb-project-menu .icon-btn { width: var(--tap); height: var(--tap); } /* a project tile's ⋯ */
|
|
5394
5473
|
}
|
|
5474
|
+
|
|
5475
|
+
/* M-3678: the new owner stop action follows the phone tap target. */
|
|
5476
|
+
@media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) { .n-actions .hub-close { min-height: var(--tap); min-width: var(--tap); } }
|
|
@@ -251,12 +251,12 @@ register("chat", {
|
|
|
251
251
|
guestNote: "你是訪客:agent 會把你的訊息視為訪客的訊息(僅供辨識)。", guestNoCommands: "訪客不能這樣送出,請去掉開頭的 / 再送出。", guestCommandNotAllowed: "訪客不能使用 {0},只有這個頻道的管理員可以執行。", attachTitle: "附加檔案(任何類型,也可以貼上或拖曳)",
|
|
252
252
|
pvPopout: "彈出預覽視窗", pvPreview: "預覽", pvStop: "停止", pvDownload: "下載", pvMenu: "預覽選項", pvHtml: "HTML",
|
|
253
253
|
pvAllowButton: "允許預覽", pvAllow: "允許預覽 HTML(預覽可能把資料傳出去)", pvDisallow: "不再允許預覽 HTML",
|
|
254
|
-
pvConfirm: "要允許預覽 HTML 嗎?\n\n這會套用到你登入的每一台裝置。預覽會在隔離的框架裡執行
|
|
254
|
+
pvConfirm: "要允許預覽 HTML 嗎?\n\n這會套用到你登入的每一台裝置。預覽會在隔離的框架裡執行 Agent 的 HTML。它無法使用你的登入,但可能把資料傳出去,也可能讓這個分頁變慢或卡住。每次仍需要你按「預覽」。",
|
|
255
255
|
pvNever: "這台裝置永不預覽 HTML", pvNeverUndo: "讓這台裝置再次可以預覽 HTML", pvStarting: "正在啟動預覽…",
|
|
256
|
-
pvChanged: "預覽已停止——訊息內容變了。請再預覽一次。", pvTruncated: "內容被截斷——請
|
|
256
|
+
pvChanged: "預覽已停止——訊息內容變了。請再預覽一次。", pvTruncated: "內容被截斷——請 Agent 改用 .html 檔案傳送。",
|
|
257
257
|
pvLoading: "正在讀取檔案…", pvAttOver: "這個檔案超過 50 MB,不提供預覽,請下載後開啟。",
|
|
258
258
|
pvLarge: "這個檔案比較大({0}),仍要預覽嗎?", pvAnyway: "仍要預覽",
|
|
259
|
-
pvAttGone: "這裡已無法取得這個檔案(檔案已變更,或 Fleet 已重新啟動)。請
|
|
259
|
+
pvAttGone: "這裡已無法取得這個檔案(檔案已變更,或 Fleet 已重新啟動)。請 Agent 再傳一次。",
|
|
260
260
|
pvAttFailed: "無法讀取這個檔案,請再試一次。",
|
|
261
261
|
pvBannerAck: "我知道了", pvBannerAckTitle: "隱藏這則提醒,直到下次登入",
|
|
262
262
|
attGone: "AgEnD 重新啟動後找不到這個檔案(已移動、刪除或變更)。請 agent 再傳一次。", attUnavailable: "無法取得", yesterdayAt: "昨天 {0}",
|
|
@@ -295,7 +295,7 @@ register("chat", {
|
|
|
295
295
|
pvNoAnswer: "無法預覽:預覽在 3 秒內沒有回應。如果先前的預覽卡住了,它可能還在執行——請在新分頁開啟儀表板。透過 SSH 使用時,也要轉送預覽的連接埠。",
|
|
296
296
|
pvStoppedAnswering: "預覽沒有回應,已將它關閉。", pvSwitchedOff: "這台裝置已關閉預覽。",
|
|
297
297
|
pvAnother: "另一個預覽已開始。", pvWrongBoot: "無法預覽:預覽連接埠上回應的不是這個 Fleet。",
|
|
298
|
-
pvBanner: "預覽會在隔離的框架裡執行
|
|
298
|
+
pvBanner: "預覽會在隔離的框架裡執行 Agent 的 HTML。它無法使用你的登入,但可能把資料傳出去。只預覽你信任的內容。預覽可能讓這個分頁變慢或卡住。",
|
|
299
299
|
pvServer_fleetOff: "這個 Fleet 已關閉預覽(web.preview: false)。", pvServer_unchecked: "無法確認這個網址。",
|
|
300
300
|
pvServer_noPort: "預覽沒有可用的連接埠:請設定 web.preview_port(health_port 已是最大的連接埠)。",
|
|
301
301
|
pvServer_notListed: "{0} 不提供預覽:請把這個網址(含連接埠)加入 web.allowed_hosts,並設定 web.preview_origin。",
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
// #1770: the time a chat line shows, read in the fleet's zone (the one chat-logs, fleet.log and the #1586 DMs use) —
|
|
2
|
-
// "17:38" today, "Yesterday 17:38", "10/11 17:38" earlier this year, "2025/10/11 17:38" before.
|
|
3
|
-
// the browser's own format (12- or 24-hour), as they always had
|
|
2
|
+
// "17:38" today, "Yesterday 17:38", "10/11 17:38" earlier this year, "2025/10/11 17:38" before. In English the hour and
|
|
3
|
+
// minute keep the browser's own format (12- or 24-hour), as they always had; a zh-TW page is on the 24-hour clock
|
|
4
|
+
// (M-3730, the same rule as clock-text.js, read from <html lang>). No imports: the thread, the preview panel and the
|
|
4
5
|
// tests read it as it is.
|
|
5
6
|
|
|
6
7
|
const cache = new Map();
|
|
7
8
|
/** One formatter per (kind, zone, locale): a thread may label 500 lines on every render. */
|
|
9
|
+
const zhPage = () => /^zh/i.test(globalThis.document?.documentElement?.lang || "");
|
|
8
10
|
function fmt(kind, tz, locale) {
|
|
9
|
-
const
|
|
11
|
+
const zh = kind !== "ymd" && (locale ? /^zh/i.test(String(locale)) : zhPage());
|
|
12
|
+
const key = `${kind}|${tz || ""}|${locale || ""}|${zh ? "h23" : ""}`;
|
|
10
13
|
let f = cache.get(key);
|
|
11
14
|
if (!f) {
|
|
12
15
|
const o = kind === "hm" ? { hour: "2-digit", minute: "2-digit" }
|
|
13
16
|
: kind === "ymd" ? { year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric", hourCycle: "h23" }
|
|
14
17
|
: { year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", timeZoneName: "short" };
|
|
15
|
-
f = new Intl.DateTimeFormat(kind === "ymd" ? "en-US" : (locale || []), { ...o, timeZone: tz || undefined });
|
|
18
|
+
f = new Intl.DateTimeFormat(kind === "ymd" ? "en-US" : zh ? "zh-TW" : (locale || []), { ...o, ...(zh ? { hourCycle: "h23" } : {}), timeZone: tz || undefined });
|
|
16
19
|
cache.set(key, f);
|
|
17
20
|
}
|
|
18
21
|
return f;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// M-3730 (the user, 2026-11-25): a time in the zh-TW interface is a 24-hour clock, 00:19 and 19:45, never 上午12:19 or
|
|
2
|
+
// 下午07:45. Every time and date-with-time the web UI shows goes through here; English keeps what each screen showed.
|
|
3
|
+
// No imports: the language is the page's own <html lang> (app-i18n.js sets "zh-Hant" or "en"), so the fleet, the Hub,
|
|
4
|
+
// a share page and the tests can all read it as it is.
|
|
5
|
+
|
|
6
|
+
/** True when the page shows zh-TW. */
|
|
7
|
+
export function zhClock() { return /^zh/i.test(globalThis.document?.documentElement?.lang || ""); }
|
|
8
|
+
|
|
9
|
+
/** The locale to format with: zh-TW on a zh-TW page, else the screen's own (English: what it always used). */
|
|
10
|
+
export function clockLocale(enLocale) { return zhClock() ? "zh-TW" : enLocale; }
|
|
11
|
+
|
|
12
|
+
const hasTime = (o) => Boolean(o && (o.hour || o.timeStyle));
|
|
13
|
+
const DATE = { year: "numeric", month: "numeric", day: "numeric" }, HMS = { hour: "2-digit", minute: "2-digit", second: "2-digit" };
|
|
14
|
+
/**
|
|
15
|
+
* Intl options for that locale: a zh-TW time is on the 24-hour cycle. A date-only format is left as it is. With no
|
|
16
|
+
* fields (none, {} or only a timeZone) each wrapper keeps its native default: `datetime` (toLocaleString) is a date and
|
|
17
|
+
* a time, `time` (toLocaleTimeString) a time alone, `format` (Intl.DateTimeFormat) a date alone (#4455 review).
|
|
18
|
+
*/
|
|
19
|
+
export function clockOptions(o, kind = "datetime") {
|
|
20
|
+
if (!zhClock()) return o;
|
|
21
|
+
if (!o || !Object.keys(o).some((k) => k !== "timeZone")) {
|
|
22
|
+
if (kind === "format") return o;
|
|
23
|
+
return { ...(kind === "datetime" ? DATE : {}), ...HMS, hourCycle: "h23", ...(o?.timeZone ? { timeZone: o.timeZone } : {}) };
|
|
24
|
+
}
|
|
25
|
+
if (!hasTime(o)) return o;
|
|
26
|
+
const { hour12: _ignored, dateStyle, timeStyle, ...rest } = o;
|
|
27
|
+
// ICU drops a dateStyle's words when an hourCycle comes with it (2026年12月2日 turns into 2026/12/2), so the styles
|
|
28
|
+
// become the parts they stand for.
|
|
29
|
+
const day = dateStyle === "full" ? { year: "numeric", month: "long", day: "numeric", weekday: "long" }
|
|
30
|
+
: dateStyle === "long" || dateStyle === "medium" ? { year: "numeric", month: "long", day: "numeric" }
|
|
31
|
+
: dateStyle === "short" ? { year: "numeric", month: "numeric", day: "numeric" } : {};
|
|
32
|
+
const time = !timeStyle ? {} : { hour: "2-digit", minute: "2-digit", ...(timeStyle === "short" ? {} : { second: "2-digit" }),
|
|
33
|
+
...(timeStyle === "long" || timeStyle === "full" ? { timeZoneName: "short" } : {}) };
|
|
34
|
+
return { ...day, ...time, ...rest, hourCycle: "h23" };
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** An Intl.DateTimeFormat that follows the rule above. */
|
|
38
|
+
export function clockFormat(o, enLocale) { return new Intl.DateTimeFormat(clockLocale(enLocale), clockOptions(o, "format")); }
|
|
39
|
+
|
|
40
|
+
const date = (v) => (v instanceof Date ? v : new Date(v));
|
|
41
|
+
/** A time of day ("19:45" in zh-TW; the screen's English format otherwise). No `o`: toLocaleTimeString's own default
|
|
42
|
+
* (hours, minutes and seconds). */
|
|
43
|
+
export function timeText(v, o, enLocale) {
|
|
44
|
+
const d = date(v);
|
|
45
|
+
if (!Number.isFinite(d.getTime())) return "";
|
|
46
|
+
return d.toLocaleTimeString(clockLocale(enLocale), clockOptions(o, "time"));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** A date with its time (toLocaleString), with the screen's options. */
|
|
50
|
+
export function dateTimeText(v, o, enLocale) {
|
|
51
|
+
const d = date(v);
|
|
52
|
+
return Number.isFinite(d.getTime()) ? d.toLocaleString(clockLocale(enLocale), clockOptions(o)) : "";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const ZH_UNIT = { ms: "毫秒", s: "秒", m: "分鐘", min: "分鐘", h: "小時" };
|
|
56
|
+
/** A number with its time unit: "2 h" / "5 min" / "3 s" in English, "2 小時" / "5 分鐘" / "3 秒" on a zh-TW page. */
|
|
57
|
+
export function unitText(n, unit) { return `${n} ${zhClock() ? ZH_UNIT[unit] ?? unit : unit}`; }
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import { register, t } from "./app-i18n.js";
|
|
8
8
|
|
|
9
9
|
register("webauth", {
|
|
10
|
-
en: { role: "Role", roleOwner: "Owner ✓", roleAdminUnverified: "Admin · not verified", roleGuest: "Guest", roleRead: "Read-only" },
|
|
11
|
-
"zh-TW": { role: "角色", roleOwner: "擁有者 ✓", roleAdminUnverified: "管理員 · 未驗證", roleGuest: "訪客", roleRead: "唯讀" },
|
|
10
|
+
en: { role: "Role", roleOwner: "Owner ✓", roleAdminUnverified: "Admin · not verified", roleGuest: "Guest", roleGuestVerified: "Guest · Verified until {0}", roleRead: "Read-only" },
|
|
11
|
+
"zh-TW": { role: "角色", roleOwner: "擁有者 ✓", roleAdminUnverified: "管理員 · 未驗證", roleGuest: "訪客", roleGuestVerified: "訪客 · 驗證有效至 {0}", roleRead: "唯讀" },
|
|
12
12
|
});
|
|
13
13
|
register("app", {
|
|
14
14
|
en: { manageDevices: "Manage devices" },
|
|
@@ -18,10 +18,11 @@ register("app", {
|
|
|
18
18
|
/**
|
|
19
19
|
* A sign-in's role as one of four words — the session menu's and Settings → Devices' alike. `tier` is the session's (admin /
|
|
20
20
|
* read / guest); `verified`: its owner authorization is valid now (this computer's code sign-in or a chat account's confirm).
|
|
21
|
-
* Only an admin can be an owner; an admin without that is "Admin · not verified".
|
|
21
|
+
* Only an admin can be an owner; an admin without that is "Admin · not verified". M-3651: a guest verified as its account
|
|
22
|
+
* (its private code) is "Guest · Verified until …" when `until` (the time, as shown) is given — who it is, never an owner.
|
|
22
23
|
*/
|
|
23
|
-
export function roleName(tier, verified) {
|
|
24
|
-
if (tier === "guest") return t("webauth.roleGuest");
|
|
24
|
+
export function roleName(tier, verified, until) {
|
|
25
|
+
if (tier === "guest") return verified && until ? t("webauth.roleGuestVerified", until) : t("webauth.roleGuest");
|
|
25
26
|
if (tier === "read") return t("webauth.roleRead");
|
|
26
27
|
return verified ? t("webauth.roleOwner") : t("webauth.roleAdminUnverified");
|
|
27
28
|
}
|
|
@@ -22,6 +22,7 @@ import "./view-strings.js";
|
|
|
22
22
|
import { themesShown, themesStore } from "./app-themes.js";
|
|
23
23
|
import { machineName } from "./machine-name.js";
|
|
24
24
|
import { identityClasses, identityOf, paintIdentity, useIdentityColors } from "./identity-color.js";
|
|
25
|
+
import { dateTimeText } from "./clock-text.js";
|
|
25
26
|
|
|
26
27
|
// Keep new copy beside its caller: a retained view-strings.js still links and renders the menu.
|
|
27
28
|
register("agentRow", {
|
|
@@ -510,28 +511,21 @@ export function agentTurnAge(it, now = Date.now()) {
|
|
|
510
511
|
const at = it && typeof it.last_agent_turn === "string" ? Date.parse(it.last_agent_turn) : NaN;
|
|
511
512
|
return Number.isFinite(at) ? Math.max(0, (now - at) / 60000) : null;
|
|
512
513
|
}
|
|
513
|
-
/** A short "ago": "now", "2m", "3h", "4d" (zh-TW: 剛剛、2 分、3 小時、4 天). */
|
|
514
|
-
export function whenShort(mins) {
|
|
515
|
-
if (mins < 1) return tn("whenNow");
|
|
516
|
-
if (mins < 60) return tn("whenMin", { n: Math.floor(mins) });
|
|
517
|
-
if (mins < 1440) return tn("whenHour", { n: Math.floor(mins / 60) });
|
|
518
|
-
return tn("whenDay", { n: Math.floor(mins / 1440) });
|
|
519
|
-
}
|
|
520
514
|
/**
|
|
521
|
-
* The row's
|
|
522
|
-
*
|
|
523
|
-
* null for
|
|
524
|
-
*
|
|
515
|
+
* The row's time (M-3707, the user 11-25: one time again, not M-3674's 人/Agent pair): the most recent response, to a
|
|
516
|
+
* person (last_reply) or to another agent (last_agent_turn), unlabelled, as a reply's time always read ("2 min ago");
|
|
517
|
+
* null for neither. `person`: the time shown is the reply to a person. The title says which kind each was, the newer
|
|
518
|
+
* first, each with its full time. Only a reply to a person highlights the row or moves it in "Recent" (replyAge, below):
|
|
519
|
+
* a turn another agent started updates the time silently.
|
|
525
520
|
*/
|
|
526
|
-
export function activityText(it, replyMins, agentMins
|
|
521
|
+
export function activityText(it, replyMins, agentMins) {
|
|
527
522
|
if (replyMins == null && agentMins == null) return null;
|
|
528
|
-
const at = (k) =>
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
return { text: replyMins == null ? a : tn("whenBoth", { p: tn("whenPerson", { t: whenShort(replyMins) }), a }), title };
|
|
523
|
+
const at = (k) => dateTimeText(Date.parse(it[k]));
|
|
524
|
+
const agentNewer = agentMins != null && (replyMins == null || agentMins < replyMins);
|
|
525
|
+
const lines = [replyMins != null ? tn("whenPersonTitle", { time: at("last_reply") }) : null, agentMins != null ? tn("whenAgentTitle", { time: at("last_agent_turn") }) : null]
|
|
526
|
+
.filter(Boolean);
|
|
527
|
+
if (agentNewer) lines.reverse();
|
|
528
|
+
return { text: replyText(agentNewer ? agentMins : replyMins), title: lines.join("\n"), person: !agentNewer };
|
|
535
529
|
}
|
|
536
530
|
/** How strong the highlight is: 1 just after a reply, down to 0 at REPLY_FRESH_MIN minutes. */
|
|
537
531
|
export function replyFade(mins) { return mins == null || mins >= REPLY_FRESH_MIN ? 0 : 1 - mins / REPLY_FRESH_MIN; }
|
|
@@ -821,8 +815,9 @@ export function InstanceNav({ route, items, loaded = true, exec = {}, awaiting =
|
|
|
821
815
|
// #2179 (B5, the user's pick): the % (and the ★ beside the row) on the name's line; the time of the last reply at the
|
|
822
816
|
// end of the second line, highlighted for REPLY_FRESH_MIN minutes, fading by itself (a reply under a minute pulses once).
|
|
823
817
|
const mins = ageOf(name), fade = replyFade(mins);
|
|
824
|
-
// M-3674:
|
|
825
|
-
|
|
818
|
+
// M-3674/M-3707: the time is the newer of that reply and the last turn another agent started (a busy agent no longer
|
|
819
|
+
// reads "33 天前"); the highlight and "Recent" stay the reply's.
|
|
820
|
+
const amins = viewOnly ? null : agentTurnAge(byName.get(name), now), act = activityText(byName.get(name) || {}, mins, amins);
|
|
826
821
|
const two = !!secondary || !!act;
|
|
827
822
|
const menuItems = [
|
|
828
823
|
canStar ? { key: "favorite", label: t(`agentRow.${starred ? "remove" : "add"}`), icon: "star", disabled: full,
|
|
@@ -855,7 +850,7 @@ export function InstanceNav({ route, items, loaded = true, exec = {}, awaiting =
|
|
|
855
850
|
<span class="inst-text"><span class="inst-line"><span class="inst-name" title=${label}>${label}</span>
|
|
856
851
|
${!compact ? html`<span class="v-meta">${it.runtime === "windows" ? "Windows" : it.context_pct != null ? `${Math.round(it.context_pct)}%` : ""}</span>` : null}</span>
|
|
857
852
|
${two ? html`<span class="inst-line inst-line2">${!compact ? html`<span class="inst-alt" title=${secondary || undefined}>${secondary || ""}</span>` : null}
|
|
858
|
-
${act ? html`<span class=${`inst-when${fade > 0 ? " fresh" : ""}`} title=${act.title}>${act.text}</span>` : null}</span>` : null}
|
|
853
|
+
${act ? html`<span class=${`inst-when${fade > 0 && act.person ? " fresh" : ""}`} title=${act.title}>${act.text}</span>` : null}</span>` : null}
|
|
859
854
|
${!compact && it.machine_id ? html`<span class=${`inst-machine${it.machine_status !== "online" ? " offline" : ""}`} title=${tn("tooltipMachine",{value:machineName(it.machine_id,it.machine_name)})}><span class="inst-machine-name">${machineName(it.machine_id,it.machine_name)}</span>${it.machine_status !== "online" ? html`<span class="inst-machine-status">${tn(it.machine_status === "revoked" ? "machineRevoked" : "machineOffline")}</span>` : null}</span>` : null}
|
|
860
855
|
${!compact && facet === "needs" ? html`<span class="inst-sub"><span class="badge-await" title=${waiting || t("app.approxNote")}>${t("app.needsYou")}</span></span>` : null}
|
|
861
856
|
<span class="sr-only">${tn("tooltipBackend", { value: backendLabel(it.backend) })}</span></span>
|
|
@@ -492,6 +492,8 @@ button.tb-row-progress:hover { background: var(--surface-2); }
|
|
|
492
492
|
.tb-progress { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); font-size: var(--fs-sm); min-width: 0; }
|
|
493
493
|
.tb-progress > .tb-bar { width: auto; flex: 1 1 64px; min-width: 64px; }
|
|
494
494
|
.tb-stats > .tb-sort-link { grid-column: 1 / -1; margin-top: 0; }
|
|
495
|
+
/* M-3668: "Archived · N" on its own row under the name (in the name's row it squeezed the name letter by letter). */
|
|
496
|
+
.tb-stats > .tb-archived-link { grid-column: 1 / -1; justify-self: start; }
|
|
495
497
|
/* Home's head: the title with Agent and New project in its row; the search under it, across the width. */
|
|
496
498
|
.tb-home > .tb-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-2); }
|
|
497
499
|
.tb-home > .tb-head > .s-page-title { flex: 1 1 auto; min-width: min-content; }
|
|
@@ -587,3 +589,65 @@ button.tb-owner-btn:hover { border-color: var(--border); background: var(--surfa
|
|
|
587
589
|
@media (prefers-reduced-motion: reduce) {
|
|
588
590
|
.tr-mark.s-working .tr-dot, .tr-state.s-working .tr-dot { animation: none; }
|
|
589
591
|
}
|
|
592
|
+
|
|
593
|
+
/* M-3668: the Done column's "Show 20 more" under its newest cards; this week's count beside its title; the Archive's filter. */
|
|
594
|
+
.tb-done-more { display: block; margin: var(--s-2) auto; }
|
|
595
|
+
/* #4428 capture check: under the Done column's head, not in it (a narrow head squeezed its title to 「完 / 成」). */
|
|
596
|
+
.tb-done-week-line { margin: 0 0 var(--s-2); font-size: var(--fs-xs); }
|
|
597
|
+
.tb-nowrap { white-space: nowrap; }
|
|
598
|
+
.tb-archive .tb-row-time { width: 11em; }
|
|
599
|
+
.tb-archive-who { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); font-size: var(--fs-sm); color: var(--text-2); }
|
|
600
|
+
|
|
601
|
+
/* Markdown in a card's fields and in a file's preview: the timeline's own rules (`.tl-body.md …`, above) — the element carries
|
|
602
|
+
`.tl-body` and `.md` too — with the timeline's indent (the avatar's width) taken off, and the field's own box and size. */
|
|
603
|
+
.tc-md.tl-body { padding: var(--s-2); }
|
|
604
|
+
.tf-md.tl-body { padding: var(--s-2) var(--s-3); }
|
|
605
|
+
.tc-md.tl-body { cursor: text; }
|
|
606
|
+
/* The Edit button: on the desk it sits at the field's top right, shown on hover or focus, with room reserved for it so it never covers text;
|
|
607
|
+
on a touch screen it is always there and a 44px box; on a phone it is a row of its own under the text (nothing to cover). */
|
|
608
|
+
.tc-md-wrap { position: relative; min-width: 0; }
|
|
609
|
+
.tc-md-edit { position: absolute; top: 2px; right: 2px; opacity: 0; }
|
|
610
|
+
.tc-md-wrap:hover .tc-md-edit, .tc-md-edit:focus-visible { opacity: 1; }
|
|
611
|
+
.tp .tc-md-wrap .tc-text { padding-right: calc(var(--s-8) + var(--s-4)); }
|
|
612
|
+
@media (pointer: coarse) { .tc-md-edit { opacity: 1; min-width: var(--tap); min-height: var(--tap); } }
|
|
613
|
+
/* The Edit button is a quiet ghost button, easy to miss on the dark theme: its enabled state takes the accent token (the colour of links and
|
|
614
|
+
selected text, defined for every theme) in its text and border. Colour only: the size and the 44px touch box are the rules above. */
|
|
615
|
+
.tc-md-edit.btn-ghost { color: var(--accent); border-color: var(--accent); }
|
|
616
|
+
|
|
617
|
+
/* Files on a card (fleet-task-files.js): under the comment they came with, and together in the card's Files field. One row each — the
|
|
618
|
+
name (the download), the size, who and when, the Download button — then what the page can show of it: the picture, the text, the preview. */
|
|
619
|
+
.tf-list { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; margin: 0; padding: 0; list-style: none; }
|
|
620
|
+
.tl-files { margin: var(--s-2) 0 0 36px; }
|
|
621
|
+
.tf-row { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); }
|
|
622
|
+
.tf-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); min-width: 0; }
|
|
623
|
+
.tf-icon { display: inline-flex; flex: none; color: var(--text-3); }
|
|
624
|
+
.tf-name { min-width: 0; overflow-wrap: anywhere; color: var(--text); font-weight: var(--fw-semibold); text-decoration: none; }
|
|
625
|
+
.tf-name:hover { text-decoration: underline; }
|
|
626
|
+
.tf-meta { font-size: var(--fs-xs); color: var(--text-3); }
|
|
627
|
+
.tf-grow { flex: 1 1 auto; }
|
|
628
|
+
.tf-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
|
|
629
|
+
.tf-img { display: block; width: fit-content; max-width: 100%; }
|
|
630
|
+
.tf-img img { display: block; max-width: min(100%, 420px); max-height: 280px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); object-fit: contain; }
|
|
631
|
+
.tf-pre { margin: 0; padding: var(--s-2) var(--s-3); max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.5; white-space: pre; }
|
|
632
|
+
.tf-body { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
|
|
633
|
+
.tf-body > .tf-pre { border: 0; }
|
|
634
|
+
.tf-body > .tf-more { align-self: flex-start; margin: 0 var(--s-3) var(--s-2); }
|
|
635
|
+
.tf-note { margin-top: 0; }
|
|
636
|
+
.tf-count { margin-left: var(--s-1); font-weight: var(--fw-regular); color: var(--text-3); }
|
|
637
|
+
.tf-html, .tf-text { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
|
|
638
|
+
.tf-holder { margin-top: 0; }
|
|
639
|
+
/* While a preview runs, its bar — "Stop preview" and the mark that this is a preview — stays at the top of the scrolling page for as long as the
|
|
640
|
+
preview's box is on screen, so a person using the embedded page never has to scroll back up to stop it or to remember what it is. (The page's
|
|
641
|
+
header sits above the scrolling area, so `top: 0` is directly under it.) The bar is opaque and above the frame; it keeps the 44px boxes below. */
|
|
642
|
+
.tf-actions.tf-live { position: sticky; top: 0; z-index: 3; align-items: center; padding: var(--s-1) 0; background: var(--bg); border-bottom: 1px solid var(--border); }
|
|
643
|
+
.tf-live-mark { display: inline-flex; align-items: center; padding: 2px var(--s-2); border-radius: var(--r-full); background: var(--warn-bg); color: var(--warn); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
|
|
644
|
+
/* A running preview has a place of its own: a frame that fills a box of fixed height (a page that lays itself out by the window's height — a
|
|
645
|
+
canvas game — has no height of its own to report, and the automatic height left it a strip of 40px). A page taller than the box scrolls. */
|
|
646
|
+
.tf-holder:not(:empty) { display: flex; flex-direction: column; height: min(75vh, 640px); min-height: 260px; }
|
|
647
|
+
@media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
|
|
648
|
+
.tl-files { margin-left: 0; }
|
|
649
|
+
.tf-dl, .tf-actions .btn, .tf-more { min-height: var(--tap); }
|
|
650
|
+
.tc-md-wrap { display: flex; flex-direction: column; }
|
|
651
|
+
.tp .tc-md-wrap .tc-text { padding-right: var(--s-2); }
|
|
652
|
+
.tc-md-edit { position: static; opacity: 1; align-self: flex-start; min-width: var(--tap); min-height: var(--tap); }
|
|
653
|
+
}
|
|
@@ -13,6 +13,7 @@ import { Icon } from "./ui-icons.js";
|
|
|
13
13
|
import { InfoTip } from "./info-tip.js";
|
|
14
14
|
import "./view-strings.js";
|
|
15
15
|
import { CompactMeter, level, resetClock, resetText, tn, usageClock, usageDuration, usageText, windowTag } from "./usage-meter.js";
|
|
16
|
+
import { dateTimeText } from "./clock-text.js";
|
|
16
17
|
// What this file exported before the meter moved out of it (#3321), for what imports it from here.
|
|
17
18
|
export { usageClock, windowTag, soonestReset } from "./usage-meter.js";
|
|
18
19
|
|
|
@@ -391,7 +392,7 @@ export function UsageBody({ owner }) {
|
|
|
391
392
|
${compact ? compactGroups(providers).map((g) => html`<${CompactGroup} key=${g.base} group=${g} mode=${modes[g.base] || "expanded"} onCycle=${(m) => setGroupMode(g.base, m)}
|
|
392
393
|
line=${({ p, i }) => (expanded.has(key(p)) ? card(p, i) : html`<${CompactRow} key=${key(p)} p=${p} one=${(modes[g.base] || "expanded") === "compact" && g.items.length > 1} onExpand=${() => toggleOne(key(p))} />`)} />`)
|
|
393
394
|
: providers.map((p, i) => card(p, i))}
|
|
394
|
-
<div class="u-foot"><span class="note" title=${
|
|
395
|
+
<div class="u-foot"><span class="note" title=${dateTimeText(data.fetchedAt)}>${failed ? html`${updatedAgo(data.fetchedAt)} · <span class="u-refresh-failed" role="status">${tn("usageRefreshFailed")}</span>` : data.refreshing ? html`<span class="u-refreshing">${tn("usageRefreshing")}</span>` : updatedAgo(data.fetchedAt)}</span>
|
|
395
396
|
${byAgent() ? html`<a class="btn btn-ghost btn-sm u-by-agent" href="/ui/fleet/usage" title=${tn("usageByAgentTitle")}>${tn("usageByAgent")}</a>` : null}
|
|
396
397
|
<button type="button" class="btn btn-sm" onClick=${() => load(true)}>${tn("usageRefresh")}</button></div>`;
|
|
397
398
|
}
|
|
@@ -272,13 +272,6 @@ register("view", {
|
|
|
272
272
|
"replyYesterday": "yesterday",
|
|
273
273
|
"replyDays": "{n} d ago",
|
|
274
274
|
"replyTitle": "Last replied: {time}",
|
|
275
|
-
"whenPerson": "Person {t}",
|
|
276
|
-
"whenAgent": "Agent {t}",
|
|
277
|
-
"whenBoth": "{p} · {a}",
|
|
278
|
-
"whenNow": "now",
|
|
279
|
-
"whenMin": "{n}m",
|
|
280
|
-
"whenHour": "{n}h",
|
|
281
|
-
"whenDay": "{n}d",
|
|
282
275
|
"whenPersonTitle": "Last reply to a person: {time}",
|
|
283
276
|
"whenAgentTitle": "Last turn another agent started (send_to_instance, a task, a report, a broadcast): {time}",
|
|
284
277
|
"sortTitle": "Sort the list",
|
|
@@ -565,13 +558,6 @@ register("view", {
|
|
|
565
558
|
"replyYesterday": "昨天",
|
|
566
559
|
"replyDays": "{n} 天前",
|
|
567
560
|
"replyTitle": "最後回覆:{time}",
|
|
568
|
-
"whenPerson": "人 {t}",
|
|
569
|
-
"whenAgent": "Agent {t}",
|
|
570
|
-
"whenBoth": "{p} · {a}",
|
|
571
|
-
"whenNow": "剛剛",
|
|
572
|
-
"whenMin": "{n} 分",
|
|
573
|
-
"whenHour": "{n} 小時",
|
|
574
|
-
"whenDay": "{n} 天",
|
|
575
561
|
"whenPersonTitle": "最後回覆人的時間:{time}",
|
|
576
562
|
"whenAgentTitle": "最後一次由其他 Agent 發起的回合(send_to_instance、任務、回報、廣播):{time}",
|
|
577
563
|
"sortTitle": "排序方式",
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { html, useEffect, useLayoutEffect, useRef, useState } from "./app-html.js";
|
|
5
5
|
import { register, t } from "./app-i18n.js";
|
|
6
6
|
import { guestPage } from "./app-store.js";
|
|
7
|
+
import { dateTimeText, timeText } from "./clock-text.js";
|
|
7
8
|
|
|
8
9
|
register("webauth", {
|
|
9
10
|
en: {
|
|
@@ -93,8 +94,8 @@ const REASONS = ["disabled", "loopback_only", "no_account", "host_sign_in", "not
|
|
|
93
94
|
// Until when: the time, with the day when it isn't today (an authorization lasts up to 48 h).
|
|
94
95
|
const clock = (ms) => {
|
|
95
96
|
const d = new Date(ms), today = new Date().toDateString() === d.toDateString();
|
|
96
|
-
return today ? d
|
|
97
|
-
: d
|
|
97
|
+
return today ? timeText(d, { hour: "2-digit", minute: "2-digit" }, [])
|
|
98
|
+
: dateTimeText(d, { weekday: "short", month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }, []);
|
|
98
99
|
};
|
|
99
100
|
const mmss = (ms) => { const s = Math.max(0, Math.ceil(ms / 1000)); return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`; };
|
|
100
101
|
|
package/dist/ui/subagent-row.js
CHANGED
|
@@ -3,6 +3,7 @@ import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
|
3
3
|
import { register, t } from "/assets/app-i18n.js";
|
|
4
4
|
import { ErrorState } from "/assets/ui-states.js";
|
|
5
5
|
import { assetUrl } from "/assets/asset-url.js";
|
|
6
|
+
import { dateTimeText } from "/assets/clock-text.js";
|
|
6
7
|
register("subagents", {
|
|
7
8
|
en: { title: "Subagents", completed: "{0} finished", running: "{0} running", unknown: "{0} unconfirmed", parent: "Main Agent task: {0}", turn: "Main Agent task turn: {0}", done: "Finished", live: "Running", unsure: "Unconfirmed", seconds: "{0} s", elapsed: "{0} s elapsed", note: "A subagent's report is not the main Agent's final answer.", gap: "Some records are missing or no longer current. Their state is unconfirmed.", failed: "Subagent status could not be checked.", fallback: "Subagent", scroll: "Scroll to see all child runs.", bound: "Up to 16 recent child runs are shown." },
|
|
8
9
|
"zh-TW": { title: "子 Agent", completed: "{0} 已完成", running: "{0} 執行中", unknown: "{0} 待確認", parent: "主 Agent 工作:{0}", turn: "主 Agent 工作回合:{0}", done: "已完成", live: "執行中", unsure: "待確認", seconds: "{0} 秒", elapsed: "已經過 {0} 秒", note: "子 Agent 的回報不是主 Agent 的最終答覆。", gap: "部分紀錄缺漏或已不再是目前的紀錄,狀態待確認。", failed: "暫時無法確認子 Agent 的狀態。", fallback: "子 Agent", scroll: "捲動檢視所有子工作回合。", bound: "最多顯示最近 16 個子工作回合。" },
|
|
@@ -63,7 +64,7 @@ export function SubagentRow({ name }) {
|
|
|
63
64
|
for (const row of runs) { if (!groups.has(row.parentTurn)) groups.set(row.parentTurn, []); groups.get(row.parentTurn).push(row); }
|
|
64
65
|
return html`<details class="subagent-progress" data-trust="subagent-observation"><summary><span>${copy("title")}</span><span class="note">${counts.join(" · ")}</span></summary><p class="note subagent-scroll-hint">${copy("scroll")}</p><div class="subagent-scroll">
|
|
65
66
|
${value.error ? html`<${ErrorState} message=${copy("failed")} onRetry=${() => observer.current?.retry()} />` : null}
|
|
66
|
-
${[...groups].map(([turn, rows]) => html`<section key=${turn} class="subagent-group"><p class="note subagent-parent">${rows[0].parentTask ? copy("parent", rows[0].parentTask) : copy("turn",
|
|
67
|
+
${[...groups].map(([turn, rows]) => html`<section key=${turn} class="subagent-group"><p class="note subagent-parent">${rows[0].parentTask ? copy("parent", rows[0].parentTask) : copy("turn", dateTimeText(Math.min(...rows.map(r => r.parentStartedAt))))}</p>
|
|
67
68
|
${rows.map(r => html`<article key=${r.key} class="subagent-item"><div class="subagent-head"><strong>${r.name || copy("fallback")}</strong>${r.type ? html`<span class="note">${r.type}</span>` : null}<span class="tag">${copy(r.state === "completed" ? "done" : r.state === "running" ? "live" : "unsure")}</span></div>
|
|
68
69
|
<p>${r.task}</p>${r.state === "completed" && Number.isFinite(r.durationMs) ? html`<p class="note">${copy("seconds", (r.durationMs / 1000).toFixed(1).replace(/\.0$/, ""))}</p>` : r.state === "running" ? html`<p class="note">${copy("elapsed", Math.max(0, Math.floor((tick - r.startedAt) / 1000)))}</p>` : null}
|
|
69
70
|
${r.state === "completed" && r.summary ? html`<p class="subagent-report">${r.summary}</p>` : null}</article>`)}
|