@ashx-j/lunr 0.2.21 → 0.2.23
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/CHANGELOG.md +4 -2
- package/README.md +23 -5
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +1 -0
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-browser.d.ts +9 -0
- package/dist/builtin-extensions/lunr-browser.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-browser.js +169 -0
- package/dist/builtin-extensions/lunr-browser.js.map +1 -0
- package/dist/builtin-extensions/lunr-todos.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-todos.js +15 -0
- package/dist/builtin-extensions/lunr-todos.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.js +3 -0
- package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js +5 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +18 -5
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -3
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.d.ts +17 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.js +45 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js +4 -11
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts +4 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js +160 -51
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js +5 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js +3 -2
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts +3 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js +11 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +41 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +4 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts +18 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js +48 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -0
- package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.js +11 -7
- package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +2 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/install-cli.d.ts.map +1 -1
- package/dist/cli/install-cli.js +15 -45
- package/dist/cli/install-cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +9 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +126 -29
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +22 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +250 -105
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/browser/network.d.ts +9 -0
- package/dist/core/browser/network.d.ts.map +1 -0
- package/dist/core/browser/network.js +146 -0
- package/dist/core/browser/network.js.map +1 -0
- package/dist/core/browser/runtime.d.ts +24 -0
- package/dist/core/browser/runtime.d.ts.map +1 -0
- package/dist/core/browser/runtime.js +289 -0
- package/dist/core/browser/runtime.js.map +1 -0
- package/dist/core/browser/schema.d.ts +16 -0
- package/dist/core/browser/schema.d.ts.map +1 -0
- package/dist/core/browser/schema.js +36 -0
- package/dist/core/browser/schema.js.map +1 -0
- package/dist/core/browser/settings.d.ts +8 -0
- package/dist/core/browser/settings.d.ts.map +1 -0
- package/dist/core/browser/settings.js +30 -0
- package/dist/core/browser/settings.js.map +1 -0
- package/dist/core/browser/setup.d.ts +2 -0
- package/dist/core/browser/setup.d.ts.map +1 -0
- package/dist/core/browser/setup.js +16 -0
- package/dist/core/browser/setup.js.map +1 -0
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +15 -14
- package/dist/core/customize.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +1 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/install-features.d.ts.map +1 -1
- package/dist/core/install-features.js +10 -8
- package/dist/core/install-features.js.map +1 -1
- package/dist/core/memory-cap.d.ts.map +1 -1
- package/dist/core/memory-cap.js +5 -3
- package/dist/core/memory-cap.js.map +1 -1
- package/dist/core/model-tiers.d.ts.map +1 -1
- package/dist/core/model-tiers.js +9 -6
- package/dist/core/model-tiers.js.map +1 -1
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +9 -0
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +3 -0
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/process-registry.d.ts.map +1 -1
- package/dist/core/process-registry.js +6 -4
- package/dist/core/process-registry.js.map +1 -1
- package/dist/core/runtime-scope.d.ts +11 -0
- package/dist/core/runtime-scope.d.ts.map +1 -0
- package/dist/core/runtime-scope.js +3 -0
- package/dist/core/runtime-scope.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +13 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-handoff.d.ts +35 -0
- package/dist/core/session-handoff.d.ts.map +1 -0
- package/dist/core/session-handoff.js +214 -0
- package/dist/core/session-handoff.js.map +1 -0
- package/dist/core/session-manager.d.ts +20 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +184 -22
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-ownership.d.ts +28 -0
- package/dist/core/session-ownership.d.ts.map +1 -0
- package/dist/core/session-ownership.js +138 -0
- package/dist/core/session-ownership.js.map +1 -0
- package/dist/core/session-retention.d.ts.map +1 -1
- package/dist/core/session-retention.js +11 -2
- package/dist/core/session-retention.js.map +1 -1
- package/dist/core/settings-manager.d.ts +11 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +27 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/subagent-wait-interruption.d.ts +11 -0
- package/dist/core/subagent-wait-interruption.d.ts.map +1 -0
- package/dist/core/subagent-wait-interruption.js +19 -0
- package/dist/core/subagent-wait-interruption.js.map +1 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +7 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/todo-settings.d.ts +5 -0
- package/dist/core/todo-settings.d.ts.map +1 -0
- package/dist/core/todo-settings.js +7 -0
- package/dist/core/todo-settings.js.map +1 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +4 -4
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +5 -3
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +4 -4
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +4 -4
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +4 -4
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +4 -4
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +14 -5
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +34 -7
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +4 -4
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/usage-service.d.ts.map +1 -1
- package/dist/core/usage-service.js +5 -3
- package/dist/core/usage-service.js.map +1 -1
- package/dist/gateway/adapters/discord.d.ts +12 -1
- package/dist/gateway/adapters/discord.d.ts.map +1 -1
- package/dist/gateway/adapters/discord.js +112 -17
- package/dist/gateway/adapters/discord.js.map +1 -1
- package/dist/gateway/adapters/telegram.d.ts +4 -2
- package/dist/gateway/adapters/telegram.d.ts.map +1 -1
- package/dist/gateway/adapters/telegram.js +34 -11
- package/dist/gateway/adapters/telegram.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts +14 -3
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +252 -60
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/approval.d.ts +1 -0
- package/dist/gateway/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +60 -18
- package/dist/gateway/approval.js.map +1 -1
- package/dist/gateway/authz.d.ts +2 -0
- package/dist/gateway/authz.d.ts.map +1 -1
- package/dist/gateway/authz.js +13 -0
- package/dist/gateway/authz.js.map +1 -1
- package/dist/gateway/buttons.d.ts +3 -1
- package/dist/gateway/buttons.d.ts.map +1 -1
- package/dist/gateway/buttons.js +18 -3
- package/dist/gateway/buttons.js.map +1 -1
- package/dist/gateway/command.d.ts.map +1 -1
- package/dist/gateway/command.js +49 -4
- package/dist/gateway/command.js.map +1 -1
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +18 -3
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/config.d.ts +5 -0
- package/dist/gateway/config.d.ts.map +1 -1
- package/dist/gateway/config.js +5 -0
- package/dist/gateway/config.js.map +1 -1
- package/dist/gateway/conversations.d.ts +14 -0
- package/dist/gateway/conversations.d.ts.map +1 -0
- package/dist/gateway/conversations.js +30 -0
- package/dist/gateway/conversations.js.map +1 -0
- package/dist/gateway/download.d.ts +2 -0
- package/dist/gateway/download.d.ts.map +1 -0
- package/dist/gateway/download.js +36 -0
- package/dist/gateway/download.js.map +1 -0
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js +85 -26
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/mobile-commands.d.ts +24 -0
- package/dist/gateway/mobile-commands.d.ts.map +1 -0
- package/dist/gateway/mobile-commands.js +422 -0
- package/dist/gateway/mobile-commands.js.map +1 -0
- package/dist/gateway/presenter.d.ts +16 -0
- package/dist/gateway/presenter.d.ts.map +1 -0
- package/dist/gateway/presenter.js +210 -0
- package/dist/gateway/presenter.js.map +1 -0
- package/dist/gateway/router.d.ts +1 -0
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +32 -3
- package/dist/gateway/router.js.map +1 -1
- package/dist/gateway/service.d.ts +46 -0
- package/dist/gateway/service.d.ts.map +1 -0
- package/dist/gateway/service.js +395 -0
- package/dist/gateway/service.js.map +1 -0
- package/dist/gateway/setup.d.ts +4 -0
- package/dist/gateway/setup.d.ts.map +1 -0
- package/dist/gateway/setup.js +146 -0
- package/dist/gateway/setup.js.map +1 -0
- package/dist/gateway/types.d.ts +4 -2
- package/dist/gateway/types.d.ts.map +1 -1
- package/dist/gateway/types.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +19 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +78 -17
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/copyable-text.d.ts +27 -0
- package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/copyable-text.js +156 -0
- package/dist/modes/interactive/components/copyable-text.js.map +1 -0
- package/dist/modes/interactive/components/custom-entry.d.ts +1 -0
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +8 -0
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +8 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +16 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +8 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +51 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.d.ts +9 -2
- package/dist/modes/interactive/components/thinking-tail.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.js +43 -1
- package/dist/modes/interactive/components/thinking-tail.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +4 -3
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +34 -45
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +9 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +267 -44
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +23 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/node-runtime/agent-session-services-GZVSOGYR.js +49 -0
- package/dist/node-runtime/{builtin-extensions-JCOPAAB5.js → builtin-extensions-QVCXNQT4.js} +6 -5
- package/dist/node-runtime/{chunk-LTYWTR3V.js → chunk-2MI5OPMN.js} +17 -2
- package/dist/node-runtime/{chunk-W3CVH5RX.js → chunk-2TKODGBZ.js} +11 -6
- package/dist/node-runtime/chunk-4EULYYR4.js +62 -0
- package/dist/node-runtime/{chunk-6N22HULO.js → chunk-5D7LC2ZQ.js} +7 -2
- package/dist/node-runtime/{chunk-KBKMCJDU.js → chunk-5ZQXRPMC.js} +19 -4
- package/dist/node-runtime/{chunk-BOHIDQT4.js → chunk-6VYZ5UFP.js} +1 -1
- package/dist/node-runtime/chunk-AZJHNQKQ.js +205 -0
- package/dist/node-runtime/{chunk-A3KMVBZV.js → chunk-BBUVIEZB.js} +1 -10
- package/dist/node-runtime/{chunk-IRPJXI6U.js → chunk-BX2RB477.js} +1 -1
- package/dist/node-runtime/chunk-CCCN2UCX.js +14 -0
- package/dist/node-runtime/{chunk-25I2BHAA.js → chunk-CSUZVNYE.js} +1 -1
- package/dist/node-runtime/chunk-DD5YWFSJ.js +708 -0
- package/dist/node-runtime/chunk-DQMGU675.js +3409 -0
- package/dist/node-runtime/{chunk-QZMODZQ2.js → chunk-E24EO34J.js} +2 -1
- package/dist/node-runtime/chunk-EKVFP6YF.js +355 -0
- package/dist/node-runtime/chunk-GJ2RDBRL.js +672 -0
- package/dist/node-runtime/{chunk-W3SILANP.js → chunk-GMHJCCEN.js} +8 -8
- package/dist/node-runtime/{chunk-DDWHZ633.js → chunk-GS42T6MX.js} +1 -1
- package/dist/node-runtime/chunk-GS66LV4M.js +2830 -0
- package/dist/node-runtime/chunk-H4K3JDRB.js +47 -0
- package/dist/node-runtime/{chunk-2SJB2AWP.js → chunk-HMBGROQK.js} +3 -3
- package/dist/node-runtime/{chunk-GB2MGFLI.js → chunk-HPUP7E4T.js} +216 -201
- package/dist/node-runtime/{chunk-YMEAYRBE.js → chunk-HTFRRDSF.js} +2 -7
- package/dist/node-runtime/{chunk-OPEK5RRY.js → chunk-IF24A3FH.js} +1 -1
- package/dist/node-runtime/chunk-IMLCWLPI.js +9 -0
- package/dist/node-runtime/chunk-KKUTQQV7.js +144 -0
- package/dist/node-runtime/chunk-LFZDVKSP.js +521 -0
- package/dist/node-runtime/{chunk-2BUAYZ7K.js → chunk-LLUIPGDR.js} +581 -197
- package/dist/node-runtime/{chunk-7NBZ5P7I.js → chunk-NAY6UUQZ.js} +1 -1
- package/dist/node-runtime/chunk-OAR4TYZE.js +146 -0
- package/dist/node-runtime/{chunk-STERBGUB.js → chunk-OFKSVRV7.js} +2 -2
- package/dist/node-runtime/{chunk-JZQ7F36T.js → chunk-PCEW76PM.js} +19 -3
- package/dist/node-runtime/{chunk-WLLDXJRT.js → chunk-QAZOULTU.js} +29 -1014
- package/dist/node-runtime/{chunk-6KDIOJL3.js → chunk-QH6YL7VK.js} +3 -3
- package/dist/node-runtime/chunk-R3K2F5GI.js +122 -0
- package/dist/node-runtime/{chunk-RNBHABBA.js → chunk-RDDAZOMU.js} +23 -0
- package/dist/node-runtime/{chunk-SY2TFMLO.js → chunk-RIR5EDDJ.js} +46 -151
- package/dist/node-runtime/chunk-RMQZU2YU.js +117 -0
- package/dist/node-runtime/{chunk-6BEIBLQ3.js → chunk-RWTKOC3B.js} +1 -1
- package/dist/node-runtime/{chunk-G6LRAP36.js → chunk-TQGPP4SC.js} +1 -1
- package/dist/node-runtime/{chunk-Y5KOEMBH.js → chunk-TVJUOJZJ.js} +9 -674
- package/dist/node-runtime/chunk-UAEOTO52.js +119 -0
- package/dist/node-runtime/{chunk-AY6CAJSL.js → chunk-UJOCPOMX.js} +6 -3
- package/dist/node-runtime/chunk-UP2XBVH5.js +40 -0
- package/dist/node-runtime/{chunk-WJVFOIB5.js → chunk-UQUCFAJ3.js} +1 -1
- package/dist/node-runtime/chunk-URD2SLIT.js +1019 -0
- package/dist/node-runtime/chunk-US544NN6.js +13 -0
- package/dist/node-runtime/chunk-UWPJL22I.js +341 -0
- package/dist/node-runtime/{chunk-4I23VTC4.js → chunk-VWCE2HSZ.js} +21 -124
- package/dist/node-runtime/{chunk-VZR3NCM7.js → chunk-W64JC4E7.js} +18 -14
- package/dist/node-runtime/{chunk-AWVD5IEY.js → chunk-X3URCYCU.js} +23 -12
- package/dist/node-runtime/{chunk-GKLEQ3I4.js → chunk-XLTL257W.js} +126 -27
- package/dist/node-runtime/{chunk-WKDK4C5P.js → chunk-YDO2F2IA.js} +38 -164
- package/dist/node-runtime/{chunk-PDNXVXMD.js → chunk-YHQ3NBB3.js} +58 -48
- package/dist/node-runtime/chunk-YPHAIRZT.js +10 -0
- package/dist/node-runtime/cli-runtime.js +2 -2
- package/dist/node-runtime/command-PDVTBRWA.js +45 -0
- package/dist/node-runtime/{commands-MV5KOZ64.js → commands-KAMO2T6P.js} +10 -10
- package/dist/node-runtime/commands-XDCFGIGW.js +36 -0
- package/dist/node-runtime/config-RORQUQFG.js +20 -0
- package/dist/node-runtime/{customize-LF5VST47.js → customize-VFJV3U6A.js} +2 -1
- package/dist/node-runtime/{direct-tool-executor-BK7CLEBX.js → direct-tool-executor-YAVOLDFY.js} +8 -8
- package/dist/node-runtime/{export-html-TEXVV5RP.js → export-html-KSOIMVPI.js} +4 -3
- package/dist/node-runtime/{extension-input-O4HSAEM4.js → extension-input-E7BJZ35H.js} +4 -4
- package/dist/node-runtime/{extension-selector-X5FCX43D.js → extension-selector-WU42XDTU.js} +4 -4
- package/dist/node-runtime/{extract-XLQSJN4V.js → extract-EQJE7FZZ.js} +2 -2
- package/dist/node-runtime/{gateway-BM6NLOH4.js → gateway-AYWM5DIO.js} +275 -994
- package/dist/node-runtime/{gemini-search-U7SUMPQA.js → gemini-search-35OCRFLN.js} +1 -1
- package/dist/node-runtime/{gemini-url-context-PXWCBQHK.js → gemini-url-context-UQY3PHHW.js} +2 -2
- package/dist/node-runtime/index.js +104 -65
- package/dist/node-runtime/{init-3C7Z24OI.js → init-X2LIUB2H.js} +3 -3
- package/dist/node-runtime/{install-cli-EXMJQESX.js → install-cli-3BO4MMQ6.js} +21 -82
- package/dist/node-runtime/interactive-mode-4MFRKAHG.js +72 -0
- package/dist/node-runtime/{interactive-view-ILS6TAN5.js → interactive-view-TUZHCQM3.js} +8 -8
- package/dist/node-runtime/lunr-browser-RYFIIVJN.js +174 -0
- package/dist/node-runtime/{lunr-cron-4VHP4E4B.js → lunr-cron-YWXEPZMQ.js} +19 -5
- package/dist/node-runtime/main.js +44 -31
- package/dist/node-runtime/{memory-cap-3S4XRLNP.js → memory-cap-EL3KL4JJ.js} +2 -1
- package/dist/node-runtime/mobile-commands-LVHDAUDP.js +32 -0
- package/dist/node-runtime/model-runtime-PLQKAG4B.js +16 -0
- package/dist/node-runtime/{model-tiers-NJLHUEGK.js → model-tiers-OU3U5CZG.js} +2 -1
- package/dist/node-runtime/{package-manager-cli-N37546V5.js → package-manager-cli-6GT3Z3CK.js} +22 -15
- package/dist/node-runtime/{pi-intercom-NV2LW6X7.js → pi-intercom-HBPK5HSJ.js} +4 -1
- package/dist/node-runtime/{pi-mcp-adapter-GUFZWW54.js → pi-mcp-adapter-E6WULBKF.js} +4 -4
- package/dist/node-runtime/{pi-subagents-6MUIFNDM.js → pi-subagents-CDWK2AKY.js} +236 -79
- package/dist/node-runtime/{pi-web-access-2CQGFLT2.js → pi-web-access-WTGMNZ32.js} +15 -15
- package/dist/node-runtime/process-registry-4FAKZQOL.js +31 -0
- package/dist/node-runtime/{proxy-modes-V6YVFH3C.js → proxy-modes-OSQCWRBI.js} +9 -9
- package/dist/node-runtime/rpc-entry.js +44 -31
- package/dist/node-runtime/{rpc-mode-W5ZTLTMZ.js → rpc-mode-O3XV4SID.js} +2 -2
- package/dist/node-runtime/runtime-4VA6JKNF.js +373 -0
- package/dist/node-runtime/{runtime-bridges-2VQTLPOZ.js → runtime-bridges-3XUQ46XW.js} +6 -5
- package/dist/node-runtime/service-ISSP6VHE.js +36 -0
- package/dist/node-runtime/session-handoff-HC7R5E24.js +33 -0
- package/dist/node-runtime/{session-manager-E7AREDTV.js → session-manager-CFN4UFM2.js} +2 -1
- package/dist/node-runtime/{session-selector-FJ7M2AIX.js → session-selector-GIM4DHQ2.js} +5 -4
- package/dist/node-runtime/{settings-manager-CUGAZWAB.js → settings-manager-6VEMXRDL.js} +7 -2
- package/dist/node-runtime/setup-5SR2J35A.js +155 -0
- package/dist/node-runtime/setup-JBKOLJ6F.js +18 -0
- package/dist/node-runtime/{subagent-executor-MH4A7CCF.js → subagent-executor-M5VWB3D3.js} +26 -18
- package/dist/node-runtime/theme-UOO5RVFN.js +68 -0
- package/dist/node-runtime/trust-manager-MMISNCYO.js +17 -0
- package/dist/node-runtime/{update-cli-XTZMZGOL.js → update-cli-UVKJWRRJ.js} +7 -2
- package/dist/node-runtime/usage-service-LFB2SWYV.js +37 -0
- package/dist/node-runtime/{video-extract-OYT5WKS5.js → video-extract-OOZHR7SU.js} +2 -2
- package/dist/node-runtime/{youtube-extract-TQYKGFGS.js → youtube-extract-FNPAUNHU.js} +6 -6
- package/docs/browser.md +86 -0
- package/docs/extensions.md +2 -0
- package/docs/features.md +96 -16
- package/docs/interactive-startup.md +2 -1
- package/docs/sessions.md +10 -0
- package/docs/settings.md +2 -0
- package/docs/tui.md +2 -0
- package/docs/usage.md +16 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +7 -4
- package/scripts/install-browser.mjs +20 -0
- package/dist/node-runtime/agent-session-services-C743TYQE.js +0 -37
- package/dist/node-runtime/chunk-VGYZ3APQ.js +0 -59
- package/dist/node-runtime/chunk-XI77KVKA.js +0 -6009
- package/dist/node-runtime/command-P4NYCJ2M.js +0 -13
- package/dist/node-runtime/interactive-mode-EVVBA64D.js +0 -59
- package/dist/node-runtime/{chunk-UWQYRSYQ.js → chunk-YJMMG7C6.js} +25 -25
- package/dist/node-runtime/{mcp-panel-IIGMXQGP.js → mcp-panel-KTTFXJZ4.js} +3 -3
- package/dist/node-runtime/{src-BPQFJR76.js → src-IVPNZ2BX.js} +9 -9
|
@@ -36,10 +36,12 @@ import * as processRegistry from "../../core/process-registry.js";
|
|
|
36
36
|
import { captureTreeChanges, clearRollback, disableRollbackForSession, enableRollbackForSession, initRollback, isRollbackEnabled, isRollbackSessionForceEnabled, migrateRollbackSession, peekRollbackTurnsConsumed, beginTurn as rollbackBeginTurn, rollbackLastTurn, setRollbackWarningHandler, } from "../../core/rollback.js";
|
|
37
37
|
import { getSearchCuratorSetting, setSearchCuratorSetting } from "../../core/search-curator.js";
|
|
38
38
|
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
|
|
39
|
+
import { cancelSessionHandoff, markSessionHandoff, recordTuiActivity, registerTransferHandler, requestSessionTransfer, } from "../../core/session-handoff.js";
|
|
39
40
|
import { SessionManager, sessionEntryToContextMessages } from "../../core/session-manager.js";
|
|
40
41
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
41
42
|
import { getSubagentCancellation, SubagentEscapeSequence } from "../../core/subagent-cancellation.js";
|
|
42
43
|
import { time } from "../../core/timings.js";
|
|
44
|
+
import { notifyTodosEnabledChanged } from "../../core/todo-settings.js";
|
|
43
45
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
44
46
|
import { checkForUpdate, markUpdateNotified } from "../../core/update-check.js";
|
|
45
47
|
import { getAllPlanUsageResults, getUsageServiceBridge } from "../../core/usage-service.js";
|
|
@@ -255,8 +257,10 @@ export class InteractiveMode {
|
|
|
255
257
|
streamingTargetMessage = undefined;
|
|
256
258
|
streamingDisplayedLength = 0;
|
|
257
259
|
smoothStreamingTimer = undefined;
|
|
260
|
+
thinkingAnimationTimer;
|
|
258
261
|
// Tool execution tracking: toolCallId -> component
|
|
259
262
|
pendingTools = new Map();
|
|
263
|
+
browserActivityComponent;
|
|
260
264
|
// Tool output expansion state
|
|
261
265
|
toolOutputExpanded = false;
|
|
262
266
|
// Thinking block visibility state
|
|
@@ -360,7 +364,9 @@ export class InteractiveMode {
|
|
|
360
364
|
await this.rebindCurrentSession({ renderBeforeBind: true });
|
|
361
365
|
// lunr: re-init rollback for the new session id + re-apply auto force-enable.
|
|
362
366
|
initRollback(this.settingsManager, this.sessionManager.getSessionId());
|
|
363
|
-
this.
|
|
367
|
+
const mode = this.sessionManager.getPermissionMode() ?? this.settingsManager.getDefaultPermissionMode();
|
|
368
|
+
resetPermissions(mode);
|
|
369
|
+
this.syncPermissionModeEffects(mode);
|
|
364
370
|
});
|
|
365
371
|
this.version = VERSION;
|
|
366
372
|
this.ui = options.startupView?.ui ?? new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
|
|
@@ -371,8 +377,7 @@ export class InteractiveMode {
|
|
|
371
377
|
enterGoalAuto: () => this.enterGoalAuto(),
|
|
372
378
|
leaveGoalAuto: () => this.leaveGoalAuto(),
|
|
373
379
|
});
|
|
374
|
-
|
|
375
|
-
resetPermissions(this.settingsManager.getDefaultPermissionMode());
|
|
380
|
+
resetPermissions(this.sessionManager.getPermissionMode() ?? this.settingsManager.getDefaultPermissionMode());
|
|
376
381
|
this.headerContainer = new Container();
|
|
377
382
|
if (options.startupView) {
|
|
378
383
|
this.headerContainer.addChild(new Spacer(1));
|
|
@@ -627,7 +632,7 @@ export class InteractiveMode {
|
|
|
627
632
|
// lunr: initialize rollback service for this session.
|
|
628
633
|
initRollback(this.settingsManager, this.sessionManager.getSessionId());
|
|
629
634
|
setRollbackWarningHandler((msg) => this.showStatus(msg));
|
|
630
|
-
this.syncPermissionModeEffects(this.settingsManager.getDefaultPermissionMode());
|
|
635
|
+
this.syncPermissionModeEffects(this.sessionManager.getPermissionMode() ?? this.settingsManager.getDefaultPermissionMode());
|
|
631
636
|
await this.themeController.applyFromSettings();
|
|
632
637
|
this.headerContainer.clear();
|
|
633
638
|
// Add boot screen header (unless silenced)
|
|
@@ -1383,7 +1388,7 @@ export class InteractiveMode {
|
|
|
1383
1388
|
if (result.cancelled) {
|
|
1384
1389
|
return { cancelled: true };
|
|
1385
1390
|
}
|
|
1386
|
-
this.
|
|
1391
|
+
this.clearChatContainer();
|
|
1387
1392
|
this.renderInitialMessages();
|
|
1388
1393
|
if (result.editorText && !this.editor.getText().trim()) {
|
|
1389
1394
|
this.restoreEditorFromTreeResult(result);
|
|
@@ -1452,8 +1457,26 @@ export class InteractiveMode {
|
|
|
1452
1457
|
}
|
|
1453
1458
|
return bootRows;
|
|
1454
1459
|
}
|
|
1460
|
+
unregisterSessionTransfer;
|
|
1461
|
+
transferInProgress = false;
|
|
1462
|
+
detachedDraft = "";
|
|
1455
1463
|
async rebindCurrentSession(options = {}) {
|
|
1456
1464
|
await this.waitForDeferredBuiltins();
|
|
1465
|
+
this.unregisterSessionTransfer?.();
|
|
1466
|
+
recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
1467
|
+
this.unregisterSessionTransfer = registerTransferHandler(this.sessionManager, async ({ stop, signal }) => {
|
|
1468
|
+
this.transferInProgress = true;
|
|
1469
|
+
try {
|
|
1470
|
+
this.detachedDraft = this.editor.getText();
|
|
1471
|
+
await this.runtimeHost.releaseForTransfer({ stop, signal });
|
|
1472
|
+
this.editor.setText(this.detachedDraft);
|
|
1473
|
+
this.unregisterSessionTransfer?.();
|
|
1474
|
+
this.showStatus("Session released for remote continuation. Draft retained. Use /reclaim to continue here.");
|
|
1475
|
+
}
|
|
1476
|
+
finally {
|
|
1477
|
+
this.transferInProgress = false;
|
|
1478
|
+
}
|
|
1479
|
+
});
|
|
1457
1480
|
this.unsubscribe?.();
|
|
1458
1481
|
this.unsubscribe = undefined;
|
|
1459
1482
|
this.applyRuntimeSettings();
|
|
@@ -1484,7 +1507,7 @@ export class InteractiveMode {
|
|
|
1484
1507
|
renderCurrentSessionState() {
|
|
1485
1508
|
this.ui.setChatScroll(0);
|
|
1486
1509
|
this.loadedResourcesContainer.clear();
|
|
1487
|
-
this.
|
|
1510
|
+
this.clearChatContainer();
|
|
1488
1511
|
this.pendingMessagesContainer.clear();
|
|
1489
1512
|
this.compactionQueuedMessages = [];
|
|
1490
1513
|
this.pendingCompactionRender = undefined;
|
|
@@ -2394,6 +2417,51 @@ export class InteractiveMode {
|
|
|
2394
2417
|
setupEditorSubmitHandler() {
|
|
2395
2418
|
this.defaultEditor.onSubmit = async (text) => {
|
|
2396
2419
|
text = text.trim();
|
|
2420
|
+
if (text === "/reclaim" || text === "/reclaim stop") {
|
|
2421
|
+
const file = this.sessionManager.getSessionFile();
|
|
2422
|
+
try {
|
|
2423
|
+
if (!file)
|
|
2424
|
+
throw new Error("This session is not saved.");
|
|
2425
|
+
if (!this.runtimeHost.isDetached) {
|
|
2426
|
+
this.showStatus("This terminal already owns the session.");
|
|
2427
|
+
return;
|
|
2428
|
+
}
|
|
2429
|
+
const draft = this.editor.getText();
|
|
2430
|
+
await requestSessionTransfer(file, { stop: text === "/reclaim stop" });
|
|
2431
|
+
await this.runtimeHost.switchSession(file);
|
|
2432
|
+
this.editor.setText(draft === text ? this.detachedDraft : draft);
|
|
2433
|
+
this.showStatus("Session reclaimed.");
|
|
2434
|
+
}
|
|
2435
|
+
catch (error) {
|
|
2436
|
+
this.showError(error instanceof Error ? error.message : String(error));
|
|
2437
|
+
}
|
|
2438
|
+
return;
|
|
2439
|
+
}
|
|
2440
|
+
if ((this.runtimeHost.isDetached || this.transferInProgress) && !["/quit", "/exit"].includes(text)) {
|
|
2441
|
+
this.showError("Session is detached or transferring. Draft retained. Use /reclaim, /reclaim stop, or /quit.");
|
|
2442
|
+
return;
|
|
2443
|
+
}
|
|
2444
|
+
if (text === "/handoff" || text === "/handoff cancel") {
|
|
2445
|
+
try {
|
|
2446
|
+
if (text === "/handoff cancel")
|
|
2447
|
+
cancelSessionHandoff(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
2448
|
+
else
|
|
2449
|
+
markSessionHandoff(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
2450
|
+
this.showStatus(text === "/handoff cancel"
|
|
2451
|
+
? "Handoff mark cancelled."
|
|
2452
|
+
: "Marked for phone continuation for 8 hours. Busy work must finish or be explicitly stopped before transfer.");
|
|
2453
|
+
}
|
|
2454
|
+
catch (error) {
|
|
2455
|
+
this.showError(error instanceof Error ? error.message : String(error));
|
|
2456
|
+
}
|
|
2457
|
+
return;
|
|
2458
|
+
}
|
|
2459
|
+
if (text &&
|
|
2460
|
+
!this.runtimeHost.isDetached &&
|
|
2461
|
+
(!text.startsWith("/") ||
|
|
2462
|
+
/^\/(?:model|thinking|effort|reasoning|off|minimal|low|medium|high|xhigh|max|mode|plan|manual|yolo|auto|name|title|undo|edit|redo|tree|compact)(?:\s|$)/.test(text))) {
|
|
2463
|
+
recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
2464
|
+
}
|
|
2397
2465
|
if (!text) {
|
|
2398
2466
|
this.takeSubmittedImages(text);
|
|
2399
2467
|
return;
|
|
@@ -2621,15 +2689,30 @@ export class InteractiveMode {
|
|
|
2621
2689
|
}
|
|
2622
2690
|
return;
|
|
2623
2691
|
}
|
|
2624
|
-
//
|
|
2625
|
-
//
|
|
2626
|
-
if (this.session.isStreaming) {
|
|
2627
|
-
this.
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2692
|
+
// While streaming or settling a wait handoff, reserve normal Enter for subagent_wait when possible.
|
|
2693
|
+
// Extension commands keep their existing path.
|
|
2694
|
+
if (this.session.isStreaming || this.session.isWaitPromptHandoffActive) {
|
|
2695
|
+
if (!this.isExtensionCommand(text)) {
|
|
2696
|
+
await this.awaitDeferredBuiltinsForPrompt();
|
|
2697
|
+
const handoff = await this.session.interruptSubagentWaitWithPrompt(text, { images });
|
|
2698
|
+
if (handoff) {
|
|
2699
|
+
this.editor.addToHistory?.(text);
|
|
2700
|
+
this.editor.setText("");
|
|
2701
|
+
void handoff.completion.catch((error) => {
|
|
2702
|
+
this.showError(error instanceof Error ? error.message : String(error));
|
|
2703
|
+
});
|
|
2704
|
+
this.ui.requestRender();
|
|
2705
|
+
return;
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
if (this.session.isStreaming) {
|
|
2709
|
+
this.editor.addToHistory?.(text);
|
|
2710
|
+
this.editor.setText("");
|
|
2711
|
+
await this.promptAfterDeferredBuiltins(text, { streamingBehavior: "steer", images });
|
|
2712
|
+
this.updatePendingMessagesDisplay();
|
|
2713
|
+
this.ui.requestRender();
|
|
2714
|
+
return;
|
|
2715
|
+
}
|
|
2633
2716
|
}
|
|
2634
2717
|
// Normal message submission
|
|
2635
2718
|
// First, move any pending bash components to chat
|
|
@@ -2648,6 +2731,18 @@ export class InteractiveMode {
|
|
|
2648
2731
|
getSmoothStreamingOptions() {
|
|
2649
2732
|
return { hideThinking: this.hideThinkingBlock };
|
|
2650
2733
|
}
|
|
2734
|
+
setThinkingAnimation(active) {
|
|
2735
|
+
if (!active) {
|
|
2736
|
+
if (this.thinkingAnimationTimer)
|
|
2737
|
+
clearInterval(this.thinkingAnimationTimer);
|
|
2738
|
+
this.thinkingAnimationTimer = undefined;
|
|
2739
|
+
return;
|
|
2740
|
+
}
|
|
2741
|
+
if (this.thinkingAnimationTimer)
|
|
2742
|
+
return;
|
|
2743
|
+
this.thinkingAnimationTimer = setInterval(() => this.ui.requestRender(), 33);
|
|
2744
|
+
this.thinkingAnimationTimer.unref?.();
|
|
2745
|
+
}
|
|
2651
2746
|
clearSmoothStreamingTimer() {
|
|
2652
2747
|
if (this.smoothStreamingTimer) {
|
|
2653
2748
|
clearInterval(this.smoothStreamingTimer);
|
|
@@ -2688,12 +2783,9 @@ export class InteractiveMode {
|
|
|
2688
2783
|
if (content.type !== "toolCall" || !revealedIds.has(content.id))
|
|
2689
2784
|
continue;
|
|
2690
2785
|
if (!this.pendingTools.has(content.id)) {
|
|
2691
|
-
const component =
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
}, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
|
|
2695
|
-
component.setExpanded(this.toolOutputExpanded);
|
|
2696
|
-
this.addToolComponentToChat(component);
|
|
2786
|
+
const component = content.name === "browser" && this.browserActivityComponent
|
|
2787
|
+
? this.browserActivityComponent
|
|
2788
|
+
: this.createToolExecutionComponent(content.name, content.id, content.arguments);
|
|
2697
2789
|
this.pendingTools.set(content.id, component);
|
|
2698
2790
|
}
|
|
2699
2791
|
else {
|
|
@@ -2728,6 +2820,7 @@ export class InteractiveMode {
|
|
|
2728
2820
|
}
|
|
2729
2821
|
}
|
|
2730
2822
|
stopSmoothStreaming() {
|
|
2823
|
+
this.setThinkingAnimation(false);
|
|
2731
2824
|
this.clearSmoothStreamingTimer();
|
|
2732
2825
|
this.streamingTargetMessage = undefined;
|
|
2733
2826
|
this.streamingDisplayedLength = 0;
|
|
@@ -2767,6 +2860,7 @@ export class InteractiveMode {
|
|
|
2767
2860
|
switch (event.type) {
|
|
2768
2861
|
case "agent_start":
|
|
2769
2862
|
this.pendingTools.clear();
|
|
2863
|
+
this.browserActivityComponent = undefined;
|
|
2770
2864
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
2771
2865
|
this.ui.terminal.setProgress(true);
|
|
2772
2866
|
}
|
|
@@ -2819,7 +2913,11 @@ export class InteractiveMode {
|
|
|
2819
2913
|
this.ui.requestRender();
|
|
2820
2914
|
}
|
|
2821
2915
|
else if (event.message.role === "assistant") {
|
|
2822
|
-
this.streamingComponent = new AssistantMessageComponent(undefined, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse
|
|
2916
|
+
this.streamingComponent = new AssistantMessageComponent(undefined, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse, {
|
|
2917
|
+
requestRender: () => this.ui.requestRender(),
|
|
2918
|
+
reasoningDisplay: this.settingsManager.getReasoningDisplay(),
|
|
2919
|
+
onThinkingAnimationChange: (active) => this.setThinkingAnimation(active),
|
|
2920
|
+
});
|
|
2823
2921
|
// lunr: collapsible reasoning — fresh timing array for this message.
|
|
2824
2922
|
this.thinkingRunTimings = [];
|
|
2825
2923
|
this.streamingComponent.setThinkingTimings(this.thinkingRunTimings);
|
|
@@ -2926,14 +3024,12 @@ export class InteractiveMode {
|
|
|
2926
3024
|
}
|
|
2927
3025
|
let component = this.pendingTools.get(event.toolCallId);
|
|
2928
3026
|
if (!component) {
|
|
2929
|
-
component =
|
|
2930
|
-
showImages: this.settingsManager.getShowImages(),
|
|
2931
|
-
imageWidthCells: this.settingsManager.getImageWidthCells(),
|
|
2932
|
-
}, this.getRegisteredToolDefinition(event.toolName), this.ui, this.sessionManager.getCwd());
|
|
2933
|
-
component.setExpanded(this.toolOutputExpanded);
|
|
2934
|
-
this.addToolComponentToChat(component);
|
|
3027
|
+
component = this.createToolExecutionComponent(event.toolName, event.toolCallId, event.args);
|
|
2935
3028
|
this.pendingTools.set(event.toolCallId, component);
|
|
2936
3029
|
}
|
|
3030
|
+
else if (event.toolName === "browser" && !component.matchesToolCall(event.toolCallId)) {
|
|
3031
|
+
component.beginNextExecution(event.toolCallId, event.args);
|
|
3032
|
+
}
|
|
2937
3033
|
component.markExecutionStarted();
|
|
2938
3034
|
this.ui.requestRender();
|
|
2939
3035
|
break;
|
|
@@ -2968,6 +3064,7 @@ export class InteractiveMode {
|
|
|
2968
3064
|
this.streamingMessage = undefined;
|
|
2969
3065
|
}
|
|
2970
3066
|
this.pendingTools.clear();
|
|
3067
|
+
this.browserActivityComponent = undefined;
|
|
2971
3068
|
this.maybeAutoNameSession();
|
|
2972
3069
|
// lunr: capture tree-scope changes at turn boundary (bash side-effects).
|
|
2973
3070
|
captureTreeChanges(this.sessionManager.getCwd(), this.sessionManager.getSessionId());
|
|
@@ -3186,7 +3283,10 @@ export class InteractiveMode {
|
|
|
3186
3283
|
break;
|
|
3187
3284
|
}
|
|
3188
3285
|
case "assistant": {
|
|
3189
|
-
const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse
|
|
3286
|
+
const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse, {
|
|
3287
|
+
requestRender: () => this.ui.requestRender(),
|
|
3288
|
+
reasoningDisplay: this.settingsManager.getReasoningDisplay(),
|
|
3289
|
+
});
|
|
3190
3290
|
// lunr: collapsible reasoning — re-attach live timings when this
|
|
3191
3291
|
// message was streamed in this session (undefined = history).
|
|
3192
3292
|
assistantComponent.setThinkingTimings(this.thinkingTimingsByMessage.get(message));
|
|
@@ -3206,6 +3306,7 @@ export class InteractiveMode {
|
|
|
3206
3306
|
}
|
|
3207
3307
|
renderSessionItems(items, options = {}) {
|
|
3208
3308
|
this.pendingTools.clear();
|
|
3309
|
+
let browserActivityComponent;
|
|
3209
3310
|
const renderedPendingTools = new Map();
|
|
3210
3311
|
// Cache-miss notices are not persisted; re-derive them from the full entry
|
|
3211
3312
|
// list and re-inject them after the assistant messages that paid for them.
|
|
@@ -3228,12 +3329,20 @@ export class InteractiveMode {
|
|
|
3228
3329
|
// Render tool call components
|
|
3229
3330
|
for (const content of message.content) {
|
|
3230
3331
|
if (content.type === "toolCall") {
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
}
|
|
3235
|
-
|
|
3236
|
-
|
|
3332
|
+
let component = content.name === "browser" ? browserActivityComponent : undefined;
|
|
3333
|
+
if (component) {
|
|
3334
|
+
component.beginNextExecution(content.id, content.arguments);
|
|
3335
|
+
}
|
|
3336
|
+
else {
|
|
3337
|
+
component = new ToolExecutionComponent(content.name, content.id, content.arguments, {
|
|
3338
|
+
showImages: this.settingsManager.getShowImages(),
|
|
3339
|
+
imageWidthCells: this.settingsManager.getImageWidthCells(),
|
|
3340
|
+
}, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
|
|
3341
|
+
component.setExpanded(this.toolOutputExpanded);
|
|
3342
|
+
this.addToolComponentToChat(component);
|
|
3343
|
+
if (content.name === "browser")
|
|
3344
|
+
browserActivityComponent = component;
|
|
3345
|
+
}
|
|
3237
3346
|
if (message.stopReason === "aborted" || message.stopReason === "error") {
|
|
3238
3347
|
let errorMessage;
|
|
3239
3348
|
if (message.stopReason === "aborted") {
|
|
@@ -3268,6 +3377,8 @@ export class InteractiveMode {
|
|
|
3268
3377
|
}
|
|
3269
3378
|
}
|
|
3270
3379
|
else {
|
|
3380
|
+
if (message.role === "user")
|
|
3381
|
+
browserActivityComponent = undefined;
|
|
3271
3382
|
// All other messages use standard rendering
|
|
3272
3383
|
this.addMessageToChat(message, options);
|
|
3273
3384
|
}
|
|
@@ -3358,7 +3469,7 @@ export class InteractiveMode {
|
|
|
3358
3469
|
});
|
|
3359
3470
|
}
|
|
3360
3471
|
rebuildChatFromMessages() {
|
|
3361
|
-
this.
|
|
3472
|
+
this.clearChatContainer();
|
|
3362
3473
|
this.renderSessionEntries(this.sessionManager.buildContextEntries());
|
|
3363
3474
|
}
|
|
3364
3475
|
// =========================================================================
|
|
@@ -3388,6 +3499,7 @@ export class InteractiveMode {
|
|
|
3388
3499
|
if (this.isShuttingDown)
|
|
3389
3500
|
return;
|
|
3390
3501
|
this.isShuttingDown = true;
|
|
3502
|
+
this.unregisterSessionTransfer?.();
|
|
3391
3503
|
this.stopSmoothStreaming();
|
|
3392
3504
|
if (this.planUsageTimer) {
|
|
3393
3505
|
clearInterval(this.planUsageTimer);
|
|
@@ -3575,6 +3687,10 @@ export class InteractiveMode {
|
|
|
3575
3687
|
}
|
|
3576
3688
|
}
|
|
3577
3689
|
async handleFollowUp() {
|
|
3690
|
+
if (this.runtimeHost.isDetached || this.transferInProgress) {
|
|
3691
|
+
this.showError("Use /reclaim before sending more work. Draft retained.");
|
|
3692
|
+
return;
|
|
3693
|
+
}
|
|
3578
3694
|
const text = (this.editor.getExpandedText?.() ?? this.editor.getText()).trim();
|
|
3579
3695
|
if (!text)
|
|
3580
3696
|
return;
|
|
@@ -3629,6 +3745,9 @@ export class InteractiveMode {
|
|
|
3629
3745
|
this.ui.requestRender();
|
|
3630
3746
|
}
|
|
3631
3747
|
cycleThinkingLevel() {
|
|
3748
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
3749
|
+
return;
|
|
3750
|
+
recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
3632
3751
|
const newLevel = this.session.cycleThinkingLevel();
|
|
3633
3752
|
if (newLevel === undefined) {
|
|
3634
3753
|
this.showStatus("Current model does not support thinking");
|
|
@@ -3642,6 +3761,9 @@ export class InteractiveMode {
|
|
|
3642
3761
|
this.applyPermissionMode(nextPermissionMode(getPermissionMode()), { silent: true });
|
|
3643
3762
|
}
|
|
3644
3763
|
async cycleModel(direction) {
|
|
3764
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
3765
|
+
return;
|
|
3766
|
+
recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
3645
3767
|
try {
|
|
3646
3768
|
const result = await this.session.cycleModel(direction);
|
|
3647
3769
|
if (result === undefined) {
|
|
@@ -3678,6 +3800,32 @@ export class InteractiveMode {
|
|
|
3678
3800
|
globalThis[Symbol.for("@lunr/tools-expanded-changed")]?.(expanded);
|
|
3679
3801
|
this.ui.requestRender();
|
|
3680
3802
|
}
|
|
3803
|
+
createToolExecutionComponent(toolName, toolCallId, args) {
|
|
3804
|
+
if (toolName === "browser" && this.browserActivityComponent) {
|
|
3805
|
+
this.browserActivityComponent.beginNextExecution(toolCallId, args);
|
|
3806
|
+
return this.browserActivityComponent;
|
|
3807
|
+
}
|
|
3808
|
+
const component = new ToolExecutionComponent(toolName, toolCallId, args, {
|
|
3809
|
+
showImages: this.settingsManager.getShowImages(),
|
|
3810
|
+
imageWidthCells: this.settingsManager.getImageWidthCells(),
|
|
3811
|
+
}, this.getRegisteredToolDefinition(toolName), this.ui, this.sessionManager.getCwd());
|
|
3812
|
+
component.setExpanded(this.toolOutputExpanded);
|
|
3813
|
+
this.addToolComponentToChat(component);
|
|
3814
|
+
if (toolName === "browser")
|
|
3815
|
+
this.browserActivityComponent = component;
|
|
3816
|
+
return component;
|
|
3817
|
+
}
|
|
3818
|
+
disposeChatToolComponents() {
|
|
3819
|
+
for (const child of this.chatContainer.children) {
|
|
3820
|
+
if (child instanceof ToolExecutionComponent)
|
|
3821
|
+
child.dispose();
|
|
3822
|
+
}
|
|
3823
|
+
this.browserActivityComponent = undefined;
|
|
3824
|
+
}
|
|
3825
|
+
clearChatContainer() {
|
|
3826
|
+
this.disposeChatToolComponents();
|
|
3827
|
+
this.chatContainer.clear();
|
|
3828
|
+
}
|
|
3681
3829
|
// lunr: consecutive same-tool grouping — a tool component appended right after
|
|
3682
3830
|
// another component for the SAME tool becomes a group continuation (no top
|
|
3683
3831
|
// spacer / top pad); the previous card drops its bottom pad. Mixed neighbors
|
|
@@ -3691,7 +3839,6 @@ export class InteractiveMode {
|
|
|
3691
3839
|
this.hideThinkingBlock = !this.hideThinkingBlock;
|
|
3692
3840
|
this.settingsManager.setHideThinkingBlock(this.hideThinkingBlock);
|
|
3693
3841
|
// Rebuild chat from session messages
|
|
3694
|
-
this.chatContainer.clear();
|
|
3695
3842
|
this.rebuildChatFromMessages();
|
|
3696
3843
|
// If streaming, re-add the streaming component with updated visibility and re-render.
|
|
3697
3844
|
// Re-slice to the current revealed length so hide-thinking does not dump the tail.
|
|
@@ -3869,7 +4016,6 @@ export class InteractiveMode {
|
|
|
3869
4016
|
return !!extensionRunner.getCommand(commandName);
|
|
3870
4017
|
}
|
|
3871
4018
|
renderCompactionResult(result) {
|
|
3872
|
-
this.chatContainer.clear();
|
|
3873
4019
|
this.rebuildChatFromMessages();
|
|
3874
4020
|
this.addMessageToChat(createCompactionSummaryMessage(result.summary, result.tokensBefore, new Date().toISOString()));
|
|
3875
4021
|
this.footer.invalidate();
|
|
@@ -3995,6 +4141,7 @@ export class InteractiveMode {
|
|
|
3995
4141
|
availableThemes: getAvailableThemes(),
|
|
3996
4142
|
hideThinkingBlock: this.hideThinkingBlock,
|
|
3997
4143
|
thinkingCollapse: this.thinkingCollapse,
|
|
4144
|
+
reasoningDisplay: this.settingsManager.getReasoningDisplay(),
|
|
3998
4145
|
cacheRetention: this.settingsManager.getCacheRetention() ?? "short",
|
|
3999
4146
|
doubleEscapeAction: this.settingsManager.getDoubleEscapeAction(),
|
|
4000
4147
|
treeFilterMode: this.settingsManager.getTreeFilterMode(),
|
|
@@ -4015,8 +4162,10 @@ export class InteractiveMode {
|
|
|
4015
4162
|
globalInstructionsPath: getGlobalInstructionsPath(getAgentDir()),
|
|
4016
4163
|
modelInstructionsPath: getModelInstructionsPath(getAgentDir(), this.session.model?.id ?? "no-model-selected"),
|
|
4017
4164
|
confirmLargeSubagentLaunches: this.settingsManager.getConfirmLargeSubagentLaunches(),
|
|
4165
|
+
browserEnabled: this.settingsManager.getBrowserEnabled(),
|
|
4018
4166
|
memoryEnabled: this.settingsManager.getMemoryEnabled(),
|
|
4019
4167
|
memoryCharCap: this.settingsManager.getMemoryCharCap(),
|
|
4168
|
+
todosEnabled: this.settingsManager.getTodosEnabled(),
|
|
4020
4169
|
searchCurator: getSearchCuratorSetting(),
|
|
4021
4170
|
// lunr: TUI customize settings
|
|
4022
4171
|
footerMcp: this.settingsManager.getFooterMcp(),
|
|
@@ -4106,7 +4255,6 @@ export class InteractiveMode {
|
|
|
4106
4255
|
child.setHideThinkingBlock(hidden);
|
|
4107
4256
|
}
|
|
4108
4257
|
}
|
|
4109
|
-
this.chatContainer.clear();
|
|
4110
4258
|
this.rebuildChatFromMessages();
|
|
4111
4259
|
},
|
|
4112
4260
|
onThinkingCollapseChange: (collapse) => {
|
|
@@ -4117,9 +4265,17 @@ export class InteractiveMode {
|
|
|
4117
4265
|
child.setThinkingCollapse(collapse);
|
|
4118
4266
|
}
|
|
4119
4267
|
}
|
|
4120
|
-
this.chatContainer.clear();
|
|
4121
4268
|
this.rebuildChatFromMessages();
|
|
4122
4269
|
},
|
|
4270
|
+
onReasoningDisplayChange: (display) => {
|
|
4271
|
+
this.settingsManager.setReasoningDisplay(display);
|
|
4272
|
+
for (const child of this.chatContainer.children) {
|
|
4273
|
+
if (child instanceof AssistantMessageComponent) {
|
|
4274
|
+
child.setReasoningDisplay(this.settingsManager.getReasoningDisplay());
|
|
4275
|
+
}
|
|
4276
|
+
}
|
|
4277
|
+
this.ui.requestRender();
|
|
4278
|
+
},
|
|
4123
4279
|
onShowCacheMissNoticesChange: (shown) => {
|
|
4124
4280
|
this.settingsManager.setShowCacheMissNotices(shown);
|
|
4125
4281
|
this.rebuildChatFromMessages();
|
|
@@ -4224,11 +4380,20 @@ export class InteractiveMode {
|
|
|
4224
4380
|
onMemoryCharCapChange: (cap) => {
|
|
4225
4381
|
this.settingsManager.setMemoryCharCap(cap);
|
|
4226
4382
|
},
|
|
4383
|
+
onBrowserEnabledChange: (enabled) => {
|
|
4384
|
+
this.settingsManager.setBrowserEnabled(enabled);
|
|
4385
|
+
this.session.refreshToolRegistry();
|
|
4386
|
+
},
|
|
4227
4387
|
onMemoryEnabledChange: (enabled) => {
|
|
4228
4388
|
this.settingsManager.setMemoryEnabled(enabled);
|
|
4229
4389
|
this.session.refreshToolRegistry();
|
|
4230
4390
|
this.showStatus(`Agent memory: ${enabled ? "on" : "off"}`);
|
|
4231
4391
|
},
|
|
4392
|
+
onTodosEnabledChange: (enabled) => {
|
|
4393
|
+
this.settingsManager.setTodosEnabled(enabled);
|
|
4394
|
+
notifyTodosEnabledChanged(enabled);
|
|
4395
|
+
this.session.refreshToolRegistry();
|
|
4396
|
+
},
|
|
4232
4397
|
onSearchCuratorChange: (setting) => {
|
|
4233
4398
|
if (!setSearchCuratorSetting(setting)) {
|
|
4234
4399
|
this.showError("pi-web-access is not loaded; curator setting unavailable.");
|
|
@@ -4268,6 +4433,36 @@ export class InteractiveMode {
|
|
|
4268
4433
|
onPlanUsageWindowChange: (window) => {
|
|
4269
4434
|
this.settingsManager.setPlanUsageWindow(window);
|
|
4270
4435
|
},
|
|
4436
|
+
onGatewayAction: (action) => {
|
|
4437
|
+
void (async () => {
|
|
4438
|
+
if (this.session.isStreaming) {
|
|
4439
|
+
this.showStatus("Wait for the current turn before managing the gateway.");
|
|
4440
|
+
return;
|
|
4441
|
+
}
|
|
4442
|
+
if (action === "status") {
|
|
4443
|
+
this.showStatus((await import("../../gateway/service.js")).serviceStatusText());
|
|
4444
|
+
return;
|
|
4445
|
+
}
|
|
4446
|
+
this.ui.stop();
|
|
4447
|
+
try {
|
|
4448
|
+
await new Promise((resolve, reject) => {
|
|
4449
|
+
const child = spawn(process.execPath, [process.argv[1], "gateway", ...action.split(" ")], {
|
|
4450
|
+
stdio: "inherit",
|
|
4451
|
+
env: process.env,
|
|
4452
|
+
});
|
|
4453
|
+
child.once("error", reject);
|
|
4454
|
+
child.once("exit", (code) => code === 0
|
|
4455
|
+
? resolve()
|
|
4456
|
+
: reject(new Error(`Gateway command exited with code ${code}. Run lunr gateway doctor.`)));
|
|
4457
|
+
});
|
|
4458
|
+
}
|
|
4459
|
+
finally {
|
|
4460
|
+
this.ui.start();
|
|
4461
|
+
this.ui.requestRender(true);
|
|
4462
|
+
}
|
|
4463
|
+
this.showStatus((await import("../../gateway/service.js")).serviceStatusText());
|
|
4464
|
+
})().catch((error) => this.showStatus(error instanceof Error ? error.message : String(error)));
|
|
4465
|
+
},
|
|
4271
4466
|
onDefaultPermissionModeChange: (mode) => {
|
|
4272
4467
|
this.settingsManager.setDefaultPermissionMode(mode);
|
|
4273
4468
|
},
|
|
@@ -4498,6 +4693,8 @@ export class InteractiveMode {
|
|
|
4498
4693
|
});
|
|
4499
4694
|
}
|
|
4500
4695
|
async showModelSelector(initialSearchInput) {
|
|
4696
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
4697
|
+
return;
|
|
4501
4698
|
// lunr: prefetch active subscription names so row rendering stays synchronous.
|
|
4502
4699
|
const subscriptionNames = await this.getActiveSubscriptionNames();
|
|
4503
4700
|
this.showSelector((done) => {
|
|
@@ -4690,6 +4887,8 @@ export class InteractiveMode {
|
|
|
4690
4887
|
});
|
|
4691
4888
|
}
|
|
4692
4889
|
showUserMessageSelector() {
|
|
4890
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
4891
|
+
return;
|
|
4693
4892
|
const userMessages = this.session.getUserMessagesForForking();
|
|
4694
4893
|
if (userMessages.length === 0) {
|
|
4695
4894
|
this.showStatus("No messages to fork from");
|
|
@@ -4738,6 +4937,8 @@ export class InteractiveMode {
|
|
|
4738
4937
|
}
|
|
4739
4938
|
}
|
|
4740
4939
|
showTreeSelector(initialSelectedId) {
|
|
4940
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
4941
|
+
return;
|
|
4741
4942
|
const tree = this.sessionManager.getTree();
|
|
4742
4943
|
const realLeafId = this.sessionManager.getLeafId();
|
|
4743
4944
|
const initialFilterMode = this.settingsManager.getTreeFilterMode();
|
|
@@ -4811,7 +5012,7 @@ export class InteractiveMode {
|
|
|
4811
5012
|
return;
|
|
4812
5013
|
}
|
|
4813
5014
|
// Update UI
|
|
4814
|
-
this.
|
|
5015
|
+
this.clearChatContainer();
|
|
4815
5016
|
this.renderInitialMessages();
|
|
4816
5017
|
if (result.editorText && !this.editor.getText().trim()) {
|
|
4817
5018
|
this.restoreEditorFromTreeResult(result);
|
|
@@ -4868,8 +5069,17 @@ export class InteractiveMode {
|
|
|
4868
5069
|
const next = (nextName ?? "").trim();
|
|
4869
5070
|
if (!next)
|
|
4870
5071
|
return;
|
|
5072
|
+
if (sessionFilePath === this.sessionManager.getSessionFile() && !this.runtimeHost.isDetached) {
|
|
5073
|
+
this.sessionManager.appendSessionInfo(next);
|
|
5074
|
+
return;
|
|
5075
|
+
}
|
|
4871
5076
|
const mgr = SessionManager.open(sessionFilePath);
|
|
4872
|
-
|
|
5077
|
+
try {
|
|
5078
|
+
mgr.appendSessionInfo(next);
|
|
5079
|
+
}
|
|
5080
|
+
finally {
|
|
5081
|
+
mgr.dispose();
|
|
5082
|
+
}
|
|
4873
5083
|
},
|
|
4874
5084
|
showRenameHint: true,
|
|
4875
5085
|
keybindings: this.keybindings,
|
|
@@ -5662,7 +5872,7 @@ export class InteractiveMode {
|
|
|
5662
5872
|
if (leafId) {
|
|
5663
5873
|
this.redoStack.push(leafId);
|
|
5664
5874
|
}
|
|
5665
|
-
this.
|
|
5875
|
+
this.clearChatContainer();
|
|
5666
5876
|
this.renderInitialMessages();
|
|
5667
5877
|
void this.flushCompactionQueue({ willRetry: false });
|
|
5668
5878
|
return { editorText: result.editorText, editorImages: result.editorImages };
|
|
@@ -5705,7 +5915,7 @@ export class InteractiveMode {
|
|
|
5705
5915
|
this.showStatus("Navigation cancelled");
|
|
5706
5916
|
return;
|
|
5707
5917
|
}
|
|
5708
|
-
this.
|
|
5918
|
+
this.clearChatContainer();
|
|
5709
5919
|
this.renderInitialMessages();
|
|
5710
5920
|
if (result.editorText && !this.editor.getText().trim()) {
|
|
5711
5921
|
this.restoreEditorFromTreeResult(result);
|
|
@@ -6300,6 +6510,9 @@ export class InteractiveMode {
|
|
|
6300
6510
|
}
|
|
6301
6511
|
/** Apply addendum + auto-rollback for a mode without a status toast. */
|
|
6302
6512
|
syncPermissionModeEffects(mode) {
|
|
6513
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
6514
|
+
return;
|
|
6515
|
+
this.sessionManager.setPermissionMode(mode);
|
|
6303
6516
|
if (mode === "plan") {
|
|
6304
6517
|
this.session.setSystemPromptAppend(PLAN_MODE_ADDENDUM);
|
|
6305
6518
|
}
|
|
@@ -6327,6 +6540,10 @@ export class InteractiveMode {
|
|
|
6327
6540
|
}
|
|
6328
6541
|
}
|
|
6329
6542
|
applyPermissionMode(mode, opts) {
|
|
6543
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
6544
|
+
return;
|
|
6545
|
+
this.sessionManager.setPermissionMode(mode);
|
|
6546
|
+
recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
6330
6547
|
const prev = getPermissionMode();
|
|
6331
6548
|
if (mode === "plan" && prev !== "plan") {
|
|
6332
6549
|
this.previousPermissionMode = prev;
|
|
@@ -6665,6 +6882,10 @@ ${toggleThinking ? `| \`${toggleThinking}\` | Toggle thinking block visibility |
|
|
|
6665
6882
|
this.ui.requestRender();
|
|
6666
6883
|
}
|
|
6667
6884
|
async handleClearCommand() {
|
|
6885
|
+
if (this.runtimeHost.isDetached || this.transferInProgress) {
|
|
6886
|
+
this.showError("Use /reclaim first, or /quit to leave this terminal.");
|
|
6887
|
+
return;
|
|
6888
|
+
}
|
|
6668
6889
|
this.clearStatusIndicator();
|
|
6669
6890
|
this.ui.setChatScroll(0);
|
|
6670
6891
|
// Deferred factories must be on builtinRoster before /new rebuilds the runtime.
|
|
@@ -6805,6 +7026,7 @@ ${toggleThinking ? `| \`${toggleThinking}\` | Toggle thinking block visibility |
|
|
|
6805
7026
|
}
|
|
6806
7027
|
}
|
|
6807
7028
|
stop() {
|
|
7029
|
+
this.setThinkingAnimation(false);
|
|
6808
7030
|
this.stopCatalogRefresh?.();
|
|
6809
7031
|
this.stopCatalogRefresh = undefined;
|
|
6810
7032
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
@@ -6815,6 +7037,7 @@ ${toggleThinking ? `| \`${toggleThinking}\` | Toggle thinking block visibility |
|
|
|
6815
7037
|
this.clearExtensionTerminalInputListeners();
|
|
6816
7038
|
this.footer.dispose();
|
|
6817
7039
|
this.footerDataProvider.dispose();
|
|
7040
|
+
this.disposeChatToolComponents();
|
|
6818
7041
|
if (this.unsubscribe) {
|
|
6819
7042
|
this.unsubscribe();
|
|
6820
7043
|
}
|