@songsid/agend 2.4.0-beta.2 → 2.4.0-beta.21
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/accounts-profiles.d.ts +1 -1
- package/dist/accounts-view.d.ts +32 -0
- package/dist/accounts-view.js +2 -14
- package/dist/accounts-view.js.map +1 -1
- package/dist/agent-cli-instructions.md +17 -7
- package/dist/agent-cli.js +163 -51
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +4 -1
- package/dist/agent-endpoint.js +47 -11
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-export.d.ts +3 -1
- package/dist/agent-export.js +18 -1
- package/dist/agent-export.js.map +1 -1
- package/dist/agent-token-header.d.ts +1 -1
- package/dist/agent-token-header.js +1 -1
- package/dist/agent-whats-new.js +15 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/app-message-origin.d.ts +2 -0
- package/dist/app-message-origin.js +3 -0
- package/dist/app-message-origin.js.map +1 -0
- package/dist/apply-job.d.ts +2 -2
- package/dist/auth-api.d.ts +10 -0
- package/dist/auth-api.js +81 -4
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/authority-state.d.ts +7 -0
- package/dist/authority/authority-state.js +17 -2
- package/dist/authority/authority-state.js.map +1 -1
- package/dist/authority/web-authority.d.ts +11 -1
- package/dist/authority/web-authority.js +11 -1
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/agy-model-switch.d.ts +22 -0
- package/dist/backend/agy-model-switch.js +62 -0
- package/dist/backend/agy-model-switch.js.map +1 -0
- package/dist/backend/antigravity.d.ts +9 -2
- package/dist/backend/antigravity.js +84 -9
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-carry.d.ts +11 -0
- package/dist/backend/claude-carry.js +88 -6
- package/dist/backend/claude-carry.js.map +1 -1
- package/dist/backend/claude-code.d.ts +24 -7
- package/dist/backend/claude-code.js +206 -29
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/claude-transcript-errors.d.ts +4 -0
- package/dist/backend/claude-transcript-errors.js +5 -1
- package/dist/backend/claude-transcript-errors.js.map +1 -1
- package/dist/backend/cli-env-probe.js +1 -1
- package/dist/backend/cli-env-probe.js.map +1 -1
- package/dist/backend/cli-runtime-switch.d.ts +90 -0
- package/dist/backend/cli-runtime-switch.js +273 -0
- package/dist/backend/cli-runtime-switch.js.map +1 -0
- package/dist/backend/codex-footer-hints.d.ts +1 -0
- package/dist/backend/codex-footer-hints.js +15 -0
- package/dist/backend/codex-footer-hints.js.map +1 -1
- package/dist/backend/codex-model-switch.d.ts +41 -0
- package/dist/backend/codex-model-switch.js +170 -0
- package/dist/backend/codex-model-switch.js.map +1 -0
- package/dist/backend/codex-precaution.d.ts +7 -0
- package/dist/backend/codex-precaution.js +103 -0
- package/dist/backend/codex-precaution.js.map +1 -0
- package/dist/backend/codex.d.ts +7 -4
- package/dist/backend/codex.js +56 -10
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.js +1 -1
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/grok-model-switch.d.ts +16 -0
- package/dist/backend/grok-model-switch.js +45 -0
- package/dist/backend/grok-model-switch.js.map +1 -0
- package/dist/backend/grok.js +33 -7
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.js +10 -5
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.d.ts +2 -0
- package/dist/backend/muse.js +7 -3
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/native-pane.js +1 -1
- package/dist/backend/native-pane.js.map +1 -1
- package/dist/backend/types.d.ts +29 -2
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +23 -16
- package/dist/backend-availability.js +73 -93
- package/dist/backend-availability.js.map +1 -1
- package/dist/backend-command.d.ts +4 -2
- package/dist/backend-command.js +3 -0
- package/dist/backend-command.js.map +1 -1
- package/dist/backend-signin-guide.js +1 -1
- package/dist/backend-signin-guide.js.map +1 -1
- package/dist/backend-version-static.d.ts +15 -0
- package/dist/backend-version-static.js +95 -0
- package/dist/backend-version-static.js.map +1 -0
- package/dist/browser-backend-signins.d.ts +1 -0
- package/dist/browser-backend-signins.js +3 -1
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/adapters/discord.d.ts +10 -0
- package/dist/channel/adapters/discord.js +35 -0
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +2 -0
- package/dist/channel/adapters/telegram.js +6 -1
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-server.js +36 -4
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.d.ts +27 -1
- package/dist/channel/mcp-tools.js +91 -8
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/tool-router.d.ts +4 -0
- package/dist/channel/tool-router.js +50 -19
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/channel/types.d.ts +10 -0
- package/dist/chat-task-refs.d.ts +61 -0
- package/dist/chat-task-refs.js +112 -0
- package/dist/chat-task-refs.js.map +1 -0
- package/dist/classic-channel-manager.d.ts +6 -2
- package/dist/classic-channel-manager.js +29 -4
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/classic-cli-guard.d.ts +66 -0
- package/dist/classic-cli-guard.js +209 -0
- package/dist/classic-cli-guard.js.map +1 -0
- package/dist/claude-credential-change.d.ts +22 -0
- package/dist/claude-credential-change.js +47 -0
- package/dist/claude-credential-change.js.map +1 -0
- package/dist/claude-credential-launch.d.ts +69 -0
- package/dist/claude-credential-launch.js +328 -0
- package/dist/claude-credential-launch.js.map +1 -0
- package/dist/claude-credential-runner.d.ts +1 -0
- package/dist/claude-credential-runner.js +58 -0
- package/dist/claude-credential-runner.js.map +1 -0
- package/dist/claude-credential-vault.d.ts +57 -0
- package/dist/claude-credential-vault.js +277 -0
- package/dist/claude-credential-vault.js.map +1 -0
- package/dist/claude-install-kind.d.ts +19 -0
- package/dist/claude-install-kind.js +54 -0
- package/dist/claude-install-kind.js.map +1 -0
- package/dist/claude-request-observation.d.ts +7 -0
- package/dist/claude-request-observation.js +26 -0
- package/dist/claude-request-observation.js.map +1 -0
- package/dist/claude-setup-token-transport.d.ts +9 -0
- package/dist/claude-setup-token-transport.js +104 -0
- package/dist/claude-setup-token-transport.js.map +1 -0
- package/dist/claude-setup-token.d.ts +51 -0
- package/dist/claude-setup-token.js +83 -0
- package/dist/claude-setup-token.js.map +1 -0
- package/dist/cli-audited.js +24 -17
- package/dist/cli-audited.js.map +1 -1
- package/dist/cli-capability.d.ts +3 -0
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-registry-check.js +1 -1
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +1 -0
- package/dist/cli-spec-antigravity.d.ts +1 -0
- package/dist/cli-spec-antigravity.js +3 -1
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/dist/command-report.d.ts +11 -0
- package/dist/command-report.js +2 -0
- package/dist/command-report.js.map +1 -0
- package/dist/composite-tools.d.ts +11 -0
- package/dist/composite-tools.js +29 -0
- package/dist/composite-tools.js.map +1 -0
- package/dist/config-validator.js +52 -2
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +15 -2
- package/dist/config.js.map +1 -1
- package/dist/connect/control.d.ts +20 -0
- package/dist/connect/control.js +236 -0
- package/dist/connect/control.js.map +1 -0
- package/dist/connect/install.d.ts +13 -0
- package/dist/connect/install.js +12 -0
- package/dist/connect/install.js.map +1 -0
- package/dist/connect/mcp.d.ts +9 -0
- package/dist/connect/mcp.js +10 -0
- package/dist/connect/mcp.js.map +1 -0
- package/dist/connect/protocol.d.ts +38 -0
- package/dist/connect/protocol.js +36 -0
- package/dist/connect/protocol.js.map +1 -0
- package/dist/connect/service.d.ts +19 -0
- package/dist/connect/service.js +79 -0
- package/dist/connect/service.js.map +1 -0
- package/dist/connect/stdio-entry.d.ts +1 -0
- package/dist/connect/stdio-entry.js +6 -0
- package/dist/connect/stdio-entry.js.map +1 -0
- package/dist/connect/stdio.d.ts +5 -0
- package/dist/connect/stdio.js +33 -0
- package/dist/connect/stdio.js.map +1 -0
- package/dist/contact-auth-api.d.ts +17 -0
- package/dist/contact-auth-api.js +88 -0
- package/dist/contact-auth-api.js.map +1 -0
- package/dist/contact-auth-files.d.ts +6 -0
- package/dist/contact-auth-files.js +29 -0
- package/dist/contact-auth-files.js.map +1 -0
- package/dist/contact-auth-policy.d.ts +81 -0
- package/dist/contact-auth-policy.js +26 -0
- package/dist/contact-auth-policy.js.map +1 -0
- package/dist/contact-auth-service.d.ts +32 -0
- package/dist/contact-auth-service.js +101 -0
- package/dist/contact-auth-service.js.map +1 -0
- package/dist/contact-auth-store.d.ts +86 -0
- package/dist/contact-auth-store.js +372 -0
- package/dist/contact-auth-store.js.map +1 -0
- package/dist/contact-auth-types.d.ts +198 -0
- package/dist/contact-auth-types.js +7 -0
- package/dist/contact-auth-types.js.map +1 -0
- package/dist/contact-change-proposals.d.ts +47 -0
- package/dist/contact-change-proposals.js +131 -0
- package/dist/contact-change-proposals.js.map +1 -0
- package/dist/daemon.d.ts +98 -3
- package/dist/daemon.js +673 -59
- package/dist/daemon.js.map +1 -1
- package/dist/darwin-memory.js +2 -1
- package/dist/darwin-memory.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +15 -8
- package/dist/dashboard-permissions.js +25 -10
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-consumed-watch.js +3 -0
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/delivery-outbox.d.ts +6 -6
- package/dist/delivery-outbox.js +19 -25
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-outbox.test.js +132 -96
- package/dist/delivery-outbox.test.js.map +1 -1
- package/dist/dispatcher-liveness.d.ts +51 -1
- package/dist/dispatcher-liveness.js +94 -4
- package/dist/dispatcher-liveness.js.map +1 -1
- package/dist/event-log.d.ts +13 -1
- package/dist/event-log.js +41 -1
- package/dist/event-log.js.map +1 -1
- package/dist/fleet-context.d.ts +1 -0
- package/dist/fleet-level-config.d.ts +1 -1
- package/dist/fleet-level-config.js +1 -0
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +530 -14
- package/dist/fleet-manager.js +3323 -266
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +2 -2
- package/dist/fleet-windows-runtime.js +13 -4
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/fleet-yaml-stringify.d.ts +3 -0
- package/dist/fleet-yaml-stringify.js +132 -0
- package/dist/fleet-yaml-stringify.js.map +1 -0
- package/dist/general-knowledge/skills/concepts/SKILL.md +72 -4
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +23 -1
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +52 -0
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +21 -1
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +18 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +369 -27
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +5 -1
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +7 -2
- package/dist/general-knowledge/skills/persona-emoji/SKILL.md +3 -0
- package/dist/general-knowledge/skills/task-board/SKILL.md +67 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +29 -3
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +224 -43
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +6 -0
- package/dist/general-knowledge/steering/core-rules.md +15 -78
- package/dist/general-role-block.d.ts +19 -0
- package/dist/general-role-block.js +56 -0
- package/dist/general-role-block.js.map +1 -0
- 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/host-memory.d.ts +3 -0
- package/dist/host-memory.js.map +1 -1
- package/dist/host-monitoring/darwin/collector.d.ts +18 -0
- package/dist/host-monitoring/darwin/collector.js +65 -0
- package/dist/host-monitoring/darwin/collector.js.map +1 -0
- package/dist/host-monitoring/darwin/defaults.d.ts +2 -0
- package/dist/host-monitoring/darwin/defaults.js +9 -0
- package/dist/host-monitoring/darwin/defaults.js.map +1 -0
- package/dist/host-monitoring/darwin/interpretation.d.ts +20 -0
- package/dist/host-monitoring/darwin/interpretation.js +73 -0
- package/dist/host-monitoring/darwin/interpretation.js.map +1 -0
- package/dist/host-monitoring/linux/collector.d.ts +17 -0
- package/dist/host-monitoring/linux/collector.js +55 -0
- package/dist/host-monitoring/linux/collector.js.map +1 -0
- package/dist/host-monitoring/linux/defaults.d.ts +2 -0
- package/dist/host-monitoring/linux/defaults.js +9 -0
- package/dist/host-monitoring/linux/defaults.js.map +1 -0
- package/dist/host-monitoring/linux/interpretation.d.ts +22 -0
- package/dist/host-monitoring/linux/interpretation.js +76 -0
- package/dist/host-monitoring/linux/interpretation.js.map +1 -0
- package/dist/host-monitoring/transport.d.ts +42 -0
- package/dist/host-monitoring/transport.js +101 -0
- package/dist/host-monitoring/transport.js.map +1 -0
- package/dist/host-monitoring/wsl/collector.d.ts +19 -0
- package/dist/host-monitoring/wsl/collector.js +72 -0
- package/dist/host-monitoring/wsl/collector.js.map +1 -0
- package/dist/host-monitoring/wsl/defaults.d.ts +2 -0
- package/dist/host-monitoring/wsl/defaults.js +9 -0
- package/dist/host-monitoring/wsl/defaults.js.map +1 -0
- package/dist/host-monitoring/wsl/interpretation.d.ts +22 -0
- package/dist/host-monitoring/wsl/interpretation.js +77 -0
- package/dist/host-monitoring/wsl/interpretation.js.map +1 -0
- package/dist/host-monitoring-alert-policy.d.ts +73 -0
- package/dist/host-monitoring-alert-policy.js +152 -0
- package/dist/host-monitoring-alert-policy.js.map +1 -0
- package/dist/host-monitoring-alert-resources.d.ts +11 -0
- package/dist/host-monitoring-alert-resources.js +16 -0
- package/dist/host-monitoring-alert-resources.js.map +1 -0
- package/dist/host-monitoring-alert-settings.d.ts +16 -0
- package/dist/host-monitoring-alert-settings.js +68 -0
- package/dist/host-monitoring-alert-settings.js.map +1 -0
- package/dist/host-monitoring-alert-store.d.ts +49 -0
- package/dist/host-monitoring-alert-store.js +228 -0
- package/dist/host-monitoring-alert-store.js.map +1 -0
- package/dist/host-monitoring-alert-text.d.ts +7 -0
- package/dist/host-monitoring-alert-text.js +10 -0
- package/dist/host-monitoring-alert-text.js.map +1 -0
- package/dist/host-monitoring-alerts.d.ts +79 -0
- package/dist/host-monitoring-alerts.js +276 -0
- package/dist/host-monitoring-alerts.js.map +1 -0
- package/dist/host-monitoring-config.d.ts +15 -0
- package/dist/host-monitoring-config.js +36 -0
- package/dist/host-monitoring-config.js.map +1 -0
- package/dist/host-monitoring-defaults.d.ts +19 -0
- package/dist/host-monitoring-defaults.js +10 -0
- package/dist/host-monitoring-defaults.js.map +1 -0
- package/dist/host-monitoring-footprint-policy.d.ts +45 -0
- package/dist/host-monitoring-footprint-policy.js +150 -0
- package/dist/host-monitoring-footprint-policy.js.map +1 -0
- package/dist/host-monitoring-footprint.d.ts +42 -0
- package/dist/host-monitoring-footprint.js +169 -0
- package/dist/host-monitoring-footprint.js.map +1 -0
- package/dist/host-monitoring-history-files.d.ts +2 -0
- package/dist/host-monitoring-history-files.js +16 -0
- package/dist/host-monitoring-history-files.js.map +1 -0
- package/dist/host-monitoring-history-policy.d.ts +57 -0
- package/dist/host-monitoring-history-policy.js +107 -0
- package/dist/host-monitoring-history-policy.js.map +1 -0
- package/dist/host-monitoring-history-store.d.ts +52 -0
- package/dist/host-monitoring-history-store.js +178 -0
- package/dist/host-monitoring-history-store.js.map +1 -0
- package/dist/host-monitoring-history-worker.d.ts +1 -0
- package/dist/host-monitoring-history-worker.js +66 -0
- package/dist/host-monitoring-history-worker.js.map +1 -0
- package/dist/host-monitoring-history.d.ts +80 -0
- package/dist/host-monitoring-history.js +301 -0
- package/dist/host-monitoring-history.js.map +1 -0
- package/dist/host-monitoring-platform.d.ts +21 -0
- package/dist/host-monitoring-platform.js +18 -0
- package/dist/host-monitoring-platform.js.map +1 -0
- package/dist/host-monitoring-process-identity.d.ts +8 -0
- package/dist/host-monitoring-process-identity.js +81 -0
- package/dist/host-monitoring-process-identity.js.map +1 -0
- package/dist/host-monitoring-runtime.d.ts +42 -0
- package/dist/host-monitoring-runtime.js +95 -0
- package/dist/host-monitoring-runtime.js.map +1 -0
- package/dist/host-monitoring-settings-store.d.ts +5 -0
- package/dist/host-monitoring-settings-store.js +49 -0
- package/dist/host-monitoring-settings-store.js.map +1 -0
- package/dist/host-monitoring.d.ts +121 -0
- package/dist/host-monitoring.js +157 -0
- package/dist/host-monitoring.js.map +1 -0
- package/dist/hub/admin-dashboard.d.ts +85 -0
- package/dist/hub/admin-dashboard.js +177 -0
- package/dist/hub/admin-dashboard.js.map +1 -0
- package/dist/hub/agent-catalog-model.d.ts +297 -0
- package/dist/hub/agent-catalog-model.js +57 -0
- package/dist/hub/agent-catalog-model.js.map +1 -0
- package/dist/hub/agent-catalog.d.ts +140 -0
- package/dist/hub/agent-catalog.js +129 -0
- package/dist/hub/agent-catalog.js.map +1 -0
- package/dist/hub/agent-intro-model.d.ts +38 -0
- package/dist/hub/agent-intro-model.js +14 -0
- package/dist/hub/agent-intro-model.js.map +1 -0
- package/dist/hub/agent-intro-tool.d.ts +35 -0
- package/dist/hub/agent-intro-tool.js +83 -0
- package/dist/hub/agent-intro-tool.js.map +1 -0
- package/dist/hub/agent-intro.d.ts +31 -0
- package/dist/hub/agent-intro.js +51 -0
- package/dist/hub/agent-intro.js.map +1 -0
- package/dist/hub/agent-pictures-model.d.ts +147 -0
- package/dist/hub/agent-pictures-model.js +64 -0
- package/dist/hub/agent-pictures-model.js.map +1 -0
- package/dist/hub/agent-pictures.d.ts +52 -0
- package/dist/hub/agent-pictures.js +202 -0
- package/dist/hub/agent-pictures.js.map +1 -0
- package/dist/hub/attachments/store.d.ts +2 -0
- package/dist/hub/attachments/store.js +6 -0
- package/dist/hub/attachments/store.js.map +1 -1
- package/dist/hub/audit/index.d.ts +5 -1
- package/dist/hub/audit/index.js +43 -3
- package/dist/hub/audit/index.js.map +1 -1
- package/dist/hub/buttons.js +3 -1
- package/dist/hub/buttons.js.map +1 -1
- package/dist/hub/catalog.d.ts +19 -6
- package/dist/hub/catalog.js +89 -17
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +18 -0
- package/dist/hub/client.js +149 -12
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +56 -7
- package/dist/hub/compose/member.js +371 -31
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +24 -0
- package/dist/hub/compose/server.js +130 -16
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/direct-posts-model.d.ts +1 -0
- package/dist/hub/direct-posts-model.js +2 -0
- package/dist/hub/direct-posts-model.js.map +1 -0
- package/dist/hub/direct-posts.d.ts +36 -0
- package/dist/hub/direct-posts.js +145 -0
- package/dist/hub/direct-posts.js.map +1 -0
- package/dist/hub/directory/directory.js +5 -2
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/types.d.ts +5 -1
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/display-name.d.ts +10 -0
- package/dist/hub/display-name.js +35 -0
- package/dist/hub/display-name.js.map +1 -0
- package/dist/hub/execution/service.d.ts +2 -1
- package/dist/hub/execution/service.js +2 -1
- package/dist/hub/execution/service.js.map +1 -1
- package/dist/hub/fleet-info.d.ts +12 -0
- package/dist/hub/fleet-info.js +14 -0
- package/dist/hub/fleet-info.js.map +1 -0
- package/dist/hub/fleet-update-model.d.ts +100 -0
- package/dist/hub/fleet-update-model.js +15 -0
- package/dist/hub/fleet-update-model.js.map +1 -0
- package/dist/hub/fleet-updates.d.ts +46 -0
- package/dist/hub/fleet-updates.js +282 -0
- package/dist/hub/fleet-updates.js.map +1 -0
- package/dist/hub/fleet-versions.d.ts +28 -0
- package/dist/hub/fleet-versions.js +80 -0
- package/dist/hub/fleet-versions.js.map +1 -0
- package/dist/hub/group-policy/admin-api.d.ts +1 -0
- package/dist/hub/group-policy/admin-api.js +10 -1
- package/dist/hub/group-policy/admin-api.js.map +1 -1
- package/dist/hub/group-policy/admin-control.d.ts +1 -0
- package/dist/hub/group-policy/admin-control.js +13 -4
- package/dist/hub/group-policy/admin-control.js.map +1 -1
- package/dist/hub/group-policy/admin-dto.d.ts +39 -1
- package/dist/hub/group-policy/admin-dto.js.map +1 -1
- package/dist/hub/group-policy/admin-facts.d.ts +4 -2
- package/dist/hub/group-policy/admin-facts.js +17 -2
- package/dist/hub/group-policy/admin-facts.js.map +1 -1
- package/dist/hub/group-policy/admin-impact.d.ts +36 -6
- package/dist/hub/group-policy/admin-impact.js +21 -7
- package/dist/hub/group-policy/admin-impact.js.map +1 -1
- package/dist/hub/group-policy/admin-inventory.d.ts +2 -0
- package/dist/hub/group-policy/admin-inventory.js +13 -4
- package/dist/hub/group-policy/admin-inventory.js.map +1 -1
- package/dist/hub/group-policy/admin-search.d.ts +2 -1
- package/dist/hub/group-policy/admin-search.js +56 -7
- package/dist/hub/group-policy/admin-search.js.map +1 -1
- package/dist/hub/group-policy/authorization.d.ts +2 -0
- package/dist/hub/group-policy/authorization.js +7 -2
- package/dist/hub/group-policy/authorization.js.map +1 -1
- package/dist/hub/group-policy/impact-inventory.d.ts +4 -1
- package/dist/hub/group-policy/impact-inventory.js +23 -2
- package/dist/hub/group-policy/impact-inventory.js.map +1 -1
- package/dist/hub/group-policy/model.d.ts +52 -1
- package/dist/hub/group-policy/model.js +20 -7
- package/dist/hub/group-policy/model.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +2 -0
- package/dist/hub/group-policy/resources.js +12 -1
- package/dist/hub/group-policy/resources.js.map +1 -1
- package/dist/hub/group-policy/store.js +22 -3
- package/dist/hub/group-policy/store.js.map +1 -1
- package/dist/hub/group-policy/team-subjects.d.ts +16 -0
- package/dist/hub/group-policy/team-subjects.js +32 -0
- package/dist/hub/group-policy/team-subjects.js.map +1 -0
- package/dist/hub/http/compose.d.ts +14 -0
- package/dist/hub/http/compose.js +771 -47
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.d.ts +9 -1
- package/dist/hub/http/core.js +53 -3
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +19 -0
- package/dist/hub/http/schema.js +50 -1
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/invitations.js +15 -7
- package/dist/hub/invitations.js.map +1 -1
- package/dist/hub/join/client.js +75 -42
- package/dist/hub/join/client.js.map +1 -1
- package/dist/hub/join/service.d.ts +3 -1
- package/dist/hub/join/service.js +7 -3
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/lapse-carry.d.ts +45 -0
- package/dist/hub/lapse-carry.js +62 -0
- package/dist/hub/lapse-carry.js.map +1 -0
- package/dist/hub/mcp/auth-schema.d.ts +7 -0
- package/dist/hub/mcp/auth-schema.js +31 -0
- package/dist/hub/mcp/auth-schema.js.map +1 -0
- package/dist/hub/mcp/auth.d.ts +89 -0
- package/dist/hub/mcp/auth.js +374 -0
- package/dist/hub/mcp/auth.js.map +1 -0
- package/dist/hub/mcp/catalog.d.ts +44 -0
- package/dist/hub/mcp/catalog.js +31 -0
- package/dist/hub/mcp/catalog.js.map +1 -0
- package/dist/hub/mcp/door-schema.d.ts +7 -0
- package/dist/hub/mcp/door-schema.js +20 -0
- package/dist/hub/mcp/door-schema.js.map +1 -0
- package/dist/hub/mcp/http.d.ts +25 -0
- package/dist/hub/mcp/http.js +259 -0
- package/dist/hub/mcp/http.js.map +1 -0
- package/dist/hub/mcp/policy.d.ts +65 -0
- package/dist/hub/mcp/policy.js +153 -0
- package/dist/hub/mcp/policy.js.map +1 -0
- package/dist/hub/mcp/server.d.ts +3 -0
- package/dist/hub/mcp/server.js +32 -0
- package/dist/hub/mcp/server.js.map +1 -0
- package/dist/hub/mcp/tools.d.ts +31 -0
- package/dist/hub/mcp/tools.js +177 -0
- package/dist/hub/mcp/tools.js.map +1 -0
- package/dist/hub/member/agent-catalog.d.ts +31 -0
- package/dist/hub/member/agent-catalog.js +91 -0
- package/dist/hub/member/agent-catalog.js.map +1 -0
- package/dist/hub/member/agent-intro.d.ts +29 -0
- package/dist/hub/member/agent-intro.js +73 -0
- package/dist/hub/member/agent-intro.js.map +1 -0
- package/dist/hub/member/agent-pictures.d.ts +43 -0
- package/dist/hub/member/agent-pictures.js +125 -0
- package/dist/hub/member/agent-pictures.js.map +1 -0
- package/dist/hub/member/direct-rooms.d.ts +9 -0
- package/dist/hub/member/direct-rooms.js +14 -0
- package/dist/hub/member/direct-rooms.js.map +1 -0
- package/dist/hub/member/display-name.d.ts +9 -0
- package/dist/hub/member/display-name.js +71 -0
- package/dist/hub/member/display-name.js.map +1 -0
- package/dist/hub/member/exposure-api.d.ts +11 -3
- package/dist/hub/member/exposure-api.js +24 -10
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/exposures.d.ts +16 -4
- package/dist/hub/member/exposures.js +47 -13
- package/dist/hub/member/exposures.js.map +1 -1
- package/dist/hub/member/pairing-api.js +3 -2
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/member/recommendations.d.ts +37 -0
- package/dist/hub/member/recommendations.js +129 -0
- package/dist/hub/member/recommendations.js.map +1 -0
- package/dist/hub/member/room-ask.d.ts +78 -5
- package/dist/hub/member/room-ask.js +337 -26
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member/room-context-budget.d.ts +5 -0
- package/dist/hub/member/room-context-budget.js +34 -0
- package/dist/hub/member/room-context-budget.js.map +1 -0
- package/dist/hub/member/room-mention-feedback.d.ts +44 -0
- package/dist/hub/member/room-mention-feedback.js +121 -0
- package/dist/hub/member/room-mention-feedback.js.map +1 -0
- package/dist/hub/member/room-notification.d.ts +9 -0
- package/dist/hub/member/room-notification.js +2 -0
- package/dist/hub/member/room-notification.js.map +1 -0
- package/dist/hub/member/room-post-answers.d.ts +46 -0
- package/dist/hub/member/room-post-answers.js +152 -0
- package/dist/hub/member/room-post-answers.js.map +1 -0
- package/dist/hub/member/room-post-receipt.d.ts +21 -0
- package/dist/hub/member/room-post-receipt.js +49 -0
- package/dist/hub/member/room-post-receipt.js.map +1 -0
- package/dist/hub/member/room-post.d.ts +135 -0
- package/dist/hub/member/room-post.js +311 -0
- package/dist/hub/member/room-post.js.map +1 -0
- package/dist/hub/member/sharing-journal.d.ts +252 -0
- package/dist/hub/member/sharing-journal.js +212 -0
- package/dist/hub/member/sharing-journal.js.map +1 -0
- package/dist/hub/member/sharing-link.d.ts +25 -0
- package/dist/hub/member/sharing-link.js +68 -0
- package/dist/hub/member/sharing-link.js.map +1 -0
- package/dist/hub/member/sharing-result.d.ts +6 -0
- package/dist/hub/member/sharing-result.js +46 -0
- package/dist/hub/member/sharing-result.js.map +1 -0
- package/dist/hub/member/sharing.d.ts +39 -0
- package/dist/hub/member/sharing.js +188 -0
- package/dist/hub/member/sharing.js.map +1 -0
- package/dist/hub/member/updates.d.ts +92 -0
- package/dist/hub/member/updates.js +316 -0
- package/dist/hub/member/updates.js.map +1 -0
- package/dist/hub/pairing.d.ts +15 -1
- package/dist/hub/pairing.js +33 -2
- package/dist/hub/pairing.js.map +1 -1
- package/dist/hub/personal/owner-host.d.ts +146 -0
- package/dist/hub/personal/owner-host.js +289 -0
- package/dist/hub/personal/owner-host.js.map +1 -0
- package/dist/hub/personal/refusals.d.ts +11 -0
- package/dist/hub/personal/refusals.js +33 -0
- package/dist/hub/personal/refusals.js.map +1 -0
- package/dist/hub/personal/runtime-host.d.ts +26 -0
- package/dist/hub/personal/runtime-host.js +51 -0
- package/dist/hub/personal/runtime-host.js.map +1 -0
- package/dist/hub/personal/schema.d.ts +4 -0
- package/dist/hub/personal/schema.js +54 -0
- package/dist/hub/personal/schema.js.map +1 -0
- package/dist/hub/personal/turns.d.ts +39 -0
- package/dist/hub/personal/turns.js +221 -0
- package/dist/hub/personal/turns.js.map +1 -0
- package/dist/hub/personal/types.d.ts +42 -0
- package/dist/hub/personal/types.js +2 -0
- package/dist/hub/personal/types.js.map +1 -0
- package/dist/hub/policy.d.ts +12 -3
- package/dist/hub/policy.js +62 -7
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +1274 -56
- package/dist/hub/protocol.js +123 -16
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/published-version.d.ts +3 -0
- package/dist/hub/published-version.js +35 -0
- package/dist/hub/published-version.js.map +1 -0
- package/dist/hub/quota.js +3 -1
- package/dist/hub/quota.js.map +1 -1
- package/dist/hub/recommendation-model.d.ts +36 -0
- package/dist/hub/recommendation-model.js +9 -0
- package/dist/hub/recommendation-model.js.map +1 -0
- package/dist/hub/recommendations.d.ts +58 -0
- package/dist/hub/recommendations.js +211 -0
- package/dist/hub/recommendations.js.map +1 -0
- package/dist/hub/representative.d.ts +33 -0
- package/dist/hub/representative.js +132 -12
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/roles/admin-control.d.ts +29 -0
- package/dist/hub/roles/admin-control.js +187 -0
- package/dist/hub/roles/admin-control.js.map +1 -0
- package/dist/hub/roles/admin-types.d.ts +72 -0
- package/dist/hub/roles/admin-types.js +2 -0
- package/dist/hub/roles/admin-types.js.map +1 -0
- package/dist/hub/roles/allowed-list-control.d.ts +34 -0
- package/dist/hub/roles/allowed-list-control.js +179 -0
- package/dist/hub/roles/allowed-list-control.js.map +1 -0
- package/dist/hub/roles/allowed-list.d.ts +8 -0
- package/dist/hub/roles/allowed-list.js +49 -0
- package/dist/hub/roles/allowed-list.js.map +1 -0
- package/dist/hub/roles/audit-details.d.ts +144 -0
- package/dist/hub/roles/audit-details.js +26 -0
- package/dist/hub/roles/audit-details.js.map +1 -0
- package/dist/hub/roles/authority.d.ts +12 -0
- package/dist/hub/roles/authority.js +39 -3
- package/dist/hub/roles/authority.js.map +1 -1
- package/dist/hub/roles/change.d.ts +3 -1
- package/dist/hub/roles/change.js +7 -2
- package/dist/hub/roles/change.js.map +1 -1
- package/dist/hub/roles/clock.d.ts +3 -0
- package/dist/hub/roles/clock.js +1 -1
- package/dist/hub/roles/clock.js.map +1 -1
- package/dist/hub/roles/convert.js +1 -1
- package/dist/hub/roles/convert.js.map +1 -1
- package/dist/hub/roles/cutover-inventory.d.ts +5 -0
- package/dist/hub/roles/cutover-inventory.js +27 -4
- package/dist/hub/roles/cutover-inventory.js.map +1 -1
- package/dist/hub/roles/cutover-marker.d.ts +18 -2
- package/dist/hub/roles/cutover-marker.js +6 -2
- package/dist/hub/roles/cutover-marker.js.map +1 -1
- package/dist/hub/roles/cutover.d.ts +2 -2
- package/dist/hub/roles/cutover.js +3 -4
- package/dist/hub/roles/cutover.js.map +1 -1
- package/dist/hub/roles/delegation.d.ts +4 -1
- package/dist/hub/roles/delegation.js +7 -2
- package/dist/hub/roles/delegation.js.map +1 -1
- package/dist/hub/roles/evaluate.d.ts +2 -1
- package/dist/hub/roles/evaluate.js +14 -0
- package/dist/hub/roles/evaluate.js.map +1 -1
- package/dist/hub/roles/expiry-effects.d.ts +8 -0
- package/dist/hub/roles/expiry-effects.js +50 -0
- package/dist/hub/roles/expiry-effects.js.map +1 -0
- package/dist/hub/roles/migrations.d.ts +7 -0
- package/dist/hub/roles/migrations.js +44 -0
- package/dist/hub/roles/migrations.js.map +1 -0
- package/dist/hub/roles/model.d.ts +25 -0
- package/dist/hub/roles/model.js +9 -3
- package/dist/hub/roles/model.js.map +1 -1
- package/dist/hub/roles/overview.d.ts +8 -0
- package/dist/hub/roles/overview.js +15 -0
- package/dist/hub/roles/overview.js.map +1 -0
- package/dist/hub/roles/resource-effects.d.ts +17 -0
- package/dist/hub/roles/resource-effects.js +62 -0
- package/dist/hub/roles/resource-effects.js.map +1 -0
- package/dist/hub/roles/review.d.ts +16 -0
- package/dist/hub/roles/review.js +42 -0
- package/dist/hub/roles/review.js.map +1 -0
- package/dist/hub/roles/writer.d.ts +14 -3
- package/dist/hub/roles/writer.js +64 -16
- package/dist/hub/roles/writer.js.map +1 -1
- package/dist/hub/room-agent-discovery-model.d.ts +29 -0
- package/dist/hub/room-agent-discovery-model.js +33 -0
- package/dist/hub/room-agent-discovery-model.js.map +1 -0
- package/dist/hub/room-agent-discovery.d.ts +14 -0
- package/dist/hub/room-agent-discovery.js +65 -0
- package/dist/hub/room-agent-discovery.js.map +1 -0
- package/dist/hub/room-agent-requests.d.ts +71 -0
- package/dist/hub/room-agent-requests.js +377 -0
- package/dist/hub/room-agent-requests.js.map +1 -0
- package/dist/hub/room-answer-status-model.d.ts +3 -0
- package/dist/hub/room-answer-status-model.js +4 -0
- package/dist/hub/room-answer-status-model.js.map +1 -0
- package/dist/hub/room-brief-model.d.ts +30 -0
- package/dist/hub/room-brief-model.js +38 -0
- package/dist/hub/room-brief-model.js.map +1 -0
- package/dist/hub/room-context-model.d.ts +45 -0
- package/dist/hub/room-context-model.js +12 -0
- package/dist/hub/room-context-model.js.map +1 -0
- package/dist/hub/room-members-model.d.ts +63 -0
- package/dist/hub/room-members-model.js +7 -0
- package/dist/hub/room-members-model.js.map +1 -0
- package/dist/hub/room-mention-feedback-model.d.ts +12 -0
- package/dist/hub/room-mention-feedback-model.js +12 -0
- package/dist/hub/room-mention-feedback-model.js.map +1 -0
- package/dist/hub/rooms/agents.d.ts +49 -10
- package/dist/hub/rooms/agents.js +356 -33
- package/dist/hub/rooms/agents.js.map +1 -1
- package/dist/hub/rooms/assistant.d.ts +1 -6
- package/dist/hub/rooms/assistant.js +7 -2
- package/dist/hub/rooms/assistant.js.map +1 -1
- package/dist/hub/rooms/automation.d.ts +24 -0
- package/dist/hub/rooms/automation.js +66 -0
- package/dist/hub/rooms/automation.js.map +1 -0
- package/dist/hub/rooms/brief.d.ts +18 -0
- package/dist/hub/rooms/brief.js +39 -0
- package/dist/hub/rooms/brief.js.map +1 -0
- package/dist/hub/rooms/buttons.d.ts +85 -0
- package/dist/hub/rooms/buttons.js +62 -0
- package/dist/hub/rooms/buttons.js.map +1 -0
- package/dist/hub/rooms/context-cursor.d.ts +18 -0
- package/dist/hub/rooms/context-cursor.js +61 -0
- package/dist/hub/rooms/context-cursor.js.map +1 -0
- package/dist/hub/rooms/context.d.ts +1 -1
- package/dist/hub/rooms/context.js +4 -4
- package/dist/hub/rooms/context.js.map +1 -1
- package/dist/hub/rooms/direct-view.d.ts +12 -3
- package/dist/hub/rooms/direct-view.js +25 -10
- package/dist/hub/rooms/direct-view.js.map +1 -1
- package/dist/hub/rooms/directory.d.ts +13 -0
- package/dist/hub/rooms/directory.js +12 -3
- package/dist/hub/rooms/directory.js.map +1 -1
- package/dist/hub/rooms/members-page.d.ts +33 -0
- package/dist/hub/rooms/members-page.js +37 -0
- package/dist/hub/rooms/members-page.js.map +1 -0
- package/dist/hub/rooms/mentions.d.ts +15 -0
- package/dist/hub/rooms/mentions.js +43 -0
- package/dist/hub/rooms/mentions.js.map +1 -0
- package/dist/hub/rooms/office.d.ts +123 -0
- package/dist/hub/rooms/office.js +79 -0
- package/dist/hub/rooms/office.js.map +1 -0
- package/dist/hub/rooms/post-replies.d.ts +23 -0
- package/dist/hub/rooms/post-replies.js +114 -0
- package/dist/hub/rooms/post-replies.js.map +1 -0
- package/dist/hub/rooms/purpose.d.ts +7 -0
- package/dist/hub/rooms/purpose.js +14 -0
- package/dist/hub/rooms/purpose.js.map +1 -0
- package/dist/hub/rooms/schema.d.ts +14 -0
- package/dist/hub/rooms/schema.js +52 -0
- package/dist/hub/rooms/schema.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +373 -7
- package/dist/hub/rooms/service.js +1056 -47
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +46 -4
- package/dist/hub/rooms.d.ts +22 -2
- package/dist/hub/rooms.js +193 -47
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/runtime.d.ts +1 -1
- package/dist/hub/runtime.js +17 -4
- package/dist/hub/runtime.js.map +1 -1
- package/dist/hub/server.d.ts +8 -1
- package/dist/hub/server.js +165 -7
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/session-directory-transition.d.ts +3 -1
- package/dist/hub/session-directory-transition.js +25 -12
- package/dist/hub/session-directory-transition.js.map +1 -1
- package/dist/hub/session-limits.d.ts +58 -0
- package/dist/hub/session-limits.js +121 -0
- package/dist/hub/session-limits.js.map +1 -0
- package/dist/hub/sessions.d.ts +2 -2
- package/dist/hub/sessions.js +39 -11
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/settings-commit.d.ts +32 -1
- package/dist/hub/settings-commit.js +11 -4
- package/dist/hub/settings-commit.js.map +1 -1
- package/dist/hub/settings-directory-ca.js +1 -1
- package/dist/hub/settings-directory-ca.js.map +1 -1
- package/dist/hub/settings-directory-control.js +7 -7
- package/dist/hub/settings-directory-control.js.map +1 -1
- package/dist/hub/settings-directory-decision.js +1 -1
- package/dist/hub/settings-directory-decision.js.map +1 -1
- package/dist/hub/settings-directory-http.d.ts +2 -0
- package/dist/hub/settings-directory-http.js +21 -6
- package/dist/hub/settings-directory-http.js.map +1 -1
- package/dist/hub/settings-directory-proof.d.ts +5 -1
- package/dist/hub/settings-directory-proof.js +49 -10
- package/dist/hub/settings-directory-proof.js.map +1 -1
- package/dist/hub/settings-directory-recovery.js +2 -1
- package/dist/hub/settings-directory-recovery.js.map +1 -1
- package/dist/hub/settings-directory-save.d.ts +2 -0
- package/dist/hub/settings-directory-save.js +9 -6
- package/dist/hub/settings-directory-save.js.map +1 -1
- package/dist/hub/sharing-previous-access.d.ts +22 -0
- package/dist/hub/sharing-previous-access.js +93 -0
- package/dist/hub/sharing-previous-access.js.map +1 -0
- package/dist/hub/sharing-requests.d.ts +174 -0
- package/dist/hub/sharing-requests.js +326 -0
- package/dist/hub/sharing-requests.js.map +1 -0
- package/dist/hub/sharing-retention.d.ts +47 -0
- package/dist/hub/sharing-retention.js +83 -0
- package/dist/hub/sharing-retention.js.map +1 -0
- package/dist/hub/sharing-withdrawal.d.ts +14 -0
- package/dist/hub/sharing-withdrawal.js +28 -0
- package/dist/hub/sharing-withdrawal.js.map +1 -0
- package/dist/hub/sharing.js +2 -2
- package/dist/hub/sharing.js.map +1 -1
- package/dist/hub/socket.d.ts +1 -0
- package/dist/hub/socket.js +39 -2
- package/dist/hub/socket.js.map +1 -1
- package/dist/hub/teams/index.d.ts +8 -3
- package/dist/hub/teams/index.js +106 -31
- package/dist/hub/teams/index.js.map +1 -1
- package/dist/hub/teams/store.d.ts +5 -1
- package/dist/hub/teams/store.js +25 -2
- package/dist/hub/teams/store.js.map +1 -1
- package/dist/hub/teams/types.d.ts +19 -2
- package/dist/hub/types.d.ts +173 -5
- package/dist/hub-classic-private.d.ts +19 -0
- package/dist/hub-classic-private.js +64 -0
- package/dist/hub-classic-private.js.map +1 -0
- package/dist/hub-contact-windows.d.ts +11 -0
- package/dist/hub-contact-windows.js +56 -0
- package/dist/hub-contact-windows.js.map +1 -0
- package/dist/hub-page-sharing-settings.d.ts +6 -0
- package/dist/hub-page-sharing-settings.js +19 -0
- package/dist/hub-page-sharing-settings.js.map +1 -0
- package/dist/hub-pairing-summary.d.ts +1 -1
- package/dist/hub-picture-reduce.d.ts +14 -0
- package/dist/hub-picture-reduce.js +49 -0
- package/dist/hub-picture-reduce.js.map +1 -0
- package/dist/hub-picture-worker.d.ts +1 -0
- package/dist/hub-picture-worker.js +11 -0
- package/dist/hub-picture-worker.js.map +1 -0
- package/dist/hub-report-target.d.ts +6 -0
- package/dist/hub-report-target.js +6 -0
- package/dist/hub-report-target.js.map +1 -1
- package/dist/hub-room-conversation.d.ts +14 -0
- package/dist/hub-room-conversation.js +60 -0
- package/dist/hub-room-conversation.js.map +1 -0
- package/dist/hub-room-reply-warning.d.ts +2 -0
- package/dist/hub-room-reply-warning.js +16 -0
- package/dist/hub-room-reply-warning.js.map +1 -0
- package/dist/hub-sharing-notice.d.ts +43 -0
- package/dist/hub-sharing-notice.js +34 -0
- package/dist/hub-sharing-notice.js.map +1 -0
- package/dist/hub-update-notice.d.ts +12 -0
- package/dist/hub-update-notice.js +35 -0
- package/dist/hub-update-notice.js.map +1 -0
- package/dist/human-delivery-receipts.js +8 -0
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-config-impact.js +5 -2
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +21 -1
- package/dist/instance-lifecycle.js +55 -14
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instruction-file-sizes.d.ts +46 -0
- package/dist/instruction-file-sizes.js +115 -0
- package/dist/instruction-file-sizes.js.map +1 -0
- package/dist/instructions.d.ts +35 -1
- package/dist/instructions.js +63 -33
- package/dist/instructions.js.map +1 -1
- package/dist/locale.d.ts +2 -0
- package/dist/locale.js +373 -34
- package/dist/locale.js.map +1 -1
- package/dist/log-steps.d.ts +5 -0
- package/dist/log-steps.js +6 -2
- package/dist/log-steps.js.map +1 -1
- package/dist/login-controller.d.ts +45 -2
- package/dist/login-controller.js +98 -10
- package/dist/login-controller.js.map +1 -1
- package/dist/login-flows.js +1 -1
- package/dist/login-flows.js.map +1 -1
- package/dist/memory-guidance.d.ts +5 -0
- package/dist/memory-guidance.js +14 -0
- package/dist/memory-guidance.js.map +1 -0
- package/dist/model-defaults.d.ts +5 -0
- package/dist/model-defaults.js +6 -0
- package/dist/model-defaults.js.map +1 -0
- package/dist/native-mcp.d.ts +2 -0
- package/dist/native-mcp.js +23 -11
- package/dist/native-mcp.js.map +1 -1
- package/dist/native-model-catalog.d.ts +15 -0
- package/dist/native-model-catalog.js +43 -3
- package/dist/native-model-catalog.js.map +1 -1
- package/dist/native-pane-lifecycle.js +3 -2
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-tools.js +3 -0
- package/dist/native-pane-tools.js.map +1 -1
- package/dist/needs-you-hub.d.ts +4 -0
- package/dist/needs-you-hub.js +17 -2
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +40 -2
- package/dist/needs-you.js +18 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +4 -4
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.d.ts +28 -4
- package/dist/outbound-handlers.js +150 -13
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +32 -0
- package/dist/outbound-schemas.js +44 -25
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-port.d.ts +2 -0
- package/dist/pause-marker.d.ts +1 -1
- package/dist/pause-marker.js +1 -1
- package/dist/pause-marker.js.map +1 -1
- package/dist/profile-signins.d.ts +1 -0
- package/dist/profile-signins.js +3 -1
- package/dist/profile-signins.js.map +1 -1
- package/dist/public-web-gateway.d.ts +20 -0
- package/dist/public-web-gateway.js +232 -9
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +21 -2
- package/dist/public-web-link.js +22 -2
- package/dist/public-web-link.js.map +1 -1
- package/dist/queued-handoffs.d.ts +16 -4
- package/dist/queued-handoffs.js +18 -1
- package/dist/queued-handoffs.js.map +1 -1
- package/dist/quickstart-api.d.ts +0 -1
- package/dist/quickstart-api.js +8 -1
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +1 -1
- package/dist/quickstart.js +2 -3
- package/dist/quickstart.js.map +1 -1
- package/dist/remote-card-answer.d.ts +1 -1
- package/dist/remote-card-answer.js +8 -1
- package/dist/remote-card-answer.js.map +1 -1
- package/dist/remote-card-prompt.d.ts +1 -0
- package/dist/remote-card-prompt.js +2 -2
- package/dist/remote-card-prompt.js.map +1 -1
- package/dist/reply-dedup.js +3 -1
- package/dist/reply-dedup.js.map +1 -1
- package/dist/reply-preview-files.d.ts +38 -0
- package/dist/reply-preview-files.js +142 -0
- package/dist/reply-preview-files.js.map +1 -0
- package/dist/reply-preview-spec.d.ts +18 -0
- package/dist/reply-preview-spec.js +27 -0
- package/dist/reply-preview-spec.js.map +1 -0
- package/dist/restart-progress.d.ts +6 -0
- package/dist/restart-progress.js +5 -0
- package/dist/restart-progress.js.map +1 -1
- package/dist/runtime-api.js +10 -2
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.js +2 -1
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-install.js +18 -14
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-cli.js +31 -5
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +5 -0
- package/dist/runtime-client-store.js +28 -0
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +4 -0
- package/dist/runtime-client.js +33 -10
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +4 -2
- package/dist/runtime-coordinator.js +33 -6
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-install.d.ts +6 -1
- package/dist/runtime-install.js +12 -4
- package/dist/runtime-install.js.map +1 -1
- package/dist/runtime-pane-mcp.js +7 -3
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-pane-native.js +5 -2
- package/dist/runtime-pane-native.js.map +1 -1
- package/dist/runtime-personal-answer-only-probe.d.ts +3 -0
- package/dist/runtime-personal-answer-only-probe.js +134 -0
- package/dist/runtime-personal-answer-only-probe.js.map +1 -0
- package/dist/runtime-personal-answer-only.d.ts +16 -0
- package/dist/runtime-personal-answer-only.js +54 -0
- package/dist/runtime-personal-answer-only.js.map +1 -0
- package/dist/runtime-personal-answer.d.ts +30 -0
- package/dist/runtime-personal-answer.js +124 -0
- package/dist/runtime-personal-answer.js.map +1 -0
- package/dist/runtime-personal-preflight.d.ts +8 -0
- package/dist/runtime-personal-preflight.js +103 -0
- package/dist/runtime-personal-preflight.js.map +1 -0
- package/dist/runtime-personal-profile.d.ts +40 -0
- package/dist/runtime-personal-profile.js +81 -0
- package/dist/runtime-personal-profile.js.map +1 -0
- package/dist/runtime-personal-protocol.d.ts +10 -0
- package/dist/runtime-personal-protocol.js +15 -0
- package/dist/runtime-personal-protocol.js.map +1 -0
- package/dist/runtime-personal-stage.d.ts +37 -0
- package/dist/runtime-personal-stage.js +167 -0
- package/dist/runtime-personal-stage.js.map +1 -0
- package/dist/runtime-protocol.d.ts +2 -0
- package/dist/scheduler/db.js +2 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-mentions.d.ts +32 -0
- package/dist/scheduler/task-board-mentions.js +97 -0
- package/dist/scheduler/task-board-mentions.js.map +1 -0
- package/dist/scheduler/task-board-text.js +3 -0
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +199 -3
- package/dist/scheduler/task-board.js +492 -7
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/settings-api.d.ts +36 -1
- package/dist/settings-api.js +525 -96
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +4 -0
- package/dist/settings-baseline.js +7 -5
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +47 -7
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.d.ts +7 -0
- package/dist/settings-effect.js +80 -5
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.js +18 -44
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-instance-patch.js +3 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/setup-form.js +10 -0
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-host.d.ts +2 -3
- package/dist/setup-host.js +3 -5
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-i18n.js +2 -2
- package/dist/setup-i18n.js.map +1 -1
- package/dist/setup-wizard.js +0 -2
- package/dist/setup-wizard.js.map +1 -1
- package/dist/shared-default-adoption.d.ts +24 -0
- package/dist/shared-default-adoption.js +73 -0
- package/dist/shared-default-adoption.js.map +1 -0
- package/dist/subagent-records.d.ts +2 -0
- package/dist/subagent-records.js +64 -12
- package/dist/subagent-records.js.map +1 -1
- package/dist/subagent-service.d.ts +3 -0
- package/dist/subagent-service.js +27 -5
- package/dist/subagent-service.js.map +1 -1
- package/dist/task-board-tool.d.ts +48 -0
- package/dist/task-board-tool.js +89 -6
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-board-waker.d.ts +23 -30
- package/dist/task-board-waker.js +136 -97
- package/dist/task-board-waker.js.map +1 -1
- package/dist/tmux-manager.d.ts +2 -0
- package/dist/tmux-manager.js +2 -0
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.js +5 -2
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-progress.d.ts +9 -0
- package/dist/tool-progress.js +141 -32
- package/dist/tool-progress.js.map +1 -1
- package/dist/topic-commands.d.ts +7 -1
- package/dist/topic-commands.js +103 -91
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.d.ts +1 -0
- package/dist/transcript-monitor.js +18 -0
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/tunnel/lease.d.ts +14 -0
- package/dist/tunnel/lease.js +23 -0
- package/dist/tunnel/lease.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +2 -2
- package/dist/turn-reply-guard.js +3 -3
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/types.d.ts +37 -2
- package/dist/ui/accounts-keepalive.js +2 -1
- package/dist/ui/accounts-view.js +18 -9
- package/dist/ui/agent-details-settings.js +9 -7
- package/dist/ui/agent-export-dialog.js +4 -3
- package/dist/ui/agent-export-strings.js +4 -4
- package/dist/ui/agent-page-strings.js +18 -0
- package/dist/ui/backend-signin.js +94 -23
- package/dist/ui/chat-activity-groups.js +42 -9
- package/dist/ui/chat-activity.js +22 -3
- package/dist/ui/chat-commands.js +2 -0
- package/dist/ui/chat-mentions.js +13 -0
- package/dist/ui/chat-msg-actions.js +3 -222
- package/dist/ui/chat-pins.js +106 -0
- package/dist/ui/chat-popout-header.js +2 -2
- package/dist/ui/chat-popout-transport.js +49 -19
- package/dist/ui/chat-popout.js +15 -1
- package/dist/ui/chat-quote.js +3 -261
- package/dist/ui/chat-store.js +178 -16
- package/dist/ui/chat-task-ref-strings.js +24 -0
- package/dist/ui/chat-task-refs.js +131 -0
- package/dist/ui/chat-tour.js +1 -1
- package/dist/ui/chat-workspace.js +3 -3
- package/dist/ui/claude-credentials.js +123 -0
- package/dist/ui/claude-setup-token.js +36 -0
- package/dist/ui/contact-auth-client.js +55 -0
- package/dist/ui/contact-auth-strings.js +256 -0
- package/dist/ui/contact-authorizations.js +139 -0
- package/dist/ui/contact-grant-editor.js +50 -0
- package/dist/ui/contact-needs.js +100 -0
- package/dist/ui/contact-permissions.js +251 -0
- package/dist/ui/contact-ticket-badge.js +54 -0
- package/dist/ui/contact-tool-groups.js +39 -0
- package/dist/ui/fleet-canvas.js +20 -7
- package/dist/ui/fleet-office-card.js +446 -41
- package/dist/ui/fleet-office-carousel.d.ts +14 -0
- package/dist/ui/fleet-office-carousel.js +95 -0
- package/dist/ui/fleet-office-dialogue.d.ts +6 -3
- package/dist/ui/fleet-office-dialogue.js +16 -6
- package/dist/ui/fleet-office-editor.js +6 -1
- package/dist/ui/fleet-office-layout.js +13 -13
- package/dist/ui/fleet-office-model.js +5 -3
- package/dist/ui/fleet-office-overview.js +1 -1
- package/dist/ui/fleet-office-pack.d.ts +81 -4
- package/dist/ui/fleet-office-pack.js +514 -48
- package/dist/ui/fleet-office-play.js +498 -0
- package/dist/ui/fleet-office-skin.js +268 -38
- package/dist/ui/fleet-office-store.js +88 -3
- package/dist/ui/fleet-office-talk.js +423 -0
- package/dist/ui/fleet-office-view.js +26 -17
- package/dist/ui/fleet-office-zones.js +151 -38
- package/dist/ui/fleet-office.js +1147 -155
- package/dist/ui/fleet-route.js +44 -6
- package/dist/ui/fleet-task-activity.js +362 -0
- package/dist/ui/fleet-task-card.js +317 -314
- package/dist/ui/fleet-task-common.js +100 -10
- package/dist/ui/fleet-task-create.js +67 -0
- package/dist/ui/fleet-task-edit.js +204 -0
- package/dist/ui/fleet-task-follow.js +123 -0
- package/dist/ui/fleet-task-menu.js +1 -1
- package/dist/ui/fleet-task-owner.js +252 -0
- package/dist/ui/fleet-task-run.js +257 -0
- package/dist/ui/fleet-task-sort.js +88 -0
- package/dist/ui/fleet-task-view.js +209 -40
- package/dist/ui/fleet-task-work.js +2 -2
- package/dist/ui/fleet-tasks.js +294 -134
- package/dist/ui/host-alerts.js +23 -0
- package/dist/ui/host-footprint.js +17 -0
- package/dist/ui/host-health-model.js +42 -0
- package/dist/ui/host-health.js +82 -0
- package/dist/ui/host-install.js +87 -7
- package/dist/ui/host-monitoring-darwin.js +6 -0
- package/dist/ui/host-monitoring-help.js +7 -0
- package/dist/ui/host-monitoring-linux.js +6 -0
- package/dist/ui/host-monitoring-wsl.js +6 -0
- package/dist/ui/host-time.js +5 -0
- package/dist/ui/hub-admin-overview.js +189 -0
- package/dist/ui/hub-admin-rooms.js +1 -1
- package/dist/ui/hub-agent-copy.js +8 -2
- package/dist/ui/hub-agent-intro.js +35 -0
- package/dist/ui/hub-ai-apps-strings.js +6 -0
- package/dist/ui/hub-ai-apps.js +84 -0
- package/dist/ui/hub-attachments.js +81 -3
- package/dist/ui/hub-chat-store.js +4 -3
- package/dist/ui/hub-chat-strings.js +13 -3
- package/dist/ui/hub-client.js +123 -12
- package/dist/ui/hub-directory-editor-strings.js +2 -2
- package/dist/ui/hub-directory-editor.js +1 -0
- package/dist/ui/hub-fleet-versions.js +393 -0
- package/dist/ui/hub-grant-picker.js +28 -47
- package/dist/ui/hub-group-policy.js +26 -13
- package/dist/ui/hub-group-strings.js +28 -18
- package/dist/ui/hub-intro-notice.js +16 -0
- package/dist/ui/hub-invitations.js +5 -1
- package/dist/ui/hub-join-steps.js +27 -15
- package/dist/ui/hub-my-agents-model.js +42 -0
- package/dist/ui/hub-my-agents-strings.js +20 -0
- package/dist/ui/hub-my-agents.js +169 -0
- package/dist/ui/hub-owner-strings.js +9 -8
- package/dist/ui/hub-personal-agent-strings.js +246 -0
- package/dist/ui/hub-personal-agent.js +119 -0
- package/dist/ui/hub-policy-subjects.js +35 -0
- package/dist/ui/hub-quick-pairing.js +7 -2
- package/dist/ui/hub-quota.js +2 -1
- package/dist/ui/hub-role-audit.js +39 -0
- package/dist/ui/hub-role-forms.js +99 -0
- package/dist/ui/hub-role-notices.js +11 -0
- package/dist/ui/hub-role-view.js +86 -0
- package/dist/ui/hub-roles-strings.js +440 -0
- package/dist/ui/hub-roles.js +83 -0
- package/dist/ui/hub-room-agent-strings.js +28 -0
- package/dist/ui/hub-room-composer.js +183 -20
- package/dist/ui/hub-room-list.js +6 -4
- package/dist/ui/hub-room-members-strings.js +11 -4
- package/dist/ui/hub-room-members.js +132 -18
- package/dist/ui/hub-room-new-strings.js +2 -1
- package/dist/ui/hub-room-new.js +17 -7
- package/dist/ui/hub-room-notify.js +161 -0
- package/dist/ui/hub-room-office.js +203 -0
- package/dist/ui/hub-room-owner-requests-strings.js +114 -0
- package/dist/ui/hub-room-owner-requests.js +264 -0
- package/dist/ui/hub-room-pins.js +43 -0
- package/dist/ui/hub-room-presence.js +14 -2
- package/dist/ui/hub-room-purpose.js +35 -0
- package/dist/ui/hub-room-search.js +126 -0
- package/dist/ui/hub-room-settings.js +79 -4
- package/dist/ui/hub-room-source-strings.js +17 -0
- package/dist/ui/hub-room-source.js +37 -0
- package/dist/ui/hub-room-strings.js +102 -7
- package/dist/ui/hub-room-thread.js +510 -65
- package/dist/ui/hub-room-unread.js +2 -1
- package/dist/ui/hub-room-working.js +37 -0
- package/dist/ui/hub-session-limits.js +79 -0
- package/dist/ui/hub-strings.js +19 -10
- package/dist/ui/hub-subject-picker.js +58 -0
- package/dist/ui/hub-switcher.js +2 -2
- package/dist/ui/hub-teams-strings.js +10 -6
- package/dist/ui/hub-teams.js +58 -29
- package/dist/ui/hub-this-hub.js +2 -2
- package/dist/ui/hub-welcome.js +122 -75
- package/dist/ui/image-annotate.js +2 -283
- package/dist/ui/image-lightbox.js +2 -176
- package/dist/ui/image-zoom.js +2 -242
- package/dist/ui/log-row.js +7 -5
- package/dist/ui/model-picker.js +7 -3
- package/dist/ui/native-instance-settings.js +4 -2
- package/dist/ui/notice-hub-sharing.js +81 -0
- package/dist/ui/notice-hub-update.js +94 -0
- package/dist/ui/office-share-dialog.js +2 -2
- package/dist/ui/office-share-page.js +5 -1
- package/dist/ui/panel-chat.js +578 -78
- package/dist/ui/panel-details.js +22 -1
- package/dist/ui/panel-fleet.js +49 -14
- package/dist/ui/panel-hub.js +459 -129
- package/dist/ui/panel-log.js +4 -4
- package/dist/ui/panel-needs.js +78 -24
- package/dist/ui/panel-notices.js +4 -1
- package/dist/ui/panel-runtimes.js +2 -1
- package/dist/ui/panel-settings.js +111 -51
- package/dist/ui/preview-panel.js +3 -1
- package/dist/ui/preview-popout.js +134 -0
- package/dist/ui/reply-file-preview.js +65 -0
- package/dist/ui/runtime-commands.d.ts +2 -2
- package/dist/ui/runtime-commands.js +7 -4
- package/dist/ui/search-dialog.js +8 -1
- package/dist/ui/settings-access-overview.js +5 -4
- package/dist/ui/settings-appearance.js +13 -11
- package/dist/ui/settings-apply.js +8 -3
- package/dist/ui/settings-archive-files.js +109 -0
- package/dist/ui/settings-build-version.js +2 -2
- package/dist/ui/settings-capabilities.js +2 -0
- package/dist/ui/settings-catalog.js +22 -0
- package/dist/ui/settings-connector-strings.js +23 -0
- package/dist/ui/settings-connector.js +40 -0
- package/dist/ui/settings-default-model-scope.js +40 -0
- package/dist/ui/settings-default-model-strings.js +43 -0
- package/dist/ui/settings-dialogs.js +9 -5
- package/dist/ui/settings-guests-entries.js +16 -0
- package/dist/ui/settings-guests.js +57 -15
- package/dist/ui/settings-host-alerts.js +23 -0
- package/dist/ui/settings-host-monitoring.js +71 -0
- package/dist/ui/settings-hub-connection.js +6 -7
- package/dist/ui/settings-hub-membership.js +6 -7
- package/dist/ui/settings-hub-page-sharing.js +52 -0
- package/dist/ui/settings-hub-section.js +2 -4
- package/dist/ui/settings-hub-setup.js +2 -1
- package/dist/ui/settings-hub-updates.js +67 -0
- package/dist/ui/settings-hub.js +35 -7
- package/dist/ui/settings-layout.js +17 -14
- package/dist/ui/settings-model.js +9 -5
- package/dist/ui/settings-quota-notice.js +3 -3
- package/dist/ui/settings-registry.js +27 -5
- package/dist/ui/settings-shared-strings.js +24 -0
- package/dist/ui/settings-shared.js +62 -14
- package/dist/ui/settings-strings.js +15 -6
- package/dist/ui/settings-update.js +11 -5
- package/dist/ui/settings-web-authority.js +7 -5
- package/dist/ui/shared/access-overview.css +1 -1
- package/dist/ui/shared/accounts-keepalive.css +1 -1
- package/dist/ui/shared/accounts.css +9 -5
- package/dist/ui/shared/agent-sheet.js +120 -0
- package/dist/ui/shared/agent-widget.js +1 -2
- package/dist/ui/shared/app-i18n.js +10 -2
- package/dist/ui/shared/app-nav.js +9 -5
- package/dist/ui/shared/app-prefs.js +9 -3
- package/dist/ui/shared/app-route.js +5 -3
- package/dist/ui/shared/app-shell.js +202 -34
- package/dist/ui/shared/app-store.js +7 -3
- package/dist/ui/shared/app-stream.js +8 -2
- package/dist/ui/shared/app-swipe.js +3 -1
- package/dist/ui/shared/app-themes.js +3 -5
- package/dist/ui/shared/app-update.js +90 -8
- package/dist/ui/shared/app.css +1089 -262
- package/dist/ui/shared/app.js +12 -3
- package/dist/ui/shared/asset-url.d.ts +2 -0
- package/dist/ui/shared/asset-url.js +20 -0
- package/dist/ui/shared/chat-composer.js +36 -11
- package/dist/ui/shared/chat-msg-actions.js +233 -0
- package/dist/ui/shared/chat-quote.js +285 -0
- package/dist/ui/shared/chat-render.js +63 -10
- package/dist/ui/shared/chat-strings.js +32 -11
- package/dist/ui/shared/chat-table-select.js +175 -0
- package/dist/ui/shared/chat-thread.js +175 -29
- package/dist/ui/shared/chat-work-bar.css +118 -0
- package/dist/ui/shared/composer-focus.js +21 -0
- package/dist/ui/shared/connector-prompt.d.ts +3 -0
- package/dist/ui/shared/connector-prompt.js +20 -0
- package/dist/ui/shared/hub-ai-apps.css +12 -0
- package/dist/ui/shared/hub-chat.css +117 -4
- package/dist/ui/shared/hub-groups.css +19 -15
- package/dist/ui/shared/hub-my-agents.css +41 -0
- package/dist/ui/shared/hub-owner.css +123 -3
- package/dist/ui/shared/hub-roles.css +99 -0
- package/dist/ui/shared/hub-rooms-u2.css +98 -0
- package/dist/ui/shared/hub.css +23 -5
- package/dist/ui/shared/image-annotate.css +22 -3
- package/dist/ui/shared/image-annotate.js +416 -0
- package/dist/ui/shared/image-lightbox.js +218 -0
- package/dist/ui/shared/image-zoom.js +316 -0
- package/dist/ui/shared/info-tip.js +64 -0
- package/dist/ui/shared/instance-nav.js +166 -19
- package/dist/ui/shared/jump-idle.js +36 -0
- package/dist/ui/shared/loading.css +1 -1
- package/dist/ui/shared/model-picker.css +32 -4
- package/dist/ui/shared/module-warm.d.ts +3 -0
- package/dist/ui/shared/module-warm.js +39 -0
- package/dist/ui/shared/office-dialogue.css +122 -0
- package/dist/ui/shared/owner-css.js +1 -1
- package/dist/ui/shared/panel-view.js +7 -1
- package/dist/ui/shared/preview-panel-actions.js +1 -1
- package/dist/ui/shared/preview-panel.js +50 -20
- package/dist/ui/shared/preview-popout.css +11 -0
- package/dist/ui/shared/reply-previews.css +4 -0
- package/dist/ui/shared/runtime-install.css +5 -0
- package/dist/ui/shared/settings-connector.css +7 -0
- package/dist/ui/shared/signin.js +27 -12
- package/dist/ui/shared/task-board.css +505 -11
- package/dist/ui/shared/text-undo.js +17 -3
- package/dist/ui/shared/theme-picker.js +46 -0
- package/dist/ui/shared/theme.js +101 -2
- package/dist/ui/shared/tokens.css +300 -10
- package/dist/ui/shared/ui-confirm.js +5 -2
- package/dist/ui/shared/ui-icons.js +2 -0
- package/dist/ui/shared/ui-menu.js +17 -11
- package/dist/ui/shared/ui-states.js +3 -2
- package/dist/ui/shared/ui-toast.js +4 -4
- package/dist/ui/shared/usage-dialog.js +88 -17
- package/dist/ui/shared/view-history.js +2 -1
- package/dist/ui/shared/view-strings.js +28 -4
- package/dist/ui/shared/web-authorize.js +3 -3
- package/dist/ui/signin.html +4 -2
- package/dist/ui/structured-signin.js +64 -12
- package/dist/ui/subagent-row.js +3 -2
- package/dist/ui/trigger-complete.js +71 -0
- package/dist/ui/usage-pool.js +2 -1
- package/dist/ui/web-terminal/terminal.css +1 -1
- package/dist/ui/workspace-panel.js +6 -4
- package/dist/update-dispatch.d.ts +8 -1
- package/dist/update-dispatch.js +16 -1
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-idle.d.ts +65 -0
- package/dist/update-idle.js +190 -0
- package/dist/update-idle.js.map +1 -0
- package/dist/update-launch.d.ts +1 -1
- package/dist/update-launch.js +9 -2
- package/dist/update-launch.js.map +1 -1
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +2 -2
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/profile-timeline.d.ts +2 -0
- package/dist/usage/profile-timeline.js +4 -0
- package/dist/usage/profile-timeline.js.map +1 -1
- package/dist/usage/providers.d.ts +1 -0
- package/dist/usage/providers.js +20 -7
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-history.d.ts +1 -1
- package/dist/usage/usage-api.js +5 -2
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/view-api.js +1 -1
- package/dist/view-api.js.map +1 -1
- package/dist/wake-coordinator.js +3 -2
- package/dist/wake-coordinator.js.map +1 -1
- package/dist/web-api.d.ts +62 -6
- package/dist/web-api.js +1050 -212
- package/dist/web-api.js.map +1 -1
- package/dist/web-asset-version.d.ts +65 -0
- package/dist/web-asset-version.js +259 -0
- package/dist/web-asset-version.js.map +1 -0
- package/dist/web-backend-login.d.ts +5 -1
- package/dist/web-backend-login.js +8 -2
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-chat-archive.d.ts +147 -0
- package/dist/web-chat-archive.js +530 -0
- package/dist/web-chat-archive.js.map +1 -0
- package/dist/web-chat-history.d.ts +128 -2
- package/dist/web-chat-history.js +320 -12
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-claude-credentials.d.ts +31 -0
- package/dist/web-claude-credentials.js +138 -0
- package/dist/web-claude-credentials.js.map +1 -0
- package/dist/web-commands.d.ts +9 -5
- package/dist/web-commands.js +7 -4
- package/dist/web-commands.js.map +1 -1
- package/dist/web-guest-access.d.ts +3 -0
- package/dist/web-guest-access.js +8 -4
- package/dist/web-guest-access.js.map +1 -1
- package/dist/web-host-guard.js +3 -1
- package/dist/web-host-guard.js.map +1 -1
- package/dist/web-host-install.d.ts +30 -3
- package/dist/web-host-install.js +50 -4
- package/dist/web-host-install.js.map +1 -1
- package/dist/web-icons.js +3 -3
- package/dist/web-icons.js.map +1 -1
- package/dist/web-login.d.ts +7 -0
- package/dist/web-login.js +8 -1
- package/dist/web-login.js.map +1 -1
- package/dist/web-mentions.d.ts +2 -0
- package/dist/web-mentions.js +20 -0
- package/dist/web-mentions.js.map +1 -1
- package/dist/web-notices.d.ts +20 -0
- package/dist/web-notices.js +64 -8
- package/dist/web-notices.js.map +1 -1
- package/dist/web-office-skins.d.ts +14 -3
- package/dist/web-office-skins.js +66 -21
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-office-store.d.ts +2 -0
- package/dist/web-office-store.js +20 -6
- package/dist/web-office-store.js.map +1 -1
- package/dist/web-pin-store.d.ts +58 -0
- package/dist/web-pin-store.js +170 -0
- package/dist/web-pin-store.js.map +1 -0
- package/dist/web-prefs.js +5 -1
- package/dist/web-prefs.js.map +1 -1
- package/dist/web-reply-files.d.ts +1 -0
- package/dist/web-reply-files.js +2 -0
- package/dist/web-reply-files.js.map +1 -1
- package/dist/web-session-authorization.d.ts +24 -0
- package/dist/web-session-authorization.js +32 -0
- package/dist/web-session-authorization.js.map +1 -1
- package/dist/web-session.d.ts +26 -5
- package/dist/web-session.js +32 -3
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +24 -3
- package/dist/web-settings-patch.js +57 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-shell-routes.d.ts +2 -2
- package/dist/web-shell-routes.js +3 -2
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-terminal.d.ts +9 -0
- package/dist/web-terminal.js +27 -1
- package/dist/web-terminal.js.map +1 -1
- package/dist/web-theme.js +2 -2
- package/dist/web-update.d.ts +15 -1
- package/dist/web-upload.d.ts +37 -1
- package/dist/web-upload.js +105 -5
- package/dist/web-upload.js.map +1 -1
- package/dist/windows-cli-api.d.ts +10 -7
- package/dist/windows-cli-api.js +13 -12
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +10 -0
- package/dist/windows-cli-worker.js +109 -14
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +10 -1
- package/dist/windows-cli.js +47 -13
- package/dist/windows-cli.js.map +1 -1
- package/dist/windows-native-mcp.js +5 -2
- package/dist/windows-native-mcp.js.map +1 -1
- package/dist/workflow-templates/default.md +4 -6
- package/launcher/agend-install.cjs +48 -7
- package/package.json +1 -1
- package/templates/runtime-install/install.ps1 +24 -4
package/dist/ui/panel-chat.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { focusComposerStrip } from "/assets/composer-focus.js";
|
|
2
|
+
import { previewReplyFile, replyPreviewLabel } from "./reply-file-preview.js";
|
|
1
3
|
import { NativePaneRecovery } from "./native-pane-recovery.js";
|
|
2
4
|
import { GeneralLocation } from "./general-location.js";
|
|
3
5
|
// #1408 step 1: the chat panel. Behind the session gate (/ui/js/), loaded by the app with a dynamic import in "full"
|
|
@@ -9,17 +11,20 @@ import { GeneralLocation } from "./general-location.js";
|
|
|
9
11
|
// The instance's own actions (details, start, stop, restart, delete) are in the header's ⋯ menu, and only the ones
|
|
10
12
|
// that apply to its state are offered (#1408 rough edges 4 and 7).
|
|
11
13
|
import { html, Fragment, useEffect, useLayoutEffect, useRef, useState } from "/assets/app-html.js";
|
|
14
|
+
import { JUMP_IDLE_MS, useJumpIdle } from "/assets/jump-idle.js";
|
|
12
15
|
import { lang, register, t } from "/assets/app-i18n.js";
|
|
16
|
+
import { AgentSheetButton, AgentSheet } from "/assets/agent-sheet.js";
|
|
13
17
|
import { appStore, createStore, guestPage, guestTrusted, useStore } from "/assets/app-store.js";
|
|
14
|
-
import { ComposerAuth } from "/assets/web-authorize.js";
|
|
18
|
+
import { ComposerAuth, useWebAuthorization } from "/assets/web-authorize.js";
|
|
15
19
|
import { useLease } from "/assets/app-ctx.js";
|
|
16
20
|
import * as paneContext from "/assets/app-ctx.js";
|
|
17
21
|
import { backendLabel, modelText, namesOf, namesStore, navStore as instanceNavStore, supportsInstanceFeature } from "/assets/instance-nav.js";
|
|
18
22
|
import { machineName } from "/assets/machine-name.js";
|
|
19
|
-
import { PanelHeader, onPanelKey, setTitle, statusClass, statusLabel, openDrawer, requestNewInstance } from "/assets/app-shell.js";
|
|
20
|
-
import { detailsPath, textLinkSegments, sectionPath } from "/assets/app-route.js";
|
|
23
|
+
import { PanelHeader, onPanelKey, setTitle, statusClass, statusLabel, openDrawer, requestNewInstance, needsCount, openSearch } from "/assets/app-shell.js";
|
|
24
|
+
import { chatPath, detailsPath, textLinkSegments, sectionPath, NEEDS_PATH, fleetEntryPath, settingsPath, viewPath, logPath } from "/assets/app-route.js";
|
|
21
25
|
import { InstanceSwitch } from "/assets/instance-switch.js";
|
|
22
|
-
import { HeaderTools } from "/assets/header-tools.js";
|
|
26
|
+
import { HeaderTools, setTextSize, textSizeStore, usageOffered, TEXT_SIZES } from "/assets/header-tools.js";
|
|
27
|
+
import { UsageDialog } from "/assets/usage-dialog.js";
|
|
23
28
|
import { navigate, navStore } from "/assets/app-nav.js";
|
|
24
29
|
import { Menu } from "/assets/ui-menu.js";
|
|
25
30
|
import { Dialog } from "/assets/ui-dialog.js";
|
|
@@ -48,6 +53,7 @@ function nativeCliTag(inst) {
|
|
|
48
53
|
return html`<span class="tag native-cli-unverified" title=${t("nativecli.unverifiedHint", cli, inst.native_cli_version || "")}>${t("nativecli.unverified")}</span>`;
|
|
49
54
|
}
|
|
50
55
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
56
|
+
import { isPinned, pinOffered, PinCopyDialog, PinsButton, PinsDialog, setPin, usePins } from "./chat-pins.js";
|
|
51
57
|
import { modelLabel, modelPickerStyles, mw } from "./model-picker.js";
|
|
52
58
|
/** An effort level as a word: low → Low, xhigh → XHigh (the CLIs' own names). Local: a tab on an older model-picker.js still has it. */
|
|
53
59
|
const effortWord = (level) => ({ xhigh: "XHigh" }[level] || String(level).charAt(0).toUpperCase() + String(level).slice(1));
|
|
@@ -56,6 +62,7 @@ import { applyTheme, clearAmbient, resolvedMode, themeFor, themeImageUrl, themeM
|
|
|
56
62
|
import { colorMenuItem } from "/assets/identity-color.js";
|
|
57
63
|
import { brokenPictures, cardFoldable, IdentityCard, useCard } from "/assets/identity-card.js";
|
|
58
64
|
import { AgentWidget, instanceBinds, widgetFor } from "/assets/agent-widget.js";
|
|
65
|
+
import { assetUrl } from "/assets/asset-url.js";
|
|
59
66
|
// #1629 r4 §1: the identity card under the chat's header — hidden by default; shown or not is this device's choice.
|
|
60
67
|
// #2217 (the user, 2026-10-19): no row of its own; its picture and bio can be folded away (the banner stays) — this
|
|
61
68
|
// device's choice too, kept the same way. The user (2026-10-20): no control on the card — one card button in the header
|
|
@@ -94,16 +101,122 @@ function CardMenu({ card, ownerKey }) {
|
|
|
94
101
|
];
|
|
95
102
|
return html`<${Menu} items=${items} label=${t("card.menu")} icon="idcard" cls="chat-card-menu" active=${prefs.open} ownerKey=${ownerKey} />`;
|
|
96
103
|
}
|
|
104
|
+
|
|
105
|
+
// M-3115 (phone v2): kept beside its caller — a retained chat dictionary has no such words.
|
|
106
|
+
register("chatPhone", {
|
|
107
|
+
en: { goTo: "Go to", thisChat: "This chat", verifiedUntil: "Verified · speaks as you until {0}", needsToast: "{0} needs you", ctxHide: "Hide this for now" },
|
|
108
|
+
"zh-TW": { goTo: "前往", thisChat: "這個對話", verifiedUntil: "已驗證 · 以你的身分發言到 {0}", needsToast: "{0} 正在等你回應", ctxHide: "這次先不提醒" },
|
|
109
|
+
});
|
|
110
|
+
const untilClock = (ms) => { try { return new Date(ms).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }); } catch { return ""; } };
|
|
111
|
+
/** A Needs-you item's identity: its nonce, else its id, else what it says. */
|
|
112
|
+
const needKey = (item) => String(item?.nonce || item?.id || JSON.stringify(item || null));
|
|
113
|
+
/**
|
|
114
|
+
* The chat's ⋯ (M-3115): on a phone, where an agent's pages have no bottom tabs, it starts with 「前往」 — Needs you (its
|
|
115
|
+
* count), Fleet, Settings — then this chat's items, and ends with 「✓ 已驗證」 (the line under the composer no longer
|
|
116
|
+
* says it). A Needs-you item that arrives meanwhile, for another agent, is a short toast. A desk's ⋯ is unchanged.
|
|
117
|
+
*/
|
|
118
|
+
/** One target-bound action list for the header and sidebar; the server remains the authority. */
|
|
119
|
+
export function chatAgentMenuItems({ name, inst, wide, pinCount = 0, onPins, onDelete,
|
|
120
|
+
onDetails = () => navigate(detailsPath(name)), onSplit = () => appStore.get().chatWorkspace?.open(name) }) {
|
|
121
|
+
if (guestPage()) return [];
|
|
122
|
+
const running = inst.status === "running";
|
|
123
|
+
const action = async (verb) => {
|
|
124
|
+
let r;
|
|
125
|
+
try { const res = await fetch(`/ui/${verb}/${encodeURIComponent(name)}`, { method: "POST", headers: { "Content-Type": "application/json" } }); r = await res.json(); }
|
|
126
|
+
catch (err) { r = { error: err && err.message ? err.message : t("chat.disconnected") }; }
|
|
127
|
+
if (r && r.error) toast(r.error, false);
|
|
128
|
+
else if (r && r.held) toast(r.message);
|
|
129
|
+
else toast(t(verb === "start" ? "chat.started" : verb === "stop" ? "chat.stoppedInst" : "chat.restarted", name));
|
|
130
|
+
};
|
|
131
|
+
return [
|
|
132
|
+
// #1523 N2: Details is a page now (the Fleet side of this instance), not a dialog.
|
|
133
|
+
supportsInstanceFeature(inst,"details") ? { key: "details", label: t("chat.details"), icon: "info", onSelect: () => onDetails() } : null,
|
|
134
|
+
appStore.get().chatWorkspace ? { key: "splitChat", label: t("chatWorkspace.split"), icon: "sidebar", onSelect: () => onSplit() } : null,
|
|
135
|
+
inst.runtime === "windows" ? {key:"settings",label:t("app.settings"),icon:"settings",onSelect:() => navigate(sectionPath("agents"))} : null,
|
|
136
|
+
running || !supportsInstanceFeature(inst,"lifecycle") ? null : { key: "start", label: t("chat.start"), icon: "play", onSelect: () => action("start") },
|
|
137
|
+
running && supportsInstanceFeature(inst,"lifecycle") ? { key: "restart", label: t("chat.restart"), icon: "restart", onSelect: () => action("restart") } : null,
|
|
138
|
+
running && supportsInstanceFeature(inst,"lifecycle") ? { key: "stop", label: t("chat.stopInstance"), icon: "stop", onSelect: () => action("stop") } : null,
|
|
139
|
+
// #1958: its identity colour and where it shows (the public link too, as profile edits).
|
|
140
|
+
// #3153 P1: the folder it works in, read-only — an admin only (M-3278: over the public link too), and not an
|
|
141
|
+
// agent on another machine (the server also refuses General and coordinators: their folder is the fleet's own).
|
|
142
|
+
inst.runtime === "windows" || inst.machine_id || inst.general_topic === true ? null
|
|
143
|
+
: { key: "workspace", label: t("chat.wsOpen"), icon: "file", onSelect: () => openWorkspace({ key: `ws:${name}`, instance: name }) },
|
|
144
|
+
// M-3271: the pinned list — here too, for a phone (its header shows ← title ⋯ only) and a narrow pane.
|
|
145
|
+
pinCount ? { key: "pins", label: `${t("chat.pinsTitle")} · ${pinCount}`, icon: "pin", onSelect: onPins } : null,
|
|
146
|
+
colorMenuItem(name, inst),
|
|
147
|
+
// #1629: a person's control over this agent's theme — not over the public link (it only views themes).
|
|
148
|
+
...themeMenuItems(name),
|
|
149
|
+
// #2117: its ambient — why it is not showing here (with the way to change that), and a person's Clear.
|
|
150
|
+
...ambientMenuItems(name, { publicLink: false, clear: clearAmbient }), // M-3278
|
|
151
|
+
// AGEND-181: the activity timeline above each reply (this browser's choice), when the Log is on.
|
|
152
|
+
...(activityOffered() && activityInfo(name)?.level !== "off" ? [
|
|
153
|
+
{ key: "activity", checkbox: true, checked: activityPrefs.get().on, label: t("act.menuActivity"), onSelect: () => setActivityOn(!activityPrefs.get().on) },
|
|
154
|
+
...(activityInfo(name)?.thinking ? [{ key: "thinking", checkbox: true, checked: activityPrefs.get().thinking, disabled: !activityPrefs.get().on, label: t("act.menuThinking"), onSelect: () => setActivityThinking(!activityPrefs.get().thinking) }] : []),
|
|
155
|
+
] : []),
|
|
156
|
+
narrowScreen() ? null : { key: "fullWidth", checkbox: true, checked: wide, label: t("chat.fullWidth"), onSelect: () => setChatWide(!wide) },
|
|
157
|
+
{ key: "delete", label: t("chat.delete"), icon: "trash", danger: true, onSelect: onDelete },
|
|
158
|
+
];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function ChatMoreMenu({ items, name, inst = null, card = null, navKey, lease = null }) {
|
|
162
|
+
const app = useStore(appStore);
|
|
163
|
+
const auth = useWebAuthorization();
|
|
164
|
+
const seen = useRef(null);
|
|
165
|
+
useEffect(() => {
|
|
166
|
+
// What Needs you held when last heard, and whether it had loaded then: the first load (or a reconnect's) is not news.
|
|
167
|
+
const snap = (a) => ({ keys: new Set([...(a.needs || [])].map(needKey)), loaded: a.needsLoaded === true });
|
|
168
|
+
seen.current = snap(appStore.get());
|
|
169
|
+
return appStore.subscribe((a) => {
|
|
170
|
+
const before = seen.current;
|
|
171
|
+
seen.current = snap(a);
|
|
172
|
+
if (!before?.loaded || !seen.current.loaded || !narrowScreen()) return;
|
|
173
|
+
const fresh = (a.needs || []).find((it) => !before.keys.has(needKey(it)) && it.instance && it.instance !== name);
|
|
174
|
+
if (fresh) toast(t("chatPhone.needsToast", fresh.instance));
|
|
175
|
+
});
|
|
176
|
+
}, [name]);
|
|
177
|
+
if (!narrowScreen()) return html`<${Menu} items=${items} label=${t("app.more")} />`;
|
|
178
|
+
// M-3166 (Argon 3, the user's OK of round 2): a phone's ⋯ is a sheet (below); its Go to went to the drawer.
|
|
179
|
+
if (inst) {
|
|
180
|
+
// The header's chips, here: the same commands, bound to this page's lease (a reply after the page moved on is dropped).
|
|
181
|
+
const run = (command) => store.runCommand(name, command, "", lease ? { alive: () => lease.current() } : {});
|
|
182
|
+
const commands = supportsInstanceFeature(inst, "commands");
|
|
183
|
+
const chat = { card: !!card, onCard: () => setChatCardOpen(!chatCardPrefs.get().open),
|
|
184
|
+
...(commands ? {
|
|
185
|
+
onModel: () => run("model"),
|
|
186
|
+
modelText: `${shortModelName(modelLabel(inst.model || modelText(inst)))}${supportsInstanceFeature(inst, "effort") && effortChip(inst) ? ` · ${effortChip(inst)}` : ""}`,
|
|
187
|
+
onBackend: () => (inst.runtime === "windows" ? navigate(sectionPath("agents")) : run("backend")), backendText: backendLabel(inst.backend),
|
|
188
|
+
} : {}) };
|
|
189
|
+
return html`<${AgentSheetButton} items=${items} name=${name} inst=${inst} current="chat" navKey=${navKey} chat=${chat}
|
|
190
|
+
verifiedUntil=${auth.st?.state === "verified" ? auth.st.until : null} />`;
|
|
191
|
+
}
|
|
192
|
+
const waiting = needsCount(app);
|
|
193
|
+
const route = navStore.get().route;
|
|
194
|
+
const verified = auth.st?.state === "verified";
|
|
195
|
+
const all = [
|
|
196
|
+
{ key: "goHead", heading: true, label: t("chatPhone.goTo") },
|
|
197
|
+
{ key: "goNeeds", label: waiting ? `${t("app.needsTab")} · ${waiting}` : t("app.needsTab"), icon: "inbox", onSelect: () => navigate(NEEDS_PATH) },
|
|
198
|
+
{ key: "goFleet", label: t("app.fleet"), icon: "fleet", onSelect: () => navigate(fleetEntryPath(route)) },
|
|
199
|
+
{ key: "goSettings", label: t("app.settings"), icon: "settings", onSelect: () => navigate(settingsPath()) },
|
|
200
|
+
{ key: "chatHead", heading: true, label: t("chatPhone.thisChat") },
|
|
201
|
+
...items,
|
|
202
|
+
...(verified ? [{ key: "verified", label: `✓ ${t("webauth.verifiedShort")}`, title: t("chatPhone.verifiedUntil", untilClock(auth.st.until)), icon: "check", disabled: true, onSelect: () => {} }] : []),
|
|
203
|
+
];
|
|
204
|
+
return html`<${Menu} items=${all} label=${t("app.more")} />`;
|
|
205
|
+
}
|
|
97
206
|
import "/assets/chat-strings.js";
|
|
98
207
|
import { confirmedWrite, selfConfirmed } from "./settings-confirm.js";
|
|
99
208
|
import { createChatStore } from "./chat-store.js";
|
|
100
209
|
import { createThread, msgKey } from "/assets/chat-thread.js";
|
|
101
210
|
import { ComposerInput, WorkBarView, touchScreen } from "/assets/chat-composer.js";
|
|
102
|
-
import { installMessageActions } from "
|
|
211
|
+
import { installMessageActions } from "/assets/chat-msg-actions.js";
|
|
103
212
|
import { composerCaret, insertQuote, installQuoteSelection, showCaret } from "./chat-quote.js";
|
|
213
|
+
import { installTableSelection } from "/assets/chat-table-select.js";
|
|
214
|
+
import { contactBadgeHtml, installBadgeRefresh } from "./contact-ticket-badge.js";
|
|
104
215
|
import { createEmojiIndex } from "./chat-emojis.js";
|
|
105
216
|
import { pollPublicPreview } from "./preview-status.js";
|
|
106
217
|
import { createMentionIndex } from "./chat-mentions.js";
|
|
218
|
+
import "./chat-task-ref-strings.js";
|
|
219
|
+
import { createTaskRefIndex, insertTaskRef, taskRefAt } from "./chat-task-refs.js";
|
|
107
220
|
import { setPanelFeedback } from "./preview-panel-actions.js";
|
|
108
221
|
import { PreviewPanel, claimPanel, openMarkdown, openPanel, openWorkspace, panelClaims, panelStore, panelVersion, shownKey } from "./preview-panel.js";
|
|
109
222
|
import { isUpdateLine, needsArgument, paletteFor, parseCommandLine, UPDATE_COMMAND } from "./chat-commands.js";
|
|
@@ -124,13 +237,13 @@ export function linkWorkBarCss(doc = typeof document !== "undefined" ? document
|
|
|
124
237
|
try {
|
|
125
238
|
if (!doc || !doc.head || doc.querySelector('link[data-chat-work-bar-css="1"]')) return;
|
|
126
239
|
const link = doc.createElement("link");
|
|
127
|
-
link.setAttribute("rel", "stylesheet"); link.setAttribute("href", "/assets/chat-work-bar.css"); link.setAttribute("data-chat-work-bar-css", "1");
|
|
240
|
+
link.setAttribute("rel", "stylesheet"); link.setAttribute("href", assetUrl("/assets/chat-work-bar.css")); link.setAttribute("data-chat-work-bar-css", "1");
|
|
128
241
|
doc.head.appendChild(link);
|
|
129
242
|
} catch { /* Stop still works without it */ }
|
|
130
243
|
}
|
|
131
244
|
linkWorkBarCss();
|
|
132
245
|
|
|
133
|
-
import { activityInfo, activityInfoStore, activityOffered, activityPrefs, composeActivity, mountActivity, observeActivity, setActivityOn, setActivityThinking } from "./chat-activity.js";
|
|
246
|
+
import { activityDrawCtx, activityInfo, activityInfoStore, activityOffered, activityPrefs, composeActivity, mountActivity, observeActivity, setActivityOn, setActivityThinking } from "./chat-activity.js";
|
|
134
247
|
/** The composer's textarea (#2342: text put back into it is a step Ctrl+Z goes back from). */
|
|
135
248
|
const composers = new Map(); // agent → current mounted refs, never a retained thread's stale closure
|
|
136
249
|
const composerField = (name) => composers.get(name)?.input.current || null;
|
|
@@ -254,10 +367,7 @@ const agentBusy = (name) => R().isBusy(store.state.exec[name]);
|
|
|
254
367
|
const agentSince = (name) => { const t = store.state.workingSince[name]; return t == null ? null : Date.now() - (performance.now() - t); };
|
|
255
368
|
const rowsOf = (name) => (activityShown() ? composeActivity(name, store.threadRows(name), Date.now(), { busy: agentBusy(name), since: agentSince(name) }) : store.threadRows(name));
|
|
256
369
|
/** What a chat's activity blocks need to draw: its paths to shorten, and whether thinking is shown. */
|
|
257
|
-
const activityCtx = (name) => () =>
|
|
258
|
-
const info = activityInfo(name);
|
|
259
|
-
return { paths: info ? { cwd: info.cwd, home: info.home } : null, thinking: activityPrefs.get().thinking && !!info && info.thinking === true };
|
|
260
|
-
};
|
|
370
|
+
const activityCtx = (name) => () => activityDrawCtx(name);
|
|
261
371
|
|
|
262
372
|
// ── Announcements: one polite, visually hidden line for the coarse events only (a reply arrived, the agent started,
|
|
263
373
|
// finished, or waits on you). Messages themselves are not read out as they arrive; the list is a log to browse.
|
|
@@ -265,6 +375,15 @@ let announceTimer = null;
|
|
|
265
375
|
/** #1630: which Discord server emoji this page may draw (created with the store, in boot). */
|
|
266
376
|
let emojiIndex = null;
|
|
267
377
|
let mentionIndex = null; // #1682: the names of the mentions shown
|
|
378
|
+
let taskRefIndex = null; // The task cards the person's messages name (chips) and the ones offered while `#` is typed
|
|
379
|
+
/** What a chip draws for a card the page knows — its words, its status in the page's language, and a tip with who has it. */
|
|
380
|
+
function taskChipInfo(code) {
|
|
381
|
+
const v = taskRefIndex ? taskRefIndex.get(code) : null;
|
|
382
|
+
if (!v) return null;
|
|
383
|
+
const status = t(`taskref.s.${v.status}`);
|
|
384
|
+
const tip = [`${v.code} · ${v.title}`, status, v.assignee ? `@${v.assignee}` : null].filter(Boolean).join(" · ");
|
|
385
|
+
return { title: v.title, status: v.status, statusLabel: status, tip };
|
|
386
|
+
}
|
|
268
387
|
function announce(text) {
|
|
269
388
|
let el = document.getElementById("announcer");
|
|
270
389
|
if (!el) { el = document.createElement("div"); el.id = "announcer"; el.className = "sr-only"; el.setAttribute("role", "status"); el.setAttribute("aria-live", "polite"); el.setAttribute("aria-atomic", "true"); document.body.appendChild(el); }
|
|
@@ -296,7 +415,9 @@ export function boot({ stream, boot: bootData, deps = {} }) {
|
|
|
296
415
|
...deps,
|
|
297
416
|
});
|
|
298
417
|
emojiIndex = createEmojiIndex((url) => (deps.fetch || fetch)(url, { credentials: "same-origin" }));
|
|
299
|
-
mentionIndex = createMentionIndex((url) => (deps.fetch || fetch)(url, { credentials: "same-origin" }));
|
|
418
|
+
mentionIndex = createMentionIndex((url) => guestPage() ? null : (deps.fetch || fetch)(url, { credentials: "same-origin" }));
|
|
419
|
+
// A guest has no task board (the server refuses it too); everyone else reads the cards a message names.
|
|
420
|
+
taskRefIndex = guestPage() ? null : createTaskRefIndex((url) => (deps.fetch || fetch)(url, { credentials: "same-origin" }));
|
|
300
421
|
store.attach(stream);
|
|
301
422
|
// #1306: what the server said about previews for this load. The page-wide message and storage listeners this adds
|
|
302
423
|
// belong to the app, once (they are never per mount).
|
|
@@ -319,10 +440,11 @@ export function boot({ stream, boot: bootData, deps = {} }) {
|
|
|
319
440
|
clearReply: (instance) => store.clearReply(instance),
|
|
320
441
|
addToDraft: (instance, line) => { feedbackInstance = instance; recordEdit(composerField(instance)); store.addToDraft(instance, line); },
|
|
321
442
|
focus: (instance = feedbackInstance) => {
|
|
443
|
+
import("./preview-popout.js").then(m => m.leavePreviewWindow()).catch(() => {});
|
|
322
444
|
const el = composerField(instance); if (!el) return;
|
|
323
445
|
el.focus();
|
|
324
446
|
// After the render that shows the line: the caret at its end.
|
|
325
|
-
setTimeout(() => { if (composerField(instance) !== el) return; try { const n = el.value.length; el.setSelectionRange(n, n); } catch { /* not a text field */ } }, 0);
|
|
447
|
+
setTimeout(() => { if (composerField(instance) !== el) return; el.focus(); try { const n = el.value.length; el.setSelectionRange(n, n); } catch { /* not a text field */ } }, 0);
|
|
326
448
|
},
|
|
327
449
|
});
|
|
328
450
|
// #1604: the preview opt-in and Tour live in Settings → This device now (and on each preview card's menu).
|
|
@@ -380,6 +502,7 @@ export function ChatPanel({ route, navKey }) {
|
|
|
380
502
|
const app = useStore(appStore);
|
|
381
503
|
const name = route.instance;
|
|
382
504
|
const inst = name ? app.instances.find(i => i.name === name) : null;
|
|
505
|
+
|
|
383
506
|
useEffect(() => {
|
|
384
507
|
if (store.show) {
|
|
385
508
|
if (!name || !inst) return;
|
|
@@ -435,6 +558,16 @@ function useResolvedMode(lease) {
|
|
|
435
558
|
}
|
|
436
559
|
|
|
437
560
|
function ChatView({ name, inst, lease, navKey, exec, awaiting }) {
|
|
561
|
+
const [previewPopout, setPreviewPopout] = useState(null);
|
|
562
|
+
useEffect(() => {
|
|
563
|
+
let alive = true, owner = null; setPreviewPopout(null);
|
|
564
|
+
if (!name || !inst) return;
|
|
565
|
+
import("./preview-popout.js").then(m => m.createPreviewPopout(name)).then(value => {
|
|
566
|
+
if (!alive) { value?.close(); return; } owner = value;
|
|
567
|
+
if (owner) setPreviewPopout(() => spec => owner.open(spec));
|
|
568
|
+
}).catch(() => {});
|
|
569
|
+
return () => { alive = false; owner?.close(); };
|
|
570
|
+
}, [name, !!inst]);
|
|
438
571
|
const pane = paneContext.usePane?.(), paneNow = useRef(pane); paneNow.current = pane;
|
|
439
572
|
const bindings = useRef({ input: { current: null }, box: { current: null }, composing: false }).current;
|
|
440
573
|
const ids = pane ? Object.fromEntries(["msgIn", "attachBtn", "stopBtn", "sendBtn", "cmdPalette"].map(key => [key, `pane-${pane.id}-${key}`])) : {};
|
|
@@ -475,6 +608,11 @@ function ChatView({ name, inst, lease, navKey, exec, awaiting }) {
|
|
|
475
608
|
const wide = useStore(chatWide).on;
|
|
476
609
|
useStore(activityPrefs); useStore(activityInfoStore); // AGEND-181: the ⋯ menu's Show activity / Show thinking
|
|
477
610
|
const view = useRef(null), split = useRef(null), thread = useRef(null), bg = useRef(null), effectSurface = useRef(null);
|
|
611
|
+
// M-3271: this agent's pinned messages — the header's 📌 opens the list; a pin no longer in the chat opens its copy.
|
|
612
|
+
const [pinsOpen, setPinsOpen] = useState(false), [pinCopy, setPinCopy] = useState(null);
|
|
613
|
+
const pinCount = usePins(guestPage() ? "" : name).pins?.length || 0;
|
|
614
|
+
const openPins = () => setPinsOpen(true);
|
|
615
|
+
const jumpPin = (p) => { setPinsOpen(false); void thread.current?.jumpTo(p.key, { onGone: () => setPinCopy(p) }); };
|
|
478
616
|
useLayoutEffect(() => { applyTheme(view.current, theme, mode); }, [themeKey, mode]);
|
|
479
617
|
useLayoutEffect(() => {
|
|
480
618
|
const img = bg.current;
|
|
@@ -513,41 +651,8 @@ function ChatView({ name, inst, lease, navKey, exec, awaiting }) {
|
|
|
513
651
|
e.preventDefault();
|
|
514
652
|
store.cancelReply(name);
|
|
515
653
|
})), [lease]);
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
let r;
|
|
519
|
-
try { const res = await fetch(`/ui/${verb}/${encodeURIComponent(name)}`, { method: "POST", headers: { "Content-Type": "application/json" } }); r = await res.json(); }
|
|
520
|
-
catch (err) { r = { error: err && err.message ? err.message : t("chat.disconnected") }; }
|
|
521
|
-
if (r && r.error) toast(r.error, false);
|
|
522
|
-
else if (r && r.held) toast(r.message);
|
|
523
|
-
else toast(t(verb === "start" ? "chat.started" : verb === "stop" ? "chat.stoppedInst" : "chat.restarted", name));
|
|
524
|
-
};
|
|
525
|
-
const items = [
|
|
526
|
-
// #1523 N2: Details is a page now (the Fleet side of this instance), not a dialog.
|
|
527
|
-
supportsInstanceFeature(inst,"details") ? { key: "details", label: t("chat.details"), icon: "info", onSelect: () => (paneNow.current?.navigate || navigate)(detailsPath(name)) } : null,
|
|
528
|
-
appStore.get().chatWorkspace ? { key: "splitChat", label: t("chatWorkspace.split"), icon: "sidebar", onSelect: () => appStore.get().chatWorkspace.pick() } : null,
|
|
529
|
-
inst.runtime === "windows" ? {key:"settings",label:t("app.settings"),icon:"settings",onSelect:() => navigate(sectionPath("agents"))} : null,
|
|
530
|
-
running || !supportsInstanceFeature(inst,"lifecycle") ? null : { key: "start", label: t("chat.start"), icon: "play", onSelect: () => action("start") },
|
|
531
|
-
running && supportsInstanceFeature(inst,"lifecycle") ? { key: "restart", label: t("chat.restart"), icon: "restart", onSelect: () => action("restart") } : null,
|
|
532
|
-
running && supportsInstanceFeature(inst,"lifecycle") ? { key: "stop", label: t("chat.stopInstance"), icon: "stop", onSelect: () => action("stop") } : null,
|
|
533
|
-
// #1958: its identity colour and where it shows (the public link too, as profile edits).
|
|
534
|
-
// #3153 P1: the folder it works in, read-only — this computer's admin only (never over the public link), and not an
|
|
535
|
-
// agent on another machine (the server also refuses General and coordinators: their folder is the fleet's own).
|
|
536
|
-
document.body.dataset.publicLink === "1" || inst.runtime === "windows" || inst.machine_id || inst.general_topic === true ? null
|
|
537
|
-
: { key: "workspace", label: t("chat.wsOpen"), icon: "file", onSelect: () => openWorkspace({ key: `ws:${name}`, instance: name }) },
|
|
538
|
-
colorMenuItem(name, inst),
|
|
539
|
-
// #1629: a person's control over this agent's theme — not over the public link (it only views themes).
|
|
540
|
-
...themeMenuItems(name),
|
|
541
|
-
// #2117: its ambient — why it is not showing here (with the way to change that), and a person's Clear.
|
|
542
|
-
...ambientMenuItems(name, { publicLink: document.body.dataset.publicLink === "1", clear: clearAmbient }),
|
|
543
|
-
// AGEND-181: the activity timeline above each reply (this browser's choice), when the Log is on.
|
|
544
|
-
...(activityOffered() && activityInfo(name)?.level !== "off" ? [
|
|
545
|
-
{ key: "activity", checkbox: true, checked: activityPrefs.get().on, label: t("act.menuActivity"), onSelect: () => setActivityOn(!activityPrefs.get().on) },
|
|
546
|
-
...(activityInfo(name)?.thinking ? [{ key: "thinking", checkbox: true, checked: activityPrefs.get().thinking, disabled: !activityPrefs.get().on, label: t("act.menuThinking"), onSelect: () => setActivityThinking(!activityPrefs.get().thinking) }] : []),
|
|
547
|
-
] : []),
|
|
548
|
-
narrowScreen() ? null : { key: "fullWidth", checkbox: true, checked: wide, label: t("chat.fullWidth"), onSelect: () => setChatWide(!wide) },
|
|
549
|
-
{ key: "delete", label: t("chat.delete"), icon: "trash", danger: true, onSelect: () => setDialog("delete") },
|
|
550
|
-
];
|
|
654
|
+
const items = chatAgentMenuItems({ name, inst, wide, pinCount, onPins: openPins, onDelete: () => setDialog("delete"),
|
|
655
|
+
onDetails: () => (paneNow.current?.navigate || navigate)(detailsPath(name)), onSplit: () => appStore.get().chatWorkspace.pick() });
|
|
551
656
|
const cls = statusClass(inst, exec, awaiting);
|
|
552
657
|
// #1920 phase 3: a guest has this chat only — no Details, View or Log to switch to, no lifecycle, colour, theme,
|
|
553
658
|
// effect management or delete (a guest's status frame carries no model or effort either, so those chips do not show).
|
|
@@ -559,15 +664,17 @@ function ChatView({ name, inst, lease, navKey, exec, awaiting }) {
|
|
|
559
664
|
${inst.runtime === "windows" ? html`<span class="tag">Windows</span>` : null}
|
|
560
665
|
${nativeCliTag(inst)}${inst.machine_id ? html`<span class="tag runtime-machine-tag" title=${t("chat.machineName",machineName(inst.machine_id,inst.machine_name))}>${machineName(inst.machine_id,inst.machine_name)}</span>${inst.machine_status !== "online" ? html`<span class="tag runtime-machine-offline">${t(inst.machine_status === "revoked" ? "chat.machineRevoked" : "chat.machineOffline")}</span>` : null}` : null}
|
|
561
666
|
${!guest && supportsInstanceFeature(inst,"commands") ? html`<button type="button" class="hd-chip chat-model-entry" title=${mw("backend")} aria-label=${mw("backend")} onClick=${() => inst.runtime === "windows" ? navigate(sectionPath("agents")) : pick("backend")}>${backendLabel(inst.backend)} ▾</button>
|
|
562
|
-
<button type="button" class="hd-chip chat-model-entry" title=${t("chat.chipModel", modelText(inst))} aria-label=${t("chat.chipModel", modelText(inst))} onClick=${() => pick("model")}>${modelLabel(inst.model || modelText(inst))} ▾</button>` : null}
|
|
667
|
+
<button type="button" class="hd-chip chat-model-entry" title=${t("chat.chipModel", modelText(inst))} aria-label=${t("chat.chipModel", modelText(inst))} onClick=${(e) => { noteModelMenuAnchor(e.currentTarget); pick("model"); }}>${modelLabel(inst.model || modelText(inst))} ▾</button>` : null}
|
|
563
668
|
${effortChip(inst) && supportsInstanceFeature(inst,"effort") ? html`<button type="button" class="hd-chip" title=${t("chat.chipEffort", effortChip(inst))} aria-label=${t("chat.chipEffort", effortChip(inst))} onClick=${() => pick("effort")}>${effortChip(inst)}</button>` : null}`;
|
|
564
669
|
|
|
565
670
|
return html`<div class=${`panel p-chat${wrap ? " wrap-code" : ""}`} data-width=${wide ? "full" : undefined} ref=${view}>
|
|
566
671
|
<${PanelHeader} title=${inst.runtime === "windows" ? inst.display_name || name : headerName(namesOf(inst || { name }, names.primary))} sub=${sub}
|
|
567
|
-
pageControls=${{ CardMenu, card, navKey, usage: supportsInstanceFeature(inst,"usage") }} pageActions=${[
|
|
672
|
+
pageControls=${{ CardMenu, card, navKey, usage: supportsInstanceFeature(inst,"usage"), ...(guest ? {} : { Pins: PinsButton, pins: { name, onOpen: openPins } }) }} pageActions=${[
|
|
568
673
|
...items]}
|
|
569
|
-
nav=${guest ? (guestTrusted() ? html`<${InstanceSwitch} name=${name} instance=${inst} current="chat" guest=${true} />` : null) : html`<${InstanceSwitch} name=${name} instance=${inst} current="chat" />`}
|
|
674
|
+
nav=${guest ? (guestTrusted() ? html`<${InstanceSwitch} name=${name} instance=${inst} current="chat" guest=${true} />` : null) : html`<${InstanceSwitch} name=${name} instance=${inst} current="chat" />`}>${guest ? null : html`<${PinsButton} name=${name} onOpen=${openPins} />`}<${CardMenu} card=${card} /><${HeaderTools} navKey=${navKey} usage=${supportsInstanceFeature(inst,"usage")} />${guest ? null : html`<${ChatMoreMenu} items=${items} name=${name} inst=${inst} card=${card} navKey=${navKey} lease=${lease} />`}</${PanelHeader}>
|
|
570
675
|
<${ChatCard} key=${name} name=${name} card=${card} />
|
|
676
|
+
${pinsOpen ? html`<${PinsDialog} name=${name} onClose=${() => setPinsOpen(false)} onJump=${jumpPin} />` : null}
|
|
677
|
+
${pinCopy ? html`<${PinCopyDialog} pin=${pinCopy} onClose=${() => setPinCopy(null)} />` : null}
|
|
571
678
|
<${AgentWidget} slot="chat_header" widget=${widgetFor(name, "chat_header")} binds=${instanceBinds(inst, exec, awaiting)} />
|
|
572
679
|
<div class="chat-split" ref=${split}>
|
|
573
680
|
<div ref=${effectSurface} class=${`chat-main${theme && theme.background ? " has-th-bg" : ""}`}>
|
|
@@ -582,7 +689,7 @@ function ChatView({ name, inst, lease, navKey, exec, awaiting }) {
|
|
|
582
689
|
<${ChatAmbient} name=${name} surface=${effectSurface} part="front" />
|
|
583
690
|
</div>
|
|
584
691
|
<${PreviewPanel} name=${name} split=${split} msgs=${() => store.state.msgs[name] || []} subscribe=${(fn) => store.subscribe(fn)}
|
|
585
|
-
keyOf=${msgKey} reveal=${(k) => thread.current && thread.current
|
|
692
|
+
popout=${previewPopout} keyOf=${msgKey} reveal=${(k) => { const owner = thread.current; import("./preview-popout.js").then(m => m.leavePreviewWindow(), () => {}).then(() => { if (lease.current() && thread.current === owner) owner?.reveal(k); }); }} download=${downloadHtml} allow=${(commit) => setPreviewOptIn(true, commit)} />
|
|
586
693
|
</div>
|
|
587
694
|
<${LightboxHost} owner=${view} />
|
|
588
695
|
${attachmentsSupported ? html`<div data-trust="drop" class="drop-overlay" aria-hidden="true"><div class="drop-card"><${Icon} name="attach" size=${32} /><span>${t("chat.dropHere")}</span></div></div>` : null}
|
|
@@ -628,7 +735,34 @@ export function threadsToLetGo(kept, current, { keep, maxNodes, favorites, prote
|
|
|
628
735
|
}
|
|
629
736
|
return out;
|
|
630
737
|
}
|
|
631
|
-
const narrowScreen = () => typeof matchMedia === "function" && matchMedia("(max-width: 899px)").matches;
|
|
738
|
+
const narrowScreen = () => typeof matchMedia === "function" && matchMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)").matches;
|
|
739
|
+
/**
|
|
740
|
+
* M-3167: the composer's own model picker and context ring, below this width. The header's chips give way to them
|
|
741
|
+
* there (chat-work-bar.css, the same width), so the model is always in one place and never under the agent's tabs.
|
|
742
|
+
*/
|
|
743
|
+
const COMPOSER_TOOLS_Q = "(max-width: 1439px)";
|
|
744
|
+
/** M-3167: whether a media query matches, kept current as the window is resized (read once, it went stale: #3166). */
|
|
745
|
+
function useMedia(query) {
|
|
746
|
+
const read = () => typeof matchMedia === "function" && matchMedia(query).matches;
|
|
747
|
+
const [on, setOn] = useState(read);
|
|
748
|
+
useEffect(() => {
|
|
749
|
+
if (typeof matchMedia !== "function") return undefined;
|
|
750
|
+
const mq = matchMedia(query), changed = () => setOn(mq.matches);
|
|
751
|
+
changed();
|
|
752
|
+
mq.addEventListener?.("change", changed);
|
|
753
|
+
return () => mq.removeEventListener?.("change", changed);
|
|
754
|
+
}, [query]);
|
|
755
|
+
return on;
|
|
756
|
+
}
|
|
757
|
+
/** M-3167: the model's short name for the composer's chip on a desk ("Opus 5.5 (claude-opus-5-5)" → "Opus 5.5"). */
|
|
758
|
+
export function shortModelName(label) {
|
|
759
|
+
const s = String(label || "").replace(/\s*\([^)]*\)\s*$/, "").trim();
|
|
760
|
+
// M-3304: a version is one or two digits each (`5`, `5-5`); a dated id's date is not a minor version —
|
|
761
|
+
// "claude-sonnet-6-20270101" is "Sonnet 6" (was "Sonnet 6.20270101"), "claude-opus-5-5-20261201" "Opus 5.5".
|
|
762
|
+
const family = /^claude-(opus|sonnet|haiku|fable)-(\d{1,2})(?:-(\d{1,2}))?(?![\d.])/i.exec(s);
|
|
763
|
+
if (family) return `${family[1][0].toUpperCase()}${family[1].slice(1).toLowerCase()} ${family[2]}${family[3] ? `.${family[3]}` : ""}`;
|
|
764
|
+
return s;
|
|
765
|
+
}
|
|
632
766
|
/** Let go what the budget does not hold (after `current` was shown, or drew more). */
|
|
633
767
|
function trimKept(current) {
|
|
634
768
|
const kept = [...keptThreads].map(([n, e]) => [n, e.thread.nodes.size]);
|
|
@@ -658,21 +792,31 @@ function threadEntry(name, doc) {
|
|
|
658
792
|
onEmpty: (v) => e.sink?.setEmpty(v && store.allHidden(name) ? "hidden" : v),
|
|
659
793
|
setPreviewOptIn, copyText, download: downloadHtml, toggleWrap,
|
|
660
794
|
clickReplyButton: (id, index) => store.clickReplyButton(name, id, index), // #1266
|
|
795
|
+
contactBadge: (x) => { installBadgeRefresh(); return contactBadgeHtml(x); }, // M-3339: 聯絡申請 #R… / 已准轉交 #R… (kept current)
|
|
796
|
+
canResend: (message) => store.canResend(name, message),
|
|
797
|
+
resendMessage: (key) => store.resendMessage(name, key),
|
|
661
798
|
retryOutgoing: (clientId) => store.retryOutgoing(name, clientId), // a failed send's Retry and Delete
|
|
662
799
|
deleteOutgoing: (clientId) => store.deleteOutgoing(name, clientId),
|
|
663
800
|
putBackOutgoing: (clientId) => { recordEdit(composerField(name)); store.putBackOutgoing(name, clientId); }, // undoable, as typing
|
|
664
801
|
// #2272: reply to a message (the bar above the composer), and show the one a reply quotes.
|
|
665
802
|
startReply: (x) => { store.startReply(name, x); composerField(name)?.focus(); },
|
|
666
803
|
findQuoted: (key) => store.findQuoted(name, key),
|
|
804
|
+
// M-3272: scroll-back — older at the very top, the unloaded newest end again at the bottom (chat-store.js loadOlder).
|
|
805
|
+
onTop: () => { if (!guestPage()) void store.loadOlder(name); }, // #4103 review N1: a guest is refused; never asked
|
|
806
|
+
onBottom: () => { void store.loadNewer(name); },
|
|
807
|
+
detached: () => store.pagingState(name).detached,
|
|
667
808
|
notice: (text) => toast(text, false),
|
|
668
809
|
replyButtonBusy: (id) => store.state.rbBusy.has(id),
|
|
669
810
|
pollMine: (id) => store.state.pollMine[id], // #1823: this device's own vote
|
|
670
811
|
serverNow: () => Date.now() + store.state.clockSkew, // #1823: the deadline is the server's
|
|
671
812
|
panel: { shown: shownKey, open: (spec, o) => openPanel(spec, o), version: panelVersion, claim: claimPanel, claims: panelClaims, // #1481, #1704
|
|
672
813
|
openMarkdown: (spec) => openMarkdown(spec) }, // M-2448: a Markdown file in the side panel
|
|
814
|
+
previewFile: !guestPage() ? (spec, opener, msgKey) => previewReplyFile(name, spec, opener, msgKey) : undefined,
|
|
815
|
+
previewFileLabel: replyPreviewLabel,
|
|
673
816
|
openImage: (links, img) => openLightbox(links, img, annotateFor(name, img)), // an image, full size, in the page (#3727: with 標註)
|
|
674
817
|
emojis: (id) => !!emojiIndex && emojiIndex.known(id), // #1630: the fleet's server emoji
|
|
675
818
|
mentions: (kind, id) => (mentionIndex ? mentionIndex.name(kind, id) : null), // #1682: mention names
|
|
819
|
+
taskRefs: taskRefIndex ? taskChipInfo : undefined, // A person's and an agent's task numbers as chips
|
|
676
820
|
activity: { mount: (node, group) => mountActivity(node, group, activityCtx(name)) }, // AGEND-181: the timeline's blocks
|
|
677
821
|
});
|
|
678
822
|
e.thread = thread;
|
|
@@ -682,10 +826,20 @@ function threadEntry(name, doc) {
|
|
|
682
826
|
function follow(name, thread) {
|
|
683
827
|
// #1630: the server-emoji list is read once a message shows a tag; when it arrives, those messages are drawn again.
|
|
684
828
|
// #1682: the same for mention names — asked for the ids the messages carry; when names arrive, drawn again.
|
|
685
|
-
const wantEmojis = (msgs) => { if (emojiIndex && emojiIndex.wants(msgs)) emojiIndex.ensure(); if (mentionIndex) mentionIndex.ensure(msgs); };
|
|
829
|
+
const wantEmojis = (msgs) => { if (emojiIndex && emojiIndex.wants(msgs)) emojiIndex.ensure(); if (mentionIndex) mentionIndex.ensure(msgs); if (taskRefIndex) taskRefIndex.ensure(msgs); };
|
|
686
830
|
const offs = [];
|
|
687
831
|
if (emojiIndex) offs.push(emojiIndex.subscribe(() => thread.render(rowsOf(name))));
|
|
688
832
|
if (mentionIndex) offs.push(mentionIndex.subscribe(() => thread.render(rowsOf(name))));
|
|
833
|
+
// The cards the messages name — drawn again when their answer arrives, and read again when the board changed.
|
|
834
|
+
if (taskRefIndex) {
|
|
835
|
+
offs.push(taskRefIndex.subscribe(() => thread.render(rowsOf(name))));
|
|
836
|
+
const sub = appStore.get().streamOn;
|
|
837
|
+
if (typeof sub === "function") {
|
|
838
|
+
let timer = null;
|
|
839
|
+
const off = sub("tasks", () => { if (timer) clearTimeout(timer); timer = setTimeout(() => { timer = null; taskRefIndex.refresh(); }, 400); });
|
|
840
|
+
offs.push(() => { if (timer) clearTimeout(timer); if (typeof off === "function") off(); });
|
|
841
|
+
}
|
|
842
|
+
}
|
|
689
843
|
wantEmojis(store.state.msgs[name]);
|
|
690
844
|
// AGEND-181/197: the activity feed — this instance's steps while the chat is shown (the Log's own read, live by steps_tick,
|
|
691
845
|
// or by a poll when the stream has fallen back to polling); switched by this browser's Show activity / Show thinking.
|
|
@@ -718,8 +872,11 @@ function follow(name, thread) {
|
|
|
718
872
|
}
|
|
719
873
|
if (instance !== name) return;
|
|
720
874
|
if (kind === "msgs") { thread.render(rowsOf(name)); wantEmojis(store.state.msgs[name]); if (feed) feed.nudge(); } // a message came or went: read the steps now
|
|
875
|
+
// M-3272: a page of scroll-back (older at the top, newer at the bottom): drawn with the reader kept where they were.
|
|
876
|
+
else if (kind === "page") { thread.render(rowsOf(name), { keep: true }); wantEmojis(store.state.msgs[name]); }
|
|
721
877
|
else if (kind === "progress") thread.progress(); // an upload moved: its bar, in place
|
|
722
|
-
|
|
878
|
+
// Sent while scrolled back past an unloaded newest end: the live chat again, then its end (M-3272).
|
|
879
|
+
else if (kind === "sent") { if (store.pagingState(name).detached) void store.backToLatest(name).then(() => thread.jumpLatest()); else thread.jumpLatest(); }
|
|
723
880
|
}));
|
|
724
881
|
offs.push(P() ? P().onChange(() => thread.refreshCards()) : () => {});
|
|
725
882
|
offs.push(panelStore.subscribe(() => thread.refreshCards())); // a card shows whether the panel has its block
|
|
@@ -727,11 +884,14 @@ function follow(name, thread) {
|
|
|
727
884
|
}
|
|
728
885
|
|
|
729
886
|
/** The thread's view: Preact owns the scroller and the jump pill; the kept list (chat-thread.js) is put inside it. */
|
|
887
|
+
export { JUMP_IDLE_MS };
|
|
730
888
|
function Thread({ name, label = name, th, bindings }) {
|
|
731
889
|
const pane = paneContext.usePane?.(), paneNow = useRef(pane); paneNow.current = pane;
|
|
732
890
|
const scroller = useRef(null), host = useRef(null);
|
|
733
891
|
const [jump, setJump] = useState({ show: false, unseen: 0 });
|
|
734
892
|
const [empty, setEmpty] = useState(false);
|
|
893
|
+
// M-3492/M-3493: 最新 fades out JUMP_IDLE_MS after the last scroll (shared with the Hub's threads: jump-idle.js).
|
|
894
|
+
const jumpIdle = useJumpIdle(scroller, jump.show, name);
|
|
735
895
|
useLayoutEffect(() => { keptThreads.get(name)?.list.setAttribute("aria-label",t("chat.conversationWith",label)); },[name,label]);
|
|
736
896
|
useLayoutEffect(() => {
|
|
737
897
|
const doc = host.current.ownerDocument;
|
|
@@ -764,7 +924,13 @@ function Thread({ name, label = name, th, bindings }) {
|
|
|
764
924
|
t, messageOf: thread.messageOf, rove: thread.rove, reply: (x) => { store.startReply(name, x); bindings.input.current?.focus(); },
|
|
765
925
|
copyText, notice: (text, ok = true) => toast(text, ok),
|
|
766
926
|
linkOf: (x) => `${location.origin}/ui/chat/${encodeURIComponent(name)}#m=${msgKey(x)}`,
|
|
927
|
+
// M-3271: Pin / Unpin — an admin's (the host answers who may: pinOffered), on a stored agent or person message.
|
|
928
|
+
pin: (x) => { const key = msgKey(x); void setPin(name, key, !isPinned(name, key)); },
|
|
929
|
+
pinned: (x) => isPinned(name, msgKey(x)),
|
|
930
|
+
canPin: (x) => !guestPage() && pinOffered(name) && (x.role === "agent" || x.role === "user") && /^[0-9a-f]{1,32}-\d{1,15}$/.test(msgKey(x)),
|
|
767
931
|
});
|
|
932
|
+
// M-3326: a table's cells selected as a spreadsheet's (a desk: drag down a column or across a block; Ctrl/Cmd+C as TSV).
|
|
933
|
+
const offCells = installTableSelection(ls, { phone: () => typeof matchMedia === "function" && matchMedia("(pointer: coarse)").matches });
|
|
768
934
|
// M-2789: select a passage in a message → 「引用」 → it goes into the composer as a quote at the caret, repeatable.
|
|
769
935
|
const offQuote = installQuoteSelection(ls, {
|
|
770
936
|
field: () => bindings.input.current,
|
|
@@ -811,7 +977,7 @@ function Thread({ name, label = name, th, bindings }) {
|
|
|
811
977
|
return () => {
|
|
812
978
|
window.removeEventListener("hashchange", onHash);
|
|
813
979
|
unfollow();
|
|
814
|
-
offActions(); offQuote();
|
|
980
|
+
offActions(); offQuote(); offCells();
|
|
815
981
|
sc.removeEventListener("scroll", onScroll);
|
|
816
982
|
ls.removeEventListener("click", thread.onClick);
|
|
817
983
|
if (mountedThreads.get(name) === owner) mountedThreads.delete(name);
|
|
@@ -832,15 +998,18 @@ function Thread({ name, label = name, th, bindings }) {
|
|
|
832
998
|
<div class="thread-host" ref=${host}></div>
|
|
833
999
|
${empty === "hidden" ? html`<${Empty} icon="chat" title=${t("chat.guestAllHidden")} hint=${t("chat.guestAllHiddenHint")} />`
|
|
834
1000
|
: empty ? html`<${Empty} icon="chat" title=${t("chat.noMessages")} />` : null}
|
|
835
|
-
</div><div class="jump-dock">${jump.show ? html`<button data-trust="thread-control" type="button" class
|
|
836
|
-
|
|
1001
|
+
</div><div class="jump-dock">${jump.show ? html`<button data-trust="thread-control" type="button" ref=${jumpIdle.ref} class=${`jump-latest${jumpIdle.idle ? " is-idle" : ""}`} onClick=${() => { const t2 = th.current; if (!t2) return; if (store.pagingState(name).detached) void store.backToLatest(name).then(() => t2.jumpLatest()); else t2.jumpLatest(); }}
|
|
1002
|
+
onFocus=${jumpIdle.onFocus} onBlur=${jumpIdle.onBlur}
|
|
1003
|
+
aria-label=${jump.unseen > 0 ? t("chat.newBelow", jump.unseen) : t("chat.jumpLatest")}>
|
|
1004
|
+
<${Icon} name="down" size=${16} /><span class="jump-text">${jump.unseen > 0 ? t("chat.newBelow", jump.unseen) : t("chat.jumpLatest")}</span>${
|
|
1005
|
+
/* The user (before 2.4.0-beta.3): no unread counts for now — a phone's round button has no badge. */ ""}</button>` : null}</div>
|
|
837
1006
|
</${Fragment}>`;
|
|
838
1007
|
}
|
|
839
1008
|
|
|
840
1009
|
// Missing optional chunks on an older server never prevent chat from loading. No shared export added.
|
|
841
1010
|
function SubagentProgress({ name }) {
|
|
842
1011
|
const [Component, setComponent] = useState(null);
|
|
843
|
-
const offered = typeof document !== "undefined" && document.body?.dataset.subagents === "1" && !guestPage()
|
|
1012
|
+
const offered = typeof document !== "undefined" && document.body?.dataset.subagents === "1" && !guestPage(); // M-3278: the public link's admin too
|
|
844
1013
|
useEffect(() => {
|
|
845
1014
|
if (!offered) return;
|
|
846
1015
|
let live = true;
|
|
@@ -854,27 +1023,185 @@ function SubagentProgress({ name }) {
|
|
|
854
1023
|
function Dock({ name, inst, lease, exec, awaiting, workingLabel, bindings, ids, focused }) {
|
|
855
1024
|
useChatTick(name, ["state"]);
|
|
856
1025
|
const s = store.state;
|
|
1026
|
+
// M-3166 (Argon 0): a phone's one line above the box — model · effort · context, or what the agent is doing — instead of
|
|
1027
|
+
// the working bar; the line under the box goes with it (its Not verified is this line's right end).
|
|
1028
|
+
const metaLine = useMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)") && !guestPage();
|
|
857
1029
|
return html`<div data-trust="composer" class="dock"><div class="dock-col">
|
|
858
1030
|
<${Prompts} name=${name} />
|
|
859
1031
|
<${SubagentProgress} name=${name} />
|
|
860
|
-
|
|
1032
|
+
<div class="composer-hit" data-composer-focus onPointerDown=${focusComposerStrip} onClick=${focusComposerStrip}>
|
|
1033
|
+
${metaLine ? html`<${ChatMetaLine} ids=${ids} name=${name} inst=${inst} lease=${lease} exec=${exec} awaiting=${awaiting} />`
|
|
1034
|
+
: html`<${WorkBar} ids=${ids} name=${name} lease=${lease} exec=${exec} awaiting=${awaiting} workingLabel=${workingLabel} />`}
|
|
861
1035
|
<${CommandCard} name=${name} lease=${lease} />
|
|
862
1036
|
<${QuickActions} name=${name} inst=${inst} lease=${lease} />
|
|
863
1037
|
${s.waking[name] ? html`<p class="send-waking" role="status">${t("chat.waking", name)}</p>` : null}
|
|
864
1038
|
<${Composer} name=${name} inst=${inst} bindings=${bindings} ids=${ids} focused=${focused} label=${composerLabel(inst, name)} lease=${lease} busy=${R().isBusy(exec)} />
|
|
865
|
-
|
|
866
|
-
class="hint" title=${t(guestPage() || !supportsInstanceFeature(inst,"commands") ? "chat.guestMore" : "chat.composerMore")}>${t(supportsInstanceFeature(inst,"commands") ? touchScreen() ? "chat.composerHintTouch" : "chat.composerHint" : touchScreen() ? "chat.nativeComposerHintTouch" : "chat.nativeComposerHint")}</span></div
|
|
867
|
-
</div></div>`;
|
|
1039
|
+
${metaLine ? null : html`<div class="composer-row" data-composer-focus>${guestPage() ? html`<span class="guest-note" data-composer-focus title=${t("chat.guestNote")}>${t("chat.guestNote")}</span>` : html`<${ComposerAuth} />`}<span
|
|
1040
|
+
class="hint" data-composer-focus title=${t(guestPage() || !supportsInstanceFeature(inst,"commands") ? "chat.guestMore" : "chat.composerMore")}>${t(supportsInstanceFeature(inst,"commands") ? touchScreen() ? "chat.composerHintTouch" : "chat.composerHint" : touchScreen() ? "chat.nativeComposerHintTouch" : "chat.nativeComposerHint")}</span></div>`}
|
|
1041
|
+
</div></div></div>`;
|
|
868
1042
|
}
|
|
869
1043
|
|
|
870
|
-
/** #2233: the public link's page — the dashboard's Sign in is refused there, so it is never offered (#2262 review). */
|
|
871
|
-
const publicLinkPage = () => typeof document !== "undefined" && !!document.body && document.body.dataset.publicLink === "1";
|
|
872
1044
|
/** #2233: a backend's "not signed in" choice offers Sign in (the module behind the session gate, loaded when asked). */
|
|
873
1045
|
function openBackendSignIn(backend) {
|
|
874
1046
|
import("./backend-signin.js").then((m) => m.openSignIn({ backend }), () => toast(t("app.loadFailed"), false));
|
|
875
1047
|
}
|
|
876
1048
|
|
|
1049
|
+
/** Reports contain plain strings; HTM escapes every title, header, cell and note. */
|
|
1050
|
+
function CommandReport({ report, command }) {
|
|
1051
|
+
const [filter, setFilter] = useState("");
|
|
1052
|
+
const [expanded, setExpanded] = useState(false);
|
|
1053
|
+
const trigger = useRef(null);
|
|
1054
|
+
const wasExpanded = useRef(false);
|
|
1055
|
+
// The inline trigger is recreated when the modal closes; restore focus after its ref is mounted.
|
|
1056
|
+
useLayoutEffect(() => {
|
|
1057
|
+
if (wasExpanded.current && !expanded) trigger.current?.focus({ preventScroll: true });
|
|
1058
|
+
wasExpanded.current = expanded;
|
|
1059
|
+
}, [expanded]);
|
|
1060
|
+
const query = filter.trim().toLocaleLowerCase();
|
|
1061
|
+
const rows = command === "status" && query
|
|
1062
|
+
? report.rows.filter(row => row.some(value => value.toLocaleLowerCase().includes(query))) : report.rows;
|
|
1063
|
+
const view = html`<section class=${`cmd-report cmd-report-${command}${expanded ? " cmd-report-expanded" : ""}`} aria-label=${report.title}>
|
|
1064
|
+
${expanded ? null : html`<h3>${report.title}</h3>`}
|
|
1065
|
+
<div class="cmd-report-tools">
|
|
1066
|
+
${command === "status" ? html`<label class="field"><span class="sr-only">${t("chat.cmdReportFilter")}</span>
|
|
1067
|
+
<input type="search" aria-label=${t("chat.cmdReportFilter")} placeholder=${t("chat.cmdReportFilter")}
|
|
1068
|
+
value=${filter} onInput=${e => setFilter(e.target.value)} /></label>` : null}
|
|
1069
|
+
${expanded ? null : html`<button type="button" class="btn btn-sm btn-ghost" ref=${trigger} data-report-expand onClick=${() => setExpanded(true)}>${t("chat.cmdReportOpen")}</button>`}
|
|
1070
|
+
</div>
|
|
1071
|
+
${command === "status" ? html`<p class="note cmd-report-count">${query ? t("chat.cmdReportMatches", rows.length, report.rows.length) : t("chat.cmdReportCount", report.rows.length)}${report.notes[0] ? " · " + report.notes[0] : ""}</p>` : null}
|
|
1072
|
+
<div class="cmd-report-body" tabIndex="0" aria-label=${report.title}>
|
|
1073
|
+
${rows.length ? html`<table class=${command === "status" ? "us-table" : "cmd-metrics"}><thead><tr>${report.columns.map(label => html`<th scope="col">${label}</th>`)}</tr></thead>
|
|
1074
|
+
<tbody>${rows.map(row => html`<tr>${row.map((value, i) => html`<td data-label=${report.columns[i]}>${value}</td>`)}</tr>`)}</tbody></table>` : query ? html`<p class="note">${t("chat.cmdReportEmpty")}</p>` : null}
|
|
1075
|
+
${(command === "status" ? report.notes.slice(1) : report.notes).map(note => html`<p class="note">${note}</p>`)}
|
|
1076
|
+
</div>
|
|
1077
|
+
</section>`;
|
|
1078
|
+
return expanded ? html`<div class="cmd-report-modal"><${Dialog} title=${report.title} wide onClose=${() => setExpanded(false)}>${view}</${Dialog}></div>` : view;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
877
1081
|
/** #1269: what the last chat command answered — its text, why it was refused, or a list to choose from. */
|
|
1082
|
+
// M-3166 PR 3: the model menu's words (kept beside their caller: a retained chat dictionary has no such words).
|
|
1083
|
+
register("modelMenu", {
|
|
1084
|
+
en: { title: "Model", effort: "Reasoning effort", loading: "Loading models…", opus: "Most capable, for complex and long work",
|
|
1085
|
+
sonnet: "Fast and capable, for everyday work", haiku: "Fastest, for simple and high-volume work", close: "Close" },
|
|
1086
|
+
"zh-TW": { title: "模型", effort: "推理強度", loading: "正在讀取模型…", opus: "最強,適合複雜、長時間的工作",
|
|
1087
|
+
sonnet: "速度與品質兼顧,適合日常工作", haiku: "最快,適合簡單、大量的工作", close: "關閉" },
|
|
1088
|
+
});
|
|
1089
|
+
const mm = (key, ...args) => t(`modelMenu.${key}`, ...args);
|
|
1090
|
+
/** Where the model control that opened the menu is (a desk anchors the menu under it); null: under the box's left end. */
|
|
1091
|
+
let modelMenuAnchor = null, modelMenuOpener = null;
|
|
1092
|
+
/** The control that opens the menu: where it sits (the menu goes by it) and itself (focus goes back to it on close, M-3192). */
|
|
1093
|
+
export function noteModelMenuAnchor(el) {
|
|
1094
|
+
try { modelMenuAnchor = el ? el.getBoundingClientRect() : null; } catch { modelMenuAnchor = null; }
|
|
1095
|
+
modelMenuOpener = el || null;
|
|
1096
|
+
}
|
|
1097
|
+
/** A model's one line: its family's (Opus / Sonnet / Haiku), else its own id when the name doesn't say it. */
|
|
1098
|
+
function modelDescription(o, name) {
|
|
1099
|
+
const s = `${o.id} ${o.label}`;
|
|
1100
|
+
const family = /\bopus\b|claude-opus/i.test(s) ? "opus" : /\bsonnet\b|claude-sonnet/i.test(s) ? "sonnet" : /\bhaiku\b|claude-haiku/i.test(s) ? "haiku" : "";
|
|
1101
|
+
if (o.disabled) return String(o.disabled);
|
|
1102
|
+
if (family) return mm(family);
|
|
1103
|
+
return o.id && o.id !== name ? o.id : "";
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* M-3166 PR 3 (the user's OK of round 2): /model as a menu. One row per model — its name and one line, ✓ on the current
|
|
1107
|
+
* one; "More models" in place; the current model's reasoning effort as one segmented row; Refresh in the head. Picking a
|
|
1108
|
+
* model or an effort runs the same commands the card ran (its result then shows as the card does). A failed Refresh says
|
|
1109
|
+
* so in the menu and keeps the list (M-2731); a refused switch (no list with it) is the card's.
|
|
1110
|
+
*/
|
|
1111
|
+
function ModelMenu({ name, c, lease }) {
|
|
1112
|
+
const narrow = useMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)");
|
|
1113
|
+
const close = () => store.dismissCommand(name);
|
|
1114
|
+
const alive = () => lease.current();
|
|
1115
|
+
const run = (args, action) => store.runCommand(name, "model", args, { alive, ...(action ? { action } : {}) });
|
|
1116
|
+
// The control that opened it is this opening's only: gone with the menu, a later typed /model is placed by the box.
|
|
1117
|
+
// M-3192: on a desk, focus goes back where it came from when the menu closes — that control, else the box (a typed /model).
|
|
1118
|
+
useEffect(() => () => {
|
|
1119
|
+
const back = modelMenuOpener;
|
|
1120
|
+
modelMenuAnchor = null; modelMenuOpener = null;
|
|
1121
|
+
if (narrow || typeof document === "undefined") return;
|
|
1122
|
+
const inMenu = !document.activeElement || document.activeElement === document.body || !!document.activeElement.closest?.(".model-menu-pop");
|
|
1123
|
+
if (!inMenu) return; // the person moved on (clicked elsewhere): leave their focus be
|
|
1124
|
+
const to = back && back.isConnected !== false ? back : document.getElementById("msgIn");
|
|
1125
|
+
try { to?.focus?.(); } catch { /* gone */ }
|
|
1126
|
+
}, []);
|
|
1127
|
+
const pop = useRef(null);
|
|
1128
|
+
// M-3192: a desk's menu takes the keyboard — focus on the model in use (else the first), ↑ ↓ Home End move between its
|
|
1129
|
+
// buttons (rows, More, the effort row), Enter picks (they are buttons), Escape closes, Tab goes on as anywhere.
|
|
1130
|
+
const items = () => [...(pop.current?.querySelectorAll(".model-menu button:not([disabled])") || [])];
|
|
1131
|
+
useEffect(() => {
|
|
1132
|
+
if (narrow || !pop.current || pop.current.contains(document.activeElement)) return;
|
|
1133
|
+
const first = pop.current.querySelector(".model-menu-row.on:not([disabled])") || items()[0];
|
|
1134
|
+
try { first?.focus?.(); } catch { /* none */ }
|
|
1135
|
+
}, [narrow, c.choices?.options?.length || 0, !!c.busy]);
|
|
1136
|
+
const onKeys = (e) => {
|
|
1137
|
+
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) return;
|
|
1138
|
+
const list = items(); if (!list.length) return;
|
|
1139
|
+
e.preventDefault();
|
|
1140
|
+
const at = list.indexOf(document.activeElement);
|
|
1141
|
+
const next = e.key === "Home" ? 0 : e.key === "End" ? list.length - 1
|
|
1142
|
+
: e.key === "ArrowDown" ? (at + 1) % list.length : (at <= 0 ? list.length - 1 : at - 1);
|
|
1143
|
+
try { list[next].focus(); } catch { /* gone */ }
|
|
1144
|
+
};
|
|
1145
|
+
const options = c.choices?.options || [], current = c.choices?.current ?? null, actions = c.choices?.actions || [];
|
|
1146
|
+
const refresh = actions.find((a) => a === "refresh" || a === "refreshAll");
|
|
1147
|
+
const cur = options.find((o) => o.id === current && o.effort);
|
|
1148
|
+
useEffect(() => {
|
|
1149
|
+
if (narrow) return undefined;
|
|
1150
|
+
const esc = (e) => { if (e.key === "Escape") { e.stopPropagation(); close(); } };
|
|
1151
|
+
document.addEventListener("keydown", esc, true);
|
|
1152
|
+
return () => document.removeEventListener("keydown", esc, true);
|
|
1153
|
+
}, [narrow]);
|
|
1154
|
+
const rows = options.filter((o) => !o.signIn).map((o) => {
|
|
1155
|
+
const label = String(o.label || o.id).replace(/^✓\s*/, ""), short = shortModelName(modelLabel(label)), on = o.id === current;
|
|
1156
|
+
const desc = modelDescription(o, short);
|
|
1157
|
+
return html`<button key=${o.id} type="button" role="menuitemradio" aria-checked=${on ? "true" : "false"} class=${`model-menu-row${on ? " on" : ""}`}
|
|
1158
|
+
disabled=${c.busy || !!o.disabled} title=${label} onClick=${() => (on ? close() : run(o.id))}>
|
|
1159
|
+
<span class="model-menu-text"><b>${short}</b>${desc ? html`<small>${desc}</small>` : null}</span>${on ? html`<${Icon} name="check" size=${18} />` : null}</button>`;
|
|
1160
|
+
});
|
|
1161
|
+
const body = html`<div class="model-menu" role="menu" aria-label=${mm("title")}>
|
|
1162
|
+
${narrow ? null : html`<div class="model-menu-head"><span>${mm("title")}</span>${refresh ? html`<button type="button" class="icon-btn" data-model-action=${refresh} title=${mw("refresh")}
|
|
1163
|
+
aria-label=${mw("refresh")} disabled=${c.busy} onClick=${() => run(c.choices.args || "", refresh)}><${Icon} name="restart" size=${16} /></button>` : null}</div>`}
|
|
1164
|
+
${c.error ? html`<p class="err model-menu-error" role="alert">${c.error}</p>` : null}
|
|
1165
|
+
${c.busy && !options.length ? html`<p class="note model-menu-loading" role="status">${mm("loading")}</p>` : rows}
|
|
1166
|
+
${actions.includes("more") ? html`<button type="button" class="model-menu-more" data-model-action="more" disabled=${c.busy} onClick=${() => run("", "more")}>${mw("more")}</button>` : null}
|
|
1167
|
+
${cur ? html`<div class="model-menu-label">${mm("effort")}</div>
|
|
1168
|
+
<div class="model-menu-seg" role="group" aria-label=${mm("effort")}>${cur.effort.levels.map((level) => html`<button key=${level} type="button"
|
|
1169
|
+
class=${level === cur.effort.current ? "on" : ""} aria-pressed=${level === cur.effort.current ? "true" : "false"} disabled=${c.busy}
|
|
1170
|
+
onClick=${() => store.runCommand(name, "effort", level, { alive })}>${effortWord(level)}</button>`)}</div>` : null}
|
|
1171
|
+
${options.some((o) => o.signIn) ? html`<div class="model-menu-signin">${options.filter((o) => o.signIn).map((o) => html`<button
|
|
1172
|
+
key=${`signin:${o.signIn}`} type="button" class="btn btn-sm btn-primary" onClick=${() => openBackendSignIn(o.signIn)}>${t("chat.cmdSignInTo", o.signIn)}</button>`)}</div>` : null}
|
|
1173
|
+
</div>`;
|
|
1174
|
+
if (narrow) return html`<${Dialog} title=${mm("title")} onClose=${close} cls="model-menu-sheet"
|
|
1175
|
+
tools=${refresh ? html`<button type="button" class="icon-btn" data-model-action=${refresh} title=${mw("refresh")} aria-label=${mw("refresh")} disabled=${c.busy}
|
|
1176
|
+
onClick=${() => run(c.choices.args || "", refresh)}><${Icon} name="restart" size=${16} /></button>` : null}>${body}</${Dialog}>`;
|
|
1177
|
+
// A desk: under the control that opened it (else above the box's left end); a click outside closes it.
|
|
1178
|
+
const place = (el) => {
|
|
1179
|
+
if (!el) return;
|
|
1180
|
+
const at = modelMenuAnchor, w = el.offsetWidth || 320;
|
|
1181
|
+
const vw = globalThis.innerWidth || 1280, vh = globalThis.innerHeight || 800; // (a test DOM has no viewport)
|
|
1182
|
+
let left, top;
|
|
1183
|
+
// M-3304 (the user, beta.11): under the control — or above it when it sits in the lower half (the composer's chip) — and
|
|
1184
|
+
// never over it: a list longer than the room there scrolls within the menu (its height capped to that room), instead
|
|
1185
|
+
// of the menu moving up over the control and the header. Its left at the control's (kept in the viewport).
|
|
1186
|
+
if (at) {
|
|
1187
|
+
const up = at.top > vh / 2, room = Math.max(160, Math.floor(up ? at.top - 6 - 8 : vh - at.bottom - 6 - 8));
|
|
1188
|
+
el.style.setProperty("max-height", `${room}px`);
|
|
1189
|
+
const h = Math.min(el.offsetHeight || 0, room);
|
|
1190
|
+
left = Math.min(Math.max(8, at.left), vw - w - 8);
|
|
1191
|
+
top = up ? Math.max(8, at.top - 6 - h) : at.bottom + 6;
|
|
1192
|
+
} else {
|
|
1193
|
+
const box = el.closest(".p-chat")?.querySelector(".composer-box")?.getBoundingClientRect();
|
|
1194
|
+
el.style.setProperty("max-height", `${Math.max(160, Math.floor((box ? box.top : vh) - 16))}px`);
|
|
1195
|
+
const h = el.offsetHeight || 0;
|
|
1196
|
+
left = box ? box.left : 16; top = box ? Math.max(8, box.top - h - 8) : 72;
|
|
1197
|
+
}
|
|
1198
|
+
el.style.setProperty("left", `${Math.round(left)}px`); el.style.setProperty("top", `${Math.round(top)}px`);
|
|
1199
|
+
};
|
|
1200
|
+
return html`<div class="model-menu-scrim" onClick=${close}></div><div class="model-menu-pop" ref=${(el) => { pop.current = el; place(el); }} onKeyDown=${onKeys}>${body}</div>`;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
const usesModelMenu = c => c?.command === "model" && (c.choices ? c.choices.step !== "backend" : c.busy && !c.error && !c.args);
|
|
1204
|
+
|
|
878
1205
|
function CommandCard({ name, lease }) {
|
|
879
1206
|
const c = store.state.commands[name];
|
|
880
1207
|
if (!c) return null;
|
|
@@ -883,6 +1210,11 @@ function CommandCard({ name, lease }) {
|
|
|
883
1210
|
const refresh = actions.find(a => a === "refresh" || a === "refreshAll");
|
|
884
1211
|
// The phone's second level: a /model option with an `effort` (its levels and the one set) opens its own list, with a way back.
|
|
885
1212
|
const [sub, setSub] = useState(null);
|
|
1213
|
+
// M-3166 PR 3 (the user's OK of round 2): /model's pick list is a menu — anchored under the model control on a desk, a
|
|
1214
|
+
// bottom sheet on a phone — not a card above the box. A failure, its result text and /backend stay the card.
|
|
1215
|
+
// The menu is /model's list: shown with its choices, or while that list loads. A model being switched to (a pick from the
|
|
1216
|
+
// menu, a typed "/model <id>") is the card's, as before (#4003 review).
|
|
1217
|
+
if (usesModelMenu(c)) return html`<${ModelMenu} name=${name} c=${c} lease=${lease} />`;
|
|
886
1218
|
const open = sub && sub.for === c.choices ? c.choices.options.find((o) => o.id === sub.id && o.effort) : null;
|
|
887
1219
|
const pickEffort = async (model, level) => {
|
|
888
1220
|
setSub(null);
|
|
@@ -896,7 +1228,7 @@ function CommandCard({ name, lease }) {
|
|
|
896
1228
|
${c.busy ? html`<span class="wait">${t("chat.cmdRunning", c.command)}</span>` : html`<button type="button" class="icon-btn" title=${t("chat.cmdDismiss")}
|
|
897
1229
|
aria-label=${t("chat.cmdDismiss")} onClick=${() => store.dismissCommand(name)}><${Icon} name="close" size=${14} /></button>`}</div></div>
|
|
898
1230
|
${c.error ? html`<p class="cmd-text">${c.error}</p>` : null}
|
|
899
|
-
${c.text ? html`<pre class="cmd-text">${c.text}</pre>` : null}
|
|
1231
|
+
${c.report ? html`<${CommandReport} report=${c.report} command=${c.command} />` : c.text ? html`<pre class="cmd-text">${c.text}</pre>` : null}
|
|
900
1232
|
${c.compact ? html`<p class="cmd-text cmd-phase">${c.compact === "running" ? t("chat.compactRunning")
|
|
901
1233
|
: c.compact === "done" ? t("chat.compactDone") : c.compact === "timeout" ? t("chat.compactTimeout", "10")
|
|
902
1234
|
: c.compact === "lost" ? t("chat.compactLost") : c.compact === "not_compacted" ? t("chat.compactNotCompacted") : t("chat.compactUnknown")}</p>` : null}
|
|
@@ -916,21 +1248,31 @@ function CommandCard({ name, lease }) {
|
|
|
916
1248
|
})}</div>` : null}
|
|
917
1249
|
${c.command === "model" && c.choices ? html`<p class="note">${mw("selectionHint")}</p>` : null}
|
|
918
1250
|
${actions.includes("more") ? html`<div class="cmd-model-more"><button type="button" class="btn btn-sm btn-ghost" data-model-action="more" disabled=${c.busy} onClick=${() => run("", "more")}>${mw("more")}</button></div>` : null}
|
|
919
|
-
${c.choices && c.choices.options.some((o) => o.signIn)
|
|
1251
|
+
${c.choices && c.choices.options.some((o) => o.signIn) ? html`<div class="cmd-choices" role="group" aria-label=${t("chat.cmdSignIn")}>${c.choices.options.filter((o) => o.signIn).map((o) => html`<button
|
|
920
1252
|
key=${`signin:${o.signIn}`} type="button" class="btn btn-sm btn-primary" onClick=${() => openBackendSignIn(o.signIn)}>${t("chat.cmdSignInTo", o.signIn)}</button>`)}</div>` : null}
|
|
921
1253
|
</div>`;
|
|
922
1254
|
}
|
|
923
1255
|
|
|
924
1256
|
/** #1269 quick actions: Compact and Clear… once the instance's context is 70% used (from the status it already has). */
|
|
1257
|
+
/** M-3115 (phone v2): a phone's context hint put away (✕) for this agent, for this tab's session. */
|
|
1258
|
+
const CTX_HINT_KEY = (name) => `agend_ctx_hint_hidden:${name}`;
|
|
1259
|
+
const ctxHintHidden = (name) => { try { return sessionStorage.getItem(CTX_HINT_KEY(name)) === "1"; } catch { return false; } };
|
|
925
1260
|
function QuickActions({ name, inst, lease }) {
|
|
1261
|
+
const [, rerender] = useState(0);
|
|
926
1262
|
const pct = inst && typeof inst.context_pct === "number" ? Math.round(inst.context_pct) : null;
|
|
927
1263
|
if (pct == null || pct < 70) return null;
|
|
1264
|
+
// M-3115: on a phone, one thin line in the status line's place (while the agent is idle) — the words, 壓縮 / 清空… as
|
|
1265
|
+
// text, and ✕ that puts it away for this session (the ring by the box still shows the %). A desk is unchanged.
|
|
1266
|
+
const line = narrowScreen() && !guestPage();
|
|
1267
|
+
if (line && ctxHintHidden(name)) return null;
|
|
928
1268
|
const busy = !!(store.state.commands[name] && store.state.commands[name].busy);
|
|
929
1269
|
const run = (command) => store.runCommand(name, command, "", { alive: () => lease.current() });
|
|
930
|
-
|
|
1270
|
+
const hide = () => { try { sessionStorage.setItem(CTX_HINT_KEY(name), "1"); } catch { /* this render only */ } rerender((n) => n + 1); };
|
|
1271
|
+
return html`<div class=${`quick-actions${line ? " qa-line" : ""}`} role="group" aria-label=${t("chat.chipContext", pct)}>
|
|
931
1272
|
<span class="qa-ctx">${t("chat.chipContext", pct)}</span>
|
|
932
1273
|
<button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => run("compact")}>${t("chat.chipCompact")}</button>
|
|
933
1274
|
<button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => run("clear")}>${t("chat.chipClear")}</button>
|
|
1275
|
+
${line ? html`<button type="button" class="btn btn-sm qa-dismiss" title=${t("chatPhone.ctxHide")} aria-label=${t("chatPhone.ctxHide")} onClick=${hide}><${Icon} name="close" size=${12} /></button>` : null}
|
|
934
1276
|
</div>`;
|
|
935
1277
|
}
|
|
936
1278
|
|
|
@@ -940,7 +1282,7 @@ function Prompts({ name }) {
|
|
|
940
1282
|
return html`<div data-trust="permission" class="prompts" aria-live="polite">${list.map(p => html`<div key=${p.nonce} class=${`prompt${p.resolved ? " done" : ""}`} role="group" aria-label=${p.text}>
|
|
941
1283
|
<div class="txt">${p.resolved ? (p.outcome || t("chat.promptGone")) : textLinkSegments(p.text, p.links).map(sg => sg.href ? html`<a data-trust="link" class="st-link" href=${sg.href}>${sg.text}</a>` : sg.text)}</div>
|
|
942
1284
|
${p.resolved ? null : html`<div class="acts">${p.actions.filter(a => !a.input).map(a => html`<button key=${a.id} type="button" class="btn" disabled=${!!p.busy} onClick=${() => store.answerPrompt(p, a.id)}>${a.label}</button>`)}
|
|
943
|
-
${p.busy ? html`<span class="wait">${t("chat.promptAnswering")}</span>` : null}</div>`}
|
|
1285
|
+
${p.busy && !p.confirming ? html`<span class="wait">${t("chat.promptAnswering")}</span>` : null}</div>`}
|
|
944
1286
|
${p.resolved ? null : p.actions.filter(a => a.input).map(a => html`<${PromptText} key=${a.id} p=${p} action=${a} />`)}</div>`)}</div>`;
|
|
945
1287
|
}
|
|
946
1288
|
|
|
@@ -960,6 +1302,40 @@ function PromptText({ p, action }) {
|
|
|
960
1302
|
* #3724: the strip is always there — idle it keeps its height and shows nothing (no button), so a state change only changes
|
|
961
1303
|
* what is inside it and never moves the thread or the composer (chat-work-bar.css fixes the height; long text stays one line).
|
|
962
1304
|
*/
|
|
1305
|
+
/**
|
|
1306
|
+
* M-3166 (Argon 0, the user's OK of round 2): a phone's meta line above the box, 26 px, 12 px text. Left: the model, its
|
|
1307
|
+
* effort and the context ("Opus 5.5 · high · 56%", which opens the model's pick list) — or, while the agent is busy, what it
|
|
1308
|
+
* is doing and for how long ("處理中 0:12 · 56%"). Right: Not verified · Authorize (and its other states) only while this
|
|
1309
|
+
* browser is not verified; while the agent works with something typed, Stop (Send sends again). Hit targets ≥ 32 px.
|
|
1310
|
+
*/
|
|
1311
|
+
function ChatMetaLine({ name, inst, lease, exec, awaiting, ids = {} }) {
|
|
1312
|
+
const s = store.state, busy = R().isBusy(exec) ? exec : "";
|
|
1313
|
+
const kind = awaiting != null ? "awaiting" : s.stopping[name] && busy ? "stopping" : busy;
|
|
1314
|
+
const [, tick] = useState(0);
|
|
1315
|
+
useEffect(() => {
|
|
1316
|
+
if (!kind || kind === "awaiting") return undefined;
|
|
1317
|
+
const h = lease.interval(() => tick((n) => n + 1), 1000);
|
|
1318
|
+
return () => lease.clear(h);
|
|
1319
|
+
}, [kind, lease]);
|
|
1320
|
+
const pct = inst?.context_pct == null ? null : Math.round(inst.context_pct);
|
|
1321
|
+
const since = s.workingSince[name];
|
|
1322
|
+
const tail = pct != null ? ` · ${pct}%` : "";
|
|
1323
|
+
const commands = supportsInstanceFeature(inst, "commands");
|
|
1324
|
+
const model = shortModelName(modelLabel(inst?.model || modelText(inst || {})));
|
|
1325
|
+
const effort = supportsInstanceFeature(inst, "effort") ? effortChip(inst || {}) : "";
|
|
1326
|
+
const doing = kind ? `${t(kind === "stuck" ? "chat.metaStuck" : kind === "stopping" ? "chat.metaStopping" : kind === "awaiting" ? "chat.metaAwaiting" : "chat.metaWorking")}${
|
|
1327
|
+
kind !== "awaiting" && since != null ? ` ${R().formatElapsed(performance.now() - since)}` : ""}` : "";
|
|
1328
|
+
const run = (command) => store.runCommand(name, command, "", { alive: () => lease.current() });
|
|
1329
|
+
const label = `${model}${effort ? ` · ${effort}` : ""}`;
|
|
1330
|
+
return html`<div class=${`chat-meta${kind ? ` busy ${kind}` : ""}`} data-trust="status" role="status" data-composer-focus>
|
|
1331
|
+
${kind ? html`<span class="chat-meta-left" data-composer-focus><span class="chat-meta-dot" data-composer-focus aria-hidden="true"></span><span data-composer-focus>${doing}${tail}</span></span>`
|
|
1332
|
+
: commands ? html`<button type="button" class="chat-meta-left chat-meta-model" title=${t("chat.chipModel", label)} aria-label=${t("chat.chipModel", label)}
|
|
1333
|
+
onClick=${() => (inst?.runtime === "windows" ? navigate(sectionPath("agents")) : run("model"))}><span>${label}${tail}</span><span class="chev" aria-hidden="true">⌄</span></button>`
|
|
1334
|
+
: html`<span class="chat-meta-left" data-composer-focus><span data-composer-focus>${label}${tail}</span></span>`}
|
|
1335
|
+
<span class="chat-meta-right" data-composer-focus>${busy ? html`<button type="button" id=${ids.stopBtn || "stopBtn"} class="chat-meta-stop btn-stop" disabled=${!!s.cancelling[name]} title=${t("chat.stopReplyTitle")}
|
|
1336
|
+
onClick=${() => store.cancelReply(name)}>${t("chat.stopReply")}</button>` : null}<${ComposerAuth} /></span>
|
|
1337
|
+
</div>`;
|
|
1338
|
+
}
|
|
963
1339
|
function WorkBar({ name, lease, exec, awaiting, workingLabel, ids }) {
|
|
964
1340
|
const s = store.state;
|
|
965
1341
|
const busy = R().isBusy(exec) ? exec : "";
|
|
@@ -970,7 +1346,7 @@ function WorkBar({ name, lease, exec, awaiting, workingLabel, ids }) {
|
|
|
970
1346
|
const h = lease.interval(() => tick(n => n + 1), 1000); // ticks only while it shows, cleared with the lease
|
|
971
1347
|
return () => lease.clear(h);
|
|
972
1348
|
}, [kind, lease]);
|
|
973
|
-
if (!kind) return html`<div class="work-bar idle" aria-hidden="true"></div>`;
|
|
1349
|
+
if (!kind) return html`<div class="work-bar idle" data-composer-focus aria-hidden="true"></div>`;
|
|
974
1350
|
// #1629: the agent's own working label (its theme), shown as text — only for "working", never for the other states.
|
|
975
1351
|
const label = kind === "working" && workingLabel ? workingLabel
|
|
976
1352
|
: t(kind === "stuck" ? "chat.stuck" : kind === "stopping" ? "chat.stopping" : kind === "awaiting" ? "chat.awaiting" : "chat.working", name);
|
|
@@ -998,6 +1374,13 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
998
1374
|
const files = s.pendingFiles[name] || [];
|
|
999
1375
|
const reply = s.replies[name]; // #2272: the message this one will reply to
|
|
1000
1376
|
const content = !!value.trim() || files.length > 0;
|
|
1377
|
+
// M-3115 (phone v2): one row — the box, the context ring and the model picker beside it — and, while the agent works
|
|
1378
|
+
// with nothing typed, Send is Stop (typed: Send again, and Stop is the status line's).
|
|
1379
|
+
// M-3167: both read live, so a window resized across them redraws (read once, a phone's ring and picker stayed on a
|
|
1380
|
+
// desk, unstyled). Between the phone's width and a wide desk the composer has the ring and a short model chip too.
|
|
1381
|
+
const narrow = useMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)"), toolsHere = useMedia(COMPOSER_TOOLS_Q);
|
|
1382
|
+
const phone = narrow && !guestPage();
|
|
1383
|
+
const stopNow = phone && busy && !content;
|
|
1001
1384
|
// A file waiting: what goes is a message with its file, never a command (no palette, no command line). #2855: a guest's
|
|
1002
1385
|
// palette offers only what it may run on this agent — the table's "anyone" commands (its status frame's `commands`).
|
|
1003
1386
|
const guest = guestPage();
|
|
@@ -1013,6 +1396,48 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1013
1396
|
useEffect(() => { if (focused && input.current) input.current.focus(); }, [name]);
|
|
1014
1397
|
useEffect(() => { refreshTourSpot(); });
|
|
1015
1398
|
const setValue = (v) => { store.setDraft(name, v); setSel(0); tick(n => n + 1); };
|
|
1399
|
+
// A `#` at the caret offers the task cards (what the board has: its number, title, status); Enter or Tab put the
|
|
1400
|
+
// number in, Esc closes the list, the arrow keys choose. The caret is read from the box as the page draws (a key that only
|
|
1401
|
+
// moves it redraws: the box's keyup and click, below). Not for a guest (no board), a command line, or an IME still composing.
|
|
1402
|
+
const [refSel, setRefSel] = useState(0);
|
|
1403
|
+
const [refItems, setRefItems] = useState([]);
|
|
1404
|
+
const [refClosed, setRefClosed] = useState(null); // the draft the list was closed on (Esc); it opens again on change
|
|
1405
|
+
const refCaret = useRef(null); // where the caret goes once a chosen number is in the box
|
|
1406
|
+
const box = input.current;
|
|
1407
|
+
// While a chosen number is on its way into the box the caret is where it will be (the box still has the old text's caret until the page has drawn it).
|
|
1408
|
+
const caret = refCaret.current !== null ? refCaret.current : box && typeof box.selectionStart === "number" ? box.selectionStart : value.length;
|
|
1409
|
+
const refAt = taskRefIndex && !guest && !bindings.composing ? taskRefAt(value, caret) : null;
|
|
1410
|
+
const refKey = refAt ? `${refAt.start}:${refAt.query}` : "";
|
|
1411
|
+
const refOpen = !!refAt && refClosed !== value && refItems.length > 0;
|
|
1412
|
+
const refPick = Math.min(refSel, Math.max(refItems.length - 1, 0));
|
|
1413
|
+
useEffect(() => {
|
|
1414
|
+
if (!refAt) { setRefItems((x) => (x.length ? [] : x)); return undefined; }
|
|
1415
|
+
let live = true;
|
|
1416
|
+
const timer = setTimeout(() => { taskRefIndex.suggest(refAt.query).then((items) => { if (live) { setRefItems(items); setRefSel(0); } }); }, refAt.query ? 120 : 0);
|
|
1417
|
+
return () => { live = false; clearTimeout(timer); };
|
|
1418
|
+
}, [refKey]);
|
|
1419
|
+
useEffect(() => {
|
|
1420
|
+
const el = input.current;
|
|
1421
|
+
if (!el || !taskRefIndex || guest || typeof el.addEventListener !== "function") return undefined;
|
|
1422
|
+
const moved = (e) => { if (e.type === "click" || /^(Arrow(Left|Right)|Home|End)$/.test(String(e.key || ""))) tick((n) => n + 1); };
|
|
1423
|
+
el.addEventListener("keyup", moved); el.addEventListener("click", moved);
|
|
1424
|
+
return () => { el.removeEventListener("keyup", moved); el.removeEventListener("click", moved); };
|
|
1425
|
+
}, [input.current]);
|
|
1426
|
+
useEffect(() => { // after a chosen number is in the box, the caret goes behind it
|
|
1427
|
+
const c = refCaret.current;
|
|
1428
|
+
if (c === null) return;
|
|
1429
|
+
refCaret.current = null;
|
|
1430
|
+
const el = input.current;
|
|
1431
|
+
if (el) try { el.focus(); el.setSelectionRange(c, c); } catch { /* no selection API */ }
|
|
1432
|
+
});
|
|
1433
|
+
// Task rows keep their own interaction; only exact marked background surfaces opt into strip focus.
|
|
1434
|
+
const chooseRef = (v) => {
|
|
1435
|
+
if (!v || !refAt) return;
|
|
1436
|
+
recordEdit(input.current); // #2342: a step Ctrl+Z goes back from
|
|
1437
|
+
const r = insertTaskRef(value, refAt, caret, v.code);
|
|
1438
|
+
refCaret.current = r.caret;
|
|
1439
|
+
setValue(r.text);
|
|
1440
|
+
};
|
|
1016
1441
|
// #1269: a command line runs the command (POST /ui/command); anything else — "/" included — is sent as before.
|
|
1017
1442
|
// The draft is consumed only by a command that starts: one still out keeps the new line in the composer (#1476 review).
|
|
1018
1443
|
const runLine = (cmd) => {
|
|
@@ -1044,6 +1469,12 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1044
1469
|
store.send(name);
|
|
1045
1470
|
};
|
|
1046
1471
|
const onKeyDown = (e) => {
|
|
1472
|
+
if (refOpen) {
|
|
1473
|
+
if (e.key === "ArrowDown" || e.key === "ArrowUp") { e.preventDefault(); setRefSel((n) => (Math.min(n, refItems.length - 1) + (e.key === "ArrowDown" ? 1 : refItems.length - 1)) % refItems.length); return; }
|
|
1474
|
+
// On a touch screen Enter is a new line (the list is tapped); anywhere else it, and Tab, put the highlighted card in.
|
|
1475
|
+
if (((e.key === "Enter" && !touchScreen()) || e.key === "Tab") && !e.shiftKey && !e.ctrlKey && !e.metaKey && !e.isComposing) { e.preventDefault(); chooseRef(refItems[refPick]); return; }
|
|
1476
|
+
if (e.key === "Escape" && !e.isComposing) { e.preventDefault(); setRefClosed(value); return; }
|
|
1477
|
+
}
|
|
1047
1478
|
if (palette && palette.length && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
|
|
1048
1479
|
e.preventDefault();
|
|
1049
1480
|
setSel((n) => (Math.min(n, palette.length - 1) + (e.key === "ArrowDown" ? 1 : palette.length - 1)) % palette.length);
|
|
@@ -1063,18 +1494,22 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1063
1494
|
};
|
|
1064
1495
|
const paletteId = ids.cmdPalette || "cmdPalette";
|
|
1065
1496
|
const optId = (c) => ids.cmdPalette ? `${ids.cmdPalette}-${c.name}` : `cmd-${c.name}`;
|
|
1066
|
-
|
|
1497
|
+
const refListId = `${paletteId}-tasks`, refOptId = (v) => `${refListId}-${v.code}`;
|
|
1498
|
+
return html`<div class="composer-box" data-composer-focus ref=${bindings.box}>
|
|
1067
1499
|
${machineUnavailable ? html`<p class="note runtime-machine-unavailable" role="status">${t(inst.machine_status === "revoked" ? "chat.machineRevokedHint" : "chat.machineUnavailable",machineName(inst.machine_id,inst.machine_name))}</p>` : null}
|
|
1068
1500
|
${inst?.native_busy && !busy && !inst?.native_blocked ? html`<p class="note" role="status">${t("chat.nativeBusy")}</p>` : null}
|
|
1069
|
-
${!guestPage() && supportsInstanceFeature(inst,"commands") ? html`<div class="model-entry-row" role="group" aria-label=${mw("model")}>
|
|
1070
|
-
<button type="button" class="btn btn-sm" onClick=${() => inst?.runtime === "windows" ? navigate(sectionPath("agents")) : store.runCommand(name, "backend", "", { alive: () => lease.current() })}>${backendLabel(inst?.backend)} ▾</button>
|
|
1071
|
-
<button type="button" class="btn btn-sm" onClick=${() => store.runCommand(name, "model", "", { alive: () => lease.current() })}>${modelLabel(inst?.model || modelText(inst || {}))} ▾</button></div>` : null}
|
|
1072
1501
|
${palette ? html`<ul data-trust="palette" class="cmd-palette" id=${paletteId} role="listbox" aria-label=${t("chat.cmdCommands")}>
|
|
1073
1502
|
${palette.length ? palette.map((c) => html`<li key=${c.name} id=${optId(c)} role="option" aria-selected=${c === pick ? "true" : "false"}
|
|
1074
1503
|
class=${c === pick ? "on" : ""} onMouseDown=${(e) => { e.preventDefault(); complete(c); }}>
|
|
1075
1504
|
<span class="cmd-name mono">/${c.name}${c.arg ? html` <span class="cmd-arg">${c.arg}</span>` : null}</span><span class="cmd-desc">${t(`chat.cmd_${c.name}`)}</span></li>`)
|
|
1076
1505
|
: html`<li class="cmd-none" role="option" aria-selected="false">${t(guest ? "chat.cmdNotGuests" : "chat.cmdNotCommand")}</li>`}
|
|
1077
1506
|
</ul>` : null}
|
|
1507
|
+
${refOpen ? html`<ul data-trust="palette" class="cmd-palette task-ref-list" id=${refListId} role="listbox" aria-label=${t("taskref.pickHint")}>
|
|
1508
|
+
${refItems.map((v, i) => html`<li key=${v.code} id=${refOptId(v)} role="option" tabindex="-1" aria-selected=${i === refPick ? "true" : "false"}
|
|
1509
|
+
class=${i === refPick ? "on" : ""} onMouseDown=${(e) => { e.preventDefault(); chooseRef(v); }}>
|
|
1510
|
+
<span class="cmd-name mono">${v.code}</span><span class="cmd-desc">${v.title}</span>
|
|
1511
|
+
<span class=${`tb-pill st-${v.status}`}>${t(`taskref.s.${v.status}`)}</span></li>`)}
|
|
1512
|
+
</ul>` : null}
|
|
1078
1513
|
${reply ? html`<div class="reply-bar" data-trust="composer" role="status">
|
|
1079
1514
|
<span class="reply-mark" aria-hidden="true"><svg class="icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H11"/></svg></span><span class="reply-label">${t("chat.replyingTo", reply.sender)}</span>
|
|
1080
1515
|
<span class="reply-text">${replySnippet(reply)}</span>
|
|
@@ -1082,13 +1517,37 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1082
1517
|
</div>` : null}
|
|
1083
1518
|
${files.length ? html`<div class="pending-files">${files.map((f, i) => html`<${FileChip} bindings=${bindings} key=${`${f.name}-${i}`} f=${f} i=${i} name=${name} />`)}</div>` : null}
|
|
1084
1519
|
<${ComposerInput} inputRef=${input} ids=${ids} value=${value} placeholder=${t("chat.composerPlaceholder", label)} onValue=${setValue}
|
|
1085
|
-
onKeyDown=${onKeyDown} onPaste=${onPaste} controls=${palette ? paletteId : undefined} expanded=${!!palette
|
|
1520
|
+
onKeyDown=${onKeyDown} onPaste=${onPaste} controls=${palette ? paletteId : refOpen ? refListId : undefined} expanded=${!!palette || refOpen}
|
|
1521
|
+
activeDescendant=${pick ? optId(pick) : refOpen ? refOptId(refItems[refPick]) : undefined}
|
|
1086
1522
|
attach=${attachmentsSupported ? { title: t("chat.attachTitle"), onFiles: (list) => store.addFiles(name, list) } : null}
|
|
1087
1523
|
stop=${HIDDEN_STOP}
|
|
1088
|
-
|
|
1524
|
+
tools=${toolsHere && !narrow && !guestPage() ? html`<${ComposerTools} name=${name} inst=${inst} lease=${lease} short=${true} />` : null}
|
|
1525
|
+
send=${stopNow ? { hidden: false, stop: true, disabled: !!s.cancelling[name], label: t("chat.stopReply"), title: t("chat.stopReplyTitle"), onClick: () => store.cancelReply(name) }
|
|
1526
|
+
: { hidden: false, disabled: !content || sendingBlocked, label: t("chat.send"), onClick: submit }} />
|
|
1089
1527
|
</div>`;
|
|
1090
1528
|
}
|
|
1091
1529
|
|
|
1530
|
+
/**
|
|
1531
|
+
* M-3115 (phone v2): beside the box — the context's ring (from 50%; amber from 70%: /ctx, its use, model and effort) and
|
|
1532
|
+
* one picker for the model and its effort (/model: a phone's list opens each model's efforts) that shows the model (its
|
|
1533
|
+
* name says the effort too; the row leaves the box its room). The backend stays in
|
|
1534
|
+
* Details. The ring's fill is painted through the CSSOM (no inline style attribute under the page's CSP).
|
|
1535
|
+
*/
|
|
1536
|
+
function ComposerTools({ name, inst, lease, short = false }) {
|
|
1537
|
+
const run = (command) => store.runCommand(name, command, "", { alive: () => lease.current() });
|
|
1538
|
+
const pct = inst?.context_pct == null ? null : Math.round(inst.context_pct);
|
|
1539
|
+
const effort = supportsInstanceFeature(inst, "effort") && effortChip(inst) ? effortWord(effortChip(inst)) : null;
|
|
1540
|
+
const full = modelLabel(inst?.model || modelText(inst || {}));
|
|
1541
|
+
const model = short ? shortModelName(full) : full;
|
|
1542
|
+
const pickLabel = effort ? `${full} · ${effort}` : full; // the whole name is its title and accessible name
|
|
1543
|
+
return html`<span class="composer-tools">
|
|
1544
|
+
${pct != null && pct >= 50 ? html`<button type="button" class=${`ctx-ring${pct >= 70 ? " warn" : ""}`} ref=${(el) => el?.style?.setProperty("--pct", String(pct))}
|
|
1545
|
+
title=${t("chat.chipContext", pct)} aria-label=${t("chat.chipContext", pct)} onClick=${() => run("ctx")}><span class="ctx-dial" aria-hidden="true"><span class="ctx-pct">${pct}</span></span></button>` : null}
|
|
1546
|
+
${supportsInstanceFeature(inst, "commands") ? html`<button type="button" class="composer-pick" title=${t("chat.chipModel", pickLabel)} aria-label=${t("chat.chipModel", pickLabel)}
|
|
1547
|
+
onClick=${(e) => { if (inst?.runtime === "windows") navigate(sectionPath("agents")); else { noteModelMenuAnchor(e.currentTarget); run("model"); } }}><b>${model}</b><span class="chev" aria-hidden="true">⌄</span></button>` : null}
|
|
1548
|
+
</span>`;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1092
1551
|
function FileChip({ f, i, name, bindings }) {
|
|
1093
1552
|
const img = useRef(null);
|
|
1094
1553
|
const isImage = /^image\//.test(f.type) && typeof URL.createObjectURL === "function";
|
|
@@ -1107,7 +1566,7 @@ function FileChip({ f, i, name, bindings }) {
|
|
|
1107
1566
|
|
|
1108
1567
|
// ── Dialogs ──
|
|
1109
1568
|
|
|
1110
|
-
function DeleteDialog({ name, inst, onClose }) {
|
|
1569
|
+
function DeleteDialog({ name, inst, onClose, onDeleted = () => navigate("/ui") }) {
|
|
1111
1570
|
// The dialog's own lease: it ends when the dialog goes (closed, or the chat left for another page). The delete
|
|
1112
1571
|
// may still finish on the server, and says so, but a dialog that is gone never closes or navigates the page the
|
|
1113
1572
|
// person is on now (#1425 review).
|
|
@@ -1134,7 +1593,7 @@ function DeleteDialog({ name, inst, onClose }) {
|
|
|
1134
1593
|
if (handedOver || !lease.current()) return;
|
|
1135
1594
|
setBusy(false);
|
|
1136
1595
|
onClose();
|
|
1137
|
-
|
|
1596
|
+
onDeleted();
|
|
1138
1597
|
}
|
|
1139
1598
|
return html`<${Dialog} title=${t("chat.deleteTitle", name)} onClose=${onClose} busy=${busy}
|
|
1140
1599
|
actions=${html`<button type="button" class="btn" onClick=${onClose} disabled=${busy}>${t("chat.cancel")}</button>
|
|
@@ -1146,3 +1605,44 @@ function DeleteDialog({ name, inst, onClose }) {
|
|
|
1146
1605
|
</${Dialog}>`;
|
|
1147
1606
|
}
|
|
1148
1607
|
ChatPanel.workspaceVersion = 1;
|
|
1608
|
+
|
|
1609
|
+
/** Session-only injection: public InstanceNav never imports this module. */
|
|
1610
|
+
export function SidebarChatMenu({ inst, context, onClose, favorite = null }) {
|
|
1611
|
+
const name = inst.name || inst.instance_name, lease = useLease(`sidebar-menu:${name}`);
|
|
1612
|
+
const [phase, setPhase] = useState("menu");
|
|
1613
|
+
const [, redraw] = useState(0);
|
|
1614
|
+
const wide = useStore(chatWide).on;
|
|
1615
|
+
useStore(themesStore); useStore(activityInfoStore); useStore(activityPrefs);
|
|
1616
|
+
const auth = useWebAuthorization(), card = useCard(name, inst.card_v);
|
|
1617
|
+
const pinCount = usePins(name).pins?.length || 0;
|
|
1618
|
+
useEffect(() => store?.subscribe(target => { if (target === name) redraw(n => n + 1); }), [name]);
|
|
1619
|
+
useEffect(() => {
|
|
1620
|
+
if (phase !== "menu" || !activityShown() || activityInfo(name)?.level !== undefined) return;
|
|
1621
|
+
const feed = observeActivity(name, { changed: () => feed.stop(), wantThinking: () => activityPrefs.get().thinking });
|
|
1622
|
+
feed.start(); return () => feed.stop();
|
|
1623
|
+
}, [name, phase, activityPrefs.get().on]);
|
|
1624
|
+
const command = store?.state.commands[name];
|
|
1625
|
+
useEffect(() => { if ((phase === "command" && !command) || (phase === "card" && !card)) setPhase(null); }, [phase, command, card]);
|
|
1626
|
+
useEffect(() => { if (!phase) onClose(); }, [phase]);
|
|
1627
|
+
const items = chatAgentMenuItems({ name, inst, wide, pinCount, onPins: () => setPhase("pins"), onDelete: () => setPhase("delete") });
|
|
1628
|
+
const run = command => { setPhase("command"); void store.runCommand(name, command, "", { alive: () => lease.current() && !guestPage() }); };
|
|
1629
|
+
const dismiss = () => setPhase(null);
|
|
1630
|
+
const chat = { card: !!card, onCard: () => setPhase("card"),
|
|
1631
|
+
...(supportsInstanceFeature(inst, "commands") ? { onModel: () => run("model"),
|
|
1632
|
+
modelText: `${shortModelName(modelLabel(inst.model || modelText(inst)))}${supportsInstanceFeature(inst, "effort") && effortChip(inst) ? ` · ${effortChip(inst)}` : ""}`,
|
|
1633
|
+
onBackend: () => inst.runtime === "windows" ? navigate(sectionPath("agents")) : run("backend"), backendText: backendLabel(inst.backend) } : {}) };
|
|
1634
|
+
return html`${phase === "menu" ? narrowScreen()
|
|
1635
|
+
? html`<${AgentSheet} name=${name} inst=${inst} current="chat" items=${items} extra=${[favorite, items.find(item => item?.key === "splitChat")].filter(Boolean)} chat=${chat} targetLabel=${inst.display_name || name}
|
|
1636
|
+
verifiedUntil=${auth.st?.state === "verified" ? auth.st.until : null} onUsage=${() => setPhase("usage")} onClose=${dismiss} />`
|
|
1637
|
+
: html`<${Menu} cls="agent-menu" fit=${true} topLayer=${true} ownerKey=${name} context=${{...context, onClose: dismiss}} items=${[favorite, ...items]} label=${t("agentRow.actions", inst.display_name || name)} />` : null}
|
|
1638
|
+
${phase === "delete" ? html`<${DeleteDialog} name=${name} inst=${inst} onClose=${dismiss}
|
|
1639
|
+
onDeleted=${() => { if (navStore.get().route?.instance === name) navigate("/ui"); }} />` : null}
|
|
1640
|
+
${phase === "pins" ? html`<${PinsDialog} name=${name} onClose=${dismiss} onJump=${pin => { dismiss(); navigate(`${chatPath(name)}#m=${encodeURIComponent(pin.key)}`); }} />` : null}
|
|
1641
|
+
${phase === "usage" ? html`<${UsageDialog} owner=${`chat:${name}`} onClose=${dismiss} />` : null}
|
|
1642
|
+
${phase === "card" && card ? html`<${Dialog} title=${t("card.label", inst.display_name || name)} onClose=${dismiss}><${IdentityCard} name=${name} card=${card} compact=${true} /></${Dialog}>` : null}
|
|
1643
|
+
${phase === "command" && command ? usesModelMenu(command)
|
|
1644
|
+
? html`<${CommandCard} name=${name} lease=${lease} />`
|
|
1645
|
+
: html`<${Dialog} title=${inst.display_name || name} onClose=${() => { store.dismissCommand(name); dismiss(); }}><${CommandCard} name=${name} lease=${lease} /></${Dialog}>` : null}`;
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
SidebarChatMenu.contextVersion = Menu.contextVersion === 1 && AgentSheet.sidebarTargetVersion === 1 ? 1 : 0;
|