@songsid/agend 2.4.0-alpha.4 → 2.4.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-cli-instructions.md +4 -1
- package/dist/agent-cli.js +14 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +3 -1
- package/dist/agent-endpoint.js +15 -3
- package/dist/agent-endpoint.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 +1 -1
- 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/auth-api.d.ts +8 -0
- package/dist/auth-api.js +40 -1
- 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-code.js +20 -5
- package/dist/backend/claude-code.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.d.ts +6 -4
- package/dist/backend/codex.js +26 -9
- 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 +1 -1
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.js +4 -4
- 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 +2 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +22 -0
- package/dist/backend-availability.js +71 -2
- package/dist/backend-availability.js.map +1 -1
- package/dist/backend-signin-guide.js +1 -1
- package/dist/backend-signin-guide.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 +3 -0
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-server.js +10 -1
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.js +9 -1
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/tool-router.js +9 -2
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/channel/types.d.ts +10 -0
- package/dist/classic-channel-manager.d.ts +1 -1
- package/dist/classic-channel-manager.js +1 -1
- package/dist/cli-audited.js +14 -13
- 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/config-validator.js +18 -1
- package/dist/config-validator.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/daemon.d.ts +64 -2
- package/dist/daemon.js +397 -31
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +2 -0
- package/dist/delivery-consumed-watch.js +4 -1
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/dispatcher-liveness.d.ts +51 -1
- package/dist/dispatcher-liveness.js +92 -2
- package/dist/dispatcher-liveness.js.map +1 -1
- package/dist/event-log.d.ts +1 -1
- package/dist/event-log.js +1 -1
- package/dist/fleet-manager.d.ts +222 -6
- package/dist/fleet-manager.js +1271 -100
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.js +4 -2
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +19 -3
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +10 -0
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +18 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +331 -29
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +118 -26
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +2 -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/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 +2 -0
- package/dist/hub/audit/index.js +8 -0
- 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 +8 -5
- package/dist/hub/catalog.js +53 -20
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +13 -0
- package/dist/hub/client.js +85 -11
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +22 -0
- package/dist/hub/compose/member.js +233 -18
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +14 -0
- package/dist/hub/compose/server.js +110 -11
- package/dist/hub/compose/server.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 +1 -0
- package/dist/hub/execution/service.js +1 -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/grant-access.js +23 -3
- package/dist/hub/grant-access.js.map +1 -1
- package/dist/hub/grant-search.js +13 -1
- package/dist/hub/grant-search.js.map +1 -1
- 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 +41 -4
- 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 +2 -0
- package/dist/hub/http/compose.js +437 -32
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.js +27 -0
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +15 -0
- package/dist/hub/http/schema.js +21 -1
- package/dist/hub/http/schema.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 +1 -1
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/join/store.d.ts +5 -0
- package/dist/hub/join/store.js +12 -2
- package/dist/hub/join/store.js.map +1 -1
- 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 +176 -0
- package/dist/hub/mcp/tools.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 +6 -0
- package/dist/hub/member/exposure-api.js +13 -6
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/exposures.d.ts +4 -0
- package/dist/hub/member/exposures.js +20 -0
- 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 +65 -5
- package/dist/hub/member/room-ask.js +269 -24
- package/dist/hub/member/room-ask.js.map +1 -1
- 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 +103 -0
- package/dist/hub/member/room-post.js +231 -0
- package/dist/hub/member/room-post.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/person-prefs.d.ts +22 -0
- package/dist/hub/person-prefs.js +34 -0
- package/dist/hub/person-prefs.js.map +1 -0
- package/dist/hub/personal/owner-host.d.ts +140 -0
- package/dist/hub/personal/owner-host.js +287 -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 +1 -1
- package/dist/hub/policy.js +2 -0
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +701 -1
- package/dist/hub/protocol.js +103 -14
- 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 +5 -0
- package/dist/hub/representative.js +6 -1
- 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 +2 -0
- package/dist/hub/roles/cutover-inventory.js +8 -1
- package/dist/hub/roles/cutover-inventory.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-context-model.d.ts +43 -0
- package/dist/hub/room-context-model.js +12 -0
- package/dist/hub/room-context-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 +44 -10
- package/dist/hub/rooms/agents.js +277 -30
- 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/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 +6 -2
- package/dist/hub/rooms/direct-view.js +3 -3
- package/dist/hub/rooms/direct-view.js.map +1 -1
- 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/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/schema.d.ts +9 -0
- package/dist/hub/rooms/schema.js +43 -0
- package/dist/hub/rooms/schema.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +163 -4
- package/dist/hub/rooms/service.js +796 -26
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +29 -3
- package/dist/hub/rooms.d.ts +12 -2
- package/dist/hub/rooms.js +88 -18
- 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 +93 -7
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/session-directory-transition.d.ts +2 -1
- package/dist/hub/session-directory-transition.js +10 -3
- package/dist/hub/session-directory-transition.js.map +1 -1
- package/dist/hub/sessions.d.ts +1 -1
- package/dist/hub/sessions.js +26 -4
- 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-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/settings-member-address-decision.js +3 -1
- package/dist/hub/settings-member-address-decision.js.map +1 -1
- package/dist/hub/settings-member-address-http.js +3 -2
- package/dist/hub/settings-member-address-http.js.map +1 -1
- package/dist/hub/settings-member-address-policy.d.ts +3 -2
- package/dist/hub/settings-member-address-policy.js +3 -1
- package/dist/hub/settings-member-address-policy.js.map +1 -1
- package/dist/hub/settings-web-address-decision.js +3 -1
- package/dist/hub/settings-web-address-decision.js.map +1 -1
- package/dist/hub/settings-web-address-http.js +3 -2
- package/dist/hub/settings-web-address-http.js.map +1 -1
- package/dist/hub/settings-web-address-policy.d.ts +3 -2
- package/dist/hub/settings-web-address-policy.js +3 -1
- package/dist/hub/settings-web-address-policy.js.map +1 -1
- 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/grant-schema.d.ts +2 -0
- package/dist/hub/teams/grant-schema.js +13 -0
- package/dist/hub/teams/grant-schema.js.map +1 -0
- package/dist/hub/teams/index.d.ts +12 -0
- package/dist/hub/teams/index.js +348 -0
- package/dist/hub/teams/index.js.map +1 -0
- package/dist/hub/teams/store.d.ts +38 -0
- package/dist/hub/teams/store.js +80 -0
- package/dist/hub/teams/store.js.map +1 -0
- package/dist/hub/teams/types.d.ts +76 -2
- package/dist/hub/types.d.ts +162 -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-pairing-summary.d.ts +1 -1
- package/dist/hub-pilot-trust-settings.d.ts +1 -1
- package/dist/hub-pilot-trust-settings.js +2 -2
- package/dist/hub-pilot-trust-settings.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-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 +3 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instructions.js +3 -0
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +139 -24
- package/dist/locale.js.map +1 -1
- package/dist/login-controller.d.ts +19 -2
- package/dist/login-controller.js +26 -8
- package/dist/login-controller.js.map +1 -1
- package/dist/native-mcp.js +7 -5
- 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/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.d.ts +14 -4
- package/dist/outbound-handlers.js +54 -1
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +17 -0
- package/dist/outbound-schemas.js +14 -0
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-port.d.ts +2 -0
- package/dist/public-web-gateway.js +152 -4
- package/dist/public-web-gateway.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/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/runtime-api.js +10 -2
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.js +1 -0
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-install.js +13 -10
- 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-native.js +3 -1
- 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/settings-api.d.ts +15 -0
- package/dist/settings-api.js +210 -76
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +32 -5
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +13 -2
- 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/setup-form.js +10 -0
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-i18n.js +2 -2
- package/dist/setup-i18n.js.map +1 -1
- package/dist/subagent-records.js +53 -11
- package/dist/subagent-records.js.map +1 -1
- package/dist/subagent-service.js +3 -1
- package/dist/subagent-service.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 +3 -0
- 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/transcript-needles.d.ts +4 -2
- package/dist/transcript-needles.js +35 -4
- package/dist/transcript-needles.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 +12 -2
- package/dist/ui/backend-signin.js +91 -22
- package/dist/ui/chat-activity-groups.js +41 -8
- package/dist/ui/chat-activity.js +5 -3
- 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-store.js +143 -7
- package/dist/ui/chat-tour.js +1 -1
- package/dist/ui/chat-workspace.js +3 -3
- package/dist/ui/fleet-canvas.js +14 -5
- package/dist/ui/fleet-office-carousel.d.ts +14 -0
- package/dist/ui/fleet-office-carousel.js +95 -0
- package/dist/ui/fleet-office-editor.js +6 -1
- package/dist/ui/fleet-office-model.js +2 -1
- package/dist/ui/fleet-office-skin.js +1 -1
- package/dist/ui/fleet-office-store.js +14 -2
- package/dist/ui/fleet-office-zones.js +50 -9
- package/dist/ui/fleet-office.js +203 -24
- package/dist/ui/fleet-tasks.js +1 -1
- package/dist/ui/host-install.js +5 -2
- 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 +6 -2
- package/dist/ui/hub-ai-apps-strings.js +6 -0
- package/dist/ui/hub-ai-apps.js +83 -0
- package/dist/ui/hub-chat-strings.js +7 -0
- package/dist/ui/hub-client.js +89 -10
- 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 +7 -32
- package/dist/ui/hub-group-policy.js +26 -13
- package/dist/ui/hub-group-strings.js +29 -20
- package/dist/ui/hub-join-steps.js +27 -15
- package/dist/ui/hub-owner-strings.js +2 -2
- package/dist/ui/hub-personal-agent-strings.js +246 -0
- package/dist/ui/hub-personal-agent.js +117 -0
- package/dist/ui/hub-policy-subjects.js +35 -0
- package/dist/ui/hub-quick-pairing.js +7 -2
- 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 +439 -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 +30 -11
- package/dist/ui/hub-room-favorites.js +63 -5
- package/dist/ui/hub-room-list.js +4 -3
- package/dist/ui/hub-room-members-strings.js +2 -2
- package/dist/ui/hub-room-members.js +7 -4
- package/dist/ui/hub-room-notify.js +161 -0
- package/dist/ui/hub-room-search.js +126 -0
- package/dist/ui/hub-room-settings.js +6 -0
- package/dist/ui/hub-room-source-strings.js +17 -0
- package/dist/ui/hub-room-source.js +34 -0
- package/dist/ui/hub-room-strings.js +49 -1
- package/dist/ui/hub-room-thread.js +300 -49
- package/dist/ui/hub-room-unread.js +2 -1
- package/dist/ui/hub-strings.js +10 -0
- package/dist/ui/hub-subject-picker.js +58 -0
- package/dist/ui/hub-switcher.js +2 -2
- package/dist/ui/hub-teams-strings.js +38 -0
- package/dist/ui/hub-teams.js +197 -0
- 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/model-picker.js +4 -1
- package/dist/ui/notice-hub-update.js +94 -0
- package/dist/ui/office-share-dialog.js +2 -2
- package/dist/ui/panel-chat.js +327 -28
- package/dist/ui/panel-details.js +3 -1
- package/dist/ui/panel-fleet.js +28 -7
- package/dist/ui/panel-hub.js +316 -105
- package/dist/ui/panel-log.js +4 -4
- package/dist/ui/panel-notices.js +3 -1
- package/dist/ui/panel-settings.js +45 -34
- package/dist/ui/preview-panel.js +3 -1
- package/dist/ui/reply-file-preview.js +64 -0
- package/dist/ui/runtime-commands.d.ts +2 -2
- package/dist/ui/runtime-commands.js +7 -4
- package/dist/ui/settings-access-overview.js +3 -3
- package/dist/ui/settings-appearance.js +7 -10
- package/dist/ui/settings-archive-files.js +109 -0
- package/dist/ui/settings-build-version.js +2 -2
- package/dist/ui/settings-catalog.js +22 -0
- package/dist/ui/settings-connector-strings.js +23 -0
- package/dist/ui/settings-connector.js +39 -0
- package/dist/ui/settings-guests-entries.js +16 -0
- package/dist/ui/settings-guests.js +57 -15
- package/dist/ui/settings-hub-connection.js +4 -5
- package/dist/ui/settings-hub-member-address.js +21 -6
- package/dist/ui/settings-hub-membership.js +6 -7
- package/dist/ui/settings-hub-section.js +4 -6
- package/dist/ui/settings-hub-setup.js +2 -1
- package/dist/ui/settings-hub-updates.js +67 -0
- package/dist/ui/settings-hub-web-address.js +21 -5
- package/dist/ui/settings-hub.js +30 -4
- package/dist/ui/settings-layout.js +15 -13
- package/dist/ui/settings-registry.js +18 -3
- package/dist/ui/settings-shared-strings.js +2 -0
- package/dist/ui/settings-strings.js +13 -2
- 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 +1 -1
- package/dist/ui/shared/agent-sheet.js +116 -0
- package/dist/ui/shared/agent-widget.js +1 -2
- package/dist/ui/shared/app-i18n.js +4 -0
- 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 +4 -2
- package/dist/ui/shared/app-shell.js +178 -23
- package/dist/ui/shared/app-store.js +1 -1
- package/dist/ui/shared/app-stream.js +6 -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 +472 -203
- package/dist/ui/shared/app.js +1 -1
- package/dist/ui/shared/chat-composer.js +29 -5
- package/dist/ui/shared/chat-msg-actions.js +231 -0
- package/dist/ui/shared/chat-strings.js +19 -4
- package/dist/ui/shared/chat-thread.js +121 -17
- package/dist/ui/shared/chat-work-bar.css +118 -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 +63 -4
- package/dist/ui/shared/hub-groups.css +19 -15
- package/dist/ui/shared/hub-owner.css +118 -3
- package/dist/ui/shared/hub-roles.css +99 -0
- package/dist/ui/shared/hub-rooms-u2.css +34 -0
- package/dist/ui/shared/hub-signin.css +2 -0
- package/dist/ui/shared/hub-teams.css +31 -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 +415 -0
- package/dist/ui/shared/image-lightbox.js +218 -0
- package/dist/ui/shared/image-zoom.js +316 -0
- package/dist/ui/shared/instance-nav.js +120 -15
- package/dist/ui/shared/loading.css +1 -1
- package/dist/ui/shared/model-picker.css +32 -4
- package/dist/ui/shared/owner-css.js +1 -1
- package/dist/ui/shared/page-head.js +3 -2
- 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 +6 -2
- 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 +2 -2
- package/dist/ui/shared/theme.js +52 -0
- package/dist/ui/shared/tokens.css +27 -10
- package/dist/ui/shared/ui-icons.js +2 -0
- package/dist/ui/shared/ui-toast.js +4 -4
- package/dist/ui/shared/usage-dialog.js +113 -16
- 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/web-terminal/terminal.css +1 -1
- package/dist/ui/workspace-panel.js +4 -3
- 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/agent-output.js +1 -0
- package/dist/usage/agent-output.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/i18n.d.ts +1 -1
- package/dist/usage/i18n.js +2 -1
- package/dist/usage/i18n.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 +4 -1
- package/dist/usage/providers.js +31 -16
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-history.d.ts +1 -1
- package/dist/usage/usage-api.d.ts +1 -1
- package/dist/usage/usage-api.js +4 -4
- 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/web-api.d.ts +9 -0
- package/dist/web-api.js +434 -188
- package/dist/web-api.js.map +1 -1
- 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 +76 -0
- package/dist/web-chat-history.js +145 -1
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +4 -3
- package/dist/web-commands.js +3 -2
- package/dist/web-commands.js.map +1 -1
- package/dist/web-guest-access.d.ts +3 -0
- package/dist/web-guest-access.js +6 -2
- package/dist/web-guest-access.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 +3 -0
- package/dist/web-notices.js +17 -2
- package/dist/web-notices.js.map +1 -1
- package/dist/web-office-store.d.ts +2 -0
- package/dist/web-office-store.js +15 -3
- 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-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 +6 -4
- package/dist/web-session.js +5 -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 +1 -1
- package/dist/web-shell-routes.js +1 -1
- package/dist/web-shell-routes.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 +36 -0
- 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/package.json +1 -1
- package/templates/runtime-install/install.ps1 +24 -4
package/dist/ui/panel-chat.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { previewReplyFile, replyPreviewLabel } from "./reply-file-preview.js";
|
|
1
2
|
import { NativePaneRecovery } from "./native-pane-recovery.js";
|
|
2
3
|
import { GeneralLocation } from "./general-location.js";
|
|
3
4
|
// #1408 step 1: the chat panel. Behind the session gate (/ui/js/), loaded by the app with a dynamic import in "full"
|
|
@@ -10,16 +11,18 @@ import { GeneralLocation } from "./general-location.js";
|
|
|
10
11
|
// that apply to its state are offered (#1408 rough edges 4 and 7).
|
|
11
12
|
import { html, Fragment, useEffect, useLayoutEffect, useRef, useState } from "/assets/app-html.js";
|
|
12
13
|
import { lang, register, t } from "/assets/app-i18n.js";
|
|
14
|
+
import { AgentSheetButton } from "/assets/agent-sheet.js";
|
|
13
15
|
import { appStore, createStore, guestPage, guestTrusted, useStore } from "/assets/app-store.js";
|
|
14
|
-
import { ComposerAuth } from "/assets/web-authorize.js";
|
|
16
|
+
import { ComposerAuth, useWebAuthorization } from "/assets/web-authorize.js";
|
|
15
17
|
import { useLease } from "/assets/app-ctx.js";
|
|
16
18
|
import * as paneContext from "/assets/app-ctx.js";
|
|
17
19
|
import { backendLabel, modelText, namesOf, namesStore, navStore as instanceNavStore, supportsInstanceFeature } from "/assets/instance-nav.js";
|
|
18
20
|
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";
|
|
21
|
+
import { PanelHeader, onPanelKey, setTitle, statusClass, statusLabel, openDrawer, requestNewInstance, needsCount, openSearch } from "/assets/app-shell.js";
|
|
22
|
+
import { detailsPath, textLinkSegments, sectionPath, NEEDS_PATH, fleetEntryPath, settingsPath, viewPath, logPath } from "/assets/app-route.js";
|
|
21
23
|
import { InstanceSwitch } from "/assets/instance-switch.js";
|
|
22
|
-
import { HeaderTools } from "/assets/header-tools.js";
|
|
24
|
+
import { HeaderTools, setTextSize, textSizeStore, usageOffered, TEXT_SIZES } from "/assets/header-tools.js";
|
|
25
|
+
import { UsageDialog } from "/assets/usage-dialog.js";
|
|
23
26
|
import { navigate, navStore } from "/assets/app-nav.js";
|
|
24
27
|
import { Menu } from "/assets/ui-menu.js";
|
|
25
28
|
import { Dialog } from "/assets/ui-dialog.js";
|
|
@@ -48,6 +51,7 @@ function nativeCliTag(inst) {
|
|
|
48
51
|
return html`<span class="tag native-cli-unverified" title=${t("nativecli.unverifiedHint", cli, inst.native_cli_version || "")}>${t("nativecli.unverified")}</span>`;
|
|
49
52
|
}
|
|
50
53
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
54
|
+
import { isPinned, pinOffered, PinCopyDialog, PinsButton, PinsDialog, setPin, usePins } from "./chat-pins.js";
|
|
51
55
|
import { modelLabel, modelPickerStyles, mw } from "./model-picker.js";
|
|
52
56
|
/** 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
57
|
const effortWord = (level) => ({ xhigh: "XHigh" }[level] || String(level).charAt(0).toUpperCase() + String(level).slice(1));
|
|
@@ -94,12 +98,71 @@ function CardMenu({ card, ownerKey }) {
|
|
|
94
98
|
];
|
|
95
99
|
return html`<${Menu} items=${items} label=${t("card.menu")} icon="idcard" cls="chat-card-menu" active=${prefs.open} ownerKey=${ownerKey} />`;
|
|
96
100
|
}
|
|
101
|
+
|
|
102
|
+
// M-3115 (phone v2): kept beside its caller — a retained chat dictionary has no such words.
|
|
103
|
+
register("chatPhone", {
|
|
104
|
+
en: { goTo: "Go to", thisChat: "This chat", verifiedUntil: "Verified · speaks as you until {0}", needsToast: "{0} needs you", ctxHide: "Hide this for now" },
|
|
105
|
+
"zh-TW": { goTo: "前往", thisChat: "這個對話", verifiedUntil: "已驗證 · 以你的身分發言到 {0}", needsToast: "{0} 正在等你回應", ctxHide: "這次先不提醒" },
|
|
106
|
+
});
|
|
107
|
+
const untilClock = (ms) => { try { return new Date(ms).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }); } catch { return ""; } };
|
|
108
|
+
/** A Needs-you item's identity: its nonce, else its id, else what it says. */
|
|
109
|
+
const needKey = (item) => String(item?.nonce || item?.id || JSON.stringify(item || null));
|
|
110
|
+
/**
|
|
111
|
+
* The chat's ⋯ (M-3115): on a phone, where an agent's pages have no bottom tabs, it starts with 「前往」 — Needs you (its
|
|
112
|
+
* count), Fleet, Settings — then this chat's items, and ends with 「✓ 已驗證」 (the line under the composer no longer
|
|
113
|
+
* says it). A Needs-you item that arrives meanwhile, for another agent, is a short toast. A desk's ⋯ is unchanged.
|
|
114
|
+
*/
|
|
115
|
+
function ChatMoreMenu({ items, name, inst = null, card = null, navKey, lease = null }) {
|
|
116
|
+
const app = useStore(appStore);
|
|
117
|
+
const auth = useWebAuthorization();
|
|
118
|
+
const seen = useRef(null);
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
// What Needs you held when last heard, and whether it had loaded then: the first load (or a reconnect's) is not news.
|
|
121
|
+
const snap = (a) => ({ keys: new Set([...(a.needs || [])].map(needKey)), loaded: a.needsLoaded === true });
|
|
122
|
+
seen.current = snap(appStore.get());
|
|
123
|
+
return appStore.subscribe((a) => {
|
|
124
|
+
const before = seen.current;
|
|
125
|
+
seen.current = snap(a);
|
|
126
|
+
if (!before?.loaded || !seen.current.loaded || !narrowScreen()) return;
|
|
127
|
+
const fresh = (a.needs || []).find((it) => !before.keys.has(needKey(it)) && it.instance && it.instance !== name);
|
|
128
|
+
if (fresh) toast(t("chatPhone.needsToast", fresh.instance));
|
|
129
|
+
});
|
|
130
|
+
}, [name]);
|
|
131
|
+
if (!narrowScreen()) return html`<${Menu} items=${items} label=${t("app.more")} />`;
|
|
132
|
+
// 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.
|
|
133
|
+
if (inst) {
|
|
134
|
+
// The header's chips, here: the same commands, bound to this page's lease (a reply after the page moved on is dropped).
|
|
135
|
+
const run = (command) => store.runCommand(name, command, "", lease ? { alive: () => lease.current() } : {});
|
|
136
|
+
const commands = supportsInstanceFeature(inst, "commands");
|
|
137
|
+
const chat = { card: !!card, onCard: () => setChatCardOpen(!chatCardPrefs.get().open),
|
|
138
|
+
...(commands ? {
|
|
139
|
+
onModel: () => run("model"),
|
|
140
|
+
modelText: `${shortModelName(modelLabel(inst.model || modelText(inst)))}${supportsInstanceFeature(inst, "effort") && effortChip(inst) ? ` · ${effortChip(inst)}` : ""}`,
|
|
141
|
+
onBackend: () => (inst.runtime === "windows" ? navigate(sectionPath("agents")) : run("backend")), backendText: backendLabel(inst.backend),
|
|
142
|
+
} : {}) };
|
|
143
|
+
return html`<${AgentSheetButton} items=${items} name=${name} inst=${inst} current="chat" navKey=${navKey} chat=${chat}
|
|
144
|
+
verifiedUntil=${auth.st?.state === "verified" ? auth.st.until : null} />`;
|
|
145
|
+
}
|
|
146
|
+
const waiting = needsCount(app);
|
|
147
|
+
const route = navStore.get().route;
|
|
148
|
+
const verified = auth.st?.state === "verified";
|
|
149
|
+
const all = [
|
|
150
|
+
{ key: "goHead", heading: true, label: t("chatPhone.goTo") },
|
|
151
|
+
{ key: "goNeeds", label: waiting ? `${t("app.needsTab")} · ${waiting}` : t("app.needsTab"), icon: "inbox", onSelect: () => navigate(NEEDS_PATH) },
|
|
152
|
+
{ key: "goFleet", label: t("app.fleet"), icon: "fleet", onSelect: () => navigate(fleetEntryPath(route)) },
|
|
153
|
+
{ key: "goSettings", label: t("app.settings"), icon: "settings", onSelect: () => navigate(settingsPath()) },
|
|
154
|
+
{ key: "chatHead", heading: true, label: t("chatPhone.thisChat") },
|
|
155
|
+
...items,
|
|
156
|
+
...(verified ? [{ key: "verified", label: `✓ ${t("webauth.verifiedShort")}`, title: t("chatPhone.verifiedUntil", untilClock(auth.st.until)), icon: "check", disabled: true, onSelect: () => {} }] : []),
|
|
157
|
+
];
|
|
158
|
+
return html`<${Menu} items=${all} label=${t("app.more")} />`;
|
|
159
|
+
}
|
|
97
160
|
import "/assets/chat-strings.js";
|
|
98
161
|
import { confirmedWrite, selfConfirmed } from "./settings-confirm.js";
|
|
99
162
|
import { createChatStore } from "./chat-store.js";
|
|
100
163
|
import { createThread, msgKey } from "/assets/chat-thread.js";
|
|
101
164
|
import { ComposerInput, WorkBarView, touchScreen } from "/assets/chat-composer.js";
|
|
102
|
-
import { installMessageActions } from "
|
|
165
|
+
import { installMessageActions } from "/assets/chat-msg-actions.js";
|
|
103
166
|
import { composerCaret, insertQuote, installQuoteSelection, showCaret } from "./chat-quote.js";
|
|
104
167
|
import { createEmojiIndex } from "./chat-emojis.js";
|
|
105
168
|
import { pollPublicPreview } from "./preview-status.js";
|
|
@@ -296,7 +359,7 @@ export function boot({ stream, boot: bootData, deps = {} }) {
|
|
|
296
359
|
...deps,
|
|
297
360
|
});
|
|
298
361
|
emojiIndex = createEmojiIndex((url) => (deps.fetch || fetch)(url, { credentials: "same-origin" }));
|
|
299
|
-
mentionIndex = createMentionIndex((url) => (deps.fetch || fetch)(url, { credentials: "same-origin" }));
|
|
362
|
+
mentionIndex = createMentionIndex((url) => guestPage() ? null : (deps.fetch || fetch)(url, { credentials: "same-origin" }));
|
|
300
363
|
store.attach(stream);
|
|
301
364
|
// #1306: what the server said about previews for this load. The page-wide message and storage listeners this adds
|
|
302
365
|
// belong to the app, once (they are never per mount).
|
|
@@ -475,6 +538,11 @@ function ChatView({ name, inst, lease, navKey, exec, awaiting }) {
|
|
|
475
538
|
const wide = useStore(chatWide).on;
|
|
476
539
|
useStore(activityPrefs); useStore(activityInfoStore); // AGEND-181: the ⋯ menu's Show activity / Show thinking
|
|
477
540
|
const view = useRef(null), split = useRef(null), thread = useRef(null), bg = useRef(null), effectSurface = useRef(null);
|
|
541
|
+
// M-3271: this agent's pinned messages — the header's 📌 opens the list; a pin no longer in the chat opens its copy.
|
|
542
|
+
const [pinsOpen, setPinsOpen] = useState(false), [pinCopy, setPinCopy] = useState(null);
|
|
543
|
+
const pinCount = usePins(guestPage() ? "" : name).pins?.length || 0;
|
|
544
|
+
const openPins = () => setPinsOpen(true);
|
|
545
|
+
const jumpPin = (p) => { setPinsOpen(false); void thread.current?.jumpTo(p.key, { onGone: () => setPinCopy(p) }); };
|
|
478
546
|
useLayoutEffect(() => { applyTheme(view.current, theme, mode); }, [themeKey, mode]);
|
|
479
547
|
useLayoutEffect(() => {
|
|
480
548
|
const img = bg.current;
|
|
@@ -531,15 +599,17 @@ function ChatView({ name, inst, lease, navKey, exec, awaiting }) {
|
|
|
531
599
|
running && supportsInstanceFeature(inst,"lifecycle") ? { key: "restart", label: t("chat.restart"), icon: "restart", onSelect: () => action("restart") } : null,
|
|
532
600
|
running && supportsInstanceFeature(inst,"lifecycle") ? { key: "stop", label: t("chat.stopInstance"), icon: "stop", onSelect: () => action("stop") } : null,
|
|
533
601
|
// #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 —
|
|
602
|
+
// #3153 P1: the folder it works in, read-only — an admin only (M-3278: over the public link too), and not an
|
|
535
603
|
// agent on another machine (the server also refuses General and coordinators: their folder is the fleet's own).
|
|
536
|
-
|
|
604
|
+
inst.runtime === "windows" || inst.machine_id || inst.general_topic === true ? null
|
|
537
605
|
: { key: "workspace", label: t("chat.wsOpen"), icon: "file", onSelect: () => openWorkspace({ key: `ws:${name}`, instance: name }) },
|
|
606
|
+
// M-3271: the pinned list — here too, for a phone (its header shows ← title ⋯ only) and a narrow pane.
|
|
607
|
+
pinCount ? { key: "pins", label: `${t("chat.pinsTitle")} · ${pinCount}`, icon: "pin", onSelect: openPins } : null,
|
|
538
608
|
colorMenuItem(name, inst),
|
|
539
609
|
// #1629: a person's control over this agent's theme — not over the public link (it only views themes).
|
|
540
610
|
...themeMenuItems(name),
|
|
541
611
|
// #2117: its ambient — why it is not showing here (with the way to change that), and a person's Clear.
|
|
542
|
-
...ambientMenuItems(name, { publicLink:
|
|
612
|
+
...ambientMenuItems(name, { publicLink: false, clear: clearAmbient }), // M-3278
|
|
543
613
|
// AGEND-181: the activity timeline above each reply (this browser's choice), when the Log is on.
|
|
544
614
|
...(activityOffered() && activityInfo(name)?.level !== "off" ? [
|
|
545
615
|
{ key: "activity", checkbox: true, checked: activityPrefs.get().on, label: t("act.menuActivity"), onSelect: () => setActivityOn(!activityPrefs.get().on) },
|
|
@@ -559,15 +629,17 @@ function ChatView({ name, inst, lease, navKey, exec, awaiting }) {
|
|
|
559
629
|
${inst.runtime === "windows" ? html`<span class="tag">Windows</span>` : null}
|
|
560
630
|
${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
631
|
${!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}
|
|
632
|
+
<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
633
|
${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
634
|
|
|
565
635
|
return html`<div class=${`panel p-chat${wrap ? " wrap-code" : ""}`} data-width=${wide ? "full" : undefined} ref=${view}>
|
|
566
636
|
<${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=${[
|
|
637
|
+
pageControls=${{ CardMenu, card, navKey, usage: supportsInstanceFeature(inst,"usage"), ...(guest ? {} : { Pins: PinsButton, pins: { name, onOpen: openPins } }) }} pageActions=${[
|
|
568
638
|
...items]}
|
|
569
|
-
nav=${guest ? (guestTrusted() ? html`<${InstanceSwitch} name=${name} instance=${inst} current="chat" guest=${true} />` : null) : html`<${InstanceSwitch} name=${name} instance=${inst} current="chat" />`}
|
|
639
|
+
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
640
|
<${ChatCard} key=${name} name=${name} card=${card} />
|
|
641
|
+
${pinsOpen ? html`<${PinsDialog} name=${name} onClose=${() => setPinsOpen(false)} onJump=${jumpPin} />` : null}
|
|
642
|
+
${pinCopy ? html`<${PinCopyDialog} pin=${pinCopy} onClose=${() => setPinCopy(null)} />` : null}
|
|
571
643
|
<${AgentWidget} slot="chat_header" widget=${widgetFor(name, "chat_header")} binds=${instanceBinds(inst, exec, awaiting)} />
|
|
572
644
|
<div class="chat-split" ref=${split}>
|
|
573
645
|
<div ref=${effectSurface} class=${`chat-main${theme && theme.background ? " has-th-bg" : ""}`}>
|
|
@@ -628,7 +700,32 @@ export function threadsToLetGo(kept, current, { keep, maxNodes, favorites, prote
|
|
|
628
700
|
}
|
|
629
701
|
return out;
|
|
630
702
|
}
|
|
631
|
-
const narrowScreen = () => typeof matchMedia === "function" && matchMedia("(max-width: 899px)").matches;
|
|
703
|
+
const narrowScreen = () => typeof matchMedia === "function" && matchMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)").matches;
|
|
704
|
+
/**
|
|
705
|
+
* M-3167: the composer's own model picker and context ring, below this width. The header's chips give way to them
|
|
706
|
+
* there (chat-work-bar.css, the same width), so the model is always in one place and never under the agent's tabs.
|
|
707
|
+
*/
|
|
708
|
+
const COMPOSER_TOOLS_Q = "(max-width: 1439px)";
|
|
709
|
+
/** M-3167: whether a media query matches, kept current as the window is resized (read once, it went stale: #3166). */
|
|
710
|
+
function useMedia(query) {
|
|
711
|
+
const read = () => typeof matchMedia === "function" && matchMedia(query).matches;
|
|
712
|
+
const [on, setOn] = useState(read);
|
|
713
|
+
useEffect(() => {
|
|
714
|
+
if (typeof matchMedia !== "function") return undefined;
|
|
715
|
+
const mq = matchMedia(query), changed = () => setOn(mq.matches);
|
|
716
|
+
changed();
|
|
717
|
+
mq.addEventListener?.("change", changed);
|
|
718
|
+
return () => mq.removeEventListener?.("change", changed);
|
|
719
|
+
}, [query]);
|
|
720
|
+
return on;
|
|
721
|
+
}
|
|
722
|
+
/** 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"). */
|
|
723
|
+
export function shortModelName(label) {
|
|
724
|
+
const s = String(label || "").replace(/\s*\([^)]*\)\s*$/, "").trim();
|
|
725
|
+
const family = /^claude-(opus|sonnet|haiku|fable)-(\d+)(?:-(\d+))?/i.exec(s);
|
|
726
|
+
if (family) return `${family[1][0].toUpperCase()}${family[1].slice(1).toLowerCase()} ${family[2]}${family[3] ? `.${family[3]}` : ""}`;
|
|
727
|
+
return s;
|
|
728
|
+
}
|
|
632
729
|
/** Let go what the budget does not hold (after `current` was shown, or drew more). */
|
|
633
730
|
function trimKept(current) {
|
|
634
731
|
const kept = [...keptThreads].map(([n, e]) => [n, e.thread.nodes.size]);
|
|
@@ -664,12 +761,18 @@ function threadEntry(name, doc) {
|
|
|
664
761
|
// #2272: reply to a message (the bar above the composer), and show the one a reply quotes.
|
|
665
762
|
startReply: (x) => { store.startReply(name, x); composerField(name)?.focus(); },
|
|
666
763
|
findQuoted: (key) => store.findQuoted(name, key),
|
|
764
|
+
// M-3272: scroll-back — older at the very top, the unloaded newest end again at the bottom (chat-store.js loadOlder).
|
|
765
|
+
onTop: () => { if (!guestPage()) void store.loadOlder(name); }, // #4103 review N1: a guest is refused; never asked
|
|
766
|
+
onBottom: () => { void store.loadNewer(name); },
|
|
767
|
+
detached: () => store.pagingState(name).detached,
|
|
667
768
|
notice: (text) => toast(text, false),
|
|
668
769
|
replyButtonBusy: (id) => store.state.rbBusy.has(id),
|
|
669
770
|
pollMine: (id) => store.state.pollMine[id], // #1823: this device's own vote
|
|
670
771
|
serverNow: () => Date.now() + store.state.clockSkew, // #1823: the deadline is the server's
|
|
671
772
|
panel: { shown: shownKey, open: (spec, o) => openPanel(spec, o), version: panelVersion, claim: claimPanel, claims: panelClaims, // #1481, #1704
|
|
672
773
|
openMarkdown: (spec) => openMarkdown(spec) }, // M-2448: a Markdown file in the side panel
|
|
774
|
+
previewFile: !guestPage() ? (spec, opener, msgKey) => previewReplyFile(name, spec, opener, msgKey) : undefined,
|
|
775
|
+
previewFileLabel: replyPreviewLabel,
|
|
673
776
|
openImage: (links, img) => openLightbox(links, img, annotateFor(name, img)), // an image, full size, in the page (#3727: with 標註)
|
|
674
777
|
emojis: (id) => !!emojiIndex && emojiIndex.known(id), // #1630: the fleet's server emoji
|
|
675
778
|
mentions: (kind, id) => (mentionIndex ? mentionIndex.name(kind, id) : null), // #1682: mention names
|
|
@@ -718,8 +821,11 @@ function follow(name, thread) {
|
|
|
718
821
|
}
|
|
719
822
|
if (instance !== name) return;
|
|
720
823
|
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
|
|
824
|
+
// M-3272: a page of scroll-back (older at the top, newer at the bottom): drawn with the reader kept where they were.
|
|
825
|
+
else if (kind === "page") { thread.render(rowsOf(name), { keep: true }); wantEmojis(store.state.msgs[name]); }
|
|
721
826
|
else if (kind === "progress") thread.progress(); // an upload moved: its bar, in place
|
|
722
|
-
|
|
827
|
+
// Sent while scrolled back past an unloaded newest end: the live chat again, then its end (M-3272).
|
|
828
|
+
else if (kind === "sent") { if (store.pagingState(name).detached) void store.backToLatest(name).then(() => thread.jumpLatest()); else thread.jumpLatest(); }
|
|
723
829
|
}));
|
|
724
830
|
offs.push(P() ? P().onChange(() => thread.refreshCards()) : () => {});
|
|
725
831
|
offs.push(panelStore.subscribe(() => thread.refreshCards())); // a card shows whether the panel has its block
|
|
@@ -764,6 +870,10 @@ function Thread({ name, label = name, th, bindings }) {
|
|
|
764
870
|
t, messageOf: thread.messageOf, rove: thread.rove, reply: (x) => { store.startReply(name, x); bindings.input.current?.focus(); },
|
|
765
871
|
copyText, notice: (text, ok = true) => toast(text, ok),
|
|
766
872
|
linkOf: (x) => `${location.origin}/ui/chat/${encodeURIComponent(name)}#m=${msgKey(x)}`,
|
|
873
|
+
// M-3271: Pin / Unpin — an admin's (the host answers who may: pinOffered), on a stored agent or person message.
|
|
874
|
+
pin: (x) => { const key = msgKey(x); void setPin(name, key, !isPinned(name, key)); },
|
|
875
|
+
pinned: (x) => isPinned(name, msgKey(x)),
|
|
876
|
+
canPin: (x) => !guestPage() && pinOffered(name) && (x.role === "agent" || x.role === "user") && /^[0-9a-f]{1,32}-\d{1,15}$/.test(msgKey(x)),
|
|
767
877
|
});
|
|
768
878
|
// M-2789: select a passage in a message → 「引用」 → it goes into the composer as a quote at the caret, repeatable.
|
|
769
879
|
const offQuote = installQuoteSelection(ls, {
|
|
@@ -832,15 +942,17 @@ function Thread({ name, label = name, th, bindings }) {
|
|
|
832
942
|
<div class="thread-host" ref=${host}></div>
|
|
833
943
|
${empty === "hidden" ? html`<${Empty} icon="chat" title=${t("chat.guestAllHidden")} hint=${t("chat.guestAllHiddenHint")} />`
|
|
834
944
|
: 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="jump-latest" onClick=${() => th.current
|
|
836
|
-
|
|
945
|
+
</div><div class="jump-dock">${jump.show ? html`<button data-trust="thread-control" type="button" class="jump-latest" onClick=${() => { const t2 = th.current; if (!t2) return; if (store.pagingState(name).detached) void store.backToLatest(name).then(() => t2.jumpLatest()); else t2.jumpLatest(); }}
|
|
946
|
+
aria-label=${jump.unseen > 0 ? t("chat.newBelow", jump.unseen) : t("chat.jumpLatest")}>
|
|
947
|
+
<${Icon} name="down" size=${16} /><span class="jump-text">${jump.unseen > 0 ? t("chat.newBelow", jump.unseen) : t("chat.jumpLatest")}</span>${
|
|
948
|
+
/* 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
949
|
</${Fragment}>`;
|
|
838
950
|
}
|
|
839
951
|
|
|
840
952
|
// Missing optional chunks on an older server never prevent chat from loading. No shared export added.
|
|
841
953
|
function SubagentProgress({ name }) {
|
|
842
954
|
const [Component, setComponent] = useState(null);
|
|
843
|
-
const offered = typeof document !== "undefined" && document.body?.dataset.subagents === "1" && !guestPage()
|
|
955
|
+
const offered = typeof document !== "undefined" && document.body?.dataset.subagents === "1" && !guestPage(); // M-3278: the public link's admin too
|
|
844
956
|
useEffect(() => {
|
|
845
957
|
if (!offered) return;
|
|
846
958
|
let live = true;
|
|
@@ -854,27 +966,138 @@ function SubagentProgress({ name }) {
|
|
|
854
966
|
function Dock({ name, inst, lease, exec, awaiting, workingLabel, bindings, ids, focused }) {
|
|
855
967
|
useChatTick(name, ["state"]);
|
|
856
968
|
const s = store.state;
|
|
969
|
+
// M-3166 (Argon 0): a phone's one line above the box — model · effort · context, or what the agent is doing — instead of
|
|
970
|
+
// the working bar; the line under the box goes with it (its Not verified is this line's right end).
|
|
971
|
+
const metaLine = useMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)") && !guestPage();
|
|
857
972
|
return html`<div data-trust="composer" class="dock"><div class="dock-col">
|
|
858
973
|
<${Prompts} name=${name} />
|
|
859
974
|
<${SubagentProgress} name=${name} />
|
|
860
|
-
|
|
975
|
+
${metaLine ? html`<${ChatMetaLine} ids=${ids} name=${name} inst=${inst} lease=${lease} exec=${exec} awaiting=${awaiting} />`
|
|
976
|
+
: html`<${WorkBar} ids=${ids} name=${name} lease=${lease} exec=${exec} awaiting=${awaiting} workingLabel=${workingLabel} />`}
|
|
861
977
|
<${CommandCard} name=${name} lease=${lease} />
|
|
862
978
|
<${QuickActions} name=${name} inst=${inst} lease=${lease} />
|
|
863
979
|
${s.waking[name] ? html`<p class="send-waking" role="status">${t("chat.waking", name)}</p>` : null}
|
|
864
980
|
<${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
|
|
981
|
+
${metaLine ? null : html`<div class="composer-row">${guestPage() ? html`<span class="guest-note" title=${t("chat.guestNote")}>${t("chat.guestNote")}</span>` : html`<${ComposerAuth} />`}<span
|
|
982
|
+
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
983
|
</div></div>`;
|
|
868
984
|
}
|
|
869
985
|
|
|
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
986
|
/** #2233: a backend's "not signed in" choice offers Sign in (the module behind the session gate, loaded when asked). */
|
|
873
987
|
function openBackendSignIn(backend) {
|
|
874
988
|
import("./backend-signin.js").then((m) => m.openSignIn({ backend }), () => toast(t("app.loadFailed"), false));
|
|
875
989
|
}
|
|
876
990
|
|
|
877
991
|
/** #1269: what the last chat command answered — its text, why it was refused, or a list to choose from. */
|
|
992
|
+
// M-3166 PR 3: the model menu's words (kept beside their caller: a retained chat dictionary has no such words).
|
|
993
|
+
register("modelMenu", {
|
|
994
|
+
en: { title: "Model", effort: "Reasoning effort", loading: "Loading models…", opus: "Most capable, for complex and long work",
|
|
995
|
+
sonnet: "Fast and capable, for everyday work", haiku: "Fastest, for simple and high-volume work", close: "Close" },
|
|
996
|
+
"zh-TW": { title: "模型", effort: "推理強度", loading: "正在讀取模型…", opus: "最強,適合複雜、長時間的工作",
|
|
997
|
+
sonnet: "速度與品質兼顧,適合日常工作", haiku: "最快,適合簡單、大量的工作", close: "關閉" },
|
|
998
|
+
});
|
|
999
|
+
const mm = (key, ...args) => t(`modelMenu.${key}`, ...args);
|
|
1000
|
+
/** Where the model control that opened the menu is (a desk anchors the menu under it); null: under the box's left end. */
|
|
1001
|
+
let modelMenuAnchor = null, modelMenuOpener = null;
|
|
1002
|
+
/** 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). */
|
|
1003
|
+
export function noteModelMenuAnchor(el) {
|
|
1004
|
+
try { modelMenuAnchor = el ? el.getBoundingClientRect() : null; } catch { modelMenuAnchor = null; }
|
|
1005
|
+
modelMenuOpener = el || null;
|
|
1006
|
+
}
|
|
1007
|
+
/** A model's one line: its family's (Opus / Sonnet / Haiku), else its own id when the name doesn't say it. */
|
|
1008
|
+
function modelDescription(o, name) {
|
|
1009
|
+
const s = `${o.id} ${o.label}`;
|
|
1010
|
+
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" : "";
|
|
1011
|
+
if (o.disabled) return String(o.disabled);
|
|
1012
|
+
if (family) return mm(family);
|
|
1013
|
+
return o.id && o.id !== name ? o.id : "";
|
|
1014
|
+
}
|
|
1015
|
+
/**
|
|
1016
|
+
* 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
|
|
1017
|
+
* one; "More models" in place; the current model's reasoning effort as one segmented row; Refresh in the head. Picking a
|
|
1018
|
+
* model or an effort runs the same commands the card ran (its result then shows as the card does). A failed Refresh says
|
|
1019
|
+
* so in the menu and keeps the list (M-2731); a refused switch (no list with it) is the card's.
|
|
1020
|
+
*/
|
|
1021
|
+
function ModelMenu({ name, c, lease }) {
|
|
1022
|
+
const narrow = useMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)");
|
|
1023
|
+
const close = () => store.dismissCommand(name);
|
|
1024
|
+
const alive = () => lease.current();
|
|
1025
|
+
const run = (args, action) => store.runCommand(name, "model", args, { alive, ...(action ? { action } : {}) });
|
|
1026
|
+
// The control that opened it is this opening's only: gone with the menu, a later typed /model is placed by the box.
|
|
1027
|
+
// M-3192: on a desk, focus goes back where it came from when the menu closes — that control, else the box (a typed /model).
|
|
1028
|
+
useEffect(() => () => {
|
|
1029
|
+
const back = modelMenuOpener;
|
|
1030
|
+
modelMenuAnchor = null; modelMenuOpener = null;
|
|
1031
|
+
if (narrow || typeof document === "undefined") return;
|
|
1032
|
+
const inMenu = !document.activeElement || document.activeElement === document.body || !!document.activeElement.closest?.(".model-menu-pop");
|
|
1033
|
+
if (!inMenu) return; // the person moved on (clicked elsewhere): leave their focus be
|
|
1034
|
+
const to = back && back.isConnected !== false ? back : document.getElementById("msgIn");
|
|
1035
|
+
try { to?.focus?.(); } catch { /* gone */ }
|
|
1036
|
+
}, []);
|
|
1037
|
+
const pop = useRef(null);
|
|
1038
|
+
// M-3192: a desk's menu takes the keyboard — focus on the model in use (else the first), ↑ ↓ Home End move between its
|
|
1039
|
+
// buttons (rows, More, the effort row), Enter picks (they are buttons), Escape closes, Tab goes on as anywhere.
|
|
1040
|
+
const items = () => [...(pop.current?.querySelectorAll(".model-menu button:not([disabled])") || [])];
|
|
1041
|
+
useEffect(() => {
|
|
1042
|
+
if (narrow || !pop.current || pop.current.contains(document.activeElement)) return;
|
|
1043
|
+
const first = pop.current.querySelector(".model-menu-row.on:not([disabled])") || items()[0];
|
|
1044
|
+
try { first?.focus?.(); } catch { /* none */ }
|
|
1045
|
+
}, [narrow, c.choices?.options?.length || 0, !!c.busy]);
|
|
1046
|
+
const onKeys = (e) => {
|
|
1047
|
+
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) return;
|
|
1048
|
+
const list = items(); if (!list.length) return;
|
|
1049
|
+
e.preventDefault();
|
|
1050
|
+
const at = list.indexOf(document.activeElement);
|
|
1051
|
+
const next = e.key === "Home" ? 0 : e.key === "End" ? list.length - 1
|
|
1052
|
+
: e.key === "ArrowDown" ? (at + 1) % list.length : (at <= 0 ? list.length - 1 : at - 1);
|
|
1053
|
+
try { list[next].focus(); } catch { /* gone */ }
|
|
1054
|
+
};
|
|
1055
|
+
const options = c.choices?.options || [], current = c.choices?.current ?? null, actions = c.choices?.actions || [];
|
|
1056
|
+
const refresh = actions.find((a) => a === "refresh" || a === "refreshAll");
|
|
1057
|
+
const cur = options.find((o) => o.id === current && o.effort);
|
|
1058
|
+
useEffect(() => {
|
|
1059
|
+
if (narrow) return undefined;
|
|
1060
|
+
const esc = (e) => { if (e.key === "Escape") { e.stopPropagation(); close(); } };
|
|
1061
|
+
document.addEventListener("keydown", esc, true);
|
|
1062
|
+
return () => document.removeEventListener("keydown", esc, true);
|
|
1063
|
+
}, [narrow]);
|
|
1064
|
+
const rows = options.filter((o) => !o.signIn).map((o) => {
|
|
1065
|
+
const label = String(o.label || o.id).replace(/^✓\s*/, ""), short = shortModelName(modelLabel(label)), on = o.id === current;
|
|
1066
|
+
const desc = modelDescription(o, short);
|
|
1067
|
+
return html`<button key=${o.id} type="button" role="menuitemradio" aria-checked=${on ? "true" : "false"} class=${`model-menu-row${on ? " on" : ""}`}
|
|
1068
|
+
disabled=${c.busy || !!o.disabled} title=${label} onClick=${() => (on ? close() : run(o.id))}>
|
|
1069
|
+
<span class="model-menu-text"><b>${short}</b>${desc ? html`<small>${desc}</small>` : null}</span>${on ? html`<${Icon} name="check" size=${18} />` : null}</button>`;
|
|
1070
|
+
});
|
|
1071
|
+
const body = html`<div class="model-menu" role="menu" aria-label=${mm("title")}>
|
|
1072
|
+
${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")}
|
|
1073
|
+
aria-label=${mw("refresh")} disabled=${c.busy} onClick=${() => run(c.choices.args || "", refresh)}><${Icon} name="restart" size=${16} /></button>` : null}</div>`}
|
|
1074
|
+
${c.error ? html`<p class="err model-menu-error" role="alert">${c.error}</p>` : null}
|
|
1075
|
+
${c.busy && !options.length ? html`<p class="note model-menu-loading" role="status">${mm("loading")}</p>` : rows}
|
|
1076
|
+
${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}
|
|
1077
|
+
${cur ? html`<div class="model-menu-label">${mm("effort")}</div>
|
|
1078
|
+
<div class="model-menu-seg" role="group" aria-label=${mm("effort")}>${cur.effort.levels.map((level) => html`<button key=${level} type="button"
|
|
1079
|
+
class=${level === cur.effort.current ? "on" : ""} aria-pressed=${level === cur.effort.current ? "true" : "false"} disabled=${c.busy}
|
|
1080
|
+
onClick=${() => store.runCommand(name, "effort", level, { alive })}>${effortWord(level)}</button>`)}</div>` : null}
|
|
1081
|
+
${options.some((o) => o.signIn) ? html`<div class="model-menu-signin">${options.filter((o) => o.signIn).map((o) => html`<button
|
|
1082
|
+
key=${`signin:${o.signIn}`} type="button" class="btn btn-sm btn-primary" onClick=${() => openBackendSignIn(o.signIn)}>${t("chat.cmdSignInTo", o.signIn)}</button>`)}</div>` : null}
|
|
1083
|
+
</div>`;
|
|
1084
|
+
if (narrow) return html`<${Dialog} title=${mm("title")} onClose=${close} cls="model-menu-sheet"
|
|
1085
|
+
tools=${refresh ? html`<button type="button" class="icon-btn" data-model-action=${refresh} title=${mw("refresh")} aria-label=${mw("refresh")} disabled=${c.busy}
|
|
1086
|
+
onClick=${() => run(c.choices.args || "", refresh)}><${Icon} name="restart" size=${16} /></button>` : null}>${body}</${Dialog}>`;
|
|
1087
|
+
// A desk: under the control that opened it (else above the box's left end); a click outside closes it.
|
|
1088
|
+
const place = (el) => {
|
|
1089
|
+
if (!el) return;
|
|
1090
|
+
const at = modelMenuAnchor, w = el.offsetWidth || 320, h = el.offsetHeight || 0;
|
|
1091
|
+
const vw = globalThis.innerWidth || 1280, vh = globalThis.innerHeight || 800; // (a test DOM has no viewport)
|
|
1092
|
+
let left, top;
|
|
1093
|
+
// Under the control, or above it when it sits in the lower half (the composer's chip): never over it.
|
|
1094
|
+
if (at) { left = Math.min(Math.max(8, at.right - w), vw - w - 8); top = at.top > vh / 2 ? Math.max(8, at.top - h - 6) : Math.min(at.bottom + 6, vh - h - 8); }
|
|
1095
|
+
else { const box = el.closest(".p-chat")?.querySelector(".composer-box")?.getBoundingClientRect(); left = box ? box.left : 16; top = box ? Math.max(8, box.top - h - 8) : 72; }
|
|
1096
|
+
el.style.setProperty("left", `${Math.round(left)}px`); el.style.setProperty("top", `${Math.round(top)}px`);
|
|
1097
|
+
};
|
|
1098
|
+
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>`;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
878
1101
|
function CommandCard({ name, lease }) {
|
|
879
1102
|
const c = store.state.commands[name];
|
|
880
1103
|
if (!c) return null;
|
|
@@ -883,6 +1106,11 @@ function CommandCard({ name, lease }) {
|
|
|
883
1106
|
const refresh = actions.find(a => a === "refresh" || a === "refreshAll");
|
|
884
1107
|
// 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
1108
|
const [sub, setSub] = useState(null);
|
|
1109
|
+
// 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
|
|
1110
|
+
// bottom sheet on a phone — not a card above the box. A failure, its result text and /backend stay the card.
|
|
1111
|
+
// The menu is /model's list: shown with its choices, or while that list loads. A model being switched to (a pick from the
|
|
1112
|
+
// menu, a typed "/model <id>") is the card's, as before (#4003 review).
|
|
1113
|
+
if (c.command === "model" && (c.choices ? c.choices.step !== "backend" : c.busy && !c.error && !c.args)) return html`<${ModelMenu} name=${name} c=${c} lease=${lease} />`;
|
|
886
1114
|
const open = sub && sub.for === c.choices ? c.choices.options.find((o) => o.id === sub.id && o.effort) : null;
|
|
887
1115
|
const pickEffort = async (model, level) => {
|
|
888
1116
|
setSub(null);
|
|
@@ -916,21 +1144,31 @@ function CommandCard({ name, lease }) {
|
|
|
916
1144
|
})}</div>` : null}
|
|
917
1145
|
${c.command === "model" && c.choices ? html`<p class="note">${mw("selectionHint")}</p>` : null}
|
|
918
1146
|
${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)
|
|
1147
|
+
${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
1148
|
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
1149
|
</div>`;
|
|
922
1150
|
}
|
|
923
1151
|
|
|
924
1152
|
/** #1269 quick actions: Compact and Clear… once the instance's context is 70% used (from the status it already has). */
|
|
1153
|
+
/** M-3115 (phone v2): a phone's context hint put away (✕) for this agent, for this tab's session. */
|
|
1154
|
+
const CTX_HINT_KEY = (name) => `agend_ctx_hint_hidden:${name}`;
|
|
1155
|
+
const ctxHintHidden = (name) => { try { return sessionStorage.getItem(CTX_HINT_KEY(name)) === "1"; } catch { return false; } };
|
|
925
1156
|
function QuickActions({ name, inst, lease }) {
|
|
1157
|
+
const [, rerender] = useState(0);
|
|
926
1158
|
const pct = inst && typeof inst.context_pct === "number" ? Math.round(inst.context_pct) : null;
|
|
927
1159
|
if (pct == null || pct < 70) return null;
|
|
1160
|
+
// M-3115: on a phone, one thin line in the status line's place (while the agent is idle) — the words, 壓縮 / 清空… as
|
|
1161
|
+
// text, and ✕ that puts it away for this session (the ring by the box still shows the %). A desk is unchanged.
|
|
1162
|
+
const line = narrowScreen() && !guestPage();
|
|
1163
|
+
if (line && ctxHintHidden(name)) return null;
|
|
928
1164
|
const busy = !!(store.state.commands[name] && store.state.commands[name].busy);
|
|
929
1165
|
const run = (command) => store.runCommand(name, command, "", { alive: () => lease.current() });
|
|
930
|
-
|
|
1166
|
+
const hide = () => { try { sessionStorage.setItem(CTX_HINT_KEY(name), "1"); } catch { /* this render only */ } rerender((n) => n + 1); };
|
|
1167
|
+
return html`<div class=${`quick-actions${line ? " qa-line" : ""}`} role="group" aria-label=${t("chat.chipContext", pct)}>
|
|
931
1168
|
<span class="qa-ctx">${t("chat.chipContext", pct)}</span>
|
|
932
1169
|
<button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => run("compact")}>${t("chat.chipCompact")}</button>
|
|
933
1170
|
<button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => run("clear")}>${t("chat.chipClear")}</button>
|
|
1171
|
+
${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
1172
|
</div>`;
|
|
935
1173
|
}
|
|
936
1174
|
|
|
@@ -960,6 +1198,40 @@ function PromptText({ p, action }) {
|
|
|
960
1198
|
* #3724: the strip is always there — idle it keeps its height and shows nothing (no button), so a state change only changes
|
|
961
1199
|
* 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
1200
|
*/
|
|
1201
|
+
/**
|
|
1202
|
+
* 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
|
|
1203
|
+
* effort and the context ("Opus 5.5 · high · 56%", which opens the model's pick list) — or, while the agent is busy, what it
|
|
1204
|
+
* is doing and for how long ("處理中 0:12 · 56%"). Right: Not verified · Authorize (and its other states) only while this
|
|
1205
|
+
* browser is not verified; while the agent works with something typed, Stop (Send sends again). Hit targets ≥ 32 px.
|
|
1206
|
+
*/
|
|
1207
|
+
function ChatMetaLine({ name, inst, lease, exec, awaiting, ids = {} }) {
|
|
1208
|
+
const s = store.state, busy = R().isBusy(exec) ? exec : "";
|
|
1209
|
+
const kind = awaiting != null ? "awaiting" : s.stopping[name] && busy ? "stopping" : busy;
|
|
1210
|
+
const [, tick] = useState(0);
|
|
1211
|
+
useEffect(() => {
|
|
1212
|
+
if (!kind || kind === "awaiting") return undefined;
|
|
1213
|
+
const h = lease.interval(() => tick((n) => n + 1), 1000);
|
|
1214
|
+
return () => lease.clear(h);
|
|
1215
|
+
}, [kind, lease]);
|
|
1216
|
+
const pct = inst?.context_pct == null ? null : Math.round(inst.context_pct);
|
|
1217
|
+
const since = s.workingSince[name];
|
|
1218
|
+
const tail = pct != null ? ` · ${pct}%` : "";
|
|
1219
|
+
const commands = supportsInstanceFeature(inst, "commands");
|
|
1220
|
+
const model = shortModelName(modelLabel(inst?.model || modelText(inst || {})));
|
|
1221
|
+
const effort = supportsInstanceFeature(inst, "effort") ? effortChip(inst || {}) : "";
|
|
1222
|
+
const doing = kind ? `${t(kind === "stuck" ? "chat.metaStuck" : kind === "stopping" ? "chat.metaStopping" : kind === "awaiting" ? "chat.metaAwaiting" : "chat.metaWorking")}${
|
|
1223
|
+
kind !== "awaiting" && since != null ? ` ${R().formatElapsed(performance.now() - since)}` : ""}` : "";
|
|
1224
|
+
const run = (command) => store.runCommand(name, command, "", { alive: () => lease.current() });
|
|
1225
|
+
const label = `${model}${effort ? ` · ${effort}` : ""}`;
|
|
1226
|
+
return html`<div class=${`chat-meta${kind ? ` busy ${kind}` : ""}`} data-trust="status" role="status">
|
|
1227
|
+
${kind ? html`<span class="chat-meta-left"><span class="chat-meta-dot" aria-hidden="true"></span><span>${doing}${tail}</span></span>`
|
|
1228
|
+
: commands ? html`<button type="button" class="chat-meta-left chat-meta-model" title=${t("chat.chipModel", label)} aria-label=${t("chat.chipModel", label)}
|
|
1229
|
+
onClick=${() => (inst?.runtime === "windows" ? navigate(sectionPath("agents")) : run("model"))}><span>${label}${tail}</span><span class="chev" aria-hidden="true">⌄</span></button>`
|
|
1230
|
+
: html`<span class="chat-meta-left"><span>${label}${tail}</span></span>`}
|
|
1231
|
+
<span class="chat-meta-right">${busy ? html`<button type="button" id=${ids.stopBtn || "stopBtn"} class="chat-meta-stop btn-stop" disabled=${!!s.cancelling[name]} title=${t("chat.stopReplyTitle")}
|
|
1232
|
+
onClick=${() => store.cancelReply(name)}>${t("chat.stopReply")}</button>` : null}<${ComposerAuth} /></span>
|
|
1233
|
+
</div>`;
|
|
1234
|
+
}
|
|
963
1235
|
function WorkBar({ name, lease, exec, awaiting, workingLabel, ids }) {
|
|
964
1236
|
const s = store.state;
|
|
965
1237
|
const busy = R().isBusy(exec) ? exec : "";
|
|
@@ -998,6 +1270,13 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
998
1270
|
const files = s.pendingFiles[name] || [];
|
|
999
1271
|
const reply = s.replies[name]; // #2272: the message this one will reply to
|
|
1000
1272
|
const content = !!value.trim() || files.length > 0;
|
|
1273
|
+
// M-3115 (phone v2): one row — the box, the context ring and the model picker beside it — and, while the agent works
|
|
1274
|
+
// with nothing typed, Send is Stop (typed: Send again, and Stop is the status line's).
|
|
1275
|
+
// M-3167: both read live, so a window resized across them redraws (read once, a phone's ring and picker stayed on a
|
|
1276
|
+
// desk, unstyled). Between the phone's width and a wide desk the composer has the ring and a short model chip too.
|
|
1277
|
+
const narrow = useMedia("(max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px)"), toolsHere = useMedia(COMPOSER_TOOLS_Q);
|
|
1278
|
+
const phone = narrow && !guestPage();
|
|
1279
|
+
const stopNow = phone && busy && !content;
|
|
1001
1280
|
// A file waiting: what goes is a message with its file, never a command (no palette, no command line). #2855: a guest's
|
|
1002
1281
|
// palette offers only what it may run on this agent — the table's "anyone" commands (its status frame's `commands`).
|
|
1003
1282
|
const guest = guestPage();
|
|
@@ -1066,9 +1345,6 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1066
1345
|
return html`<div class="composer-box" ref=${bindings.box}>
|
|
1067
1346
|
${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
1347
|
${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
1348
|
${palette ? html`<ul data-trust="palette" class="cmd-palette" id=${paletteId} role="listbox" aria-label=${t("chat.cmdCommands")}>
|
|
1073
1349
|
${palette.length ? palette.map((c) => html`<li key=${c.name} id=${optId(c)} role="option" aria-selected=${c === pick ? "true" : "false"}
|
|
1074
1350
|
class=${c === pick ? "on" : ""} onMouseDown=${(e) => { e.preventDefault(); complete(c); }}>
|
|
@@ -1085,10 +1361,33 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1085
1361
|
onKeyDown=${onKeyDown} onPaste=${onPaste} controls=${palette ? paletteId : undefined} expanded=${!!palette} activeDescendant=${pick ? optId(pick) : undefined}
|
|
1086
1362
|
attach=${attachmentsSupported ? { title: t("chat.attachTitle"), onFiles: (list) => store.addFiles(name, list) } : null}
|
|
1087
1363
|
stop=${HIDDEN_STOP}
|
|
1088
|
-
|
|
1364
|
+
tools=${toolsHere && !narrow && !guestPage() ? html`<${ComposerTools} name=${name} inst=${inst} lease=${lease} short=${true} />` : null}
|
|
1365
|
+
send=${stopNow ? { hidden: false, stop: true, disabled: !!s.cancelling[name], label: t("chat.stopReply"), title: t("chat.stopReplyTitle"), onClick: () => store.cancelReply(name) }
|
|
1366
|
+
: { hidden: false, disabled: !content || sendingBlocked, label: t("chat.send"), onClick: submit }} />
|
|
1089
1367
|
</div>`;
|
|
1090
1368
|
}
|
|
1091
1369
|
|
|
1370
|
+
/**
|
|
1371
|
+
* M-3115 (phone v2): beside the box — the context's ring (from 50%; amber from 70%: /ctx, its use, model and effort) and
|
|
1372
|
+
* one picker for the model and its effort (/model: a phone's list opens each model's efforts) that shows the model (its
|
|
1373
|
+
* name says the effort too; the row leaves the box its room). The backend stays in
|
|
1374
|
+
* Details. The ring's fill is painted through the CSSOM (no inline style attribute under the page's CSP).
|
|
1375
|
+
*/
|
|
1376
|
+
function ComposerTools({ name, inst, lease, short = false }) {
|
|
1377
|
+
const run = (command) => store.runCommand(name, command, "", { alive: () => lease.current() });
|
|
1378
|
+
const pct = inst?.context_pct == null ? null : Math.round(inst.context_pct);
|
|
1379
|
+
const effort = supportsInstanceFeature(inst, "effort") && effortChip(inst) ? effortWord(effortChip(inst)) : null;
|
|
1380
|
+
const full = modelLabel(inst?.model || modelText(inst || {}));
|
|
1381
|
+
const model = short ? shortModelName(full) : full;
|
|
1382
|
+
const pickLabel = effort ? `${full} · ${effort}` : full; // the whole name is its title and accessible name
|
|
1383
|
+
return html`<span class="composer-tools">
|
|
1384
|
+
${pct != null && pct >= 50 ? html`<button type="button" class=${`ctx-ring${pct >= 70 ? " warn" : ""}`} ref=${(el) => el?.style?.setProperty("--pct", String(pct))}
|
|
1385
|
+
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}
|
|
1386
|
+
${supportsInstanceFeature(inst, "commands") ? html`<button type="button" class="composer-pick" title=${t("chat.chipModel", pickLabel)} aria-label=${t("chat.chipModel", pickLabel)}
|
|
1387
|
+
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}
|
|
1388
|
+
</span>`;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1092
1391
|
function FileChip({ f, i, name, bindings }) {
|
|
1093
1392
|
const img = useRef(null);
|
|
1094
1393
|
const isImage = /^image\//.test(f.type) && typeof URL.createObjectURL === "function";
|
package/dist/ui/panel-details.js
CHANGED
|
@@ -18,6 +18,7 @@ import { PanelHeader, setTitle, statusClass, statusLabel, openDrawer } from "/as
|
|
|
18
18
|
import { navigate } from "/assets/app-nav.js";
|
|
19
19
|
import { chatPath, detailsPath } from "/assets/app-route.js";
|
|
20
20
|
import { InstanceSwitch } from "/assets/instance-switch.js";
|
|
21
|
+
import { AgentSheetButton, usePhone } from "/assets/agent-sheet.js";
|
|
21
22
|
import { modelText } from "/assets/instance-nav.js";
|
|
22
23
|
import { HeaderTools } from "/assets/header-tools.js";
|
|
23
24
|
import { Menu } from "/assets/ui-menu.js";
|
|
@@ -55,6 +56,7 @@ export function DetailsPanel({ route, navKey }) {
|
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
function DetailsView({ name, inst, navKey, exec, awaiting }) {
|
|
59
|
+
const phone = usePhone(); // M-3166 PR 5: a phone's header is "← name ● ⋯" (the ⋯ sheet holds the rest)
|
|
58
60
|
const pane = paneContext.usePane?.();
|
|
59
61
|
useStore(themesStore); // #1629: Lock / Unlock follows the themes as read
|
|
60
62
|
const lease = useLease(`details:${name}`);
|
|
@@ -191,7 +193,7 @@ function DetailsView({ name, inst, navKey, exec, awaiting }) {
|
|
|
191
193
|
<p class="note">${pt("actionsNote")}</p></section>` : null}`;
|
|
192
194
|
const Pending = sess.mod && sess.mod.PendingBar, OpCard = sess.mod && sess.mod.OperationCard;
|
|
193
195
|
return html`<div data-effect-panel="details" class="panel p-details p-settings p-agent-page" data-view=${cat ? "section" : "index"}>
|
|
194
|
-
<${PanelHeader} title=${name} sub=${sub} pageControls=${{ navKey }} pageActions=${items} nav=${html`<${InstanceSwitch} name=${name} current="details" />`}><${HeaderTools} navKey=${navKey} /><${Menu} items=${items} label=${t("app.more")}
|
|
196
|
+
<${PanelHeader} title=${name} sub=${sub} pageControls=${{ navKey }} pageActions=${items} nav=${html`<${InstanceSwitch} name=${name} current="details" />`}><${HeaderTools} navKey=${navKey} /><${Menu} items=${items} label=${t("app.more")} />${phone ? html`<${AgentSheetButton} name=${name} inst=${inst} current="details" items=${items} navKey=${navKey} />` : null}</${PanelHeader}>
|
|
195
197
|
<${AgentCategoryNav} name=${name} kind=${kind} cat=${shownCat} dirty=${dirty}>${!cat ? html`<div class="only-narrow"><div class="s-row agent-settings-index-return"><h2>${pt("title")}</h2>${backLink()}</div></div>` : null}</${AgentCategoryNav}>
|
|
196
198
|
<div data-trust="panel-content" class="panel-body"><div class="col" ref=${body}>
|
|
197
199
|
<div class="s-row agent-settings-heading"><a class="s-back" href=${detailsPath(name)}><${Icon} name="back" size=${16} /><span>${t("app.details")}</span></a><${AgentPageHead} name=${name} kind=${kind} cat=${shownCat} inst=${null} />${backLink()}</div>
|