@xopcai/xopc 0.0.284 → 0.0.286
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/browser-ext/dist/assets/{auth-DB30ywek.js → auth-BXCWrPlg.js} +1 -1
- package/dist/browser-ext/dist/background.js +2 -2
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +136 -136
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/gateway-setup.js +14 -14
- package/dist/extensions/feishu/src/state/message-bindings.d.ts +1 -1
- package/dist/extensions/feishu/src/state/thread-bindings.d.ts +4 -4
- package/dist/extensions/feishu/src/state/thread-bindings.js +6 -6
- package/dist/extensions/feishu/src/subagent-hooks.d.ts +1 -1
- package/dist/extensions/feishu/src/subagent-hooks.js +5 -5
- package/dist/extensions/feishu/src/transport/socket-mode/monitor.js +9 -9
- package/dist/extensions/feishu/src/transport/webhook/monitor.js +4 -4
- package/dist/extensions/feishu/src/workflow-progress.d.ts +1 -1
- package/dist/extensions/feishu/src/workflow-progress.js +8 -7
- package/dist/extensions/telegram/src/approval-store.d.ts +2 -2
- package/dist/extensions/telegram/src/approval-store.js +1 -1
- package/dist/extensions/telegram/src/command-handler.d.ts +2 -2
- package/dist/extensions/telegram/src/command-handler.js +8 -8
- package/dist/extensions/telegram/src/delivery-chat-id.d.ts +1 -1
- package/dist/extensions/telegram/src/delivery-chat-id.js +7 -3
- package/dist/extensions/telegram/src/exec-approval-handler.js +1 -1
- package/dist/extensions/telegram/src/focus-handler.d.ts +2 -2
- package/dist/extensions/telegram/src/focus-handler.js +10 -10
- package/dist/extensions/telegram/src/inbound-processor.d.ts +3 -3
- package/dist/extensions/telegram/src/inbound-processor.js +11 -11
- package/dist/extensions/telegram/src/plugin.js +5 -5
- package/dist/extensions/telegram/src/routing-integration.d.ts +1 -1
- package/dist/extensions/telegram/src/routing-integration.js +19 -21
- package/dist/extensions/telegram/src/thread-bindings.d.ts +1 -1
- package/dist/extensions/telegram/src/workflow-progress.js +8 -7
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/auth/login-qr.d.ts +4 -4
- package/dist/extensions/weixin/src/auth/login-qr.js +21 -21
- package/dist/extensions/weixin/src/auth/weixin-account-id.d.ts +1 -1
- package/dist/extensions/weixin/src/auth/weixin-account-id.js +1 -1
- package/dist/extensions/weixin/src/cli/gateway-qr-login.d.ts +2 -2
- package/dist/extensions/weixin/src/cli/gateway-qr-login.js +13 -13
- package/dist/extensions/weixin/src/cli/qr-login.js +1 -1
- package/dist/extensions/weixin/src/delivery-to.js +6 -2
- package/dist/extensions/weixin/src/messaging/inbound.d.ts +1 -1
- package/dist/extensions/weixin/src/messaging/inbound.js +1 -1
- package/dist/extensions/weixin/src/messaging/process-message.js +3 -3
- package/dist/extensions/weixin/src/plugin.js +5 -5
- package/dist/extensions/weixin/src/routing-integration.d.ts +1 -1
- package/dist/extensions/weixin/src/routing-integration.js +3 -3
- package/dist/extensions/weixin/src/workflow-progress.d.ts +1 -1
- package/dist/extensions/weixin/src/workflow-progress.js +7 -6
- package/dist/gateway/static/root/assets/{activity-store-CwbIMGLY.js → activity-store-xOhV8FHx.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DjiOld-S.js → agent-avatar-dicebear-BzQbYWEj.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BxR5eog4.js +1 -0
- package/dist/gateway/static/root/assets/agents-Dx1om1eN.js +1 -0
- package/dist/gateway/static/root/assets/{api-3lphBVuY.js → api-CVJQLBv9.js} +1 -1
- package/dist/gateway/static/root/assets/api-q1kIMCLW.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-B2nwCXxE.js → app-management-settings-panel-CTyuXkNC.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BXO4Ej88.js → appearance-settings-Tk-GJtvF.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-BA-7OrhJ.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-6ZRqNjla.js → archive-plugin-O49jeeXo.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CmPZalcW.js → attachment-load-r9lBF2tW.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Bc3WbK5n.js → automations-page-CFFLXYgS.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DUZE1NOH.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-OWR6cxpc.js → binary-plugins-BpM43vsn.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Ca-tDQXm.js → block-editor-DFrfEcGw.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-Dxy2_p3U.js → browser-automation-inputs-CyHGQwxQ.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-CibQIxpi.js → browser-automations-page-CPkOWfM9.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-BOcseZxg.js +8 -0
- package/dist/gateway/static/root/assets/button-CGlRPNzi.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-ohEV64hG.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-UOf9mgqt.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-Bh-G9mdZ.js → channels-status-swr-BArPeImO.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-lbzbSpV3.js → chat-terminal-dock-D5Aka4S8.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-BEQR0NRq.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-CjrWuy2m.js → cron-expression-GDPX4NxC.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-tYvbTfZT.js → date-picker-DNtRu6EB.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-B8yo7-7V.js → dependency-picker-Dng3dIQa.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-BicYycxy.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DNeVGZNp.js → desktop-pet-settings-BEse55eX.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-be30HuFI.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-CiK0QI2p.js → extension-debug-page-YzhYyuay.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CirPNHJd.js → extension-page-CEXVIkDl.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-CrlbgK8g.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-Co4hHe0i.js → gateway-config-swr-BNuoHXiZ.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-CDJY1AOW.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DBPNJG-e.js → gateway-startup-retry-zMPfje0n.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-BtxitqZ3.js +1 -0
- package/dist/gateway/static/root/assets/home-page-_oqo0pNR.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-D0rMTumD.js → image-generation-api-B_Tyx74A.js} +1 -1
- package/dist/gateway/static/root/assets/imports-page-eZciuLw_.js +1 -0
- package/dist/gateway/static/root/assets/index--YC42LAz.css +2 -0
- package/dist/gateway/static/root/assets/index-fVtuw2o9.js +75 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CMUaF61L.js → keyboard-shortcuts-settings-B796W039.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-Z8mpau9d.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-CHxyT09t.js → local-apps-page-DXmY5jwM.js} +1 -1
- package/dist/gateway/static/root/assets/locale-store-D0001I7p.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-BGOO8ouT.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-jXbA2S54.js → management-settings-b1MG7s-3.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-CKInRsDh.js → markdown-view-2txE_Blz.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-BaPkSvW7.js → media-plugins-CDEf3ksI.js} +1 -1
- package/dist/gateway/static/root/assets/messages-BWANv-N-.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-Bm33_3xJ.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-C32-xssK.js +8 -0
- package/dist/gateway/static/root/assets/page-tabs-Bi_-DA5J.js +1 -0
- package/dist/gateway/static/root/assets/popover-select-DldSX8GX.js +1 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-DzgF1yYO.js → preview-open-alternatives-Dhfdf14p.js} +1 -1
- package/dist/gateway/static/root/assets/proactive-page-BNouL7Tv.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-iQ-eW6Aj.js → product-open-page-BkbZBqBr.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-CZ7glGYw.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DP3ZINZz.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-DMNudT60.js → registry-api-icwoEKYB.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-xqJcPdOO.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-u_wVepf7.js → runtime-tools-settings-panel-bmgxwWpW.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-YdZj2xdI.js → schema-form-DoZeepCg.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-BaxIfjpm.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cy3Ab3Vg.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-sw2bbS2b.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-CV8kVdnE.js → settings-page-BWF8uac0.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-layout-CsUQKRq0.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-BuYto2mT.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-BHwjHlrV.js → share-preview-page-BIHYD6-O.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DKtWUneq.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-Dn7ElMUk.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-DRKdb6O5.js → skills-page-D-7UtJIc.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-DYfaLtts.js → skills-page.utils-dvue6Ish.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CWrWpKV-.js → system-settings-panel-DCyxPWCl.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-efmH43Pq.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-CDc7Wqy5.js → theme-store-CZwYGpbY.js} +1 -1
- package/dist/gateway/static/root/assets/tunnel-api-__auf8Ww.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-D-FRib85.js → use-autosave-Iq83UDt3.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-DByIJcQq.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-iQ7EBzII.js → voice-api-key-field-D-QssKik.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DNMWA2tx.js → voice-config-api-B0wNN_tE.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BesuhDlH.js → work-discovery-overlay-5NRYg1iI.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Du81FoCy.js → workflow-run-setup-panel-Ds2SZjLG.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BJv3eoKR.js +6 -0
- package/dist/gateway/static/root/index.html +12 -12
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-protocol/src/index.js +312 -305
- package/dist/packages/gateway-contract/src/agent-stream.js +6 -0
- package/dist/packages/gateway-contract/src/automations.js +215 -0
- package/dist/packages/gateway-contract/src/browser-page-context.js +48 -39
- package/dist/packages/gateway-contract/src/browser-tab-binding.js +30 -25
- package/dist/packages/gateway-contract/src/clarifications.js +6 -0
- package/dist/packages/gateway-contract/src/connection-waits.js +6 -0
- package/dist/packages/gateway-contract/src/conversation-identity.js +17 -0
- package/dist/packages/gateway-contract/src/device-pairing.js +84 -78
- package/dist/packages/gateway-contract/src/discussions.js +19 -15
- package/dist/packages/gateway-contract/src/files.js +55 -0
- package/dist/packages/gateway-contract/src/home.js +188 -0
- package/dist/packages/gateway-contract/src/index.js +65 -0
- package/dist/packages/gateway-contract/src/mobile-privacy.js +26 -0
- package/dist/packages/gateway-contract/src/model-selection.js +4 -1
- package/dist/packages/gateway-contract/src/new-session.js +5 -1
- package/dist/packages/gateway-contract/src/notifications.js +64 -59
- package/dist/packages/gateway-contract/src/proactive.js +133 -119
- package/dist/packages/gateway-contract/src/product-delivery.js +56 -50
- package/dist/packages/gateway-contract/src/project-monitoring.js +33 -28
- package/dist/packages/gateway-contract/src/project-operating.js +100 -0
- package/dist/packages/gateway-contract/src/session-identity.js +38 -34
- package/dist/packages/gateway-contract/src/session-input-reliability.js +6 -0
- package/dist/packages/gateway-contract/src/sessions.js +145 -0
- package/dist/packages/gateway-contract/src/task-lifecycle.js +69 -64
- package/dist/packages/gateway-contract/src/task-runs.js +80 -75
- package/dist/packages/gateway-contract/src/tasks.js +445 -438
- package/dist/packages/gateway-contract/src/tool-activity.js +154 -149
- package/dist/packages/gateway-contract/src/turn-outcome.js +118 -112
- package/dist/packages/gateway-contract/src/user-message-display.js +13 -8
- package/dist/packages/gateway-contract/src/welcome-suggestions.js +6 -0
- package/dist/packages/realtime-client/src/index.js +1 -1
- package/dist/packages/realtime-protocol/src/index.js +4 -2
- package/dist/packages/realtime-protocol/src/voice.js +4 -4
- package/dist/src/activity/types.d.ts +1 -1
- package/dist/src/agent/agent-instance-gateway.d.ts +18 -18
- package/dist/src/agent/agent-manager.d.ts +27 -27
- package/dist/src/agent/agent-manager.js +180 -179
- package/dist/src/agent/background-review/coordinator.d.ts +3 -3
- package/dist/src/agent/background-review/coordinator.js +10 -10
- package/dist/src/agent/background-review/run-background-review.d.ts +1 -1
- package/dist/src/agent/background-review/run-background-review.js +14 -14
- package/dist/src/agent/bootstrap/bootstrap-cache.d.ts +4 -4
- package/dist/src/agent/bootstrap/bootstrap-cache.js +9 -9
- package/dist/src/agent/bootstrap/bootstrap-files.d.ts +4 -4
- package/dist/src/agent/bootstrap/bootstrap-files.js +9 -9
- package/dist/src/agent/bootstrap/filter-bootstrap-files.d.ts +1 -1
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +3 -3
- package/dist/src/agent/child-agent-factory.d.ts +3 -3
- package/dist/src/agent/child-agent-factory.js +5 -5
- package/dist/src/agent/coding/repository-instructions.js +1 -1
- package/dist/src/agent/coding/workspace-revision.js +1 -1
- package/dist/src/agent/commands/command-isolation.js +1 -1
- package/dist/src/agent/commands/command-registry.js +2 -1
- package/dist/src/agent/context/audit.d.ts +2 -2
- package/dist/src/agent/context/audit.js +5 -4
- package/dist/src/agent/context/coordinator.d.ts +6 -6
- package/dist/src/agent/context/coordinator.js +13 -13
- package/dist/src/agent/context/execution-context.js +4 -3
- package/dist/src/agent/context/execution-scope.d.ts +3 -3
- package/dist/src/agent/context/execution-scope.js +13 -13
- package/dist/src/agent/context/project-context.d.ts +1 -1
- package/dist/src/agent/context/project-context.js +4 -4
- package/dist/src/agent/embedded/execution-context.d.ts +1 -1
- package/dist/src/agent/embedded/execution-context.js +3 -3
- package/dist/src/agent/embedded/index.d.ts +1 -1
- package/dist/src/agent/embedded/index.js +2 -2
- package/dist/src/agent/embedded/run-for-session.d.ts +1 -1
- package/dist/src/agent/embedded/run-for-session.js +78 -104
- package/dist/src/agent/embedded/run-turn.js +77 -33
- package/dist/src/agent/embedded/runs.d.ts +11 -11
- package/dist/src/agent/embedded/runs.js +22 -22
- package/dist/src/agent/embedded/session-runner.d.ts +2 -2
- package/dist/src/agent/embedded/session-runner.js +5 -5
- package/dist/src/agent/embedded/session-tool-result-guard.d.ts +2 -2
- package/dist/src/agent/embedded/session-tool-result-guard.js +8 -8
- package/dist/src/agent/embedded/sqlite-hydrating-session-manager.d.ts +2 -2
- package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js +4 -4
- package/dist/src/agent/embedded/transcript-runtime.d.ts +4 -3
- package/dist/src/agent/embedded/transcript-runtime.js +33 -20
- package/dist/src/agent/embedded/types.d.ts +2 -1
- package/dist/src/agent/external-tools/composio-provider.d.ts +1 -1
- package/dist/src/agent/external-tools/composio-provider.js +12 -11
- package/dist/src/agent/external-tools/endpoint-provider.js +1 -1
- package/dist/src/agent/external-tools/extension-provider.d.ts +1 -1
- package/dist/src/agent/external-tools/extension-provider.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +9 -8
- package/dist/src/agent/external-tools/index.js +3 -3
- package/dist/src/agent/external-tools/mcp-provider.d.ts +2 -2
- package/dist/src/agent/external-tools/mcp-provider.js +8 -8
- package/dist/src/agent/external-tools/memory-provider.d.ts +1 -1
- package/dist/src/agent/external-tools/memory-provider.js +1 -1
- package/dist/src/agent/external-tools/types.d.ts +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.d.ts +7 -7
- package/dist/src/agent/inbound/attachment-pipeline.js +22 -21
- package/dist/src/agent/inbound/inbound-loop.d.ts +6 -6
- package/dist/src/agent/inbound/inbound-loop.js +23 -23
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +14 -14
- package/dist/src/agent/inbound/turn-dispatcher.js +16 -16
- package/dist/src/agent/ipc/bus.d.ts +1 -1
- package/dist/src/agent/ipc/types.d.ts +3 -3
- package/dist/src/agent/ipc/types.js +1 -1
- package/dist/src/agent/lifecycle/hook-handler.d.ts +2 -2
- package/dist/src/agent/lifecycle/hook-handler.js +6 -6
- package/dist/src/agent/lifecycle/manager.d.ts +1 -1
- package/dist/src/agent/lifecycle/manager.js +4 -4
- package/dist/src/agent/lifecycle/types.d.ts +1 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.d.ts +4 -4
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +21 -20
- package/dist/src/agent/mcp/bundle-mcp-tools.d.ts +1 -1
- package/dist/src/agent/mcp/bundle-mcp-tools.js +2 -2
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +4 -4
- package/dist/src/agent/mcp/index.js +2 -2
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +9 -8
- package/dist/src/agent/memory/compaction-ledger.js +9 -2
- package/dist/src/agent/memory/compaction-promotion.d.ts +2 -2
- package/dist/src/agent/memory/compaction-promotion.js +6 -6
- package/dist/src/agent/memory/compaction-source-planner.d.ts +2 -0
- package/dist/src/agent/memory/compaction-source-planner.js +9 -1
- package/dist/src/agent/memory/compaction.d.ts +6 -1
- package/dist/src/agent/memory/compaction.js +22 -11
- package/dist/src/agent/memory/context-recovery.d.ts +44 -0
- package/dist/src/agent/memory/context-recovery.js +96 -0
- package/dist/src/agent/memory/manager.js +11 -11
- package/dist/src/agent/memory/turn-provenance.d.ts +5 -5
- package/dist/src/agent/memory/turn-provenance.js +21 -17
- package/dist/src/agent/memory/types.d.ts +2 -2
- package/dist/src/agent/messaging/command-handler.d.ts +11 -11
- package/dist/src/agent/messaging/command-handler.js +7 -7
- package/dist/src/agent/messaging/message-router.d.ts +1 -1
- package/dist/src/agent/messaging/message-router.js +4 -4
- package/dist/src/agent/messaging/outbound-coordinator.d.ts +2 -2
- package/dist/src/agent/messaging/outbound-coordinator.js +4 -4
- package/dist/src/agent/middleware/context.d.ts +1 -2
- package/dist/src/agent/middleware/context.js +2 -5
- package/dist/src/agent/models/manager.d.ts +10 -10
- package/dist/src/agent/models/manager.js +34 -34
- package/dist/src/agent/orchestration/agent-event-handler.js +14 -14
- package/dist/src/agent/orchestration/agent-orchestrator.d.ts +7 -7
- package/dist/src/agent/orchestration/agent-orchestrator.js +29 -29
- package/dist/src/agent/orchestration/context-overflow.js +2 -0
- package/dist/src/agent/orchestration/llm-turn-retry.d.ts +1 -1
- package/dist/src/agent/orchestration/llm-turn-retry.js +2 -2
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.d.ts +1 -1
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +2 -2
- package/dist/src/agent/prompt/response-language.d.ts +1 -1
- package/dist/src/agent/prompt/response-language.js +2 -2
- package/dist/src/agent/prompt/service-prompt-builder.d.ts +2 -2
- package/dist/src/agent/prompt/service-prompt-builder.js +4 -4
- package/dist/src/agent/prompt/subagent-context.d.ts +4 -4
- package/dist/src/agent/prompt/subagent-context.js +1 -1
- package/dist/src/agent/prompt/system-prompt-params.d.ts +4 -4
- package/dist/src/agent/prompt/system-prompt-params.js +13 -12
- package/dist/src/agent/reply/apply-turn-user-enrichment.d.ts +1 -1
- package/dist/src/agent/reply/apply-turn-user-enrichment.js +3 -3
- package/dist/src/agent/reply/post-compaction-context.d.ts +1 -1
- package/dist/src/agent/reply/post-compaction-context.js +2 -2
- package/dist/src/agent/service/btw-query.d.ts +1 -1
- package/dist/src/agent/service/btw-query.js +4 -4
- package/dist/src/agent/service/build-direct-message-content.d.ts +1 -1
- package/dist/src/agent/service/build-direct-message-content.js +2 -2
- package/dist/src/agent/service/direct-turn-helpers.d.ts +6 -6
- package/dist/src/agent/service/direct-turn-helpers.js +17 -16
- package/dist/src/agent/service/parse-outbound-session-key.d.ts +1 -1
- package/dist/src/agent/service/parse-outbound-session-key.js +8 -9
- package/dist/src/agent/service/process-direct-one-shot.d.ts +11 -11
- package/dist/src/agent/service/process-direct-one-shot.js +16 -16
- package/dist/src/agent/service/process-direct-streaming.d.ts +18 -18
- package/dist/src/agent/service/process-direct-streaming.js +45 -40
- package/dist/src/agent/service/session-context-report.d.ts +1 -1
- package/dist/src/agent/service/session-context-report.js +3 -3
- package/dist/src/agent/service/webchat-tts.d.ts +3 -3
- package/dist/src/agent/service/webchat-tts.js +7 -7
- package/dist/src/agent/service.d.ts +23 -23
- package/dist/src/agent/service.js +111 -108
- package/dist/src/agent/service.types.d.ts +3 -3
- package/dist/src/agent/session/session-config-service.d.ts +5 -5
- package/dist/src/agent/session/session-config-service.js +53 -66
- package/dist/src/agent/session/session-context.d.ts +2 -2
- package/dist/src/agent/session/session-context.js +2 -2
- package/dist/src/agent/session/session-hydrator.d.ts +3 -3
- package/dist/src/agent/session/session-hydrator.js +19 -19
- package/dist/src/agent/session/session-inspector.d.ts +7 -7
- package/dist/src/agent/session/session-inspector.js +45 -45
- package/dist/src/agent/session/session-lifecycle.d.ts +2 -2
- package/dist/src/agent/session/session-lifecycle.js +17 -17
- package/dist/src/agent/session/session-state-bag.d.ts +18 -18
- package/dist/src/agent/session/session-state-bag.js +46 -46
- package/dist/src/agent/session/tracker.d.ts +7 -7
- package/dist/src/agent/session/tracker.js +27 -27
- package/dist/src/agent/source-context/types.d.ts +1 -1
- package/dist/src/agent/tasks/task-judge-service.d.ts +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +11 -10
- package/dist/src/agent/tools/automation-tool.js +2 -0
- package/dist/src/agent/tools/chain-tracker.d.ts +10 -10
- package/dist/src/agent/tools/chain-tracker.js +31 -31
- package/dist/src/agent/tools/clarify-tool.d.ts +1 -1
- package/dist/src/agent/tools/create-share-tool.js +2 -0
- package/dist/src/agent/tools/delegate-tool.d.ts +1 -1
- package/dist/src/agent/tools/delegate-tool.js +4 -4
- package/dist/src/agent/tools/exec-command.d.ts +1 -1
- package/dist/src/agent/tools/exec-command.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +3 -3
- package/dist/src/agent/tools/factory.js +42 -38
- package/dist/src/agent/tools/knowledge-memory-tool.js +2 -2
- package/dist/src/agent/tools/managed-job-tool.d.ts +1 -1
- package/dist/src/agent/tools/managed-job-tool.js +2 -2
- package/dist/src/agent/tools/publish-artifacts.js +2 -0
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/send-media.js +2 -0
- package/dist/src/agent/tools/session-recall-tool.d.ts +1 -1
- package/dist/src/agent/tools/session-recall-tool.js +3 -3
- package/dist/src/agent/tools/session-search-tool.d.ts +1 -1
- package/dist/src/agent/tools/session-search-tool.js +6 -6
- package/dist/src/agent/tools/skill-install-tool.d.ts +3 -3
- package/dist/src/agent/tools/skill-install-tool.js +3 -3
- package/dist/src/agent/tools/todo-tool.d.ts +3 -3
- package/dist/src/agent/tools/todo-tool.js +4 -4
- package/dist/src/agent/tools/workflow-tool.d.ts +1 -1
- package/dist/src/agent/tools/workflow-tool.js +15 -13
- package/dist/src/agent/tools/write.js +2 -0
- package/dist/src/agent/tools/xopc-use-tool.d.ts +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +16 -13
- package/dist/src/agent/types.d.ts +1 -1
- package/dist/src/agent/workflow/catalog.js +4 -2
- package/dist/src/agent/workflow/channel-capability.d.ts +2 -2
- package/dist/src/agent/workflow/progress-broker.d.ts +4 -4
- package/dist/src/agent/workflow/progress-broker.js +17 -17
- package/dist/src/agent/workflow/subagent-runner.js +10 -10
- package/dist/src/agent/workflow/types.d.ts +2 -2
- package/dist/src/agent/workflow/workflow-child-tools.js +1 -1
- package/dist/src/agent/workspace-runtime/registry.js +1 -1
- package/dist/src/automations/domain/types.d.ts +7 -7
- package/dist/src/automations/domain/validation.js +2 -0
- package/dist/src/automations/service/action-executor.js +15 -15
- package/dist/src/automations/service/automation-service.js +4 -3
- package/dist/src/automations/storage/automation-repository.js +2 -1
- package/dist/src/automations/storage/automation-run-repository.js +9 -8
- package/dist/src/browser/native-messaging-host.js +4 -1
- package/dist/src/browser/policy/approval-store.d.ts +4 -4
- package/dist/src/browser/policy/approval-store.js +8 -8
- package/dist/src/browser/providers/browser-ext-install.js +10 -2
- package/dist/src/browser/providers/extension.js +6 -6
- package/dist/src/browser/providers/realtime-extension.js +2 -2
- package/dist/src/browser/runtime/browser-runtime.js +3 -3
- package/dist/src/channels/exec-approval-runtime.d.ts +1 -1
- package/dist/src/channels/manager.js +1 -1
- package/dist/src/channels/pipeline.js +2 -2
- package/dist/src/channels/plugin-types.d.ts +2 -2
- package/dist/src/channels/plugins/types.adapters.d.ts +1 -1
- package/dist/src/channels/telegram/index.d.ts +1 -1
- package/dist/src/channels/telegram/index.js +2 -2
- package/dist/src/chat-commands/agent-edit.js +2 -2
- package/dist/src/chat-commands/builtins/review.js +4 -4
- package/dist/src/chat-commands/builtins/session.js +1 -1
- package/dist/src/chat-commands/builtins/system.js +2 -2
- package/dist/src/chat-commands/builtins/thinking.js +7 -7
- package/dist/src/chat-commands/builtins/understanding.js +4 -4
- package/dist/src/chat-commands/builtins/workflow.js +8 -8
- package/dist/src/chat-commands/context.d.ts +9 -9
- package/dist/src/chat-commands/context.js +35 -35
- package/dist/src/chat-commands/index.d.ts +1 -1
- package/dist/src/chat-commands/index.js +2 -2
- package/dist/src/chat-commands/processor.js +2 -2
- package/dist/src/chat-commands/registry.js +1 -1
- package/dist/src/chat-commands/session-key.d.ts +3 -3
- package/dist/src/chat-commands/session-key.js +20 -24
- package/dist/src/chat-commands/types.d.ts +3 -3
- package/dist/src/cli/command-manifest.js +3 -3
- package/dist/src/cli/commands/agent/interactive.d.ts +1 -1
- package/dist/src/cli/commands/agent/interactive.js +8 -8
- package/dist/src/cli/commands/agent/stream-renderer.d.ts +1 -1
- package/dist/src/cli/commands/agent/stream-renderer.js +2 -2
- package/dist/src/cli/commands/agent.js +12 -8
- package/dist/src/cli/commands/doctor/checks/database-schema.js +3 -2
- package/dist/src/cli/commands/doctor/checks/session-integrity.js +9 -9
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/gateway/run-foreground.js +4 -0
- package/dist/src/cli/commands/import.js +56 -7
- package/dist/src/cli/commands/logs.js +3 -3
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/platform.js +1 -1
- package/dist/src/cli/commands/profile.js +1 -1
- package/dist/src/cli/commands/project.js +5 -5
- package/dist/src/cli/commands/resume.js +4 -4
- package/dist/src/cli/commands/tunnel.js +3 -2
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/config/agent-profile.d.ts +3 -3
- package/dist/src/config/agent-profile.js +12 -12
- package/dist/src/config/index.js +1 -1
- package/dist/src/config/models-json.d.ts +6 -6
- package/dist/src/config/schema.d.ts +1 -1
- package/dist/src/connectors/catalog.js +2 -1
- package/dist/src/connectors/composio-sessions.d.ts +1 -1
- package/dist/src/connectors/composio-sessions.js +3 -3
- package/dist/src/connectors/connection-recovery-service.d.ts +4 -4
- package/dist/src/connectors/connection-recovery-service.js +41 -37
- package/dist/src/connectors/principal.d.ts +1 -1
- package/dist/src/connectors/principal.js +4 -3
- package/dist/src/connectors/types.d.ts +2 -2
- package/dist/src/discussions/action-tasks.js +4 -1
- package/dist/src/discussions/analyzer.js +2 -1
- package/dist/src/discussions/edits.js +3 -1
- package/dist/src/discussions/organizer.js +2 -1
- package/dist/src/discussions/recording.js +4 -1
- package/dist/src/discussions/recordingJobs.js +2 -1
- package/dist/src/discussions/repository.js +2 -1
- package/dist/src/discussions/revisions.js +2 -1
- package/dist/src/discussions/service.js +4 -1
- package/dist/src/discussions/types.js +4 -0
- package/dist/src/endpoint-tools/auth.js +2 -1
- package/dist/src/endpoint-tools/binding-service.d.ts +8 -8
- package/dist/src/endpoint-tools/binding-service.js +14 -14
- package/dist/src/endpoint-tools/invocation-service.d.ts +2 -0
- package/dist/src/endpoint-tools/invocation-service.js +50 -20
- package/dist/src/endpoint-tools/policy.js +2 -1
- package/dist/src/endpoint-tools/registry.js +2 -1
- package/dist/src/endpoint-tools/upload-service.js +2 -1
- package/dist/src/execution-environments/local-worktree-manager.d.ts +1 -1
- package/dist/src/execution-environments/local-worktree-manager.js +2 -2
- package/dist/src/execution-environments/session-environment-service.d.ts +3 -3
- package/dist/src/execution-environments/session-environment-service.js +10 -10
- package/dist/src/execution-environments/store.d.ts +2 -2
- package/dist/src/execution-environments/store.js +15 -14
- package/dist/src/execution-environments/subject.d.ts +1 -1
- package/dist/src/execution-environments/subject.js +2 -2
- package/dist/src/execution-environments/types.d.ts +2 -2
- package/dist/src/extensions/api.js +1 -1
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.d.ts +1 -1
- package/dist/src/extensions/types/core.d.ts +2 -2
- package/dist/src/extensions/types/hooks.d.ts +12 -12
- package/dist/src/extensions/types/tools.d.ts +3 -3
- package/dist/src/extensions/types/tui.d.ts +3 -3
- package/dist/src/files/file-service.d.ts +3 -3
- package/dist/src/files/file-service.js +3 -3
- package/dist/src/gateway/automation-agent-session.js +5 -5
- package/dist/src/gateway/chat-stream/mapper.d.ts +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +4 -2
- package/dist/src/gateway/chat-stream/protocol.d.ts +1 -1
- package/dist/src/gateway/chat-stream/thinking-delta-coalescer.js +1 -1
- package/dist/src/gateway/clarify-runtime.d.ts +2 -2
- package/dist/src/gateway/clarify-runtime.js +2 -2
- package/dist/src/gateway/file-path-classifier.d.ts +2 -2
- package/dist/src/gateway/file-path-classifier.js +4 -4
- package/dist/src/gateway/file-reference-registry.d.ts +2 -2
- package/dist/src/gateway/file-reference-registry.js +1 -1
- package/dist/src/gateway/file-space-service.js +3 -3
- package/dist/src/gateway/gateway-workflow-host.types.d.ts +1 -1
- package/dist/src/gateway/heartbeat/check-store.d.ts +18 -0
- package/dist/src/gateway/heartbeat/check-store.js +74 -0
- package/dist/src/gateway/heartbeat/service.d.ts +12 -3
- package/dist/src/gateway/heartbeat/service.js +82 -51
- package/dist/src/gateway/hono/middleware/log-context.d.ts +1 -1
- package/dist/src/gateway/hono/middleware/log-context.js +3 -3
- package/dist/src/gateway/hono/routes/agent-stream.js +20 -20
- package/dist/src/gateway/hono/routes/browser-session.js +2 -2
- package/dist/src/gateway/hono/routes/browser.js +22 -20
- package/dist/src/gateway/hono/routes/chat-model-config.d.ts +1 -1
- package/dist/src/gateway/hono/routes/chat-model-config.js +6 -6
- package/dist/src/gateway/hono/routes/commands-skills.js +13 -13
- package/dist/src/gateway/hono/routes/connection-waits.js +5 -5
- package/dist/src/gateway/hono/routes/connectors.js +5 -5
- package/dist/src/gateway/hono/routes/context-sources.js +2 -1
- package/dist/src/gateway/hono/routes/device-pairing-approval.js +2 -0
- package/dist/src/gateway/hono/routes/devices.js +2 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +8 -7
- package/dist/src/gateway/hono/routes/execution-environments.js +11 -11
- package/dist/src/gateway/hono/routes/file-references.js +5 -5
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/imports.js +18 -6
- package/dist/src/gateway/hono/routes/interaction-state.js +6 -6
- package/dist/src/gateway/hono/routes/logs.js +2 -2
- package/dist/src/gateway/hono/routes/media.js +3 -3
- package/dist/src/gateway/hono/routes/notes.js +11 -11
- package/dist/src/gateway/hono/routes/proactive-control.js +2 -1
- package/dist/src/gateway/hono/routes/projects.js +26 -26
- package/dist/src/gateway/hono/routes/public-gateway.js +3 -3
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +10 -10
- package/dist/src/gateway/hono/routes/session-input-handler.js +20 -17
- package/dist/src/gateway/hono/routes/sessions.js +79 -50
- package/dist/src/gateway/hono/routes/shares.js +38 -38
- package/dist/src/gateway/hono/routes/side-chats.js +4 -2
- package/dist/src/gateway/hono/routes/site-shares.js +6 -6
- package/dist/src/gateway/hono/routes/tasks.js +18 -13
- package/dist/src/gateway/hono/routes/tui.js +2 -2
- package/dist/src/gateway/hono/routes/user-model.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/hono/routes/workflows.js +9 -9
- package/dist/src/gateway/media-access.d.ts +1 -1
- package/dist/src/gateway/media-access.js +3 -3
- package/dist/src/gateway/resolve-webchat-session-key.d.ts +5 -5
- package/dist/src/gateway/resolve-webchat-session-key.js +5 -5
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +15 -15
- package/dist/src/gateway/service/agent-runner.js +63 -62
- package/dist/src/gateway/service/marketplace-service.d.ts +3 -3
- package/dist/src/gateway/service/marketplace-service.js +6 -6
- package/dist/src/gateway/service/run-gateway-agent.js +51 -49
- package/dist/src/gateway/service/session-input-coordinator.d.ts +11 -11
- package/dist/src/gateway/service/session-input-coordinator.js +76 -74
- package/dist/src/gateway/service/sessions-api.d.ts +19 -20
- package/dist/src/gateway/service/sessions-api.js +30 -38
- package/dist/src/gateway/service/task-conversation-query-service.d.ts +3 -2
- package/dist/src/gateway/service/task-conversation-query-service.js +3 -3
- package/dist/src/gateway/service.d.ts +11 -4
- package/dist/src/gateway/service.js +92 -71
- package/dist/src/gateway/session-context-summary.d.ts +1 -1
- package/dist/src/gateway/session-context-summary.js +13 -11
- package/dist/src/gateway/session-reset-service.d.ts +4 -4
- package/dist/src/gateway/session-reset-service.js +12 -12
- package/dist/src/gateway/side-chat/context-snapshot.d.ts +2 -2
- package/dist/src/gateway/side-chat/context-snapshot.js +2 -2
- package/dist/src/gateway/side-chat/manager.d.ts +4 -4
- package/dist/src/gateway/side-chat/manager.js +13 -13
- package/dist/src/gateway/side-chat/run-service.js +8 -8
- package/dist/src/gateway/side-chat/types.d.ts +4 -4
- package/dist/src/heartbeat/wake.d.ts +1 -1
- package/dist/src/history/ctx/exporter.js +11 -11
- package/dist/src/history/ctx/format.d.ts +1 -1
- package/dist/src/history/ctx/format.js +7 -7
- package/dist/src/imports/contextImport.js +2 -1
- package/dist/src/imports/importService.d.ts +17 -12
- package/dist/src/imports/importService.js +67 -70
- package/dist/src/imports/inventory.d.ts +11 -0
- package/dist/src/imports/inventory.js +202 -0
- package/dist/src/imports/productImport.d.ts +4 -4
- package/dist/src/imports/productImport.js +202 -108
- package/dist/src/imports/runtime.js +7 -2
- package/dist/src/imports/scanner.d.ts +1 -1
- package/dist/src/imports/scanner.js +4 -4
- package/dist/src/imports/types.d.ts +53 -0
- package/dist/src/infra/background-task.d.ts +2 -0
- package/dist/src/infra/background-task.js +25 -0
- package/dist/src/infra/node-sqlite.js +9 -3
- package/dist/src/infra/process-diagnostics.d.ts +5 -0
- package/dist/src/infra/process-diagnostics.js +101 -0
- package/dist/src/infra/sqlite-errors.js +25 -20
- package/dist/src/infra/unhandled-rejections.js +20 -9
- package/dist/src/infra/warning-filter.js +9 -3
- package/dist/src/knowledge/ingestion-service.js +1 -0
- package/dist/src/knowledge-memory/domain.d.ts +2 -2
- package/dist/src/knowledge-memory/repository.d.ts +1 -1
- package/dist/src/knowledge-memory/repository.js +10 -8
- package/dist/src/mcp/channel-bridge.d.ts +3 -3
- package/dist/src/mcp/channel-bridge.js +7 -7
- package/dist/src/mcp/channel-shared.d.ts +4 -4
- package/dist/src/mcp/channel-shared.js +3 -3
- package/dist/src/mcp/channel-tools.js +19 -19
- package/dist/src/media/session-references.js +2 -2
- package/dist/src/media-shared/http/ssrf-guard.js +1 -1
- package/dist/src/memory-maintenance/service.js +2 -1
- package/dist/src/migrations/conversation-routing-config.d.ts +2 -0
- package/dist/src/migrations/conversation-routing-config.js +42 -0
- package/dist/src/migrations/runner.js +6 -5
- package/dist/src/notes/service.d.ts +2 -2
- package/dist/src/notes/service.js +6 -6
- package/dist/src/notes/store.js +2 -1
- package/dist/src/notes/types.d.ts +3 -3
- package/dist/src/notifications/device-store.js +2 -1
- package/dist/src/notifications/planner.js +5 -3
- package/dist/src/notifications/proactive-channel.js +4 -1
- package/dist/src/notifications/proactive-policy.js +9 -6
- package/dist/src/notifications/service.d.ts +4 -4
- package/dist/src/notifications/service.js +4 -1
- package/dist/src/notifications/store.js +4 -1
- package/dist/src/notifications/web-push.js +4 -1
- package/dist/src/platform/contracts.d.ts +3 -3
- package/dist/src/proactive/actions/service.js +2 -1
- package/dist/src/proactive/events/product-event-bridge.js +1 -1
- package/dist/src/proactive/events/repository.js +2 -1
- package/dist/src/proactive/execution/authorization.d.ts +2 -0
- package/dist/src/proactive/execution/authorization.js +12 -2
- package/dist/src/proactive/execution/context.js +3 -1
- package/dist/src/proactive/execution/insight.js +2 -0
- package/dist/src/proactive/execution/repository.d.ts +2 -0
- package/dist/src/proactive/execution/repository.js +21 -3
- package/dist/src/proactive/execution/worker.js +15 -4
- package/dist/src/proactive/experience.d.ts +5 -2
- package/dist/src/proactive/experience.js +7 -3
- package/dist/src/proactive/follow-ups.d.ts +12 -7
- package/dist/src/proactive/follow-ups.js +23 -11
- package/dist/src/proactive/inbox/cards.js +7 -3
- package/dist/src/proactive/inbox/delivery.js +8 -8
- package/dist/src/proactive/inbox/digest.d.ts +1 -1
- package/dist/src/proactive/inbox/digest.js +25 -14
- package/dist/src/proactive/inbox/lifecycle.js +2 -1
- package/dist/src/proactive/inbox/notification-policy.d.ts +1 -1
- package/dist/src/proactive/inbox/notification-policy.js +9 -6
- package/dist/src/proactive/inbox/repository.js +5 -3
- package/dist/src/proactive/inbox/service.d.ts +6 -0
- package/dist/src/proactive/inbox/service.js +19 -0
- package/dist/src/proactive/inbox/types.d.ts +1 -0
- package/dist/src/proactive/mail-thread.js +2 -1
- package/dist/src/proactive/maintenance.js +2 -1
- package/dist/src/proactive/metrics.js +2 -1
- package/dist/src/proactive/policy/presence.d.ts +1 -1
- package/dist/src/proactive/policy/presence.js +9 -6
- package/dist/src/proactive/policy/service.d.ts +8 -5
- package/dist/src/proactive/policy/service.js +16 -13
- package/dist/src/proactive/routing/batch-repository.js +2 -1
- package/dist/src/proactive/scenarios/control.d.ts +3 -3
- package/dist/src/proactive/scenarios/control.js +16 -3
- package/dist/src/proactive/scenarios/repository.js +2 -1
- package/dist/src/proactive/service.js +2 -1
- package/dist/src/proactive/source-freshness.d.ts +8 -0
- package/dist/src/proactive/source-freshness.js +28 -0
- package/dist/src/proactive/status.d.ts +2 -0
- package/dist/src/proactive/status.js +22 -0
- package/dist/src/proactive/temporal/schedule.js +2 -1
- package/dist/src/proactive/temporal/worker.js +2 -1
- package/dist/src/projects/automation-bind.js +2 -1
- package/dist/src/projects/index.js +2 -2
- package/dist/src/projects/knowledge-bind.js +2 -1
- package/dist/src/projects/project-agent.js +4 -1
- package/dist/src/projects/project-service.d.ts +4 -4
- package/dist/src/projects/project-service.js +11 -10
- package/dist/src/projects/project-store.js +11 -9
- package/dist/src/projects/session-bind.d.ts +5 -5
- package/dist/src/projects/session-bind.js +18 -17
- package/dist/src/projects/types.d.ts +1 -1
- package/dist/src/projects/workflow-bind.js +2 -1
- package/dist/src/projects/workspace.d.ts +3 -3
- package/dist/src/projects/workspace.js +6 -6
- package/dist/src/providers/model-reference-auditor.js +1 -1
- package/dist/src/providers/prompt-cache-lifecycle.d.ts +2 -2
- package/dist/src/providers/prompt-cache-lifecycle.js +6 -6
- package/dist/src/realtime/broker.js +3 -3
- package/dist/src/realtime/runtime.js +32 -6
- package/dist/src/realtime/writer.js +16 -9
- package/dist/src/retrieval/queryProfile.d.ts +1 -1
- package/dist/src/routing/agent-session-key.d.ts +12 -41
- package/dist/src/routing/agent-session-key.js +39 -120
- package/dist/src/routing/conversation-route.d.ts +28 -0
- package/dist/src/routing/conversation-route.js +50 -0
- package/dist/src/routing/index.d.ts +2 -2
- package/dist/src/routing/index.js +5 -5
- package/dist/src/routing/resolve-route.d.ts +4 -9
- package/dist/src/routing/resolve-route.js +20 -60
- package/dist/src/routing/resolve-tui-session-key.d.ts +5 -13
- package/dist/src/routing/resolve-tui-session-key.js +11 -36
- package/dist/src/routing/session-key.d.ts +6 -39
- package/dist/src/routing/session-key.js +13 -161
- package/dist/src/session/client-history.js +2 -0
- package/dist/src/session/compaction-types.js +18 -13
- package/dist/src/session/config-store.d.ts +8 -8
- package/dist/src/session/config-store.js +19 -19
- package/dist/src/session/index.d.ts +2 -2
- package/dist/src/session/index.js +9 -5
- package/dist/src/session/init-session-turn.d.ts +7 -7
- package/dist/src/session/init-session-turn.js +18 -18
- package/dist/src/session/manager.d.ts +7 -7
- package/dist/src/session/manager.js +6 -6
- package/dist/src/session/model-config-lock.d.ts +1 -1
- package/dist/src/session/model-config-lock.js +4 -4
- package/dist/src/session/resolve-session.d.ts +10 -10
- package/dist/src/session/resolve-session.js +20 -20
- package/dist/src/session/session-context-for-llm.js +17 -10
- package/dist/src/session/session-title.d.ts +5 -5
- package/dist/src/session/session-title.js +28 -28
- package/dist/src/session/session-workspace.d.ts +1 -1
- package/dist/src/session/session-workspace.js +3 -3
- package/dist/src/session/store.d.ts +14 -14
- package/dist/src/session/store.js +70 -50
- package/dist/src/session/stored-rows-to-file-entries.d.ts +1 -1
- package/dist/src/session/stored-rows-to-file-entries.js +5 -3
- package/dist/src/session/thinking-resolve.d.ts +2 -2
- package/dist/src/session/thinking-resolve.js +4 -4
- package/dist/src/session/transcript-events.d.ts +1 -1
- package/dist/src/session/transcript-events.js +3 -3
- package/dist/src/session/transcript-outline.js +2 -1
- package/dist/src/session/turn-outcome-projector.js +2 -0
- package/dist/src/session/types.d.ts +5 -4
- package/dist/src/session/types.js +13 -9
- package/dist/src/session/user-message-display.js +2 -0
- package/dist/src/session/user-round-delete.js +2 -1
- package/dist/src/session/voice-transcript.js +8 -3
- package/dist/src/share/hosted-session-share.d.ts +6 -6
- package/dist/src/share/hosted-session-share.js +13 -11
- package/dist/src/share/hosted-static-site-publish.d.ts +1 -1
- package/dist/src/share/hosted-static-site-publish.js +1 -1
- package/dist/src/share/session-share-service.d.ts +9 -9
- package/dist/src/share/session-share-service.js +19 -19
- package/dist/src/share/share-store.d.ts +2 -2
- package/dist/src/share/share-store.js +9 -7
- package/dist/src/share/share-types.d.ts +2 -2
- package/dist/src/share/site-share-router.d.ts +2 -2
- package/dist/src/share/site-share-store.js +4 -2
- package/dist/src/share/site-share-types.d.ts +1 -1
- package/dist/src/storage/sqlite/activity-repository.js +2 -1
- package/dist/src/storage/sqlite/browser-session-repository.js +2 -1
- package/dist/src/storage/sqlite/browser-tab-binding-repository.d.ts +2 -2
- package/dist/src/storage/sqlite/browser-tab-binding-repository.js +10 -9
- package/dist/src/storage/sqlite/clarification-wait-repository.d.ts +7 -7
- package/dist/src/storage/sqlite/clarification-wait-repository.js +58 -53
- package/dist/src/storage/sqlite/collaboration-rule-repository.js +2 -1
- package/dist/src/storage/sqlite/composer-input-history-repository.js +2 -1
- package/dist/src/storage/sqlite/config-repository.d.ts +6 -6
- package/dist/src/storage/sqlite/config-repository.js +29 -25
- package/dist/src/storage/sqlite/connection-wait-repository.d.ts +11 -11
- package/dist/src/storage/sqlite/connection-wait-repository.js +61 -51
- package/dist/src/storage/sqlite/connection.js +28 -18
- package/dist/src/storage/sqlite/connector-account-repository.js +2 -1
- package/dist/src/storage/sqlite/connector-learning-repository.js +2 -1
- package/dist/src/storage/sqlite/connector-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/connector-repository.js +11 -10
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +2 -1
- package/dist/src/storage/sqlite/context-evidence-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/context-evidence-repository.js +7 -6
- package/dist/src/storage/sqlite/context-extraction-repository.js +2 -1
- package/dist/src/storage/sqlite/context-relation-repository.js +2 -1
- package/dist/src/storage/sqlite/conversation-repository.d.ts +12 -0
- package/dist/src/storage/sqlite/conversation-repository.js +76 -0
- package/dist/src/storage/sqlite/device-access-repository.js +4 -1
- package/dist/src/storage/sqlite/device-pairing-approval.js +4 -1
- package/dist/src/storage/sqlite/device-pairing-repository.js +2 -1
- package/dist/src/storage/sqlite/durable-queue.js +4 -2
- package/dist/src/storage/sqlite/durable-state.js +4 -2
- package/dist/src/storage/sqlite/endpoint-principal-repository.js +2 -1
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.d.ts +3 -3
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +12 -11
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +2 -1
- package/dist/src/storage/sqlite/fts.js +39 -34
- package/dist/src/storage/sqlite/gateway-identity-repository.js +2 -1
- package/dist/src/storage/sqlite/home-attention-repository.js +2 -1
- package/dist/src/storage/sqlite/import-repository.d.ts +2 -3
- package/dist/src/storage/sqlite/import-repository.js +5 -4
- package/dist/src/storage/sqlite/import-selection-repository.d.ts +15 -0
- package/dist/src/storage/sqlite/import-selection-repository.js +29 -0
- package/dist/src/storage/sqlite/index.d.ts +1 -1
- package/dist/src/storage/sqlite/index.js +25 -11
- package/dist/src/storage/sqlite/interaction-state-repository.d.ts +4 -4
- package/dist/src/storage/sqlite/interaction-state-repository.js +12 -11
- package/dist/src/storage/sqlite/knowledge-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/knowledge-repository.js +4 -3
- package/dist/src/storage/sqlite/migrations/175_import_selections.sql +8 -0
- package/dist/src/storage/sqlite/migrations/176_proactive_quality.sql +5 -0
- package/dist/src/storage/sqlite/migrations/177_proactive_check_controls.sql +25 -0
- package/dist/src/storage/sqlite/migrations/178_conversation_uuid.sql +2 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +3 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.js +88 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.ts +66 -0
- package/dist/src/storage/sqlite/migrations/conversation-key-decoder.d.ts +8 -0
- package/dist/src/storage/sqlite/migrations/conversation-key-decoder.js +87 -0
- package/dist/src/storage/sqlite/migrations/conversation-key-decoder.ts +50 -0
- package/dist/src/storage/sqlite/migrations/conversation-uuid.d.ts +8 -0
- package/dist/src/storage/sqlite/migrations/conversation-uuid.js +366 -0
- package/dist/src/storage/sqlite/migrations/conversation-uuid.ts +324 -0
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.d.ts +1 -0
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.js +92 -0
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.ts +71 -0
- package/dist/src/storage/sqlite/migrations/discover.js +7 -3
- package/dist/src/storage/sqlite/migrations/errors.js +28 -23
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +43 -14
- package/dist/src/storage/sqlite/migrations/runner.ts +13 -3
- package/dist/src/storage/sqlite/migrations/types.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/types.ts +1 -1
- package/dist/src/storage/sqlite/note-agent-context-repository.js +2 -1
- package/dist/src/storage/sqlite/notes-repository.js +4 -2
- package/dist/src/storage/sqlite/paths.js +6 -2
- package/dist/src/storage/sqlite/relationship-settings-repository.js +2 -1
- package/dist/src/storage/sqlite/row-mappers.d.ts +10 -10
- package/dist/src/storage/sqlite/row-mappers.js +22 -15
- package/dist/src/storage/sqlite/schema-version.js +7 -2
- package/dist/src/storage/sqlite/schema.js +14 -6
- package/dist/src/storage/sqlite/session-identity-sql.js +12 -5
- package/dist/src/storage/sqlite/session-input-repository.d.ts +14 -14
- package/dist/src/storage/sqlite/session-input-repository.js +69 -61
- package/dist/src/storage/sqlite/session-instance-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/session-instance-repository.js +6 -3
- package/dist/src/storage/sqlite/session-metadata.d.ts +2 -2
- package/dist/src/storage/sqlite/session-metadata.js +7 -3
- package/dist/src/storage/sqlite/session-repository.d.ts +15 -15
- package/dist/src/storage/sqlite/session-repository.js +126 -102
- package/dist/src/storage/sqlite/session-task-plan-repository.d.ts +3 -3
- package/dist/src/storage/sqlite/session-task-plan-repository.js +21 -19
- package/dist/src/storage/sqlite/session-turn-replace-repository.d.ts +2 -2
- package/dist/src/storage/sqlite/session-turn-replace-repository.js +26 -22
- package/dist/src/storage/sqlite/transaction.js +12 -6
- package/dist/src/storage/sqlite/transcript-repository.d.ts +14 -14
- package/dist/src/storage/sqlite/transcript-repository.js +107 -102
- package/dist/src/storage/sqlite/user-people-repository.js +2 -1
- package/dist/src/storage/sqlite/user-trust-repository.js +2 -1
- package/dist/src/support/collect-support-report.js +7 -7
- package/dist/src/support/types.d.ts +2 -2
- package/dist/src/support/types.js +1 -1
- package/dist/src/tasks/execution-context.d.ts +2 -2
- package/dist/src/tasks/execution-context.js +3 -3
- package/dist/src/tasks/home-query-service.d.ts +2 -2
- package/dist/src/tasks/home-query-service.js +6 -6
- package/dist/src/tasks/index.js +6 -2
- package/dist/src/tasks/project-monitoring-service.js +2 -1
- package/dist/src/tasks/project-operating-view-service.js +2 -1
- package/dist/src/tasks/task-application-service.js +9 -4
- package/dist/src/tasks/task-change-events.js +7 -2
- package/dist/src/tasks/task-context-assembler.d.ts +2 -2
- package/dist/src/tasks/task-context-assembler.js +12 -9
- package/dist/src/tasks/task-context-repository.d.ts +1 -1
- package/dist/src/tasks/task-context-repository.js +4 -3
- package/dist/src/tasks/task-conversation-repository.d.ts +7 -7
- package/dist/src/tasks/task-conversation-repository.js +27 -26
- package/dist/src/tasks/task-deletion-service.js +2 -1
- package/dist/src/tasks/task-dependency-service.js +2 -1
- package/dist/src/tasks/task-handoff-service.d.ts +2 -2
- package/dist/src/tasks/task-handoff-service.js +16 -15
- package/dist/src/tasks/task-outbox-dispatcher.js +2 -1
- package/dist/src/tasks/task-read-model-projector.js +4 -2
- package/dist/src/tasks/task-repository.js +2 -1
- package/dist/src/tasks/task-run-coordinator.js +6 -5
- package/dist/src/tasks/task-run-dispatcher.d.ts +1 -1
- package/dist/src/tasks/task-run-dispatcher.js +4 -3
- package/dist/src/tasks/task-run-repository.d.ts +2 -2
- package/dist/src/tasks/task-run-repository.js +219 -212
- package/dist/src/tasks/task-signal-service.js +6 -2
- package/dist/src/tasks/task-workflow-coordinator.js +2 -1
- package/dist/src/tui/backends/embedded-backend.d.ts +33 -32
- package/dist/src/tui/backends/embedded-backend.js +95 -83
- package/dist/src/tui/backends/gateway-realtime-backend.d.ts +34 -33
- package/dist/src/tui/backends/gateway-realtime-backend.js +95 -78
- package/dist/src/tui/components/branch-summary.js +3 -3
- package/dist/src/tui/components/session-selector.d.ts +5 -5
- package/dist/src/tui/components/session-selector.js +7 -7
- package/dist/src/tui/components/tui-bottom-bar.js +1 -1
- package/dist/src/tui/components/tui-header.d.ts +1 -1
- package/dist/src/tui/components/tui-header.js +2 -2
- package/dist/src/tui/extension-host/autocomplete.d.ts +2 -2
- package/dist/src/tui/extension-host/autocomplete.js +4 -4
- package/dist/src/tui/extension-host/host.d.ts +1 -1
- package/dist/src/tui/extension-host/runtime-context.d.ts +1 -1
- package/dist/src/tui/extension-host/runtime-context.js +2 -2
- package/dist/src/tui/extension-host/runtime.d.ts +1 -1
- package/dist/src/tui/extension-host/runtime.js +6 -6
- package/dist/src/tui/tui-backend.d.ts +43 -39
- package/dist/src/tui/tui-command-formatters.d.ts +2 -2
- package/dist/src/tui/tui-command-formatters.js +10 -18
- package/dist/src/tui/tui-commands.d.ts +3 -3
- package/dist/src/tui/tui-commands.js +31 -33
- package/dist/src/tui/tui-empty-session-cleanup.d.ts +2 -3
- package/dist/src/tui/tui-empty-session-cleanup.js +7 -15
- package/dist/src/tui/tui-file-autocomplete.d.ts +1 -1
- package/dist/src/tui/tui-file-autocomplete.js +2 -2
- package/dist/src/tui/tui-new-session-preferences.js +2 -0
- package/dist/src/tui/tui-picker-overlay.d.ts +1 -1
- package/dist/src/tui/tui-picker-overlay.js +41 -53
- package/dist/src/tui/tui-picker-services.d.ts +3 -3
- package/dist/src/tui/tui-session-actions.d.ts +1 -1
- package/dist/src/tui/tui-session-actions.js +8 -17
- package/dist/src/tui/tui-session-format.js +4 -1
- package/dist/src/tui/tui-session-snapshot.d.ts +2 -2
- package/dist/src/tui/tui-session-snapshot.js +4 -4
- package/dist/src/tui/tui-settings.js +2 -0
- package/dist/src/tui/tui-startup-resources.d.ts +1 -1
- package/dist/src/tui/tui-startup-resources.js +3 -3
- package/dist/src/tui/tui-startup-text.js +1 -1
- package/dist/src/tui/tui-transcript-tree-picker.d.ts +1 -1
- package/dist/src/tui/tui-transcript-tree-picker.js +2 -2
- package/dist/src/tui/tui-types.d.ts +4 -2
- package/dist/src/tui/tui-types.js +2 -2
- package/dist/src/tui/tui.js +114 -112
- package/dist/src/user-context/access-policy.d.ts +1 -1
- package/dist/src/user-context/access-policy.js +6 -5
- package/dist/src/user-context/changes.js +9 -4
- package/dist/src/user-context/domain.d.ts +1 -1
- package/dist/src/user-context/relationship-continuity.d.ts +1 -1
- package/dist/src/user-context/relationship-continuity.js +1 -1
- package/dist/src/user-context/sources/repository.js +4 -2
- package/dist/src/user-model/capture/executor.d.ts +1 -1
- package/dist/src/user-model/capture/executor.js +3 -3
- package/dist/src/user-model/goals.js +2 -1
- package/dist/src/user-model/repository.js +2 -1
- package/dist/src/utils/global-singleton.js +4 -1
- package/dist/src/utils/logger/context.d.ts +1 -1
- package/dist/src/utils/logger/context.js +2 -2
- package/dist/src/utils/logger/log-store.js +2 -2
- package/dist/src/utils/logger/pino-record.js +6 -6
- package/dist/src/utils/logger/types.d.ts +6 -6
- package/dist/src/voice/realtime/agentBroker.d.ts +6 -6
- package/dist/src/voice/realtime/agentBroker.js +6 -6
- package/dist/src/voice/realtime/agentEngine.js +6 -6
- package/dist/src/voice/realtime/memory-context.d.ts +2 -2
- package/dist/src/voice/realtime/memory-context.js +15 -15
- package/dist/src/voice/realtime/persona-context.d.ts +1 -1
- package/dist/src/voice/realtime/persona-context.js +6 -6
- package/dist/src/voice/realtime/runtime.d.ts +1 -1
- package/dist/src/voice/realtime/runtime.js +14 -13
- package/dist/src/voice/realtime/runtime.types.d.ts +6 -6
- package/dist/src/work-discovery/candidate-discovery.js +1 -1
- package/dist/src/work-discovery/investigation-repository.js +4 -2
- package/dist/src/work-discovery/probe.js +1 -1
- package/dist/src/work-discovery/repository.js +7 -5
- package/dist/src/work-discovery/service.js +33 -29
- package/dist/src/work-discovery/types.d.ts +1 -1
- package/dist/src/workflows/context/workflow-context-snapshot-repository.js +2 -1
- package/dist/src/workflows/domain/event.d.ts +1 -1
- package/dist/src/workflows/domain/run.d.ts +5 -5
- package/dist/src/workflows/engine/projector.js +1 -1
- package/dist/src/workflows/engine/workflow-engine.d.ts +2 -2
- package/dist/src/workflows/engine/workflow-engine.js +15 -18
- package/dist/src/workflows/index.js +3 -3
- package/dist/src/workflows/project-presets/project-workflow-preset-repository.js +2 -1
- package/dist/src/workflows/service/run-view-to-snapshot.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.d.ts +2 -2
- package/dist/src/workflows/service/workflow-run-service.js +53 -42
- package/dist/src/workflows/service/workflow-run-service.types.d.ts +2 -2
- package/dist/src/workflows/service/workflow-session-bridge.d.ts +2 -2
- package/dist/src/workflows/service/workflow-session-bridge.js +31 -31
- package/dist/src/workflows/service/workflow-session-key.d.ts +1 -1
- package/dist/src/workflows/service/workflow-session-key.js +4 -4
- package/dist/src/workflows/service/workflow-writeback-service.js +2 -1
- package/dist/src/workflows/store/event-store.js +4 -2
- package/dist/src/workflows/store/run-index-store.js +9 -8
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-D9qP10BK.js +0 -1
- package/dist/gateway/static/root/assets/agents-D-bkOuAl.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-BKwBBwJN.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-B2-f9qZu.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-Dtn4rMeq.js +0 -8
- package/dist/gateway/static/root/assets/button-BA45yciM.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DiwtR9MD.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-pTdR1q1K.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BSQ7Hs2w.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-BUGkGB4-.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-CYkT7ecp.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-Baua1_Le.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CzpSYWex.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DTM_kYpE.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CSSJvdd6.js +0 -1
- package/dist/gateway/static/root/assets/imports-page-XqVVYbAp.js +0 -1
- package/dist/gateway/static/root/assets/index-B_Sg5BKz.css +0 -2
- package/dist/gateway/static/root/assets/index-C9aQA4Dr.js +0 -74
- package/dist/gateway/static/root/assets/local-app-workbench-page-CZSgTYuI.js +0 -2
- package/dist/gateway/static/root/assets/locale-store-DO6JJ1l2.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-z5ktnEzX.js +0 -2
- package/dist/gateway/static/root/assets/messages-BgZRsCkG.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-DSaZfkna.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-CePEyv_C.js +0 -8
- package/dist/gateway/static/root/assets/page-tabs-CdYemUOu.js +0 -1
- package/dist/gateway/static/root/assets/popover-select-DGmMQt4t.js +0 -1
- package/dist/gateway/static/root/assets/proactive-page-Cy2Gm2f8.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BliwYpns.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-Dm-BqnQn.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-C_XuQ9XR.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-Drt1aS2G.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BAUd06_9.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-Bw6xKOX5.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-layout-DYelDcMV.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BHI9e5Tw.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DOAOjZBQ.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DU0VQpHj.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DiPgMmBM.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-Bmsy-5Fs.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-DxRaRdA0.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-CZikdgNw.js +0 -6
- package/dist/src/routing/session-key-utils.d.ts +0 -23
- package/dist/src/routing/session-key-utils.js +0 -85
- package/dist/src/session/session-id.d.ts +0 -3
- package/dist/src/session/session-id.js +0 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as t, M as MAX_BROWSER_CONTEXTS_PER_TURN, b as browserPageContextsInputSchema, k as gatewayFetch, o as openDatabase, R as RealtimeClient, a as activeTabId, g as currentTabDescriptor, T as TAB_BINDING_PREFIX, l as getAccessProfile, t as runWithTabSiteAccess, P as PENDING_CONTEXT_KEY, j as extensionLocale, e as captureTabWithPermission, p as pairGateway, v as setAutoConnectEnabled, r as readPendingBrowserPairing, n as readProfile, h as discoverLocalGateway, u as saveExtensionLocalePreference, s as revokeAndForgetProfile, c as cancelPendingBrowserPairing, m as loadExtensionLocalePreference } from './assets/auth-
|
|
1
|
+
import { w as t, M as MAX_BROWSER_CONTEXTS_PER_TURN, b as browserPageContextsInputSchema, k as gatewayFetch, o as openDatabase, R as RealtimeClient, a as activeTabId, g as currentTabDescriptor, T as TAB_BINDING_PREFIX, l as getAccessProfile, t as runWithTabSiteAccess, P as PENDING_CONTEXT_KEY, j as extensionLocale, e as captureTabWithPermission, p as pairGateway, v as setAutoConnectEnabled, r as readPendingBrowserPairing, n as readProfile, h as discoverLocalGateway, u as saveExtensionLocalePreference, s as revokeAndForgetProfile, c as cancelPendingBrowserPairing, m as loadExtensionLocalePreference } from './assets/auth-BXCWrPlg.js';
|
|
2
2
|
|
|
3
3
|
true &&(function polyfill() {
|
|
4
4
|
const relList = document.createElement("link").relList;
|
|
@@ -17976,8 +17976,8 @@ function findCommand(value, cursor) {
|
|
|
17976
17976
|
const match = /(?:^|\s)\/([\w.-]*)$/.exec(value.slice(0, cursor));
|
|
17977
17977
|
return match ? { start: cursor - match[1].length - 1, end: cursor, query: match[1] } : void 0;
|
|
17978
17978
|
}
|
|
17979
|
-
async function loadComposerCommands(
|
|
17980
|
-
const params = new URLSearchParams(
|
|
17979
|
+
async function loadComposerCommands(conversationId) {
|
|
17980
|
+
const params = new URLSearchParams(conversationId ? { conversationId } : {});
|
|
17981
17981
|
const responses = await Promise.all([
|
|
17982
17982
|
gatewayFetch("/api/commands"),
|
|
17983
17983
|
gatewayFetch(`/api/chat/skills?${params}`)
|
|
@@ -18030,30 +18030,30 @@ function transactionResult(database, mode, createRequest) {
|
|
|
18030
18030
|
transaction.onabort = () => reject(transaction.error ?? new Error(t("errorOutboxAborted")));
|
|
18031
18031
|
});
|
|
18032
18032
|
}
|
|
18033
|
-
async function readBrowserOutbox(
|
|
18033
|
+
async function readBrowserOutbox(conversationId) {
|
|
18034
18034
|
const database = await openDatabase();
|
|
18035
18035
|
try {
|
|
18036
18036
|
return await transactionResult(
|
|
18037
18037
|
database,
|
|
18038
18038
|
"readonly",
|
|
18039
|
-
(store) => store.get(
|
|
18039
|
+
(store) => store.get(conversationId)
|
|
18040
18040
|
);
|
|
18041
18041
|
} finally {
|
|
18042
18042
|
database.close();
|
|
18043
18043
|
}
|
|
18044
18044
|
}
|
|
18045
|
-
async function writeBrowserOutbox(
|
|
18045
|
+
async function writeBrowserOutbox(conversationId, value) {
|
|
18046
18046
|
const database = await openDatabase();
|
|
18047
18047
|
try {
|
|
18048
|
-
await transactionResult(database, "readwrite", (store) => store.put(value,
|
|
18048
|
+
await transactionResult(database, "readwrite", (store) => store.put(value, conversationId));
|
|
18049
18049
|
} finally {
|
|
18050
18050
|
database.close();
|
|
18051
18051
|
}
|
|
18052
18052
|
}
|
|
18053
|
-
async function deleteBrowserOutbox(
|
|
18053
|
+
async function deleteBrowserOutbox(conversationId) {
|
|
18054
18054
|
const database = await openDatabase();
|
|
18055
18055
|
try {
|
|
18056
|
-
await transactionResult(database, "readwrite", (store) => store.delete(
|
|
18056
|
+
await transactionResult(database, "readwrite", (store) => store.delete(conversationId));
|
|
18057
18057
|
} finally {
|
|
18058
18058
|
database.close();
|
|
18059
18059
|
}
|
|
@@ -18142,11 +18142,11 @@ function mapMessage(value, index) {
|
|
|
18142
18142
|
} : {}
|
|
18143
18143
|
};
|
|
18144
18144
|
}
|
|
18145
|
-
function mapClarification(value,
|
|
18145
|
+
function mapClarification(value, conversationId) {
|
|
18146
18146
|
if (!value || typeof value !== "object") return void 0;
|
|
18147
18147
|
const envelope = value;
|
|
18148
18148
|
const row = envelope.clarification && typeof envelope.clarification === "object" ? envelope.clarification : envelope;
|
|
18149
|
-
if (row.status !== "open" || row.
|
|
18149
|
+
if (row.status !== "open" || row.conversationId !== conversationId || typeof row.id !== "string" || typeof row.question !== "string") return void 0;
|
|
18150
18150
|
const choices = Array.isArray(row.choices) ? row.choices.filter((choice) => typeof choice === "string" && Boolean(choice.trim())) : void 0;
|
|
18151
18151
|
return {
|
|
18152
18152
|
id: row.id,
|
|
@@ -18258,8 +18258,8 @@ class BrowserChatClient {
|
|
|
18258
18258
|
if (!(cause instanceof GatewayRequestError) || cause.status !== 404) throw cause;
|
|
18259
18259
|
await chrome.storage.session.remove([ACTIVE_CHAT_KEY, ...tabKey ? [tabKey] : []]);
|
|
18260
18260
|
this.update({
|
|
18261
|
-
|
|
18262
|
-
|
|
18261
|
+
conversationId: void 0,
|
|
18262
|
+
transcriptId: void 0,
|
|
18263
18263
|
messages: [],
|
|
18264
18264
|
sessionLoading: false,
|
|
18265
18265
|
modelConfig: void 0,
|
|
@@ -18307,10 +18307,10 @@ class BrowserChatClient {
|
|
|
18307
18307
|
if (this.turnClaim && this.snapshot.pendingDelivery) void this.recoverOutbox();
|
|
18308
18308
|
}
|
|
18309
18309
|
async bindSessionEndpoint() {
|
|
18310
|
-
const
|
|
18310
|
+
const conversationId = this.snapshot.conversationId;
|
|
18311
18311
|
const endpointId = this.turnClaim?.endpointId;
|
|
18312
|
-
if (!
|
|
18313
|
-
const desired = `${
|
|
18312
|
+
if (!conversationId || !endpointId) return;
|
|
18313
|
+
const desired = `${conversationId}
|
|
18314
18314
|
${endpointId}`;
|
|
18315
18315
|
if (this.endpointBinding === desired) return;
|
|
18316
18316
|
if (this.endpointBindingTask) {
|
|
@@ -18318,14 +18318,14 @@ ${endpointId}`;
|
|
|
18318
18318
|
if (this.endpointBinding === desired) return;
|
|
18319
18319
|
}
|
|
18320
18320
|
const task = json(await gatewayFetch(
|
|
18321
|
-
`/api/endpoint-tools/bindings/${encodeURIComponent(
|
|
18321
|
+
`/api/endpoint-tools/bindings/${encodeURIComponent(conversationId)}`,
|
|
18322
18322
|
{
|
|
18323
18323
|
method: "PUT",
|
|
18324
18324
|
headers: { "Content-Type": "application/json" },
|
|
18325
18325
|
body: JSON.stringify({ endpointId })
|
|
18326
18326
|
}
|
|
18327
18327
|
)).then(() => {
|
|
18328
|
-
if (this.snapshot.
|
|
18328
|
+
if (this.snapshot.conversationId === conversationId && this.turnClaim?.endpointId === endpointId) {
|
|
18329
18329
|
this.endpointBinding = desired;
|
|
18330
18330
|
}
|
|
18331
18331
|
});
|
|
@@ -18347,7 +18347,7 @@ ${endpointId}`;
|
|
|
18347
18347
|
if (typeof row.key !== "string") return [];
|
|
18348
18348
|
return [{
|
|
18349
18349
|
key: row.key,
|
|
18350
|
-
...typeof row.
|
|
18350
|
+
...typeof row.transcriptId === "string" ? { transcriptId: row.transcriptId } : {},
|
|
18351
18351
|
title: [row.name, row.title, row.displayName].find((item) => typeof item === "string" && item.trim()) || t("newChat"),
|
|
18352
18352
|
updatedAt: typeof row.updatedAt === "string" ? row.updatedAt : ""
|
|
18353
18353
|
}];
|
|
@@ -18363,12 +18363,12 @@ ${endpointId}`;
|
|
|
18363
18363
|
await this.loadSessions();
|
|
18364
18364
|
await this.openSession(response.session.key);
|
|
18365
18365
|
}
|
|
18366
|
-
async openSession(
|
|
18366
|
+
async openSession(conversationId) {
|
|
18367
18367
|
if (this.runTopic) this.realtime?.unsubscribe(this.runTopic);
|
|
18368
18368
|
this.runTopic = void 0;
|
|
18369
18369
|
this.update({
|
|
18370
|
-
|
|
18371
|
-
|
|
18370
|
+
conversationId,
|
|
18371
|
+
transcriptId: this.snapshot.sessions.find((candidate) => candidate.key === conversationId)?.transcriptId,
|
|
18372
18372
|
messages: [],
|
|
18373
18373
|
streamingText: "",
|
|
18374
18374
|
runId: void 0,
|
|
@@ -18382,10 +18382,10 @@ ${endpointId}`;
|
|
|
18382
18382
|
modelConfig: void 0,
|
|
18383
18383
|
error: void 0
|
|
18384
18384
|
});
|
|
18385
|
-
await chrome.storage.session.set({ [ACTIVE_CHAT_KEY]:
|
|
18385
|
+
await chrome.storage.session.set({ [ACTIVE_CHAT_KEY]: conversationId });
|
|
18386
18386
|
const tabId = await activeTabId();
|
|
18387
18387
|
if (tabId !== void 0) {
|
|
18388
|
-
await chrome.storage.session.set({ [`${TAB_SESSION_PREFIX}${tabId}`]:
|
|
18388
|
+
await chrome.storage.session.set({ [`${TAB_SESSION_PREFIX}${tabId}`]: conversationId });
|
|
18389
18389
|
}
|
|
18390
18390
|
try {
|
|
18391
18391
|
await Promise.all([
|
|
@@ -18394,30 +18394,30 @@ ${endpointId}`;
|
|
|
18394
18394
|
this.reloadClarification(),
|
|
18395
18395
|
this.reloadTabBinding()
|
|
18396
18396
|
]);
|
|
18397
|
-
if (this.snapshot.
|
|
18397
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18398
18398
|
await this.bindSessionEndpoint();
|
|
18399
|
-
if (this.snapshot.
|
|
18399
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18400
18400
|
const run = await json(await gatewayFetch(
|
|
18401
|
-
`/api/sessions/${encodeURIComponent(
|
|
18401
|
+
`/api/sessions/${encodeURIComponent(conversationId)}/run`
|
|
18402
18402
|
));
|
|
18403
|
-
if (this.snapshot.
|
|
18403
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18404
18404
|
if (run.payload?.active && run.payload.runId) await this.followRun(run.payload.runId);
|
|
18405
18405
|
await this.reloadBrowserApproval();
|
|
18406
|
-
if (this.snapshot.
|
|
18407
|
-
this.update({ pendingDelivery: Boolean(await readBrowserOutbox(
|
|
18406
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18407
|
+
this.update({ pendingDelivery: Boolean(await readBrowserOutbox(conversationId)) });
|
|
18408
18408
|
if (this.snapshot.endpointReady) await this.recoverOutbox();
|
|
18409
18409
|
} catch (cause) {
|
|
18410
|
-
if (this.snapshot.
|
|
18410
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18411
18411
|
throw cause;
|
|
18412
18412
|
} finally {
|
|
18413
|
-
if (this.snapshot.
|
|
18414
|
-
await chrome.storage.session.set({ [ACTIVE_CHAT_KEY]:
|
|
18413
|
+
if (this.snapshot.conversationId === conversationId) {
|
|
18414
|
+
await chrome.storage.session.set({ [ACTIVE_CHAT_KEY]: conversationId });
|
|
18415
18415
|
this.update({ sessionLoading: false });
|
|
18416
18416
|
}
|
|
18417
18417
|
}
|
|
18418
18418
|
}
|
|
18419
|
-
get
|
|
18420
|
-
return this.snapshot.
|
|
18419
|
+
get currentConversationId() {
|
|
18420
|
+
return this.snapshot.conversationId;
|
|
18421
18421
|
}
|
|
18422
18422
|
async send(content, browserContexts = [], attachments = []) {
|
|
18423
18423
|
if (this.sendingInput) throw new Error(t("errorWaitQueuedMessage"));
|
|
@@ -18431,20 +18431,20 @@ ${endpointId}`;
|
|
|
18431
18431
|
async sendInput(content, browserContexts = [], attachments = []) {
|
|
18432
18432
|
const text = content.trim();
|
|
18433
18433
|
if (!text && attachments.length === 0) return "sent";
|
|
18434
|
-
if (!this.snapshot.
|
|
18434
|
+
if (!this.snapshot.conversationId) throw new Error(t("errorOpenChatBeforeSending"));
|
|
18435
18435
|
if (this.snapshot.submitting || this.snapshot.pendingDelivery || this.recoveringOutbox) {
|
|
18436
18436
|
throw new Error(t("errorWaitQueuedMessage"));
|
|
18437
18437
|
}
|
|
18438
18438
|
if (!this.turnClaim) throw new Error(t("errorEndpointNotReady"));
|
|
18439
|
-
const
|
|
18439
|
+
const conversationId = this.snapshot.conversationId;
|
|
18440
18440
|
await this.bindSessionEndpoint();
|
|
18441
|
-
if (this.snapshot.
|
|
18441
|
+
if (this.snapshot.conversationId !== conversationId) throw new Error(t("errorChatChanged"));
|
|
18442
18442
|
const clientMessageId = crypto.randomUUID();
|
|
18443
18443
|
const request = {
|
|
18444
18444
|
content: text,
|
|
18445
18445
|
clientMessageId,
|
|
18446
18446
|
delivery: "next",
|
|
18447
|
-
|
|
18447
|
+
expectedTranscriptId: this.snapshot.transcriptId,
|
|
18448
18448
|
...this.snapshot.modelConfig?.fixedModel ? { configVersion: this.snapshot.modelConfig.configVersion } : {},
|
|
18449
18449
|
origin: { type: "endpoint", endpointId: this.turnClaim.endpointId, token: this.turnClaim.token },
|
|
18450
18450
|
...browserContexts.length ? { browserContexts } : {},
|
|
@@ -18455,7 +18455,7 @@ ${endpointId}`;
|
|
|
18455
18455
|
let deliveryAccepted = false;
|
|
18456
18456
|
this.update({ submitting: true, pendingDelivery: false });
|
|
18457
18457
|
try {
|
|
18458
|
-
await writeBrowserOutbox(
|
|
18458
|
+
await writeBrowserOutbox(conversationId, request);
|
|
18459
18459
|
outboxStored = true;
|
|
18460
18460
|
this.update({
|
|
18461
18461
|
messages: this.snapshot.runId ? this.snapshot.messages : [...this.snapshot.messages, {
|
|
@@ -18475,24 +18475,24 @@ ${endpointId}`;
|
|
|
18475
18475
|
error: void 0
|
|
18476
18476
|
});
|
|
18477
18477
|
const response = await json(
|
|
18478
|
-
await gatewayFetch(`/api/sessions/${encodeURIComponent(
|
|
18478
|
+
await gatewayFetch(`/api/sessions/${encodeURIComponent(conversationId)}/inputs`, {
|
|
18479
18479
|
method: "POST",
|
|
18480
18480
|
headers: { "Content-Type": "application/json" },
|
|
18481
18481
|
body: JSON.stringify(request)
|
|
18482
18482
|
})
|
|
18483
18483
|
);
|
|
18484
18484
|
deliveryAccepted = true;
|
|
18485
|
-
await deleteBrowserOutbox(
|
|
18485
|
+
await deleteBrowserOutbox(conversationId);
|
|
18486
18486
|
outboxStored = false;
|
|
18487
|
-
if (this.snapshot.
|
|
18488
|
-
const runId = response.payload.state.inputs?.find((input) => input.clientMessageId === clientMessageId)?.runId ?? response.payload.state.activeRunId ?? await this.waitForRun(
|
|
18489
|
-
if (this.snapshot.
|
|
18487
|
+
if (this.snapshot.conversationId !== conversationId) return "sent";
|
|
18488
|
+
const runId = response.payload.state.inputs?.find((input) => input.clientMessageId === clientMessageId)?.runId ?? response.payload.state.activeRunId ?? await this.waitForRun(conversationId, clientMessageId);
|
|
18489
|
+
if (this.snapshot.conversationId !== conversationId) return "sent";
|
|
18490
18490
|
if (runId) await this.followRun(runId);
|
|
18491
18491
|
else await this.reloadMessages();
|
|
18492
18492
|
return "sent";
|
|
18493
18493
|
} catch (cause) {
|
|
18494
18494
|
if (deliveryAccepted) {
|
|
18495
|
-
if (this.snapshot.
|
|
18495
|
+
if (this.snapshot.conversationId === conversationId) {
|
|
18496
18496
|
this.update({
|
|
18497
18497
|
pendingDelivery: false,
|
|
18498
18498
|
error: t("errorSentStatusUnknown")
|
|
@@ -18501,23 +18501,23 @@ ${endpointId}`;
|
|
|
18501
18501
|
return "sent";
|
|
18502
18502
|
}
|
|
18503
18503
|
if (outboxStored && isRetryableDeliveryError(cause)) {
|
|
18504
|
-
if (this.snapshot.
|
|
18504
|
+
if (this.snapshot.conversationId === conversationId) {
|
|
18505
18505
|
this.update({ pendingDelivery: true, error: void 0 });
|
|
18506
18506
|
}
|
|
18507
18507
|
return "queued";
|
|
18508
18508
|
}
|
|
18509
|
-
if (outboxStored) await deleteBrowserOutbox(
|
|
18510
|
-
if (this.snapshot.
|
|
18509
|
+
if (outboxStored) await deleteBrowserOutbox(conversationId);
|
|
18510
|
+
if (this.snapshot.conversationId === conversationId) this.update({ messages: previousMessages });
|
|
18511
18511
|
throw cause;
|
|
18512
18512
|
} finally {
|
|
18513
|
-
if (this.snapshot.
|
|
18513
|
+
if (this.snapshot.conversationId === conversationId) this.update({ submitting: false });
|
|
18514
18514
|
}
|
|
18515
18515
|
}
|
|
18516
18516
|
async recoverOutbox() {
|
|
18517
|
-
const
|
|
18518
|
-
if (!
|
|
18517
|
+
const conversationId = this.snapshot.conversationId;
|
|
18518
|
+
if (!conversationId || !this.turnClaim || this.recoveringOutbox) return;
|
|
18519
18519
|
if (Date.now() - this.lastOutboxRecoveryAt < 3e3) return;
|
|
18520
|
-
const pending = await readBrowserOutbox(
|
|
18520
|
+
const pending = await readBrowserOutbox(conversationId);
|
|
18521
18521
|
if (!pending?.clientMessageId || typeof pending.content !== "string") return;
|
|
18522
18522
|
this.recoveringOutbox = true;
|
|
18523
18523
|
this.lastOutboxRecoveryAt = Date.now();
|
|
@@ -18528,21 +18528,21 @@ ${endpointId}`;
|
|
|
18528
18528
|
...pending,
|
|
18529
18529
|
origin: { type: "endpoint", endpointId: this.turnClaim.endpointId, token: this.turnClaim.token }
|
|
18530
18530
|
};
|
|
18531
|
-
const response = await json(await gatewayFetch(`/api/sessions/${encodeURIComponent(
|
|
18531
|
+
const response = await json(await gatewayFetch(`/api/sessions/${encodeURIComponent(conversationId)}/inputs`, {
|
|
18532
18532
|
method: "POST",
|
|
18533
18533
|
headers: { "Content-Type": "application/json" },
|
|
18534
18534
|
body: JSON.stringify(request)
|
|
18535
18535
|
}));
|
|
18536
18536
|
deliveryAccepted = true;
|
|
18537
|
-
await deleteBrowserOutbox(
|
|
18538
|
-
if (this.snapshot.
|
|
18537
|
+
await deleteBrowserOutbox(conversationId);
|
|
18538
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18539
18539
|
this.update({ pendingDelivery: false, error: void 0 });
|
|
18540
|
-
const runId = response.payload.state.inputs?.find((input) => input.clientMessageId === request.clientMessageId)?.runId ?? response.payload.state.activeRunId ?? await this.waitForRun(
|
|
18541
|
-
if (this.snapshot.
|
|
18540
|
+
const runId = response.payload.state.inputs?.find((input) => input.clientMessageId === request.clientMessageId)?.runId ?? response.payload.state.activeRunId ?? await this.waitForRun(conversationId, request.clientMessageId);
|
|
18541
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18542
18542
|
if (runId) await this.followRun(runId);
|
|
18543
18543
|
else await this.reloadMessages();
|
|
18544
18544
|
} catch (cause) {
|
|
18545
|
-
if (this.snapshot.
|
|
18545
|
+
if (this.snapshot.conversationId === conversationId) {
|
|
18546
18546
|
if (deliveryAccepted) {
|
|
18547
18547
|
this.update({
|
|
18548
18548
|
pendingDelivery: false,
|
|
@@ -18551,7 +18551,7 @@ ${endpointId}`;
|
|
|
18551
18551
|
} else if (isRetryableDeliveryError(cause)) {
|
|
18552
18552
|
this.update({ pendingDelivery: true, error: void 0 });
|
|
18553
18553
|
} else {
|
|
18554
|
-
await deleteBrowserOutbox(
|
|
18554
|
+
await deleteBrowserOutbox(conversationId);
|
|
18555
18555
|
this.update({
|
|
18556
18556
|
pendingDelivery: false,
|
|
18557
18557
|
messages: this.snapshot.messages.filter((message) => message.id !== pending.clientMessageId),
|
|
@@ -18565,16 +18565,16 @@ ${endpointId}`;
|
|
|
18565
18565
|
}
|
|
18566
18566
|
async refreshInputs() {
|
|
18567
18567
|
const requestId = ++this.inputsRequest;
|
|
18568
|
-
const
|
|
18569
|
-
if (!
|
|
18568
|
+
const conversationId = this.snapshot.conversationId;
|
|
18569
|
+
if (!conversationId) return;
|
|
18570
18570
|
const result = await json(
|
|
18571
|
-
await gatewayFetch(`/api/sessions/${encodeURIComponent(
|
|
18571
|
+
await gatewayFetch(`/api/sessions/${encodeURIComponent(conversationId)}/input-state`)
|
|
18572
18572
|
);
|
|
18573
|
-
if (this.snapshot.
|
|
18573
|
+
if (this.snapshot.conversationId !== conversationId || requestId !== this.inputsRequest) return;
|
|
18574
18574
|
this.update({ queuedInputs: (result.payload.inputs ?? []).filter((input) => input.status === "queued") });
|
|
18575
18575
|
if (result.payload.activeRunId !== this.snapshot.runId) {
|
|
18576
18576
|
await this.reloadMessages();
|
|
18577
|
-
if (this.snapshot.
|
|
18577
|
+
if (this.snapshot.conversationId !== conversationId || requestId !== this.inputsRequest) return;
|
|
18578
18578
|
if (result.payload.activeRunId) await this.followRun(result.payload.activeRunId);
|
|
18579
18579
|
else {
|
|
18580
18580
|
if (this.runTopic) this.realtime?.unsubscribe(this.runTopic);
|
|
@@ -18584,7 +18584,7 @@ ${endpointId}`;
|
|
|
18584
18584
|
}
|
|
18585
18585
|
}
|
|
18586
18586
|
async editInput(id, version, content) {
|
|
18587
|
-
const key = this.snapshot.
|
|
18587
|
+
const key = this.snapshot.conversationId;
|
|
18588
18588
|
if (!key) return;
|
|
18589
18589
|
try {
|
|
18590
18590
|
await json(await gatewayFetch(`/api/sessions/${encodeURIComponent(key)}/inputs/${encodeURIComponent(id)}`, {
|
|
@@ -18593,17 +18593,17 @@ ${endpointId}`;
|
|
|
18593
18593
|
body: JSON.stringify({ version, content })
|
|
18594
18594
|
}));
|
|
18595
18595
|
} finally {
|
|
18596
|
-
if (this.snapshot.
|
|
18596
|
+
if (this.snapshot.conversationId === key) await this.refreshInputs();
|
|
18597
18597
|
}
|
|
18598
18598
|
}
|
|
18599
18599
|
async cancelInput(id, version) {
|
|
18600
|
-
const key = this.snapshot.
|
|
18600
|
+
const key = this.snapshot.conversationId;
|
|
18601
18601
|
if (!key) return;
|
|
18602
18602
|
try {
|
|
18603
18603
|
await json(await gatewayFetch(`/api/sessions/${encodeURIComponent(key)}/inputs/${encodeURIComponent(id)}?version=${version}`, { method: "DELETE" }));
|
|
18604
|
-
if (this.snapshot.
|
|
18604
|
+
if (this.snapshot.conversationId === key) await this.reloadMessages();
|
|
18605
18605
|
} finally {
|
|
18606
|
-
if (this.snapshot.
|
|
18606
|
+
if (this.snapshot.conversationId === key) await this.refreshInputs();
|
|
18607
18607
|
}
|
|
18608
18608
|
}
|
|
18609
18609
|
async abort() {
|
|
@@ -18623,9 +18623,9 @@ ${endpointId}`;
|
|
|
18623
18623
|
}
|
|
18624
18624
|
}
|
|
18625
18625
|
async updateModel(model) {
|
|
18626
|
-
const
|
|
18626
|
+
const conversationId = this.snapshot.conversationId;
|
|
18627
18627
|
const current = this.snapshot.modelConfig;
|
|
18628
|
-
if (!
|
|
18628
|
+
if (!conversationId || !current) return;
|
|
18629
18629
|
const selected = this.snapshot.models.find((candidate) => candidate.id === model);
|
|
18630
18630
|
const thinkingLevel = selected?.thinking?.options?.includes(current.thinkingLevel) ? current.thinkingLevel : selected?.thinking?.default;
|
|
18631
18631
|
await this.patchModelConfig({ model, thinkingLevel });
|
|
@@ -18650,11 +18650,11 @@ ${endpointId}`;
|
|
|
18650
18650
|
await this.reloadClarification();
|
|
18651
18651
|
}
|
|
18652
18652
|
async bindActiveTab(mode) {
|
|
18653
|
-
const
|
|
18654
|
-
if (!
|
|
18653
|
+
const conversationId = this.snapshot.conversationId;
|
|
18654
|
+
if (!conversationId || !this.turnClaim) throw new Error(t("errorOpenChatForEndpoint"));
|
|
18655
18655
|
const descriptor = await currentTabDescriptor();
|
|
18656
18656
|
const result = await json(await gatewayFetch(
|
|
18657
|
-
`/api/browser/tab-bindings/${encodeURIComponent(
|
|
18657
|
+
`/api/browser/tab-bindings/${encodeURIComponent(conversationId)}`,
|
|
18658
18658
|
{
|
|
18659
18659
|
method: "PUT",
|
|
18660
18660
|
headers: { "Content-Type": "application/json" },
|
|
@@ -18666,7 +18666,7 @@ ${endpointId}`;
|
|
|
18666
18666
|
})
|
|
18667
18667
|
}
|
|
18668
18668
|
));
|
|
18669
|
-
if (this.snapshot.
|
|
18669
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18670
18670
|
if (this.snapshot.tabBinding) {
|
|
18671
18671
|
await chrome.storage.session.remove(`${TAB_BINDING_PREFIX}${this.snapshot.tabBinding.id}`);
|
|
18672
18672
|
}
|
|
@@ -18674,11 +18674,11 @@ ${endpointId}`;
|
|
|
18674
18674
|
this.update({ tabBinding: result.payload });
|
|
18675
18675
|
}
|
|
18676
18676
|
async unbindActiveTab() {
|
|
18677
|
-
const
|
|
18677
|
+
const conversationId = this.snapshot.conversationId;
|
|
18678
18678
|
const binding = this.snapshot.tabBinding;
|
|
18679
|
-
if (!
|
|
18680
|
-
await json(await gatewayFetch(`/api/browser/tab-bindings/${encodeURIComponent(
|
|
18681
|
-
if (this.snapshot.
|
|
18679
|
+
if (!conversationId) return;
|
|
18680
|
+
await json(await gatewayFetch(`/api/browser/tab-bindings/${encodeURIComponent(conversationId)}`, { method: "DELETE" }));
|
|
18681
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18682
18682
|
if (binding) await chrome.storage.session.remove(`${TAB_BINDING_PREFIX}${binding.id}`);
|
|
18683
18683
|
this.update({ tabBinding: void 0 });
|
|
18684
18684
|
}
|
|
@@ -18692,11 +18692,11 @@ ${endpointId}`;
|
|
|
18692
18692
|
}));
|
|
18693
18693
|
await this.reloadBrowserApproval();
|
|
18694
18694
|
}
|
|
18695
|
-
async waitForRun(
|
|
18695
|
+
async waitForRun(conversationId, clientMessageId) {
|
|
18696
18696
|
for (let attempt = 0; attempt < 20; attempt += 1) {
|
|
18697
18697
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
18698
18698
|
const state = await json(
|
|
18699
|
-
await gatewayFetch(`/api/sessions/${encodeURIComponent(
|
|
18699
|
+
await gatewayFetch(`/api/sessions/${encodeURIComponent(conversationId)}/input-state`)
|
|
18700
18700
|
);
|
|
18701
18701
|
const runId = state.payload.inputs?.find((input) => input.clientMessageId === clientMessageId)?.runId ?? state.payload.activeRunId;
|
|
18702
18702
|
if (runId) return runId;
|
|
@@ -18707,11 +18707,11 @@ ${endpointId}`;
|
|
|
18707
18707
|
async followRun(runId) {
|
|
18708
18708
|
const topic = `run:${runId}`;
|
|
18709
18709
|
if (this.runTopic === topic) return;
|
|
18710
|
-
const
|
|
18710
|
+
const conversationId = this.snapshot.conversationId;
|
|
18711
18711
|
if (this.runTopic) this.realtime?.unsubscribe(this.runTopic);
|
|
18712
18712
|
this.runTopic = topic;
|
|
18713
18713
|
const stored = await chrome.storage.session.get(`${CURSOR_PREFIX}${runId}`);
|
|
18714
|
-
if (this.snapshot.
|
|
18714
|
+
if (this.snapshot.conversationId !== conversationId || this.runTopic !== topic) return;
|
|
18715
18715
|
const cursor = typeof stored[`${CURSOR_PREFIX}${runId}`] === "number" ? stored[`${CURSOR_PREFIX}${runId}`] : void 0;
|
|
18716
18716
|
this.update({ runId, streamingText: "" });
|
|
18717
18717
|
this.realtime?.subscribe(topic, cursor);
|
|
@@ -18719,9 +18719,9 @@ ${endpointId}`;
|
|
|
18719
18719
|
async onRealtimeEvent(topic, seq, event, data) {
|
|
18720
18720
|
if (topic === "gateway") {
|
|
18721
18721
|
if (event === "clarification.updated") {
|
|
18722
|
-
const
|
|
18723
|
-
if (
|
|
18724
|
-
this.update({ clarification: mapClarification(data,
|
|
18722
|
+
const conversationId = this.snapshot.conversationId;
|
|
18723
|
+
if (conversationId && data && typeof data === "object" && data.conversationId === conversationId) {
|
|
18724
|
+
this.update({ clarification: mapClarification(data, conversationId) });
|
|
18725
18725
|
}
|
|
18726
18726
|
}
|
|
18727
18727
|
if (event === "browser.approval.required") await this.reloadBrowserApproval();
|
|
@@ -18752,16 +18752,16 @@ ${endpointId}`;
|
|
|
18752
18752
|
}
|
|
18753
18753
|
}
|
|
18754
18754
|
async reloadMessages() {
|
|
18755
|
-
const
|
|
18756
|
-
if (!
|
|
18757
|
-
const result = await json(await gatewayFetch(`/api/sessions/${encodeURIComponent(
|
|
18755
|
+
const conversationId = this.snapshot.conversationId;
|
|
18756
|
+
if (!conversationId) return;
|
|
18757
|
+
const result = await json(await gatewayFetch(`/api/sessions/${encodeURIComponent(conversationId)}/messages?limit=200`));
|
|
18758
18758
|
const messages = (result.payload.messages ?? []).flatMap((value, index) => {
|
|
18759
18759
|
const message = mapMessage(value, index);
|
|
18760
18760
|
return message ? [message] : [];
|
|
18761
18761
|
});
|
|
18762
|
-
if (this.snapshot.
|
|
18763
|
-
const session = this.snapshot.sessions.find((candidate) => candidate.key ===
|
|
18764
|
-
this.update({ messages,
|
|
18762
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18763
|
+
const session = this.snapshot.sessions.find((candidate) => candidate.key === conversationId);
|
|
18764
|
+
this.update({ messages, transcriptId: session?.transcriptId });
|
|
18765
18765
|
}
|
|
18766
18766
|
async loadModels() {
|
|
18767
18767
|
const result = await json(await gatewayFetch("/api/models"));
|
|
@@ -18785,16 +18785,16 @@ ${endpointId}`;
|
|
|
18785
18785
|
this.update({ models });
|
|
18786
18786
|
}
|
|
18787
18787
|
async reloadModelConfig() {
|
|
18788
|
-
const
|
|
18789
|
-
if (!
|
|
18788
|
+
const conversationId = this.snapshot.conversationId;
|
|
18789
|
+
if (!conversationId) return;
|
|
18790
18790
|
const result = await json(await gatewayFetch(
|
|
18791
|
-
`/api/sessions/${encodeURIComponent(
|
|
18791
|
+
`/api/sessions/${encodeURIComponent(conversationId)}/agent-config`
|
|
18792
18792
|
));
|
|
18793
18793
|
const config = result.payload;
|
|
18794
18794
|
if (!config || typeof config.model !== "string" || typeof config.thinkingLevel !== "string") {
|
|
18795
18795
|
throw new Error(t("errorInvalidModelConfig"));
|
|
18796
18796
|
}
|
|
18797
|
-
if (this.snapshot.
|
|
18797
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18798
18798
|
this.update({ modelConfig: {
|
|
18799
18799
|
model: config.model,
|
|
18800
18800
|
thinkingLevel: config.thinkingLevel,
|
|
@@ -18803,11 +18803,11 @@ ${endpointId}`;
|
|
|
18803
18803
|
} });
|
|
18804
18804
|
}
|
|
18805
18805
|
async patchModelConfig(patch) {
|
|
18806
|
-
const
|
|
18806
|
+
const conversationId = this.snapshot.conversationId;
|
|
18807
18807
|
const current = this.snapshot.modelConfig;
|
|
18808
|
-
if (!
|
|
18808
|
+
if (!conversationId || !current) return;
|
|
18809
18809
|
const result = await json(await gatewayFetch(
|
|
18810
|
-
`/api/sessions/${encodeURIComponent(
|
|
18810
|
+
`/api/sessions/${encodeURIComponent(conversationId)}/agent-config`,
|
|
18811
18811
|
{
|
|
18812
18812
|
method: "PATCH",
|
|
18813
18813
|
headers: { "Content-Type": "application/json" },
|
|
@@ -18818,7 +18818,7 @@ ${endpointId}`;
|
|
|
18818
18818
|
if (!config || typeof config.model !== "string" || typeof config.thinkingLevel !== "string") {
|
|
18819
18819
|
throw new Error(t("errorInvalidModelConfig"));
|
|
18820
18820
|
}
|
|
18821
|
-
if (this.snapshot.
|
|
18821
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18822
18822
|
this.update({ modelConfig: {
|
|
18823
18823
|
model: config.model,
|
|
18824
18824
|
thinkingLevel: config.thinkingLevel,
|
|
@@ -18827,49 +18827,49 @@ ${endpointId}`;
|
|
|
18827
18827
|
} });
|
|
18828
18828
|
}
|
|
18829
18829
|
async reloadClarification() {
|
|
18830
|
-
const
|
|
18831
|
-
if (!
|
|
18830
|
+
const conversationId = this.snapshot.conversationId;
|
|
18831
|
+
if (!conversationId) return;
|
|
18832
18832
|
const result = await json(await gatewayFetch(
|
|
18833
|
-
`/api/sessions/${encodeURIComponent(
|
|
18833
|
+
`/api/sessions/${encodeURIComponent(conversationId)}/clarification`
|
|
18834
18834
|
));
|
|
18835
|
-
if (this.snapshot.
|
|
18836
|
-
this.update({ clarification: mapClarification(result.payload,
|
|
18835
|
+
if (this.snapshot.conversationId === conversationId) {
|
|
18836
|
+
this.update({ clarification: mapClarification(result.payload, conversationId) });
|
|
18837
18837
|
}
|
|
18838
18838
|
}
|
|
18839
18839
|
async reloadTabBinding() {
|
|
18840
|
-
const
|
|
18841
|
-
if (!
|
|
18842
|
-
const response = await gatewayFetch(`/api/browser/tab-bindings/${encodeURIComponent(
|
|
18840
|
+
const conversationId = this.snapshot.conversationId;
|
|
18841
|
+
if (!conversationId) return;
|
|
18842
|
+
const response = await gatewayFetch(`/api/browser/tab-bindings/${encodeURIComponent(conversationId)}`);
|
|
18843
18843
|
if (response.status === 404) {
|
|
18844
|
-
if (this.snapshot.
|
|
18844
|
+
if (this.snapshot.conversationId === conversationId) this.update({ tabBinding: void 0 });
|
|
18845
18845
|
return;
|
|
18846
18846
|
}
|
|
18847
18847
|
const result = await json(response);
|
|
18848
|
-
if (this.snapshot.
|
|
18848
|
+
if (this.snapshot.conversationId !== conversationId) return;
|
|
18849
18849
|
await chrome.storage.session.set({ [`${TAB_BINDING_PREFIX}${result.payload.id}`]: result.payload });
|
|
18850
18850
|
this.update({ tabBinding: result.payload });
|
|
18851
18851
|
}
|
|
18852
18852
|
async reloadBrowserApproval() {
|
|
18853
|
-
const
|
|
18854
|
-
if (!
|
|
18853
|
+
const conversationId = this.snapshot.conversationId;
|
|
18854
|
+
if (!conversationId || !this.snapshot.tabBinding) {
|
|
18855
18855
|
this.update({ browserApproval: void 0 });
|
|
18856
18856
|
return;
|
|
18857
18857
|
}
|
|
18858
18858
|
const result = await json(await gatewayFetch(
|
|
18859
|
-
`/api/browser/approvals?
|
|
18859
|
+
`/api/browser/approvals?conversationId=${encodeURIComponent(conversationId)}`
|
|
18860
18860
|
));
|
|
18861
|
-
if (this.snapshot.
|
|
18861
|
+
if (this.snapshot.conversationId === conversationId) {
|
|
18862
18862
|
this.update({ browserApproval: result.approvals.find((approval) => approval.status === "pending") });
|
|
18863
18863
|
}
|
|
18864
18864
|
}
|
|
18865
18865
|
async reconcileAbortedRun(runId) {
|
|
18866
|
-
const
|
|
18867
|
-
if (!
|
|
18866
|
+
const conversationId = this.snapshot.conversationId;
|
|
18867
|
+
if (!conversationId) return;
|
|
18868
18868
|
for (let attempt = 0; attempt < 10; attempt += 1) {
|
|
18869
18869
|
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
18870
|
-
if (this.snapshot.
|
|
18870
|
+
if (this.snapshot.conversationId !== conversationId || this.snapshot.runId !== runId) return;
|
|
18871
18871
|
const run = await json(await gatewayFetch(
|
|
18872
|
-
`/api/sessions/${encodeURIComponent(
|
|
18872
|
+
`/api/sessions/${encodeURIComponent(conversationId)}/run`
|
|
18873
18873
|
));
|
|
18874
18874
|
if (!run.payload?.active || run.payload.runId !== runId) {
|
|
18875
18875
|
if (this.runTopic) this.realtime?.unsubscribe(this.runTopic);
|
|
@@ -18878,7 +18878,7 @@ ${endpointId}`;
|
|
|
18878
18878
|
try {
|
|
18879
18879
|
await this.reloadMessages();
|
|
18880
18880
|
} finally {
|
|
18881
|
-
if (this.snapshot.
|
|
18881
|
+
if (this.snapshot.conversationId === conversationId) {
|
|
18882
18882
|
this.update({ runId: void 0, streamingText: "", stopping: false });
|
|
18883
18883
|
}
|
|
18884
18884
|
}
|
|
@@ -27663,8 +27663,8 @@ function formatFileSize(size) {
|
|
|
27663
27663
|
function ChatPanel({ gatewayId }) {
|
|
27664
27664
|
const client = reactExports.useMemo(() => new BrowserChatClient(), []);
|
|
27665
27665
|
const [snapshot, setSnapshot] = reactExports.useState(EMPTY);
|
|
27666
|
-
const keyForSession = (
|
|
27667
|
-
const draftKey = keyForSession(snapshot.
|
|
27666
|
+
const keyForSession = (conversationId) => JSON.stringify([gatewayId, conversationId ?? "new"]);
|
|
27667
|
+
const draftKey = keyForSession(snapshot.conversationId);
|
|
27668
27668
|
const { store: drafts, draft: composerDraft, ready: draftReady, update: updateDraft } = useComposerDrafts(draftKey, (cause) => setError(String(cause)));
|
|
27669
27669
|
const draft = composerDraft.text;
|
|
27670
27670
|
const attachments = composerDraft.attachments;
|
|
@@ -27736,7 +27736,7 @@ function ChatPanel({ gatewayId }) {
|
|
|
27736
27736
|
const stored = await chrome.storage.session.get(PENDING_CONTEXT_KEY);
|
|
27737
27737
|
const pending = stored[PENDING_CONTEXT_KEY];
|
|
27738
27738
|
if (!pending || !active) return;
|
|
27739
|
-
const key = keyForSession(client.
|
|
27739
|
+
const key = keyForSession(client.currentConversationId);
|
|
27740
27740
|
await drafts.load(key);
|
|
27741
27741
|
if (!active) return;
|
|
27742
27742
|
drafts.update(key, (current) => ({ ...current, pages: appendPageContext(current.pages, pending) }));
|
|
@@ -27796,7 +27796,7 @@ function ChatPanel({ gatewayId }) {
|
|
|
27796
27796
|
setAtBottom(true);
|
|
27797
27797
|
const frame = requestAnimationFrame(() => scrollToBottom());
|
|
27798
27798
|
return () => cancelAnimationFrame(frame);
|
|
27799
|
-
}, [scrollToBottom, snapshot.
|
|
27799
|
+
}, [scrollToBottom, snapshot.conversationId]);
|
|
27800
27800
|
reactExports.useEffect(() => {
|
|
27801
27801
|
const target = textarea.current;
|
|
27802
27802
|
if (!target) return;
|
|
@@ -27830,7 +27830,7 @@ function ChatPanel({ gatewayId }) {
|
|
|
27830
27830
|
setCommandsOpen(false);
|
|
27831
27831
|
setPreview(void 0);
|
|
27832
27832
|
setError("");
|
|
27833
|
-
if (!snapshot.
|
|
27833
|
+
if (!snapshot.conversationId) return;
|
|
27834
27834
|
let active = true;
|
|
27835
27835
|
const refresh = () => {
|
|
27836
27836
|
if (active) void client.refreshInputs().catch((cause) => {
|
|
@@ -27843,12 +27843,12 @@ function ChatPanel({ gatewayId }) {
|
|
|
27843
27843
|
active = false;
|
|
27844
27844
|
clearInterval(timer);
|
|
27845
27845
|
};
|
|
27846
|
-
}, [client, snapshot.
|
|
27846
|
+
}, [client, snapshot.conversationId]);
|
|
27847
27847
|
reactExports.useEffect(() => {
|
|
27848
27848
|
if (!commandsOpen) return;
|
|
27849
27849
|
let active = true;
|
|
27850
27850
|
setCommandsLoading(true);
|
|
27851
|
-
void loadComposerCommands(snapshot.
|
|
27851
|
+
void loadComposerCommands(snapshot.conversationId).then((items) => {
|
|
27852
27852
|
if (active) setCommands(items);
|
|
27853
27853
|
}).catch((cause) => {
|
|
27854
27854
|
if (active) {
|
|
@@ -27861,7 +27861,7 @@ function ChatPanel({ gatewayId }) {
|
|
|
27861
27861
|
return () => {
|
|
27862
27862
|
active = false;
|
|
27863
27863
|
};
|
|
27864
|
-
}, [commandsOpen, snapshot.
|
|
27864
|
+
}, [commandsOpen, snapshot.conversationId]);
|
|
27865
27865
|
function chooseCommand(item) {
|
|
27866
27866
|
if (!commandRange || item.disabled) return;
|
|
27867
27867
|
const text = `${draft.slice(0, commandRange.start)}${item.wire}${draft.slice(commandRange.end)}`;
|
|
@@ -27889,9 +27889,9 @@ function ChatPanel({ gatewayId }) {
|
|
|
27889
27889
|
setAtBottom(true);
|
|
27890
27890
|
let targetKey = draftKey;
|
|
27891
27891
|
try {
|
|
27892
|
-
if (!snapshot.
|
|
27892
|
+
if (!snapshot.conversationId) {
|
|
27893
27893
|
await client.createSession();
|
|
27894
|
-
targetKey = keyForSession(client.
|
|
27894
|
+
targetKey = keyForSession(client.currentConversationId);
|
|
27895
27895
|
drafts.update(targetKey, () => payload);
|
|
27896
27896
|
drafts.update(draftKey, () => EMPTY_DRAFT);
|
|
27897
27897
|
}
|
|
@@ -28093,7 +28093,7 @@ function ChatPanel({ gatewayId }) {
|
|
|
28093
28093
|
setClarificationSubmitting(false);
|
|
28094
28094
|
}
|
|
28095
28095
|
}
|
|
28096
|
-
const activeSession = snapshot.sessions.find((session) => session.key === snapshot.
|
|
28096
|
+
const activeSession = snapshot.sessions.find((session) => session.key === snapshot.conversationId);
|
|
28097
28097
|
const connectionText = snapshot.endpointReady ? t("ready") : snapshot.connection === "connected" ? t("wakingUp") : snapshot.connection === "connecting" || snapshot.connection === "reconnecting" ? t("connecting") : t("offline");
|
|
28098
28098
|
const connectionProblem = !snapshot.endpointReady && (snapshot.connection === "error" || snapshot.connection === "disconnected");
|
|
28099
28099
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "chat", children: [
|
|
@@ -28121,7 +28121,7 @@ function ChatPanel({ gatewayId }) {
|
|
|
28121
28121
|
/* @__PURE__ */ jsxRuntimeExports.jsx("input", { value: search, onChange: (event) => void runSearch(event.target.value), placeholder: t("searchChats"), autoFocus: true })
|
|
28122
28122
|
] }),
|
|
28123
28123
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "session-list", children: [
|
|
28124
|
-
snapshot.sessions.map((session) => /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { disabled: sending || snapshot.submitting || snapshot.sessionLoading, className: session.key === snapshot.
|
|
28124
|
+
snapshot.sessions.map((session) => /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { disabled: sending || snapshot.submitting || snapshot.sessionLoading, className: session.key === snapshot.conversationId ? "active" : "", onClick: () => {
|
|
28125
28125
|
setMenuOpen(false);
|
|
28126
28126
|
void runControlAction(() => client.openSession(session.key));
|
|
28127
28127
|
}, children: [
|
|
@@ -28129,7 +28129,7 @@ function ChatPanel({ gatewayId }) {
|
|
|
28129
28129
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: session.title }),
|
|
28130
28130
|
/* @__PURE__ */ jsxRuntimeExports.jsx("small", { children: formatSessionDate(session.updatedAt) })
|
|
28131
28131
|
] }),
|
|
28132
|
-
session.key === snapshot.
|
|
28132
|
+
session.key === snapshot.conversationId ? /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, {}) : null
|
|
28133
28133
|
] }, session.key)),
|
|
28134
28134
|
!snapshot.sessions.length ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "session-list-empty", children: t("noChatsFound") }) : null
|
|
28135
28135
|
] })
|
|
@@ -28281,7 +28281,7 @@ function ChatPanel({ gatewayId }) {
|
|
|
28281
28281
|
] })
|
|
28282
28282
|
] }) : null,
|
|
28283
28283
|
processing ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "composer-notice", role: "status", children: t("processingAttachments") }) : null,
|
|
28284
|
-
snapshot.queuedInputs?.map((input) => /* @__PURE__ */ jsxRuntimeExports.jsx(QueuedInput, { input, onSave: (content, version) => client.editInput(input.id, version, content), onCancel: () => client.cancelInput(input.id, input.version) }, `${snapshot.
|
|
28284
|
+
snapshot.queuedInputs?.map((input) => /* @__PURE__ */ jsxRuntimeExports.jsx(QueuedInput, { input, onSave: (content, version) => client.editInput(input.id, version, content), onCancel: () => client.cancelInput(input.id, input.version) }, `${snapshot.conversationId}:${input.id}`)),
|
|
28285
28285
|
snapshot.pendingDelivery ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "composer-notice", role: "status", children: t("queuedMessageNotice") }) : null,
|
|
28286
28286
|
error || !connectionProblem && snapshot.error ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "composer-error", role: "alert", children: [
|
|
28287
28287
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertIcon, {}),
|
|
@@ -28566,10 +28566,10 @@ ${pageContext.context.selection ?? pageContext.context.text ?? ""}` }), children
|
|
|
28566
28566
|
] }),
|
|
28567
28567
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "composer-toolbar-end", children: [
|
|
28568
28568
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ModelControls, { models: snapshot.models, config: snapshot.modelConfig, disabled: sending || processing || voiceBusy || snapshot.submitting || snapshot.sessionLoading || Boolean(snapshot.runId), onModel: (model) => updateModelConfig(async () => {
|
|
28569
|
-
if (!client.
|
|
28569
|
+
if (!client.currentConversationId) {
|
|
28570
28570
|
const payload = drafts.get(draftKey);
|
|
28571
28571
|
await client.createSession();
|
|
28572
|
-
drafts.update(keyForSession(client.
|
|
28572
|
+
drafts.update(keyForSession(client.currentConversationId), () => payload);
|
|
28573
28573
|
drafts.update(draftKey, () => EMPTY_DRAFT);
|
|
28574
28574
|
}
|
|
28575
28575
|
await client.updateModel(model);
|