@ashx-j/lunr 0.2.21 → 0.2.22
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 +1 -1
- package/README.md +20 -4
- 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 +3 -0
- package/dist/builtin-extensions/lunr-browser.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-browser.js +56 -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 +1 -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 +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.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 +47 -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 +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +20 -2
- 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 +7 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +18 -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/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -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 +11 -2
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +31 -4
- 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 +11 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +53 -16
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/copyable-text.d.ts +31 -0
- package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/copyable-text.js +165 -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 +5 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +38 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +151 -7
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/node-runtime/agent-session-services-NQ6GKOIK.js +49 -0
- package/dist/node-runtime/{builtin-extensions-JCOPAAB5.js → builtin-extensions-GVC6IFDU.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-5BNJ4JUH.js +672 -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-6KDIOJL3.js → chunk-6427XAWG.js} +3 -3
- package/dist/node-runtime/{chunk-BOHIDQT4.js → chunk-6B2POMK7.js} +1 -1
- package/dist/node-runtime/{chunk-RNBHABBA.js → chunk-7QWNYZDI.js} +7 -0
- 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-BFNXONG3.js +521 -0
- 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-QZMODZQ2.js → chunk-E24EO34J.js} +2 -1
- package/dist/node-runtime/{chunk-2BUAYZ7K.js → chunk-EQ63ANHL.js} +422 -123
- package/dist/node-runtime/{chunk-GB2MGFLI.js → chunk-GJSAD4AB.js} +216 -201
- package/dist/node-runtime/{chunk-W3SILANP.js → chunk-GMHJCCEN.js} +8 -8
- package/dist/node-runtime/{chunk-DDWHZ633.js → chunk-GNN7H3B7.js} +1 -1
- package/dist/node-runtime/chunk-GS66LV4M.js +2830 -0
- package/dist/node-runtime/{chunk-6BEIBLQ3.js → chunk-H3XF4UVQ.js} +1 -1
- package/dist/node-runtime/chunk-H4K3JDRB.js +47 -0
- package/dist/node-runtime/{chunk-YMEAYRBE.js → chunk-HTFRRDSF.js} +2 -7
- package/dist/node-runtime/chunk-IMLCWLPI.js +9 -0
- package/dist/node-runtime/{chunk-Y5KOEMBH.js → chunk-IQIEU7SB.js} +9 -674
- package/dist/node-runtime/{chunk-OPEK5RRY.js → chunk-IVXYUAJE.js} +1 -1
- package/dist/node-runtime/{chunk-PDNXVXMD.js → chunk-IWOWXRWU.js} +58 -48
- package/dist/node-runtime/chunk-KKUTQQV7.js +144 -0
- package/dist/node-runtime/{chunk-AWVD5IEY.js → chunk-LMBNLFXQ.js} +23 -12
- 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-ORH324EP.js} +19 -3
- package/dist/node-runtime/{chunk-2SJB2AWP.js → chunk-PC2Z5TKZ.js} +3 -3
- package/dist/node-runtime/{chunk-SY2TFMLO.js → chunk-QDGKKKUM.js} +46 -151
- package/dist/node-runtime/chunk-R3K2F5GI.js +122 -0
- package/dist/node-runtime/chunk-RMQZU2YU.js +117 -0
- package/dist/node-runtime/{chunk-XI77KVKA.js → chunk-TDL7UWJ7.js} +283 -2999
- package/dist/node-runtime/{chunk-G6LRAP36.js → chunk-TQGPP4SC.js} +1 -1
- package/dist/node-runtime/chunk-UAEOTO52.js +119 -0
- package/dist/node-runtime/{chunk-VZR3NCM7.js → chunk-UAFLNHSH.js} +18 -14
- 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-V2A7CEXK.js +355 -0
- package/dist/node-runtime/chunk-VJPTNWAP.js +708 -0
- package/dist/node-runtime/{chunk-WKDK4C5P.js → chunk-VSSXXL36.js} +38 -164
- package/dist/node-runtime/{chunk-4I23VTC4.js → chunk-VWCE2HSZ.js} +21 -124
- package/dist/node-runtime/{chunk-WLLDXJRT.js → chunk-WADV2VDS.js} +22 -1014
- package/dist/node-runtime/{chunk-GKLEQ3I4.js → chunk-XLTL257W.js} +126 -27
- package/dist/node-runtime/chunk-YPHAIRZT.js +10 -0
- package/dist/node-runtime/cli-runtime.js +2 -2
- package/dist/node-runtime/command-3JHHXOPX.js +45 -0
- package/dist/node-runtime/commands-2JVNFGMQ.js +36 -0
- package/dist/node-runtime/{commands-MV5KOZ64.js → commands-KAMO2T6P.js} +10 -10
- 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-KBFVV63J.js} +4 -3
- package/dist/node-runtime/{extension-input-O4HSAEM4.js → extension-input-K24TVKVW.js} +4 -4
- package/dist/node-runtime/{extension-selector-X5FCX43D.js → extension-selector-SPNF7EDR.js} +4 -4
- package/dist/node-runtime/{extract-XLQSJN4V.js → extract-EQJE7FZZ.js} +2 -2
- package/dist/node-runtime/{gateway-BM6NLOH4.js → gateway-VFO6SFKK.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-C3CF7O7N.js} +21 -82
- package/dist/node-runtime/interactive-mode-LOM6AIF6.js +72 -0
- package/dist/node-runtime/{interactive-view-ILS6TAN5.js → interactive-view-IDSCPPK7.js} +8 -8
- package/dist/node-runtime/lunr-browser-YNW7FTYX.js +87 -0
- package/dist/node-runtime/{lunr-cron-4VHP4E4B.js → lunr-cron-BKHGNBKT.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-HMP25WBC.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-VCK4E2RC.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-FEUDLJOE.js} +201 -78
- 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-P5ODXPEG.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-LHRMJOKT.js} +5 -4
- package/dist/node-runtime/{settings-manager-CUGAZWAB.js → settings-manager-UUZ6NUXI.js} +7 -2
- package/dist/node-runtime/setup-JBKOLJ6F.js +18 -0
- package/dist/node-runtime/setup-NRXVZBLJ.js +155 -0
- package/dist/node-runtime/{subagent-executor-MH4A7CCF.js → subagent-executor-MLUMBWCP.js} +22 -18
- package/dist/node-runtime/theme-U7IGOA7O.js +68 -0
- package/dist/node-runtime/trust-manager-MMISNCYO.js +17 -0
- package/dist/node-runtime/{update-cli-XTZMZGOL.js → update-cli-4TP25CNW.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 +94 -16
- package/docs/interactive-startup.md +2 -1
- package/docs/sessions.md +10 -0
- package/docs/settings.md +1 -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/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
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
computeContextBreakdown
|
|
4
|
-
} from "./chunk-G6LRAP36.js";
|
|
5
2
|
import {
|
|
6
3
|
checkForUpdate,
|
|
7
4
|
markUpdateNotified
|
|
8
5
|
} from "./chunk-KWA4OC2J.js";
|
|
9
6
|
import {
|
|
10
|
-
SubagentEscapeSequence,
|
|
11
|
-
getSubagentCancellation,
|
|
12
7
|
getSubagentSpinnerDefinition
|
|
13
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-US544NN6.js";
|
|
9
|
+
import {
|
|
10
|
+
computeContextBreakdown
|
|
11
|
+
} from "./chunk-TQGPP4SC.js";
|
|
14
12
|
import {
|
|
15
13
|
copyToClipboard,
|
|
16
14
|
readClipboardText
|
|
@@ -22,17 +20,14 @@ import {
|
|
|
22
20
|
import {
|
|
23
21
|
BootScreenComponent,
|
|
24
22
|
registerPermissionModeBridge
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-H3XF4UVQ.js";
|
|
26
24
|
import {
|
|
27
25
|
nextModeForGoal,
|
|
28
26
|
registerPermissionModeControlBridge
|
|
29
27
|
} from "./chunk-7N3YHTYF.js";
|
|
30
28
|
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
getProjectTrustOptions,
|
|
34
|
-
hasTrustRequiringProjectResources
|
|
35
|
-
} from "./chunk-YMEAYRBE.js";
|
|
29
|
+
areExperimentalFeaturesEnabled
|
|
30
|
+
} from "./chunk-YPHAIRZT.js";
|
|
36
31
|
import {
|
|
37
32
|
MissingSessionCwdError,
|
|
38
33
|
SessionImportFileNotFoundError,
|
|
@@ -41,45 +36,28 @@ import {
|
|
|
41
36
|
clearRollback,
|
|
42
37
|
disableRollbackForSession,
|
|
43
38
|
enableRollbackForSession,
|
|
44
|
-
formatCatalogRefreshSummary,
|
|
45
39
|
formatMissingSessionCwdPrompt,
|
|
46
|
-
hasGrokCliXaiAuth,
|
|
47
40
|
initRollback,
|
|
48
41
|
isRollbackEnabled,
|
|
49
42
|
isRollbackSessionForceEnabled,
|
|
50
43
|
migrateRollbackSession,
|
|
51
44
|
parseSkillBlock,
|
|
52
45
|
peekRollbackTurnsConsumed,
|
|
53
|
-
refreshModelCandidatesForInit,
|
|
54
46
|
rollbackLastTurn,
|
|
55
|
-
setRollbackWarningHandler
|
|
56
|
-
|
|
57
|
-
} from "./chunk-XI77KVKA.js";
|
|
47
|
+
setRollbackWarningHandler
|
|
48
|
+
} from "./chunk-TDL7UWJ7.js";
|
|
58
49
|
import {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
defaultModelPerProvider,
|
|
62
|
-
extractFileOpsFromMessage,
|
|
63
|
-
findExactModelReferenceMatch,
|
|
64
|
-
resolveModelScope
|
|
65
|
-
} from "./chunk-STERBGUB.js";
|
|
50
|
+
notifyTodosEnabledChanged
|
|
51
|
+
} from "./chunk-CCCN2UCX.js";
|
|
66
52
|
import {
|
|
67
53
|
parseGitUrl
|
|
68
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-IQIEU7SB.js";
|
|
69
55
|
import {
|
|
70
|
-
clearRegistry,
|
|
71
56
|
createAllToolDefinitions,
|
|
72
57
|
ensureTool,
|
|
73
58
|
getToolPath,
|
|
74
|
-
isWindows,
|
|
75
|
-
kill,
|
|
76
|
-
killAll,
|
|
77
|
-
list,
|
|
78
|
-
pause,
|
|
79
|
-
restart,
|
|
80
|
-
resume,
|
|
81
59
|
truncateToVisualLines
|
|
82
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-VSSXXL36.js";
|
|
83
61
|
import {
|
|
84
62
|
DEFAULT_MAX_BYTES,
|
|
85
63
|
DEFAULT_MAX_LINES,
|
|
@@ -92,38 +70,44 @@ import {
|
|
|
92
70
|
toolGroupRole,
|
|
93
71
|
toolGroupTree,
|
|
94
72
|
toolStatusDot
|
|
95
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-5ZQXRPMC.js";
|
|
96
74
|
import {
|
|
97
|
-
|
|
98
|
-
|
|
75
|
+
convertToPng,
|
|
76
|
+
processImage
|
|
77
|
+
} from "./chunk-AD6VXAO7.js";
|
|
78
|
+
import {
|
|
79
|
+
formatCatalogRefreshSummary,
|
|
80
|
+
hasGrokCliXaiAuth,
|
|
81
|
+
refreshModelCandidatesForInit,
|
|
82
|
+
stripJsonComments
|
|
83
|
+
} from "./chunk-GS66LV4M.js";
|
|
99
84
|
import {
|
|
100
85
|
HTTP_IDLE_TIMEOUT_CHOICES,
|
|
101
86
|
SKILL_TAG_CHARACTERS,
|
|
102
87
|
configureHttpDispatcher,
|
|
103
88
|
formatHttpIdleTimeoutMs
|
|
104
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-WADV2VDS.js";
|
|
105
90
|
import {
|
|
106
91
|
SUBAGENT_SPINNER_LABELS,
|
|
107
92
|
SUBAGENT_SPINNER_NAMES
|
|
108
93
|
} from "./chunk-LISUTZS3.js";
|
|
109
94
|
import {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
createCompactionSummaryMessage
|
|
115
|
-
} from "./chunk-FVDOXRUD.js";
|
|
116
|
-
import {
|
|
117
|
-
getModelTiersBridge
|
|
118
|
-
} from "./chunk-W3CVH5RX.js";
|
|
95
|
+
ProjectTrustStore,
|
|
96
|
+
getProjectTrustOptions,
|
|
97
|
+
hasTrustRequiringProjectResources
|
|
98
|
+
} from "./chunk-HTFRRDSF.js";
|
|
119
99
|
import {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
100
|
+
computeFileLists,
|
|
101
|
+
createFileOps,
|
|
102
|
+
defaultModelPerProvider,
|
|
103
|
+
extractFileOpsFromMessage,
|
|
104
|
+
findExactModelReferenceMatch,
|
|
105
|
+
resolveModelScope
|
|
106
|
+
} from "./chunk-OFKSVRV7.js";
|
|
123
107
|
import {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
} from "./chunk-
|
|
108
|
+
SubagentEscapeSequence,
|
|
109
|
+
getSubagentCancellation
|
|
110
|
+
} from "./chunk-BBUVIEZB.js";
|
|
127
111
|
import {
|
|
128
112
|
AUTO_MODE_ADDENDUM,
|
|
129
113
|
PLAN_MODE_ADDENDUM,
|
|
@@ -133,53 +117,87 @@ import {
|
|
|
133
117
|
resetPermissions,
|
|
134
118
|
restorePermissionModeAfterPlan,
|
|
135
119
|
setPermissionMode
|
|
136
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-5D7LC2ZQ.js";
|
|
137
121
|
import {
|
|
138
122
|
getGlobalInstructionsPath,
|
|
139
123
|
getModelInstructionsPath
|
|
140
124
|
} from "./chunk-M3LZLQW2.js";
|
|
141
125
|
import {
|
|
142
|
-
|
|
143
|
-
|
|
126
|
+
clearRegistry,
|
|
127
|
+
isWindows,
|
|
128
|
+
kill,
|
|
129
|
+
killAll,
|
|
130
|
+
list,
|
|
131
|
+
pause,
|
|
132
|
+
restart,
|
|
133
|
+
resume
|
|
134
|
+
} from "./chunk-KKUTQQV7.js";
|
|
144
135
|
import {
|
|
145
|
-
|
|
146
|
-
} from "./chunk-
|
|
136
|
+
killTrackedDetachedChildren
|
|
137
|
+
} from "./chunk-CSFI6YXL.js";
|
|
138
|
+
import {
|
|
139
|
+
cancelSessionHandoff,
|
|
140
|
+
markSessionHandoff,
|
|
141
|
+
recordTuiActivity,
|
|
142
|
+
registerTransferHandler,
|
|
143
|
+
requestSessionTransfer
|
|
144
|
+
} from "./chunk-AZJHNQKQ.js";
|
|
145
|
+
import {
|
|
146
|
+
SessionManager,
|
|
147
|
+
sessionEntryToContextMessages
|
|
148
|
+
} from "./chunk-XLTL257W.js";
|
|
149
|
+
import {
|
|
150
|
+
createCompactionSummaryMessage
|
|
151
|
+
} from "./chunk-FVDOXRUD.js";
|
|
147
152
|
import {
|
|
148
153
|
getCustomizeBridge
|
|
149
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-4EULYYR4.js";
|
|
150
155
|
import {
|
|
151
156
|
MEMORY_CHAR_CAP_DEFAULT,
|
|
152
157
|
MEMORY_CHAR_CAP_MAX,
|
|
153
158
|
MEMORY_CHAR_CAP_MIN
|
|
154
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-UJOCPOMX.js";
|
|
160
|
+
import {
|
|
161
|
+
getModelTiersBridge
|
|
162
|
+
} from "./chunk-2TKODGBZ.js";
|
|
163
|
+
import {
|
|
164
|
+
getAllPlanUsageResults,
|
|
165
|
+
getUsageServiceBridge
|
|
166
|
+
} from "./chunk-2MI5OPMN.js";
|
|
167
|
+
import {
|
|
168
|
+
SessionSelectorComponent
|
|
169
|
+
} from "./chunk-ORH324EP.js";
|
|
170
|
+
import {
|
|
171
|
+
CustomEditor
|
|
172
|
+
} from "./chunk-H2EOZYMP.js";
|
|
173
|
+
import {
|
|
174
|
+
KeybindingsManager
|
|
175
|
+
} from "./chunk-5EFIU3OM.js";
|
|
176
|
+
import {
|
|
177
|
+
time
|
|
178
|
+
} from "./chunk-PVCDKGR6.js";
|
|
155
179
|
import {
|
|
156
180
|
markStartupMilestone
|
|
157
181
|
} from "./chunk-CCZJ3PYY.js";
|
|
158
182
|
import {
|
|
159
183
|
ExtensionSelectorComponent
|
|
160
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-6427XAWG.js";
|
|
161
185
|
import {
|
|
162
186
|
ExtensionInputComponent
|
|
163
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-PC2Z5TKZ.js";
|
|
164
188
|
import {
|
|
165
189
|
CountdownTimer
|
|
166
190
|
} from "./chunk-I6R76AG7.js";
|
|
167
|
-
import {
|
|
168
|
-
SessionSelectorComponent
|
|
169
|
-
} from "./chunk-JZQ7F36T.js";
|
|
170
|
-
import {
|
|
171
|
-
KeybindingsManager
|
|
172
|
-
} from "./chunk-5EFIU3OM.js";
|
|
173
191
|
import {
|
|
174
192
|
DynamicBorder
|
|
175
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-6B2POMK7.js";
|
|
176
194
|
import {
|
|
177
195
|
formatKeyText,
|
|
178
196
|
keyDisplayText,
|
|
179
197
|
keyHint,
|
|
180
198
|
keyText,
|
|
181
199
|
rawKeyHint
|
|
182
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-GNN7H3B7.js";
|
|
183
201
|
import {
|
|
184
202
|
FS_WATCH_RETRY_DELAY_MS,
|
|
185
203
|
Theme,
|
|
@@ -205,7 +223,7 @@ import {
|
|
|
205
223
|
stopThemeWatcher,
|
|
206
224
|
theme,
|
|
207
225
|
watchWithErrorHandler
|
|
208
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-7QWNYZDI.js";
|
|
209
227
|
import {
|
|
210
228
|
APP_NAME,
|
|
211
229
|
APP_TITLE,
|
|
@@ -719,6 +737,8 @@ var BUILTIN_SLASH_COMMANDS = [
|
|
|
719
737
|
{ name: "new", description: "Start a new session" },
|
|
720
738
|
{ name: "init", description: "Generate a starter AGENTS.md for this project" },
|
|
721
739
|
{ name: "compact", description: "Manually compact the session context" },
|
|
740
|
+
{ name: "handoff", description: "Mark this saved session for phone continuation for 8 hours, or cancel" },
|
|
741
|
+
{ name: "reclaim", description: "Reclaim this session after its remote owner releases it" },
|
|
722
742
|
{ name: "resume", description: "Resume a different session" },
|
|
723
743
|
{ name: "sessions", description: "Browse and resume sessions" },
|
|
724
744
|
{ name: "reload", description: "Reload keybindings, extensions, skills, prompts, themes, and context files" },
|
|
@@ -1097,6 +1117,113 @@ var ArminComponent = class {
|
|
|
1097
1117
|
// packages/coding-agent/dist/modes/interactive/components/assistant-message.js
|
|
1098
1118
|
import { Container, Markdown as Markdown2, Spacer, Text } from "@ashx-j/lunr-tui";
|
|
1099
1119
|
|
|
1120
|
+
// packages/coding-agent/dist/modes/interactive/components/copyable-text.js
|
|
1121
|
+
import { truncateToWidth, wrapTextWithAnsi } from "@ashx-j/lunr-tui";
|
|
1122
|
+
function sourceLines(source) {
|
|
1123
|
+
let lines = [], pattern = /([^\r\n]*)(\r\n|\r|\n|$)/g;
|
|
1124
|
+
for (let match of source.matchAll(pattern)) {
|
|
1125
|
+
let start = match.index, text = match[1], newline = match[2];
|
|
1126
|
+
if (lines.push({ start, end: start + text.length + newline.length, text }), !newline)
|
|
1127
|
+
break;
|
|
1128
|
+
}
|
|
1129
|
+
return lines;
|
|
1130
|
+
}
|
|
1131
|
+
function parseFenceOpening(line) {
|
|
1132
|
+
let match = /^( {0,3})(`{3,}|~{3,})(.*)$/.exec(line);
|
|
1133
|
+
if (!match)
|
|
1134
|
+
return;
|
|
1135
|
+
let fence = match[2], info = match[3];
|
|
1136
|
+
if (!(fence[0] === "`" && info.includes("`")))
|
|
1137
|
+
return {
|
|
1138
|
+
marker: fence[0],
|
|
1139
|
+
length: fence.length,
|
|
1140
|
+
copyable: info.trim() === "lunr-copy"
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
function isFenceClosing(line, opening) {
|
|
1144
|
+
let match = /^( {0,3})(`+|~+)[ \t]*$/.exec(line);
|
|
1145
|
+
if (!match)
|
|
1146
|
+
return !1;
|
|
1147
|
+
let fence = match[2];
|
|
1148
|
+
return fence[0] === opening.marker && fence.length >= opening.length;
|
|
1149
|
+
}
|
|
1150
|
+
function payloadEndBeforeClosing(source, closingStart) {
|
|
1151
|
+
return closingStart >= 2 && source.slice(closingStart - 2, closingStart) === `\r
|
|
1152
|
+
` ? closingStart - 2 : closingStart >= 1 && (source[closingStart - 1] === `
|
|
1153
|
+
` || source[closingStart - 1] === "\r") ? closingStart - 1 : closingStart;
|
|
1154
|
+
}
|
|
1155
|
+
function parseCopyableTextSegments(source) {
|
|
1156
|
+
let lines = sourceLines(source), segments = [], emittedThrough = 0, lineIndex = 0;
|
|
1157
|
+
for (; lineIndex < lines.length; ) {
|
|
1158
|
+
let openingLine = lines[lineIndex], opening = parseFenceOpening(openingLine.text);
|
|
1159
|
+
if (!opening) {
|
|
1160
|
+
lineIndex++;
|
|
1161
|
+
continue;
|
|
1162
|
+
}
|
|
1163
|
+
let closingIndex = -1;
|
|
1164
|
+
for (let i = lineIndex + 1; i < lines.length; i++)
|
|
1165
|
+
if (isFenceClosing(lines[i].text, opening)) {
|
|
1166
|
+
closingIndex = i;
|
|
1167
|
+
break;
|
|
1168
|
+
}
|
|
1169
|
+
if (!opening.copyable) {
|
|
1170
|
+
if (closingIndex < 0)
|
|
1171
|
+
break;
|
|
1172
|
+
lineIndex = closingIndex + 1;
|
|
1173
|
+
continue;
|
|
1174
|
+
}
|
|
1175
|
+
openingLine.start > emittedThrough && segments.push({ type: "markdown", text: source.slice(emittedThrough, openingLine.start) });
|
|
1176
|
+
let payloadStart = openingLine.end;
|
|
1177
|
+
if (closingIndex < 0)
|
|
1178
|
+
return segments.push({
|
|
1179
|
+
type: "copyable",
|
|
1180
|
+
payload: source.slice(payloadStart),
|
|
1181
|
+
complete: !1,
|
|
1182
|
+
start: openingLine.start
|
|
1183
|
+
}), segments;
|
|
1184
|
+
let closingLine = lines[closingIndex];
|
|
1185
|
+
segments.push({
|
|
1186
|
+
type: "copyable",
|
|
1187
|
+
payload: source.slice(payloadStart, payloadEndBeforeClosing(source, closingLine.start)),
|
|
1188
|
+
complete: !0,
|
|
1189
|
+
start: openingLine.start
|
|
1190
|
+
}), emittedThrough = closingLine.end, lineIndex = closingIndex + 1;
|
|
1191
|
+
}
|
|
1192
|
+
return emittedThrough < source.length && segments.push({ type: "markdown", text: source.slice(emittedThrough) }), segments;
|
|
1193
|
+
}
|
|
1194
|
+
var CopyableTextBlockComponent = class {
|
|
1195
|
+
buttonRow = -1;
|
|
1196
|
+
buttonStart = -1;
|
|
1197
|
+
buttonEnd = -1;
|
|
1198
|
+
payload;
|
|
1199
|
+
complete;
|
|
1200
|
+
outputPad;
|
|
1201
|
+
markdownTheme;
|
|
1202
|
+
status;
|
|
1203
|
+
onCopy;
|
|
1204
|
+
constructor(payload, complete, outputPad, markdownTheme, status, onCopy) {
|
|
1205
|
+
this.payload = payload, this.complete = complete, this.outputPad = outputPad, this.markdownTheme = markdownTheme, this.status = status, this.onCopy = onCopy;
|
|
1206
|
+
}
|
|
1207
|
+
invalidate() {
|
|
1208
|
+
this.buttonRow = -1, this.buttonStart = -1, this.buttonEnd = -1;
|
|
1209
|
+
}
|
|
1210
|
+
render(width) {
|
|
1211
|
+
let pad = " ".repeat(this.outputPad), contentWidth = Math.max(1, width - this.outputPad - 2), lines = [truncateToWidth(`${pad}${this.markdownTheme.codeBlockBorder("\u256D\u2500 lunr-copy")}`, width, "")], payloadLines = this.payload.replace(/\t/g, " ").split(`
|
|
1212
|
+
`);
|
|
1213
|
+
for (let payloadLine of payloadLines)
|
|
1214
|
+
for (let wrappedLine of wrapTextWithAnsi(payloadLine, contentWidth))
|
|
1215
|
+
lines.push(truncateToWidth(`${pad}${this.markdownTheme.codeBlockBorder("\u2502 ")}${this.markdownTheme.codeBlock(wrappedLine)}`, width, ""));
|
|
1216
|
+
if (lines.push(truncateToWidth(`${pad}${this.markdownTheme.codeBlockBorder(this.complete ? "\u2570\u2500" : "\u2570\u2500 receiving")}`, width, "")), this.buttonRow = -1, this.buttonStart = -1, this.buttonEnd = -1, this.complete) {
|
|
1217
|
+
let button = "[ Copy ]", feedback = "";
|
|
1218
|
+
this.status === "copying" ? feedback = theme.fg("dim", " Copying...") : this.status === "copied" ? feedback = theme.fg("success", " Copied") : typeof this.status == "object" && (feedback = theme.fg("error", ` Copy failed: ${this.status.error}`)), this.buttonRow = lines.length, this.buttonStart = this.outputPad, this.buttonEnd = Math.min(width, this.buttonStart + button.length), lines.push(truncateToWidth(`${pad}${theme.fg("accent", button)}${feedback}`, width, ""));
|
|
1219
|
+
}
|
|
1220
|
+
return lines;
|
|
1221
|
+
}
|
|
1222
|
+
handleClick(localY, width, localX) {
|
|
1223
|
+
return this.render(width), !this.complete || this.status === "copying" || localX === void 0 || localY !== this.buttonRow || localX < this.buttonStart || localX >= this.buttonEnd ? !1 : (this.onCopy(), !0);
|
|
1224
|
+
}
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1100
1227
|
// packages/coding-agent/dist/modes/interactive/components/thinking-summary.js
|
|
1101
1228
|
var LEADING_MARKDOWN_RE = /^[#*`>\-\s]+/;
|
|
1102
1229
|
function thinkingSnippet(joinedThinking, maxLen = 120) {
|
|
@@ -1181,8 +1308,12 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1181
1308
|
lastMessage;
|
|
1182
1309
|
thinkingSource;
|
|
1183
1310
|
hasToolCalls = !1;
|
|
1184
|
-
|
|
1185
|
-
|
|
1311
|
+
copyText;
|
|
1312
|
+
requestRender;
|
|
1313
|
+
copyStates = /* @__PURE__ */ new Map();
|
|
1314
|
+
constructor(message, hideThinkingBlock = !1, markdownTheme = getMarkdownTheme(), hiddenThinkingLabel = "Thinking...", outputPad = 1, thinkingCollapse = !1, copyOptions = {}) {
|
|
1315
|
+
super(), this.hideThinkingBlock = hideThinkingBlock, this.thinkingCollapse = thinkingCollapse, this.markdownTheme = markdownTheme, this.hiddenThinkingLabel = hiddenThinkingLabel, this.outputPad = outputPad, this.copyText = copyOptions.copyText ?? copyToClipboard, this.requestRender = copyOptions.requestRender ?? (() => {
|
|
1316
|
+
}), this.contentContainer = new Container(), this.addChild(this.contentContainer), message && this.updateContent(message);
|
|
1186
1317
|
}
|
|
1187
1318
|
invalidate() {
|
|
1188
1319
|
super.invalidate(), this.lastMessage && this.updateContent(this.lastMessage, this.thinkingSourceOptions());
|
|
@@ -1210,12 +1341,12 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1210
1341
|
} else this.expandedRuns.has(runIndex) ? this.expandedRuns.delete(runIndex) : this.expandedRuns.add(runIndex);
|
|
1211
1342
|
this.lastMessage && this.updateContent(this.lastMessage, this.thinkingSourceOptions());
|
|
1212
1343
|
}
|
|
1213
|
-
handleClick(localY, width) {
|
|
1344
|
+
handleClick(localY, width, localX) {
|
|
1214
1345
|
let contentWidth = width, y = 0;
|
|
1215
1346
|
for (let child of this.contentContainer.children) {
|
|
1216
1347
|
let h = child.render(contentWidth).length;
|
|
1217
1348
|
if (localY >= y && localY < y + h)
|
|
1218
|
-
return typeof child.handleClick == "function" ? child.handleClick(localY - y, contentWidth) : !1;
|
|
1349
|
+
return typeof child.handleClick == "function" ? child.handleClick(localY - y, contentWidth, localX) : !1;
|
|
1219
1350
|
y += h;
|
|
1220
1351
|
}
|
|
1221
1352
|
return !1;
|
|
@@ -1243,12 +1374,22 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1243
1374
|
let isFirstTextBlock = !0, thinkingRunIndex = -1;
|
|
1244
1375
|
for (let i = 0; i < message.content.length; i++) {
|
|
1245
1376
|
let content = message.content[i];
|
|
1246
|
-
if (content.type === "text" && content.text.trim())
|
|
1247
|
-
let
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1377
|
+
if (content.type === "text" && content.text.trim())
|
|
1378
|
+
for (let segment of parseCopyableTextSegments(content.text)) {
|
|
1379
|
+
if (segment.type === "markdown") {
|
|
1380
|
+
let trimmed = segment.text.trim();
|
|
1381
|
+
if (!trimmed)
|
|
1382
|
+
continue;
|
|
1383
|
+
let text = isFirstTextBlock ? `\u25CF ${trimmed}` : trimmed;
|
|
1384
|
+
isFirstTextBlock = !1, this.contentContainer.addChild(new Markdown2(text, this.outputPad, 0, this.markdownTheme, {
|
|
1385
|
+
color: (body) => theme.fg("userMessageText", body)
|
|
1386
|
+
}));
|
|
1387
|
+
continue;
|
|
1388
|
+
}
|
|
1389
|
+
let key = `${i}:${segment.start}`, copyState = this.copyStates.get(key), status = copyState?.payload === segment.payload ? copyState.status : "idle";
|
|
1390
|
+
copyState && copyState.payload !== segment.payload && this.copyStates.delete(key), this.contentContainer.addChild(new CopyableTextBlockComponent(segment.payload, segment.complete, this.outputPad, this.markdownTheme, status, () => this.copyPayload(key, segment.payload)));
|
|
1391
|
+
}
|
|
1392
|
+
else if (content.type === "thinking") {
|
|
1252
1393
|
thinkingRunIndex++;
|
|
1253
1394
|
let displayBlocks = [];
|
|
1254
1395
|
for (; i < message.content.length; i++) {
|
|
@@ -1277,6 +1418,17 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1277
1418
|
}
|
|
1278
1419
|
}
|
|
1279
1420
|
}
|
|
1421
|
+
copyPayload(key, payload) {
|
|
1422
|
+
this.copyStates.get(key)?.status !== "copying" && (this.copyStates.set(key, { payload, status: "copying" }), this.refreshCopyStatus(), Promise.resolve().then(() => this.copyText(payload)).then(() => {
|
|
1423
|
+
this.copyStates.set(key, { payload, status: "copied" }), this.refreshCopyStatus();
|
|
1424
|
+
}).catch((error) => {
|
|
1425
|
+
let message = (error instanceof Error ? error.message : String(error)).replace(/\s+/g, " ").trim();
|
|
1426
|
+
this.copyStates.set(key, { payload, status: { error: message || "Unknown error" } }), this.refreshCopyStatus();
|
|
1427
|
+
}));
|
|
1428
|
+
}
|
|
1429
|
+
refreshCopyStatus() {
|
|
1430
|
+
this.lastMessage && this.updateContent(this.lastMessage, this.thinkingSourceOptions()), this.requestRender();
|
|
1431
|
+
}
|
|
1280
1432
|
renderThinkingRun(thinkingRunIndex, thinkingBlocks, displayMessage, displayIndex, fullyRevealed) {
|
|
1281
1433
|
let hasVisibleContentAfter = displayIndex >= 0 ? displayMessage.content.slice(displayIndex + 1).some((c) => c.type === "text" && c.text.trim() || c.type === "thinking" && c.thinking.trim()) : displayMessage.content.some((c) => c.type === "text" && c.text.trim()), runComplete = fullyRevealed && isThinkingRunComplete(!1, this.thinkingTimings?.[thinkingRunIndex], this.thinkingTimings !== void 0), wrap = (inner) => {
|
|
1282
1434
|
this.contentContainer.addChild(new ThinkingRunBlock(this, thinkingRunIndex, inner));
|
|
@@ -1284,9 +1436,9 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1284
1436
|
if (this.thinkingCollapse && !this.isRunExpanded(thinkingRunIndex) && runComplete) {
|
|
1285
1437
|
let timing = this.thinkingTimings?.[thinkingRunIndex], label = timing?.end !== void 0 ? `\u273B Thought for ${formatThoughtDuration(timing.end - timing.start)}` : "\u273B Thought", block = new Container();
|
|
1286
1438
|
block.addChild(new Text(theme.fg("thinkingText", theme.italic(label)), this.outputPad, 0));
|
|
1287
|
-
let
|
|
1439
|
+
let joinedThinking = thinkingBlocks.join(`
|
|
1288
1440
|
|
|
1289
|
-
`));
|
|
1441
|
+
`), snippet = thinkingSnippet(displayMessage.provider === "openai-codex" ? joinedThinking.replaceAll("**", "") : joinedThinking);
|
|
1290
1442
|
snippet && block.addChild(new Text(theme.fg("thinkingText", theme.italic(snippet)), this.outputPad + 2, 0)), wrap(block), hasVisibleContentAfter && this.contentContainer.addChild(new Spacer(1));
|
|
1291
1443
|
return;
|
|
1292
1444
|
}
|
|
@@ -1509,7 +1661,7 @@ var CompactionSummaryMessageComponent = class extends Box2 {
|
|
|
1509
1661
|
|
|
1510
1662
|
// packages/coding-agent/dist/modes/interactive/components/footer.js
|
|
1511
1663
|
import { isAbsolute, relative, resolve as resolve2, sep } from "node:path";
|
|
1512
|
-
import { truncateToWidth, visibleWidth } from "@ashx-j/lunr-tui";
|
|
1664
|
+
import { truncateToWidth as truncateToWidth2, visibleWidth } from "@ashx-j/lunr-tui";
|
|
1513
1665
|
function sanitizeStatusText(text) {
|
|
1514
1666
|
return text.replace(/[\r\n\t]/g, " ").replace(/ +/g, " ").trim();
|
|
1515
1667
|
}
|
|
@@ -1569,7 +1721,7 @@ var FooterComponent = class {
|
|
|
1569
1721
|
let contextPercentStr, autoIndicator = this.autoCompactEnabled ? " (auto)" : "", contextPercentDisplay = contextPercent === "?" ? `?/${formatTokens(contextWindow)}${autoIndicator}` : `${contextPercent}%/${formatTokens(contextWindow)}${autoIndicator}`;
|
|
1570
1722
|
contextPercentValue > 90 ? contextPercentStr = theme.fg("error", contextPercentDisplay) : contextPercentValue > 70 ? contextPercentStr = theme.fg("warning", contextPercentDisplay) : contextPercentStr = contextPercentDisplay, statsParts.push(contextPercentStr), areExperimentalFeaturesEnabled() && statsParts.push(`${theme.fg("dim", "\u2022")} ${theme.bold(theme.fg("warning", "xp"))}`);
|
|
1571
1723
|
let statsLeft = statsParts.join(" "), modelName = state.model?.id || "no-model", statsLeftWidth = visibleWidth(statsLeft);
|
|
1572
|
-
statsLeftWidth > width && (statsLeft =
|
|
1724
|
+
statsLeftWidth > width && (statsLeft = truncateToWidth2(statsLeft, width, "..."), statsLeftWidth = visibleWidth(statsLeft));
|
|
1573
1725
|
let minPadding = 2, rightSideWithoutProvider = modelName;
|
|
1574
1726
|
if (state.model?.reasoning) {
|
|
1575
1727
|
let thinkingLevel = state.thinkingLevel || "off";
|
|
@@ -1584,22 +1736,22 @@ var FooterComponent = class {
|
|
|
1584
1736
|
} else {
|
|
1585
1737
|
let availableForRight = width - statsLeftWidth - minPadding;
|
|
1586
1738
|
if (availableForRight > 0) {
|
|
1587
|
-
let truncatedRight =
|
|
1739
|
+
let truncatedRight = truncateToWidth2(rightSide, availableForRight, ""), truncatedRightWidth = visibleWidth(truncatedRight), padding = " ".repeat(Math.max(0, width - statsLeftWidth - truncatedRightWidth));
|
|
1588
1740
|
statsLine = statsLeft + padding + truncatedRight;
|
|
1589
1741
|
} else
|
|
1590
1742
|
statsLine = statsLeft;
|
|
1591
1743
|
}
|
|
1592
|
-
let dimStatsLeft = theme.fg("dim", statsLeft), remainder = statsLine.slice(statsLeft.length), dimRemainder = theme.fg("dim", remainder), lines = [
|
|
1744
|
+
let dimStatsLeft = theme.fg("dim", statsLeft), remainder = statsLine.slice(statsLeft.length), dimRemainder = theme.fg("dim", remainder), lines = [truncateToWidth2(theme.fg("dim", pwd), width, theme.fg("dim", "...")), dimStatsLeft + dimRemainder], extensionStatuses = this.footerData.getExtensionStatuses();
|
|
1593
1745
|
if (extensionStatuses.size > 0) {
|
|
1594
1746
|
let statusLine = Array.from(extensionStatuses.entries()).sort(([a], [b]) => a.localeCompare(b)).map(([, text]) => sanitizeStatusText(text)).join(" ");
|
|
1595
|
-
lines.push(
|
|
1747
|
+
lines.push(truncateToWidth2(statusLine, width, theme.fg("dim", "...")));
|
|
1596
1748
|
}
|
|
1597
1749
|
return lines;
|
|
1598
1750
|
}
|
|
1599
1751
|
};
|
|
1600
1752
|
|
|
1601
1753
|
// packages/coding-agent/dist/modes/interactive/components/usage-view.js
|
|
1602
|
-
import { truncateToWidth as
|
|
1754
|
+
import { truncateToWidth as truncateToWidth3, visibleWidth as visibleWidth2 } from "@ashx-j/lunr-tui";
|
|
1603
1755
|
var BAR_CELLS = 20;
|
|
1604
1756
|
function usageLevelColor(percent) {
|
|
1605
1757
|
return percent > 90 ? "error" : percent > 70 ? "warning" : "success";
|
|
@@ -1639,7 +1791,7 @@ function planWindowLine(window, labelWidth) {
|
|
|
1639
1791
|
function renderThemedBox(headerText, content, maxWidth) {
|
|
1640
1792
|
let contentWidth = Math.max(...content.map((line) => visibleWidth2(line))), totalWidth = Math.max(24, Math.min(contentWidth + 4, Math.max(24, maxWidth))), innerWidth = totalWidth - 4, border = (text) => theme.fg("border", text), top = border(`\u256D${headerText}${"\u2500".repeat(Math.max(0, totalWidth - 2 - headerText.length))}\u256E`), bottom = border(`\u2570${"\u2500".repeat(totalWidth - 2)}\u256F`), lines = [top];
|
|
1641
1793
|
for (let rawLine of content) {
|
|
1642
|
-
let line = rawLine.length > 0 ?
|
|
1794
|
+
let line = rawLine.length > 0 ? truncateToWidth3(rawLine, innerWidth, "") : "", padding = " ".repeat(Math.max(0, innerWidth - visibleWidth2(line)));
|
|
1643
1795
|
lines.push(`${border("\u2502 ")}${line}${padding}${border(" \u2502")}`);
|
|
1644
1796
|
}
|
|
1645
1797
|
return lines.push(bottom), lines;
|
|
@@ -1731,6 +1883,9 @@ var CustomEntryComponent = class extends Container4 {
|
|
|
1731
1883
|
setExpanded(expanded) {
|
|
1732
1884
|
this._expanded !== expanded && (this._expanded = expanded, this.rebuild());
|
|
1733
1885
|
}
|
|
1886
|
+
handleClick(localY, width) {
|
|
1887
|
+
return super.handleClick(localY, width) ? !0 : !this.customComponent || localY < 1 ? !1 : (this.setExpanded(!this._expanded), !0);
|
|
1888
|
+
}
|
|
1734
1889
|
invalidate() {
|
|
1735
1890
|
super.invalidate(), this.rebuild();
|
|
1736
1891
|
}
|
|
@@ -1762,6 +1917,9 @@ var CustomMessageComponent = class extends Container5 {
|
|
|
1762
1917
|
setExpanded(expanded) {
|
|
1763
1918
|
this._expanded !== expanded && (this._expanded = expanded, this.rebuild());
|
|
1764
1919
|
}
|
|
1920
|
+
handleClick(localY, width) {
|
|
1921
|
+
return super.handleClick(localY, width) ? !0 : !this.customRenderer || !this.customComponent || localY < 1 ? !1 : (this.setExpanded(!this._expanded), !0);
|
|
1922
|
+
}
|
|
1765
1923
|
invalidate() {
|
|
1766
1924
|
super.invalidate(), this.rebuild();
|
|
1767
1925
|
}
|
|
@@ -2410,7 +2568,7 @@ var PlanMessageComponent = class extends Container10 {
|
|
|
2410
2568
|
};
|
|
2411
2569
|
|
|
2412
2570
|
// packages/coding-agent/dist/modes/interactive/components/processes-selector.js
|
|
2413
|
-
import { Container as Container11, getKeybindings as getKeybindings5, Spacer as Spacer12, Text as Text13, truncateToWidth as
|
|
2571
|
+
import { Container as Container11, getKeybindings as getKeybindings5, Spacer as Spacer12, Text as Text13, truncateToWidth as truncateToWidth4 } from "@ashx-j/lunr-tui";
|
|
2414
2572
|
function formatElapsed(startedAt) {
|
|
2415
2573
|
let ms = Date.now() - startedAt, s = Math.floor(ms / 1e3);
|
|
2416
2574
|
if (s < 60)
|
|
@@ -2447,7 +2605,7 @@ var ProcessesSelectorComponent = class extends Container11 {
|
|
|
2447
2605
|
continue;
|
|
2448
2606
|
let elapsed = formatElapsed(p.startedAt), status;
|
|
2449
2607
|
p.status === "exited" ? status = `exited(${p.exitCode ?? "?"})` : p.status === "paused" ? status = "paused" : status = "running";
|
|
2450
|
-
let line = `${i === this.selected ? "\u25B8 " : " "}${p.pid} \xB7 ${status} \xB7 ${elapsed} \xB7 ${
|
|
2608
|
+
let line = `${i === this.selected ? "\u25B8 " : " "}${p.pid} \xB7 ${status} \xB7 ${elapsed} \xB7 ${truncateToWidth4(p.command, 60)}`, colored = i === this.selected ? theme.fg("accent", line) : theme.fg("dim", line);
|
|
2451
2609
|
this.addChild(new Text13(colored, 0, 0));
|
|
2452
2610
|
}
|
|
2453
2611
|
this.addChild(new Spacer12(1));
|
|
@@ -3452,6 +3610,13 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3452
3610
|
currentValue: config.smoothStreaming ? "true" : "false",
|
|
3453
3611
|
values: ["true", "false"]
|
|
3454
3612
|
},
|
|
3613
|
+
{
|
|
3614
|
+
id: "browser-enabled",
|
|
3615
|
+
label: "Browser",
|
|
3616
|
+
description: "Browse JavaScript pages and interact with websites. Off closes the browser and hides its tool.",
|
|
3617
|
+
currentValue: config.browserEnabled ? "on" : "off",
|
|
3618
|
+
values: ["on", "off"]
|
|
3619
|
+
},
|
|
3455
3620
|
{
|
|
3456
3621
|
id: "agent-memory",
|
|
3457
3622
|
label: "Agent memory",
|
|
@@ -3459,6 +3624,13 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3459
3624
|
currentValue: config.memoryEnabled ? "on" : "off",
|
|
3460
3625
|
values: ["on", "off"]
|
|
3461
3626
|
},
|
|
3627
|
+
{
|
|
3628
|
+
id: "todos",
|
|
3629
|
+
label: "Todos",
|
|
3630
|
+
description: "Agent task list and todo tool",
|
|
3631
|
+
currentValue: config.todosEnabled ? "on" : "off",
|
|
3632
|
+
values: ["on", "off"]
|
|
3633
|
+
},
|
|
3462
3634
|
{
|
|
3463
3635
|
id: "memory-char-cap",
|
|
3464
3636
|
label: "Memory character cap",
|
|
@@ -3487,6 +3659,23 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3487
3659
|
currentValue: DEFAULT_PROJECT_TRUST_LABELS[config.defaultProjectTrust],
|
|
3488
3660
|
values: Object.values(DEFAULT_PROJECT_TRUST_LABELS)
|
|
3489
3661
|
},
|
|
3662
|
+
{
|
|
3663
|
+
id: "gateway",
|
|
3664
|
+
label: "Gateway",
|
|
3665
|
+
description: "Phone access and automatic startup",
|
|
3666
|
+
currentValue: "manage",
|
|
3667
|
+
submenu: (_value, done) => new SelectSubmenu("Gateway", "Boot startup may require administrator permission. Setup manages bot accounts and approved folders.", [
|
|
3668
|
+
{ value: "setup", label: "Set up Telegram or Discord" },
|
|
3669
|
+
{ value: "status", label: "Show gateway status" },
|
|
3670
|
+
{ value: "start", label: "Start gateway" },
|
|
3671
|
+
{ value: "stop", label: "Stop gateway" },
|
|
3672
|
+
{ value: "autostart login", label: "Start automatically at login" },
|
|
3673
|
+
{ value: "autostart boot", label: "Start automatically at boot" },
|
|
3674
|
+
{ value: "autostart off", label: "Disable automatic startup" }
|
|
3675
|
+
], "", (action) => {
|
|
3676
|
+
done(), callbacks.onGatewayAction?.(action);
|
|
3677
|
+
}, () => done())
|
|
3678
|
+
},
|
|
3490
3679
|
{
|
|
3491
3680
|
id: "default-permission-mode",
|
|
3492
3681
|
label: "Default permission mode",
|
|
@@ -3738,9 +3927,15 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3738
3927
|
case "memory-char-cap":
|
|
3739
3928
|
callbacks.onMemoryCharCapChange(parseInt(newValue, 10));
|
|
3740
3929
|
break;
|
|
3930
|
+
case "browser-enabled":
|
|
3931
|
+
callbacks.onBrowserEnabledChange(newValue === "on");
|
|
3932
|
+
break;
|
|
3741
3933
|
case "agent-memory":
|
|
3742
3934
|
callbacks.onMemoryEnabledChange(newValue === "on");
|
|
3743
3935
|
break;
|
|
3936
|
+
case "todos":
|
|
3937
|
+
callbacks.onTodosEnabledChange(newValue === "on");
|
|
3938
|
+
break;
|
|
3744
3939
|
case "search-curator":
|
|
3745
3940
|
callbacks.onSearchCuratorChange(newValue);
|
|
3746
3941
|
break;
|
|
@@ -4169,7 +4364,7 @@ function applySameToolGrouping(previous, next) {
|
|
|
4169
4364
|
}
|
|
4170
4365
|
|
|
4171
4366
|
// packages/coding-agent/dist/modes/interactive/components/tree-selector.js
|
|
4172
|
-
import { Container as Container15, getKeybindings as getKeybindings8, Input as Input6, Spacer as Spacer16, sliceByColumn, Text as Text18, truncateToWidth as
|
|
4367
|
+
import { Container as Container15, getKeybindings as getKeybindings8, Input as Input6, Spacer as Spacer16, sliceByColumn, Text as Text18, truncateToWidth as truncateToWidth5, visibleWidth as visibleWidth3, wrapTextWithAnsi as wrapTextWithAnsi2 } from "@ashx-j/lunr-tui";
|
|
4173
4368
|
var TREE_GUTTER_WIDTH = 2, MIN_VISIBLE_ANCHOR_CONTENT_WIDTH = 4, MAX_VISIBLE_ANCHOR_CONTENT_WIDTH = 20, MIN_ANCHOR_CONTEXT_WIDTH = 2, MAX_ANCHOR_CONTEXT_WIDTH = 12;
|
|
4174
4369
|
function renderHorizontalViewport(rows, width) {
|
|
4175
4370
|
let viewportWidth = Math.max(0, width - TREE_GUTTER_WIDTH), maxBodyWidth = rows.reduce((max, row) => Math.max(max, row.bodyWidth), 0), maxHorizontalScroll = Math.max(0, maxBodyWidth - viewportWidth), selectedRow = rows.find((row) => row.isSelected), horizontalScroll = 0;
|
|
@@ -4182,7 +4377,7 @@ function renderHorizontalViewport(rows, width) {
|
|
|
4182
4377
|
}
|
|
4183
4378
|
return rows.map((row) => {
|
|
4184
4379
|
let line = horizontalScroll > 0 ? `${row.gutter}${sliceByColumn(row.body, horizontalScroll, viewportWidth, !0)}\x1B[0m` : row.gutter + row.body;
|
|
4185
|
-
return
|
|
4380
|
+
return truncateToWidth5(line, width, "");
|
|
4186
4381
|
});
|
|
4187
4382
|
}
|
|
4188
4383
|
var TreeList = class {
|
|
@@ -4500,7 +4695,7 @@ var TreeList = class {
|
|
|
4500
4695
|
render(width) {
|
|
4501
4696
|
let lines = [];
|
|
4502
4697
|
if (this.filteredNodes.length === 0)
|
|
4503
|
-
return lines.push(
|
|
4698
|
+
return lines.push(truncateToWidth5(theme.fg("muted", " No entries found"), width)), lines.push(truncateToWidth5(theme.fg("muted", ` (0/0)${this.getStatusLabels()}`), width)), lines;
|
|
4504
4699
|
let startIndex = Math.max(0, Math.min(this.selectedIndex - Math.floor(this.maxVisibleLines / 2), this.filteredNodes.length - this.maxVisibleLines)), endIndex = Math.min(startIndex + this.maxVisibleLines, this.filteredNodes.length), renderedRows = [];
|
|
4505
4700
|
for (let i = startIndex; i < endIndex; i++) {
|
|
4506
4701
|
let flatNode = this.filteredNodes[i], entry = flatNode.node.entry, isSelected = i === this.selectedIndex, cursor = isSelected ? theme.fg("accent", "\u203A ") : " ", displayIndent = this.multipleRoots ? Math.max(0, flatNode.indent - 1) : flatNode.indent, connector = flatNode.showConnector && !flatNode.isVirtualRootChild ? flatNode.isLast ? "\u2514\u2500 " : "\u251C\u2500 " : "", connectorPosition = connector ? displayIndent - 1 : -1, totalChars = displayIndent * 3, prefixChars = [], isFolded = this.foldedNodes.has(entry.id);
|
|
@@ -4522,7 +4717,7 @@ var TreeList = class {
|
|
|
4522
4717
|
let prefix = prefixChars.join(""), showsFoldInConnector = flatNode.showConnector && !flatNode.isVirtualRootChild, foldMarker = isFolded && !showsFoldInConnector ? theme.fg("accent", "\u229E ") : "", pathMarker = this.activePathIds.has(entry.id) ? theme.fg("accent", "\u2022 ") : "", label = flatNode.node.label ? theme.fg("warning", `[${flatNode.node.label}] `) : "", labelTimestamp = this.showLabelTimestamps && flatNode.node.label && flatNode.node.labelTimestamp ? theme.fg("muted", `${this.formatLabelTimestamp(flatNode.node.labelTimestamp)} `) : "", content = this.getEntryDisplayText(flatNode.node, isSelected), prefixPart = theme.fg("dim", prefix) + foldMarker + pathMarker, anchorCol = visibleWidth3(prefixPart), gutter = cursor, body = prefixPart + label + labelTimestamp + content;
|
|
4523
4718
|
isSelected && (gutter = theme.bg("selectedBg", gutter), body = theme.bg("selectedBg", body)), renderedRows.push({ gutter, body, anchorCol, bodyWidth: visibleWidth3(body), isSelected });
|
|
4524
4719
|
}
|
|
4525
|
-
return lines.push(...renderHorizontalViewport(renderedRows, width)), lines.push(
|
|
4720
|
+
return lines.push(...renderHorizontalViewport(renderedRows, width)), lines.push(truncateToWidth5(theme.fg("muted", ` (${this.selectedIndex + 1}/${this.filteredNodes.length})${this.getStatusLabels()}`), width)), lines;
|
|
4526
4721
|
}
|
|
4527
4722
|
getEntryDisplayText(node, isSelected) {
|
|
4528
4723
|
let entry = node.entry, result, normalize = (s) => s.replace(/[\n\t]/g, " ").trim();
|
|
@@ -4781,7 +4976,7 @@ var TreeList = class {
|
|
|
4781
4976
|
}
|
|
4782
4977
|
render(width) {
|
|
4783
4978
|
let query = this.treeList.getSearchQuery();
|
|
4784
|
-
return query ? [
|
|
4979
|
+
return query ? [truncateToWidth5(` ${theme.fg("muted", "Type to search:")} ${theme.fg("accent", query)}`, width)] : [truncateToWidth5(` ${theme.fg("muted", "Type to search:")}`, width)];
|
|
4785
4980
|
}
|
|
4786
4981
|
handleInput(_keyData) {
|
|
4787
4982
|
}
|
|
@@ -4799,9 +4994,9 @@ var TreeList = class {
|
|
|
4799
4994
|
currentLine = candidate;
|
|
4800
4995
|
continue;
|
|
4801
4996
|
}
|
|
4802
|
-
lines.push(...
|
|
4997
|
+
lines.push(...wrapTextWithAnsi2(currentLine.trimEnd(), availableWidth)), currentLine = visibleWidth3(`${indent}${item}`) <= availableWidth ? `${indent}${item}` : item;
|
|
4803
4998
|
}
|
|
4804
|
-
return currentLine && lines.push(...
|
|
4999
|
+
return currentLine && lines.push(...wrapTextWithAnsi2(currentLine.trimEnd(), availableWidth)), lines.map((line) => theme.fg("muted", line));
|
|
4805
5000
|
}
|
|
4806
5001
|
}, TREE_HELP_ITEMS = [
|
|
4807
5002
|
{ keys: ["tui.select.up", "tui.select.down"], label: "move" },
|
|
@@ -4860,7 +5055,7 @@ var LabelInput = class {
|
|
|
4860
5055
|
}
|
|
4861
5056
|
render(width) {
|
|
4862
5057
|
let lines = [], availableWidth = width - 2;
|
|
4863
|
-
return lines.push(
|
|
5058
|
+
return lines.push(truncateToWidth5(` ${theme.fg("muted", "Label (empty to remove):")}`, width)), lines.push(...this.input.render(availableWidth).map((line) => truncateToWidth5(` ${line}`, width))), lines.push(truncateToWidth5(` ${keyHint("tui.select.confirm", "save")} ${keyHint("tui.select.cancel", "cancel")}`, width)), lines;
|
|
4864
5059
|
}
|
|
4865
5060
|
handleInput(keyData) {
|
|
4866
5061
|
let kb = getKeybindings8();
|
|
@@ -4977,7 +5172,7 @@ var OSC133_ZONE_START2 = "\x1B]133;A\x07", OSC133_ZONE_END2 = "\x1B]133;B\x07",
|
|
|
4977
5172
|
};
|
|
4978
5173
|
|
|
4979
5174
|
// packages/coding-agent/dist/modes/interactive/components/user-message-selector.js
|
|
4980
|
-
import { Container as Container18, getKeybindings as getKeybindings10, Spacer as Spacer18, Text as Text20, truncateToWidth as
|
|
5175
|
+
import { Container as Container18, getKeybindings as getKeybindings10, Spacer as Spacer18, Text as Text20, truncateToWidth as truncateToWidth6 } from "@ashx-j/lunr-tui";
|
|
4981
5176
|
var UserMessageList = class {
|
|
4982
5177
|
messages = [];
|
|
4983
5178
|
selectedIndex = 0;
|
|
@@ -4998,7 +5193,7 @@ var UserMessageList = class {
|
|
|
4998
5193
|
return lines.push(theme.fg("muted", " No user messages found")), lines;
|
|
4999
5194
|
let startIndex = Math.max(0, Math.min(this.selectedIndex - Math.floor(this.maxVisible / 2), this.messages.length - this.maxVisible)), endIndex = Math.min(startIndex + this.maxVisible, this.messages.length);
|
|
5000
5195
|
for (let i = startIndex; i < endIndex; i++) {
|
|
5001
|
-
let message = this.messages[i], isSelected = i === this.selectedIndex, normalizedMessage = message.text.replace(/\n/g, " ").trim(), cursor = isSelected ? theme.fg("accent", "\u203A ") : " ", maxMsgWidth = width - 2, truncatedMsg =
|
|
5196
|
+
let message = this.messages[i], isSelected = i === this.selectedIndex, normalizedMessage = message.text.replace(/\n/g, " ").trim(), cursor = isSelected ? theme.fg("accent", "\u203A ") : " ", maxMsgWidth = width - 2, truncatedMsg = truncateToWidth6(normalizedMessage, maxMsgWidth), messageLine = cursor + (isSelected ? theme.bold(truncatedMsg) : truncatedMsg);
|
|
5002
5197
|
lines.push(messageLine);
|
|
5003
5198
|
let metadata = ` Message ${i + 1} of ${this.messages.length}`, metadataLine = theme.fg("muted", metadata);
|
|
5004
5199
|
lines.push(metadataLine), lines.push("");
|
|
@@ -5506,11 +5701,13 @@ var InteractiveMode = class _InteractiveMode {
|
|
|
5506
5701
|
this.runtimeHost = runtimeHost, this.options = options, this.autoTrustOnReloadCwd = options.autoTrustOnReloadCwd, this.runtimeHost.setBeforeSessionInvalidate((reason) => {
|
|
5507
5702
|
this.resetExtensionUI(), this.previousPermissionMode = void 0, this.preGoalPermissionMode = void 0, resetPermissions(this.settingsManager.getDefaultPermissionMode()), clearRegistry(), reason !== "fork" && clearRollback(this.sessionManager.getSessionId());
|
|
5508
5703
|
}), this.runtimeHost.setRebindSession(async () => {
|
|
5509
|
-
await this.rebindCurrentSession({ renderBeforeBind: !0 }), initRollback(this.settingsManager, this.sessionManager.getSessionId())
|
|
5704
|
+
await this.rebindCurrentSession({ renderBeforeBind: !0 }), initRollback(this.settingsManager, this.sessionManager.getSessionId());
|
|
5705
|
+
let mode = this.sessionManager.getPermissionMode() ?? this.settingsManager.getDefaultPermissionMode();
|
|
5706
|
+
resetPermissions(mode), this.syncPermissionModeEffects(mode);
|
|
5510
5707
|
}), this.version = VERSION, this.ui = options.startupView?.ui ?? new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor()), this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink()), registerPermissionModeBridge(() => getPermissionMode()), registerPermissionModeControlBridge({
|
|
5511
5708
|
enterGoalAuto: () => this.enterGoalAuto(),
|
|
5512
5709
|
leaveGoalAuto: () => this.leaveGoalAuto()
|
|
5513
|
-
}), resetPermissions(this.settingsManager.getDefaultPermissionMode()), this.headerContainer = new Container19(), options.startupView && (this.headerContainer.addChild(new Spacer19(1)), this.headerContainer.addChild(options.startupView.header), this.customFooter = options.startupView.footer), this.loadedResourcesContainer = new Container19(), this.chatContainer = new Container19(), this.pendingMessagesContainer = new Container19(), this.statusContainer = options.startupView?.statusContainer ?? new Container19(), this.widgetContainerAbove = new Container19(), this.widgetContainerBelow = new Container19(), this.keybindings = options.startupView?.keybindings ?? KeybindingsManager.create(), setKeybindings(this.keybindings);
|
|
5710
|
+
}), resetPermissions(this.sessionManager.getPermissionMode() ?? this.settingsManager.getDefaultPermissionMode()), this.headerContainer = new Container19(), options.startupView && (this.headerContainer.addChild(new Spacer19(1)), this.headerContainer.addChild(options.startupView.header), this.customFooter = options.startupView.footer), this.loadedResourcesContainer = new Container19(), this.chatContainer = new Container19(), this.pendingMessagesContainer = new Container19(), this.statusContainer = options.startupView?.statusContainer ?? new Container19(), this.widgetContainerAbove = new Container19(), this.widgetContainerBelow = new Container19(), this.keybindings = options.startupView?.keybindings ?? KeybindingsManager.create(), setKeybindings(this.keybindings);
|
|
5514
5711
|
let editorPaddingX = this.settingsManager.getEditorPaddingX(), autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();
|
|
5515
5712
|
this.defaultEditor = options.startupView?.editor ?? new CustomEditor(this.ui, getEditorTheme(), this.keybindings, {
|
|
5516
5713
|
paddingX: editorPaddingX,
|
|
@@ -5629,7 +5826,7 @@ var InteractiveMode = class _InteractiveMode {
|
|
|
5629
5826
|
return (typeof resp == "string" ? resp : resp.decision) !== "reject" && this.applyPermissionMode(this.restoreTargetAfterPlan()), resp;
|
|
5630
5827
|
}
|
|
5631
5828
|
return this.showApprovalDialog(req);
|
|
5632
|
-
}), initRollback(this.settingsManager, this.sessionManager.getSessionId()), setRollbackWarningHandler((msg) => this.showStatus(msg)), this.syncPermissionModeEffects(this.settingsManager.getDefaultPermissionMode()), await this.themeController.applyFromSettings(), this.headerContainer.clear(), this.options.verbose || !this.settingsManager.getQuietStartup()) {
|
|
5829
|
+
}), initRollback(this.settingsManager, this.sessionManager.getSessionId()), setRollbackWarningHandler((msg) => this.showStatus(msg)), this.syncPermissionModeEffects(this.sessionManager.getPermissionMode() ?? this.settingsManager.getDefaultPermissionMode()), await this.themeController.applyFromSettings(), this.headerContainer.clear(), this.options.verbose || !this.settingsManager.getQuietStartup()) {
|
|
5633
5830
|
let header = theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
|
|
5634
5831
|
this.builtInHeader = new BootScreenComponent(header, this.buildBootRows()), this.headerContainer.addChild(new Spacer19(1)), this.headerContainer.addChild(this.builtInHeader);
|
|
5635
5832
|
} else
|
|
@@ -6149,8 +6346,18 @@ ${warningLines}`, 0, 0)), this.loadedResourcesContainer.addChild(new Spacer19(1)
|
|
|
6149
6346
|
], skillsCount = this.session.resourceLoader.getSkills().skills.length;
|
|
6150
6347
|
return skillsCount > 0 && bootRows.push({ label: "skills", value: String(skillsCount) }), bootRows;
|
|
6151
6348
|
}
|
|
6349
|
+
unregisterSessionTransfer;
|
|
6350
|
+
transferInProgress = !1;
|
|
6351
|
+
detachedDraft = "";
|
|
6152
6352
|
async rebindCurrentSession(options = {}) {
|
|
6153
|
-
await this.waitForDeferredBuiltins(), this.
|
|
6353
|
+
await this.waitForDeferredBuiltins(), this.unregisterSessionTransfer?.(), recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir), this.unregisterSessionTransfer = registerTransferHandler(this.sessionManager, async ({ stop, signal }) => {
|
|
6354
|
+
this.transferInProgress = !0;
|
|
6355
|
+
try {
|
|
6356
|
+
this.detachedDraft = this.editor.getText(), await this.runtimeHost.releaseForTransfer({ stop, signal }), this.editor.setText(this.detachedDraft), this.unregisterSessionTransfer?.(), this.showStatus("Session released for remote continuation. Draft retained. Use /reclaim to continue here.");
|
|
6357
|
+
} finally {
|
|
6358
|
+
this.transferInProgress = !1;
|
|
6359
|
+
}
|
|
6360
|
+
}), this.unsubscribe?.(), this.unsubscribe = void 0, this.applyRuntimeSettings(), this.builtInHeader instanceof BootScreenComponent && this.builtInHeader.updateRows(this.buildBootRows()), options.renderBeforeBind ? (this.renderCurrentSessionState(), this.subscribeToAgent(), await this.bindCurrentSessionExtensions()) : (await this.bindCurrentSessionExtensions(), this.subscribeToAgent()), this.updateAvailableProviderCount(), this.updateEditorBorderColor(), this.updateTerminalTitle();
|
|
6154
6361
|
}
|
|
6155
6362
|
async handleFatalRuntimeError(prefix, error) {
|
|
6156
6363
|
let message = error instanceof Error ? error.message : String(error);
|
|
@@ -6672,7 +6879,35 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
6672
6879
|
}
|
|
6673
6880
|
setupEditorSubmitHandler() {
|
|
6674
6881
|
this.defaultEditor.onSubmit = async (text) => {
|
|
6675
|
-
if (text = text.trim(),
|
|
6882
|
+
if (text = text.trim(), text === "/reclaim" || text === "/reclaim stop") {
|
|
6883
|
+
let file = this.sessionManager.getSessionFile();
|
|
6884
|
+
try {
|
|
6885
|
+
if (!file)
|
|
6886
|
+
throw new Error("This session is not saved.");
|
|
6887
|
+
if (!this.runtimeHost.isDetached) {
|
|
6888
|
+
this.showStatus("This terminal already owns the session.");
|
|
6889
|
+
return;
|
|
6890
|
+
}
|
|
6891
|
+
let draft = this.editor.getText();
|
|
6892
|
+
await requestSessionTransfer(file, { stop: text === "/reclaim stop" }), await this.runtimeHost.switchSession(file), this.editor.setText(draft === text ? this.detachedDraft : draft), this.showStatus("Session reclaimed.");
|
|
6893
|
+
} catch (error) {
|
|
6894
|
+
this.showError(error instanceof Error ? error.message : String(error));
|
|
6895
|
+
}
|
|
6896
|
+
return;
|
|
6897
|
+
}
|
|
6898
|
+
if ((this.runtimeHost.isDetached || this.transferInProgress) && !["/quit", "/exit"].includes(text)) {
|
|
6899
|
+
this.showError("Session is detached or transferring. Draft retained. Use /reclaim, /reclaim stop, or /quit.");
|
|
6900
|
+
return;
|
|
6901
|
+
}
|
|
6902
|
+
if (text === "/handoff" || text === "/handoff cancel") {
|
|
6903
|
+
try {
|
|
6904
|
+
text === "/handoff cancel" ? cancelSessionHandoff(this.sessionManager, this.runtimeHost.services.agentDir) : markSessionHandoff(this.sessionManager, this.runtimeHost.services.agentDir), this.showStatus(text === "/handoff cancel" ? "Handoff mark cancelled." : "Marked for phone continuation for 8 hours. Busy work must finish or be explicitly stopped before transfer.");
|
|
6905
|
+
} catch (error) {
|
|
6906
|
+
this.showError(error instanceof Error ? error.message : String(error));
|
|
6907
|
+
}
|
|
6908
|
+
return;
|
|
6909
|
+
}
|
|
6910
|
+
if (text && !this.runtimeHost.isDetached && (!text.startsWith("/") || /^\/(?: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)) && recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir), !text) {
|
|
6676
6911
|
this.takeSubmittedImages(text);
|
|
6677
6912
|
return;
|
|
6678
6913
|
}
|
|
@@ -6944,7 +7179,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
6944
7179
|
this.footer.invalidate(), this.updateEditorBorderColor();
|
|
6945
7180
|
break;
|
|
6946
7181
|
case "message_start":
|
|
6947
|
-
event.message.role === "custom" ? (this.addMessageToChat(event.message), this.ui.requestRender()) : event.message.role === "user" ? (this.redoStack.length = 0, beginTurn(this.sessionManager.getCwd(), this.sessionManager.getSessionId()), this.stopSmoothStreaming(), this.addMessageToChat(event.message), this.updatePendingMessagesDisplay(), this.ui.requestRender()) : event.message.role === "assistant" && (this.streamingComponent = new AssistantMessageComponent(void 0, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse), this.thinkingRunTimings = [], this.streamingComponent.setThinkingTimings(this.thinkingRunTimings), this.streamingComponent.setExpanded(this.toolOutputExpanded), this.streamingMessage = event.message, this.streamingTargetMessage = event.message, this.streamingDisplayedLength = 0, this.chatContainer.addChild(this.streamingComponent), this.settingsManager.getSmoothStreaming() ? this.streamingComponent.updateContent(sliceMessageContent(this.streamingMessage, 0, this.getSmoothStreamingOptions()), { thinkingSource: this.streamingMessage }) : this.streamingComponent.updateContent(this.streamingMessage), this.ui.requestRender());
|
|
7182
|
+
event.message.role === "custom" ? (this.addMessageToChat(event.message), this.ui.requestRender()) : event.message.role === "user" ? (this.redoStack.length = 0, beginTurn(this.sessionManager.getCwd(), this.sessionManager.getSessionId()), this.stopSmoothStreaming(), this.addMessageToChat(event.message), this.updatePendingMessagesDisplay(), this.ui.requestRender()) : event.message.role === "assistant" && (this.streamingComponent = new AssistantMessageComponent(void 0, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse, { requestRender: () => this.ui.requestRender() }), this.thinkingRunTimings = [], this.streamingComponent.setThinkingTimings(this.thinkingRunTimings), this.streamingComponent.setExpanded(this.toolOutputExpanded), this.streamingMessage = event.message, this.streamingTargetMessage = event.message, this.streamingDisplayedLength = 0, this.chatContainer.addChild(this.streamingComponent), this.settingsManager.getSmoothStreaming() ? this.streamingComponent.updateContent(sliceMessageContent(this.streamingMessage, 0, this.getSmoothStreamingOptions()), { thinkingSource: this.streamingMessage }) : this.streamingComponent.updateContent(this.streamingMessage), this.ui.requestRender());
|
|
6948
7183
|
break;
|
|
6949
7184
|
case "message_update":
|
|
6950
7185
|
if (this.streamingComponent && event.message.role === "assistant")
|
|
@@ -7125,7 +7360,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
7125
7360
|
break;
|
|
7126
7361
|
}
|
|
7127
7362
|
case "assistant": {
|
|
7128
|
-
let assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse);
|
|
7363
|
+
let assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse, { requestRender: () => this.ui.requestRender() });
|
|
7129
7364
|
assistantComponent.setThinkingTimings(this.thinkingTimingsByMessage.get(message)), assistantComponent.setExpanded(this.toolOutputExpanded), this.chatContainer.addChild(assistantComponent);
|
|
7130
7365
|
break;
|
|
7131
7366
|
}
|
|
@@ -7253,7 +7488,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
7253
7488
|
async shutdown(options) {
|
|
7254
7489
|
if (this.isShuttingDown)
|
|
7255
7490
|
return;
|
|
7256
|
-
if (this.isShuttingDown = !0, this.stopSmoothStreaming(), this.planUsageTimer && (clearInterval(this.planUsageTimer), this.planUsageTimer = void 0), getUsageServiceBridge()?.setOnUpdate(void 0), options?.fromSignal) {
|
|
7491
|
+
if (this.isShuttingDown = !0, this.unregisterSessionTransfer?.(), this.stopSmoothStreaming(), this.planUsageTimer && (clearInterval(this.planUsageTimer), this.planUsageTimer = void 0), getUsageServiceBridge()?.setOnUpdate(void 0), options?.fromSignal) {
|
|
7257
7492
|
await this.runtimeHost.dispose(), this.themeController.disableAutoSync(), await this.ui.terminal.drainInput(1e3);
|
|
7258
7493
|
try {
|
|
7259
7494
|
killAll();
|
|
@@ -7354,6 +7589,10 @@ Kill them before exit?`) && killAll(), this.stop(), await this.runtimeHost.dispo
|
|
|
7354
7589
|
}
|
|
7355
7590
|
}
|
|
7356
7591
|
async handleFollowUp() {
|
|
7592
|
+
if (this.runtimeHost.isDetached || this.transferInProgress) {
|
|
7593
|
+
this.showError("Use /reclaim before sending more work. Draft retained.");
|
|
7594
|
+
return;
|
|
7595
|
+
}
|
|
7357
7596
|
let text = (this.editor.getExpandedText?.() ?? this.editor.getText()).trim();
|
|
7358
7597
|
if (text) {
|
|
7359
7598
|
if (this.session.isCompacting) {
|
|
@@ -7388,21 +7627,26 @@ Kill them before exit?`) && killAll(), this.stop(), await this.runtimeHost.dispo
|
|
|
7388
7627
|
this.ui.requestRender();
|
|
7389
7628
|
}
|
|
7390
7629
|
cycleThinkingLevel() {
|
|
7391
|
-
|
|
7630
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
7631
|
+
return;
|
|
7632
|
+
recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir), this.session.cycleThinkingLevel() === void 0 ? this.showStatus("Current model does not support thinking") : (this.footer.invalidate(), this.updateEditorBorderColor());
|
|
7392
7633
|
}
|
|
7393
7634
|
cyclePermissionMode() {
|
|
7394
7635
|
this.applyPermissionMode(nextPermissionMode(getPermissionMode()), { silent: !0 });
|
|
7395
7636
|
}
|
|
7396
7637
|
async cycleModel(direction) {
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
let
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7638
|
+
if (!(this.runtimeHost.isDetached || this.transferInProgress)) {
|
|
7639
|
+
recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
7640
|
+
try {
|
|
7641
|
+
let result = await this.session.cycleModel(direction);
|
|
7642
|
+
if (result === void 0) {
|
|
7643
|
+
let msg = this.session.scopedModels.length > 0 ? "Only one model in scope" : "Only one model available";
|
|
7644
|
+
this.showStatus(msg);
|
|
7645
|
+
} else
|
|
7646
|
+
this.footer.invalidate(), this.updateEditorBorderColor(), this.maybeWarnAboutAnthropicSubscriptionAuth(result.model);
|
|
7647
|
+
} catch (error) {
|
|
7648
|
+
this.showError(error instanceof Error ? error.message : String(error));
|
|
7649
|
+
}
|
|
7406
7650
|
}
|
|
7407
7651
|
}
|
|
7408
7652
|
toggleToolOutputExpansion() {
|
|
@@ -7642,8 +7886,10 @@ Pi will resume when the editor exits.
|
|
|
7642
7886
|
globalInstructionsPath: getGlobalInstructionsPath(getAgentDir()),
|
|
7643
7887
|
modelInstructionsPath: getModelInstructionsPath(getAgentDir(), this.session.model?.id ?? "no-model-selected"),
|
|
7644
7888
|
confirmLargeSubagentLaunches: this.settingsManager.getConfirmLargeSubagentLaunches(),
|
|
7889
|
+
browserEnabled: this.settingsManager.getBrowserEnabled(),
|
|
7645
7890
|
memoryEnabled: this.settingsManager.getMemoryEnabled(),
|
|
7646
7891
|
memoryCharCap: this.settingsManager.getMemoryCharCap(),
|
|
7892
|
+
todosEnabled: this.settingsManager.getTodosEnabled(),
|
|
7647
7893
|
searchCurator: getSearchCuratorSetting(),
|
|
7648
7894
|
// lunr: TUI customize settings
|
|
7649
7895
|
footerMcp: this.settingsManager.getFooterMcp(),
|
|
@@ -7798,9 +8044,15 @@ Pi will resume when the editor exits.
|
|
|
7798
8044
|
onMemoryCharCapChange: (cap) => {
|
|
7799
8045
|
this.settingsManager.setMemoryCharCap(cap);
|
|
7800
8046
|
},
|
|
8047
|
+
onBrowserEnabledChange: (enabled) => {
|
|
8048
|
+
this.settingsManager.setBrowserEnabled(enabled), this.session.refreshToolRegistry();
|
|
8049
|
+
},
|
|
7801
8050
|
onMemoryEnabledChange: (enabled) => {
|
|
7802
8051
|
this.settingsManager.setMemoryEnabled(enabled), this.session.refreshToolRegistry(), this.showStatus(`Agent memory: ${enabled ? "on" : "off"}`);
|
|
7803
8052
|
},
|
|
8053
|
+
onTodosEnabledChange: (enabled) => {
|
|
8054
|
+
this.settingsManager.setTodosEnabled(enabled), notifyTodosEnabledChanged(enabled), this.session.refreshToolRegistry();
|
|
8055
|
+
},
|
|
7804
8056
|
onSearchCuratorChange: (setting) => {
|
|
7805
8057
|
setSearchCuratorSetting(setting) || this.showError("pi-web-access is not loaded; curator setting unavailable.");
|
|
7806
8058
|
},
|
|
@@ -7838,6 +8090,31 @@ Pi will resume when the editor exits.
|
|
|
7838
8090
|
onPlanUsageWindowChange: (window) => {
|
|
7839
8091
|
this.settingsManager.setPlanUsageWindow(window);
|
|
7840
8092
|
},
|
|
8093
|
+
onGatewayAction: (action) => {
|
|
8094
|
+
(async () => {
|
|
8095
|
+
if (this.session.isStreaming) {
|
|
8096
|
+
this.showStatus("Wait for the current turn before managing the gateway.");
|
|
8097
|
+
return;
|
|
8098
|
+
}
|
|
8099
|
+
if (action === "status") {
|
|
8100
|
+
this.showStatus((await import("./service-ISSP6VHE.js")).serviceStatusText());
|
|
8101
|
+
return;
|
|
8102
|
+
}
|
|
8103
|
+
this.ui.stop();
|
|
8104
|
+
try {
|
|
8105
|
+
await new Promise((resolve4, reject) => {
|
|
8106
|
+
let child = spawn3(process.execPath, [process.argv[1], "gateway", ...action.split(" ")], {
|
|
8107
|
+
stdio: "inherit",
|
|
8108
|
+
env: process.env
|
|
8109
|
+
});
|
|
8110
|
+
child.once("error", reject), child.once("exit", (code) => code === 0 ? resolve4() : reject(new Error(`Gateway command exited with code ${code}. Run lunr gateway doctor.`)));
|
|
8111
|
+
});
|
|
8112
|
+
} finally {
|
|
8113
|
+
this.ui.start(), this.ui.requestRender(!0);
|
|
8114
|
+
}
|
|
8115
|
+
this.showStatus((await import("./service-ISSP6VHE.js")).serviceStatusText());
|
|
8116
|
+
})().catch((error) => this.showStatus(error instanceof Error ? error.message : String(error)));
|
|
8117
|
+
},
|
|
7841
8118
|
onDefaultPermissionModeChange: (mode) => {
|
|
7842
8119
|
this.settingsManager.setDefaultPermissionMode(mode);
|
|
7843
8120
|
},
|
|
@@ -8009,6 +8286,8 @@ Pi will resume when the editor exits.
|
|
|
8009
8286
|
});
|
|
8010
8287
|
}
|
|
8011
8288
|
async showModelSelector(initialSearchInput) {
|
|
8289
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
8290
|
+
return;
|
|
8012
8291
|
let subscriptionNames = await this.getActiveSubscriptionNames();
|
|
8013
8292
|
this.showSelector((done) => {
|
|
8014
8293
|
let selector = new ModelSelectorComponent(this.ui, this.session.model, this.settingsManager, this.session.modelRuntime, this.session.scopedModels, async (model) => {
|
|
@@ -8145,6 +8424,8 @@ Pi will resume when the editor exits.
|
|
|
8145
8424
|
});
|
|
8146
8425
|
}
|
|
8147
8426
|
showUserMessageSelector() {
|
|
8427
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
8428
|
+
return;
|
|
8148
8429
|
let userMessages = this.session.getUserMessagesForForking();
|
|
8149
8430
|
if (userMessages.length === 0) {
|
|
8150
8431
|
this.showStatus("No messages to fork from");
|
|
@@ -8187,6 +8468,8 @@ Pi will resume when the editor exits.
|
|
|
8187
8468
|
}
|
|
8188
8469
|
}
|
|
8189
8470
|
showTreeSelector(initialSelectedId) {
|
|
8471
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
8472
|
+
return;
|
|
8190
8473
|
let tree = this.sessionManager.getTree(), realLeafId = this.sessionManager.getLeafId(), initialFilterMode = this.settingsManager.getTreeFilterMode();
|
|
8191
8474
|
if (tree.length === 0) {
|
|
8192
8475
|
this.showStatus("No entries in session");
|
|
@@ -8268,7 +8551,16 @@ Pi will resume when the editor exits.
|
|
|
8268
8551
|
let next = (nextName ?? "").trim();
|
|
8269
8552
|
if (!next)
|
|
8270
8553
|
return;
|
|
8271
|
-
|
|
8554
|
+
if (sessionFilePath === this.sessionManager.getSessionFile() && !this.runtimeHost.isDetached) {
|
|
8555
|
+
this.sessionManager.appendSessionInfo(next);
|
|
8556
|
+
return;
|
|
8557
|
+
}
|
|
8558
|
+
let mgr = SessionManager.open(sessionFilePath);
|
|
8559
|
+
try {
|
|
8560
|
+
mgr.appendSessionInfo(next);
|
|
8561
|
+
} finally {
|
|
8562
|
+
mgr.dispose();
|
|
8563
|
+
}
|
|
8272
8564
|
},
|
|
8273
8565
|
showRenameHint: !0,
|
|
8274
8566
|
keybindings: this.keybindings
|
|
@@ -9236,7 +9528,7 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9236
9528
|
}
|
|
9237
9529
|
/** Apply addendum + auto-rollback for a mode without a status toast. */
|
|
9238
9530
|
syncPermissionModeEffects(mode) {
|
|
9239
|
-
mode === "plan" ? this.session.setSystemPromptAppend(PLAN_MODE_ADDENDUM) : mode === "auto" ? (this.session.setSystemPromptAppend(AUTO_MODE_ADDENDUM), enableRollbackForSession(this.sessionManager.getSessionId())) : this.session.setSystemPromptAppend(void 0);
|
|
9531
|
+
this.runtimeHost.isDetached || this.transferInProgress || (this.sessionManager.setPermissionMode(mode), mode === "plan" ? this.session.setSystemPromptAppend(PLAN_MODE_ADDENDUM) : mode === "auto" ? (this.session.setSystemPromptAppend(AUTO_MODE_ADDENDUM), enableRollbackForSession(this.sessionManager.getSessionId())) : this.session.setSystemPromptAppend(void 0));
|
|
9240
9532
|
}
|
|
9241
9533
|
// lunr: `/goal` forces session auto without writing settings.
|
|
9242
9534
|
enterGoalAuto() {
|
|
@@ -9248,6 +9540,9 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9248
9540
|
this.preGoalPermissionMode = next.saved, next.mode !== getPermissionMode() && this.applyPermissionMode(next.mode, { silent: !0 });
|
|
9249
9541
|
}
|
|
9250
9542
|
applyPermissionMode(mode, opts) {
|
|
9543
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
9544
|
+
return;
|
|
9545
|
+
this.sessionManager.setPermissionMode(mode), recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
9251
9546
|
let prev = getPermissionMode();
|
|
9252
9547
|
mode === "plan" && prev !== "plan" && (this.previousPermissionMode = prev), setPermissionMode(mode), this.ui.requestRender(), mode === "plan" ? this.session.setSystemPromptAppend(PLAN_MODE_ADDENDUM) : mode === "auto" ? this.session.setSystemPromptAppend(AUTO_MODE_ADDENDUM) : this.session.setSystemPromptAppend(void 0), mode === "auto" && prev !== "auto" ? enableRollbackForSession(this.sessionManager.getSessionId()) : mode !== "auto" && prev === "auto" && disableRollbackForSession(this.sessionManager.getSessionId()), !opts?.silent && (mode === "auto" && prev !== "auto" ? this.showStatus("Auto mode active \u2014 fully autonomous. Rollback enabled for this session.") : mode === "plan" ? this.showStatus("Plan mode active \u2014 edit/write and mutating bash are blocked. /plan off to implement.") : this.showStatus(`Permission mode: ${mode}`));
|
|
9253
9548
|
}
|
|
@@ -9433,6 +9728,10 @@ ${toggleThinking ? `| \`${toggleThinking}\` | Toggle thinking block visibility |
|
|
|
9433
9728
|
this.chatContainer.addChild(new Spacer19(1)), this.chatContainer.addChild(new DynamicBorder()), this.chatContainer.addChild(new Text21(theme.bold(theme.fg("accent", "Keyboard Shortcuts")), 1, 0)), this.chatContainer.addChild(new Spacer19(1)), this.chatContainer.addChild(new Markdown10(hotkeys.trim(), 1, 1, this.getMarkdownThemeWithSettings())), this.chatContainer.addChild(new DynamicBorder()), this.ui.requestRender();
|
|
9434
9729
|
}
|
|
9435
9730
|
async handleClearCommand() {
|
|
9731
|
+
if (this.runtimeHost.isDetached || this.transferInProgress) {
|
|
9732
|
+
this.showError("Use /reclaim first, or /quit to leave this terminal.");
|
|
9733
|
+
return;
|
|
9734
|
+
}
|
|
9436
9735
|
this.clearStatusIndicator(), this.ui.setChatScroll(0), await this.waitForDeferredBuiltins();
|
|
9437
9736
|
let previousModel = this.session.model;
|
|
9438
9737
|
try {
|