@ashx-j/lunr 0.2.20 → 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 +14 -2
- 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 +6 -5
- package/dist/builtin-extensions/lunr-todos.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-todos.js +24 -7
- package/dist/builtin-extensions/lunr-todos.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/broker/spawn.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/broker/spawn.js +30 -21
- package/dist/builtin-extensions/pi-intercom/broker/spawn.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.js +15 -3
- 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/fanout-child.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +8 -7
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +78 -31
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.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 +6 -2
- 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 +5 -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 +186 -58
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.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/async-execution.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +4 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.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/notify.d.ts +6 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js +23 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts +100 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +46 -31
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.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/background/top-level-async.d.ts +15 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.js +14 -4
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts +0 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +9 -9
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +3 -0
- 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 +5 -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/runs/shared/task-intent.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js +5 -10
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +6 -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/slash/delegation-adapters.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts +7 -0
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js +11 -7
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +4 -0
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +22 -23
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.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-subagents/src/tui/render.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +237 -374
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- 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 +2 -0
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +17 -13
- package/dist/core/customize.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +1 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/install-features.d.ts.map +1 -1
- package/dist/core/install-features.js +10 -8
- package/dist/core/install-features.js.map +1 -1
- package/dist/core/memory-cap.d.ts.map +1 -1
- package/dist/core/memory-cap.js +5 -3
- package/dist/core/memory-cap.js.map +1 -1
- package/dist/core/model-tiers.d.ts.map +1 -1
- package/dist/core/model-tiers.js +9 -6
- package/dist/core/model-tiers.js.map +1 -1
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +9 -0
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +3 -0
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/process-registry.d.ts.map +1 -1
- package/dist/core/process-registry.js +6 -4
- package/dist/core/process-registry.js.map +1 -1
- package/dist/core/runtime-scope.d.ts +11 -0
- package/dist/core/runtime-scope.d.ts.map +1 -0
- package/dist/core/runtime-scope.js +3 -0
- package/dist/core/runtime-scope.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +13 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-handoff.d.ts +35 -0
- package/dist/core/session-handoff.d.ts.map +1 -0
- package/dist/core/session-handoff.js +214 -0
- package/dist/core/session-handoff.js.map +1 -0
- package/dist/core/session-manager.d.ts +20 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +184 -22
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-ownership.d.ts +28 -0
- package/dist/core/session-ownership.d.ts.map +1 -0
- package/dist/core/session-ownership.js +138 -0
- package/dist/core/session-ownership.js.map +1 -0
- package/dist/core/session-retention.d.ts.map +1 -1
- package/dist/core/session-retention.js +11 -2
- package/dist/core/session-retention.js.map +1 -1
- package/dist/core/settings-manager.d.ts +11 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +29 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/subagent-spinner-setting.d.ts +6 -0
- package/dist/core/subagent-spinner-setting.d.ts.map +1 -0
- package/dist/core/subagent-spinner-setting.js +12 -0
- package/dist/core/subagent-spinner-setting.js.map +1 -0
- package/dist/core/subagent-spinner.d.ts +4 -0
- package/dist/core/subagent-spinner.d.ts.map +1 -0
- package/dist/core/subagent-spinner.js +6 -0
- package/dist/core/subagent-spinner.js.map +1 -0
- 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 +9 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +111 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/extension-widget-order.d.ts +8 -0
- package/dist/modes/interactive/extension-widget-order.d.ts.map +1 -0
- package/dist/modes/interactive/extension-widget-order.js +37 -0
- package/dist/modes/interactive/extension-widget-order.js.map +1 -0
- 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 +166 -29
- 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-X4JMM4ZS.js → builtin-extensions-GVC6IFDU.js} +6 -4
- 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-5ZH3ZFIZ.js +308 -0
- 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-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-QKFMBRAL.js → chunk-EQ63ANHL.js} +508 -140
- package/dist/node-runtime/{chunk-ELWEXVO5.js → chunk-GJSAD4AB.js} +216 -201
- package/dist/node-runtime/{chunk-AOFXZQKA.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-AROOY4BB.js → chunk-HTFRRDSF.js} +2 -7
- package/dist/node-runtime/chunk-IMLCWLPI.js +9 -0
- package/dist/node-runtime/{chunk-4CSFRBCN.js → chunk-IQIEU7SB.js} +9 -674
- package/dist/node-runtime/{chunk-OPEK5RRY.js → chunk-IVXYUAJE.js} +1 -1
- package/dist/node-runtime/{chunk-AL2FMKKM.js → chunk-IWOWXRWU.js} +58 -48
- package/dist/node-runtime/chunk-KKUTQQV7.js +144 -0
- package/dist/node-runtime/chunk-LISUTZS3.js +19 -0
- package/dist/node-runtime/{chunk-K3646JTM.js → chunk-LMBNLFXQ.js} +25 -314
- 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-46ECNOLF.js → chunk-QDGKKKUM.js} +97 -162
- package/dist/node-runtime/chunk-R3K2F5GI.js +122 -0
- package/dist/node-runtime/chunk-RMQZU2YU.js +117 -0
- package/dist/node-runtime/{chunk-JYNNB7DU.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-4DJ6HEGH.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-CBGB57XT.js → chunk-WADV2VDS.js} +32 -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-XEXL2DGQ.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-L4ANRTVE.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 +105 -64
- 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-NNYTWTGF.js → lunr-cron-BKHGNBKT.js} +19 -5
- package/dist/node-runtime/main.js +45 -30
- 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-7RKSZGEN.js → package-manager-cli-VCK4E2RC.js} +23 -15
- package/dist/node-runtime/{pi-intercom-DDQMRNPJ.js → pi-intercom-HBPK5HSJ.js} +38 -34
- package/dist/node-runtime/{pi-mcp-adapter-GUFZWW54.js → pi-mcp-adapter-E6WULBKF.js} +4 -4
- package/dist/node-runtime/{pi-subagents-T5WMMLBB.js → pi-subagents-FEUDLJOE.js} +476 -412
- 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 +46 -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-NJQERQ72.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-GHPTUN7R.js → settings-manager-UUZ6NUXI.js} +8 -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-SRFC26SJ.js → subagent-executor-MLUMBWCP.js} +35 -63
- 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-L3JIBH2U.js → update-cli-4TP25CNW.js} +8 -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 +99 -17
- package/docs/interactive-startup.md +2 -1
- package/docs/sessions.md +10 -0
- package/docs/settings.md +3 -1
- 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-75JKASCW.js +0 -36
- package/dist/node-runtime/chunk-HQCKFM2O.js +0 -56
- package/dist/node-runtime/command-RBTRL55A.js +0 -13
- package/dist/node-runtime/interactive-mode-HPUNH7SV.js +0 -57
- 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,15 +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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
getSubagentSpinnerDefinition
|
|
8
|
+
} from "./chunk-US544NN6.js";
|
|
9
|
+
import {
|
|
10
|
+
computeContextBreakdown
|
|
11
|
+
} from "./chunk-TQGPP4SC.js";
|
|
13
12
|
import {
|
|
14
13
|
copyToClipboard,
|
|
15
14
|
readClipboardText
|
|
@@ -21,17 +20,14 @@ import {
|
|
|
21
20
|
import {
|
|
22
21
|
BootScreenComponent,
|
|
23
22
|
registerPermissionModeBridge
|
|
24
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-H3XF4UVQ.js";
|
|
25
24
|
import {
|
|
26
25
|
nextModeForGoal,
|
|
27
26
|
registerPermissionModeControlBridge
|
|
28
27
|
} from "./chunk-7N3YHTYF.js";
|
|
29
28
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
getProjectTrustOptions,
|
|
33
|
-
hasTrustRequiringProjectResources
|
|
34
|
-
} from "./chunk-AROOY4BB.js";
|
|
29
|
+
areExperimentalFeaturesEnabled
|
|
30
|
+
} from "./chunk-YPHAIRZT.js";
|
|
35
31
|
import {
|
|
36
32
|
MissingSessionCwdError,
|
|
37
33
|
SessionImportFileNotFoundError,
|
|
@@ -40,45 +36,28 @@ import {
|
|
|
40
36
|
clearRollback,
|
|
41
37
|
disableRollbackForSession,
|
|
42
38
|
enableRollbackForSession,
|
|
43
|
-
formatCatalogRefreshSummary,
|
|
44
39
|
formatMissingSessionCwdPrompt,
|
|
45
|
-
hasGrokCliXaiAuth,
|
|
46
40
|
initRollback,
|
|
47
41
|
isRollbackEnabled,
|
|
48
42
|
isRollbackSessionForceEnabled,
|
|
49
43
|
migrateRollbackSession,
|
|
50
44
|
parseSkillBlock,
|
|
51
45
|
peekRollbackTurnsConsumed,
|
|
52
|
-
refreshModelCandidatesForInit,
|
|
53
46
|
rollbackLastTurn,
|
|
54
|
-
setRollbackWarningHandler
|
|
55
|
-
|
|
56
|
-
} from "./chunk-JYNNB7DU.js";
|
|
47
|
+
setRollbackWarningHandler
|
|
48
|
+
} from "./chunk-TDL7UWJ7.js";
|
|
57
49
|
import {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
defaultModelPerProvider,
|
|
61
|
-
extractFileOpsFromMessage,
|
|
62
|
-
findExactModelReferenceMatch,
|
|
63
|
-
resolveModelScope
|
|
64
|
-
} from "./chunk-STERBGUB.js";
|
|
50
|
+
notifyTodosEnabledChanged
|
|
51
|
+
} from "./chunk-CCCN2UCX.js";
|
|
65
52
|
import {
|
|
66
53
|
parseGitUrl
|
|
67
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-IQIEU7SB.js";
|
|
68
55
|
import {
|
|
69
|
-
clearRegistry,
|
|
70
56
|
createAllToolDefinitions,
|
|
71
57
|
ensureTool,
|
|
72
58
|
getToolPath,
|
|
73
|
-
isWindows,
|
|
74
|
-
kill,
|
|
75
|
-
killAll,
|
|
76
|
-
list,
|
|
77
|
-
pause,
|
|
78
|
-
restart,
|
|
79
|
-
resume,
|
|
80
59
|
truncateToVisualLines
|
|
81
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-VSSXXL36.js";
|
|
82
61
|
import {
|
|
83
62
|
DEFAULT_MAX_BYTES,
|
|
84
63
|
DEFAULT_MAX_LINES,
|
|
@@ -91,34 +70,44 @@ import {
|
|
|
91
70
|
toolGroupRole,
|
|
92
71
|
toolGroupTree,
|
|
93
72
|
toolStatusDot
|
|
94
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-5ZQXRPMC.js";
|
|
95
74
|
import {
|
|
96
|
-
|
|
97
|
-
|
|
75
|
+
convertToPng,
|
|
76
|
+
processImage
|
|
77
|
+
} from "./chunk-AD6VXAO7.js";
|
|
78
|
+
import {
|
|
79
|
+
formatCatalogRefreshSummary,
|
|
80
|
+
hasGrokCliXaiAuth,
|
|
81
|
+
refreshModelCandidatesForInit,
|
|
82
|
+
stripJsonComments
|
|
83
|
+
} from "./chunk-GS66LV4M.js";
|
|
98
84
|
import {
|
|
99
85
|
HTTP_IDLE_TIMEOUT_CHOICES,
|
|
100
86
|
SKILL_TAG_CHARACTERS,
|
|
101
87
|
configureHttpDispatcher,
|
|
102
88
|
formatHttpIdleTimeoutMs
|
|
103
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-WADV2VDS.js";
|
|
104
90
|
import {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
} from "./chunk-
|
|
91
|
+
SUBAGENT_SPINNER_LABELS,
|
|
92
|
+
SUBAGENT_SPINNER_NAMES
|
|
93
|
+
} from "./chunk-LISUTZS3.js";
|
|
108
94
|
import {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} from "./chunk-W3CVH5RX.js";
|
|
95
|
+
ProjectTrustStore,
|
|
96
|
+
getProjectTrustOptions,
|
|
97
|
+
hasTrustRequiringProjectResources
|
|
98
|
+
} from "./chunk-HTFRRDSF.js";
|
|
114
99
|
import {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
100
|
+
computeFileLists,
|
|
101
|
+
createFileOps,
|
|
102
|
+
defaultModelPerProvider,
|
|
103
|
+
extractFileOpsFromMessage,
|
|
104
|
+
findExactModelReferenceMatch,
|
|
105
|
+
resolveModelScope
|
|
106
|
+
} from "./chunk-OFKSVRV7.js";
|
|
118
107
|
import {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
} from "./chunk-
|
|
108
|
+
SubagentEscapeSequence,
|
|
109
|
+
getSubagentCancellation
|
|
110
|
+
} from "./chunk-BBUVIEZB.js";
|
|
122
111
|
import {
|
|
123
112
|
AUTO_MODE_ADDENDUM,
|
|
124
113
|
PLAN_MODE_ADDENDUM,
|
|
@@ -128,53 +117,87 @@ import {
|
|
|
128
117
|
resetPermissions,
|
|
129
118
|
restorePermissionModeAfterPlan,
|
|
130
119
|
setPermissionMode
|
|
131
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-5D7LC2ZQ.js";
|
|
132
121
|
import {
|
|
133
122
|
getGlobalInstructionsPath,
|
|
134
123
|
getModelInstructionsPath
|
|
135
124
|
} from "./chunk-M3LZLQW2.js";
|
|
136
125
|
import {
|
|
137
|
-
|
|
138
|
-
|
|
126
|
+
clearRegistry,
|
|
127
|
+
isWindows,
|
|
128
|
+
kill,
|
|
129
|
+
killAll,
|
|
130
|
+
list,
|
|
131
|
+
pause,
|
|
132
|
+
restart,
|
|
133
|
+
resume
|
|
134
|
+
} from "./chunk-KKUTQQV7.js";
|
|
139
135
|
import {
|
|
140
|
-
|
|
141
|
-
} 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";
|
|
142
152
|
import {
|
|
143
153
|
getCustomizeBridge
|
|
144
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-4EULYYR4.js";
|
|
145
155
|
import {
|
|
146
156
|
MEMORY_CHAR_CAP_DEFAULT,
|
|
147
157
|
MEMORY_CHAR_CAP_MAX,
|
|
148
158
|
MEMORY_CHAR_CAP_MIN
|
|
149
|
-
} 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";
|
|
150
179
|
import {
|
|
151
180
|
markStartupMilestone
|
|
152
181
|
} from "./chunk-CCZJ3PYY.js";
|
|
153
182
|
import {
|
|
154
183
|
ExtensionSelectorComponent
|
|
155
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-6427XAWG.js";
|
|
156
185
|
import {
|
|
157
186
|
ExtensionInputComponent
|
|
158
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-PC2Z5TKZ.js";
|
|
159
188
|
import {
|
|
160
189
|
CountdownTimer
|
|
161
190
|
} from "./chunk-I6R76AG7.js";
|
|
162
|
-
import {
|
|
163
|
-
SessionSelectorComponent
|
|
164
|
-
} from "./chunk-JZQ7F36T.js";
|
|
165
|
-
import {
|
|
166
|
-
KeybindingsManager
|
|
167
|
-
} from "./chunk-5EFIU3OM.js";
|
|
168
191
|
import {
|
|
169
192
|
DynamicBorder
|
|
170
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-6B2POMK7.js";
|
|
171
194
|
import {
|
|
172
195
|
formatKeyText,
|
|
173
196
|
keyDisplayText,
|
|
174
197
|
keyHint,
|
|
175
198
|
keyText,
|
|
176
199
|
rawKeyHint
|
|
177
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-GNN7H3B7.js";
|
|
178
201
|
import {
|
|
179
202
|
FS_WATCH_RETRY_DELAY_MS,
|
|
180
203
|
Theme,
|
|
@@ -200,7 +223,7 @@ import {
|
|
|
200
223
|
stopThemeWatcher,
|
|
201
224
|
theme,
|
|
202
225
|
watchWithErrorHandler
|
|
203
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-7QWNYZDI.js";
|
|
204
227
|
import {
|
|
205
228
|
APP_NAME,
|
|
206
229
|
APP_TITLE,
|
|
@@ -714,6 +737,8 @@ var BUILTIN_SLASH_COMMANDS = [
|
|
|
714
737
|
{ name: "new", description: "Start a new session" },
|
|
715
738
|
{ name: "init", description: "Generate a starter AGENTS.md for this project" },
|
|
716
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" },
|
|
717
742
|
{ name: "resume", description: "Resume a different session" },
|
|
718
743
|
{ name: "sessions", description: "Browse and resume sessions" },
|
|
719
744
|
{ name: "reload", description: "Reload keybindings, extensions, skills, prompts, themes, and context files" },
|
|
@@ -1092,6 +1117,113 @@ var ArminComponent = class {
|
|
|
1092
1117
|
// packages/coding-agent/dist/modes/interactive/components/assistant-message.js
|
|
1093
1118
|
import { Container, Markdown as Markdown2, Spacer, Text } from "@ashx-j/lunr-tui";
|
|
1094
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
|
+
|
|
1095
1227
|
// packages/coding-agent/dist/modes/interactive/components/thinking-summary.js
|
|
1096
1228
|
var LEADING_MARKDOWN_RE = /^[#*`>\-\s]+/;
|
|
1097
1229
|
function thinkingSnippet(joinedThinking, maxLen = 120) {
|
|
@@ -1176,8 +1308,12 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1176
1308
|
lastMessage;
|
|
1177
1309
|
thinkingSource;
|
|
1178
1310
|
hasToolCalls = !1;
|
|
1179
|
-
|
|
1180
|
-
|
|
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);
|
|
1181
1317
|
}
|
|
1182
1318
|
invalidate() {
|
|
1183
1319
|
super.invalidate(), this.lastMessage && this.updateContent(this.lastMessage, this.thinkingSourceOptions());
|
|
@@ -1205,12 +1341,12 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1205
1341
|
} else this.expandedRuns.has(runIndex) ? this.expandedRuns.delete(runIndex) : this.expandedRuns.add(runIndex);
|
|
1206
1342
|
this.lastMessage && this.updateContent(this.lastMessage, this.thinkingSourceOptions());
|
|
1207
1343
|
}
|
|
1208
|
-
handleClick(localY, width) {
|
|
1344
|
+
handleClick(localY, width, localX) {
|
|
1209
1345
|
let contentWidth = width, y = 0;
|
|
1210
1346
|
for (let child of this.contentContainer.children) {
|
|
1211
1347
|
let h = child.render(contentWidth).length;
|
|
1212
1348
|
if (localY >= y && localY < y + h)
|
|
1213
|
-
return typeof child.handleClick == "function" ? child.handleClick(localY - y, contentWidth) : !1;
|
|
1349
|
+
return typeof child.handleClick == "function" ? child.handleClick(localY - y, contentWidth, localX) : !1;
|
|
1214
1350
|
y += h;
|
|
1215
1351
|
}
|
|
1216
1352
|
return !1;
|
|
@@ -1238,12 +1374,22 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1238
1374
|
let isFirstTextBlock = !0, thinkingRunIndex = -1;
|
|
1239
1375
|
for (let i = 0; i < message.content.length; i++) {
|
|
1240
1376
|
let content = message.content[i];
|
|
1241
|
-
if (content.type === "text" && content.text.trim())
|
|
1242
|
-
let
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
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") {
|
|
1247
1393
|
thinkingRunIndex++;
|
|
1248
1394
|
let displayBlocks = [];
|
|
1249
1395
|
for (; i < message.content.length; i++) {
|
|
@@ -1272,6 +1418,17 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1272
1418
|
}
|
|
1273
1419
|
}
|
|
1274
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
|
+
}
|
|
1275
1432
|
renderThinkingRun(thinkingRunIndex, thinkingBlocks, displayMessage, displayIndex, fullyRevealed) {
|
|
1276
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) => {
|
|
1277
1434
|
this.contentContainer.addChild(new ThinkingRunBlock(this, thinkingRunIndex, inner));
|
|
@@ -1279,9 +1436,9 @@ var OSC133_ZONE_START = "\x1B]133;A\x07", OSC133_ZONE_END = "\x1B]133;B\x07", OS
|
|
|
1279
1436
|
if (this.thinkingCollapse && !this.isRunExpanded(thinkingRunIndex) && runComplete) {
|
|
1280
1437
|
let timing = this.thinkingTimings?.[thinkingRunIndex], label = timing?.end !== void 0 ? `\u273B Thought for ${formatThoughtDuration(timing.end - timing.start)}` : "\u273B Thought", block = new Container();
|
|
1281
1438
|
block.addChild(new Text(theme.fg("thinkingText", theme.italic(label)), this.outputPad, 0));
|
|
1282
|
-
let
|
|
1439
|
+
let joinedThinking = thinkingBlocks.join(`
|
|
1283
1440
|
|
|
1284
|
-
`));
|
|
1441
|
+
`), snippet = thinkingSnippet(displayMessage.provider === "openai-codex" ? joinedThinking.replaceAll("**", "") : joinedThinking);
|
|
1285
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));
|
|
1286
1443
|
return;
|
|
1287
1444
|
}
|
|
@@ -1504,7 +1661,7 @@ var CompactionSummaryMessageComponent = class extends Box2 {
|
|
|
1504
1661
|
|
|
1505
1662
|
// packages/coding-agent/dist/modes/interactive/components/footer.js
|
|
1506
1663
|
import { isAbsolute, relative, resolve as resolve2, sep } from "node:path";
|
|
1507
|
-
import { truncateToWidth, visibleWidth } from "@ashx-j/lunr-tui";
|
|
1664
|
+
import { truncateToWidth as truncateToWidth2, visibleWidth } from "@ashx-j/lunr-tui";
|
|
1508
1665
|
function sanitizeStatusText(text) {
|
|
1509
1666
|
return text.replace(/[\r\n\t]/g, " ").replace(/ +/g, " ").trim();
|
|
1510
1667
|
}
|
|
@@ -1564,7 +1721,7 @@ var FooterComponent = class {
|
|
|
1564
1721
|
let contextPercentStr, autoIndicator = this.autoCompactEnabled ? " (auto)" : "", contextPercentDisplay = contextPercent === "?" ? `?/${formatTokens(contextWindow)}${autoIndicator}` : `${contextPercent}%/${formatTokens(contextWindow)}${autoIndicator}`;
|
|
1565
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"))}`);
|
|
1566
1723
|
let statsLeft = statsParts.join(" "), modelName = state.model?.id || "no-model", statsLeftWidth = visibleWidth(statsLeft);
|
|
1567
|
-
statsLeftWidth > width && (statsLeft =
|
|
1724
|
+
statsLeftWidth > width && (statsLeft = truncateToWidth2(statsLeft, width, "..."), statsLeftWidth = visibleWidth(statsLeft));
|
|
1568
1725
|
let minPadding = 2, rightSideWithoutProvider = modelName;
|
|
1569
1726
|
if (state.model?.reasoning) {
|
|
1570
1727
|
let thinkingLevel = state.thinkingLevel || "off";
|
|
@@ -1579,22 +1736,22 @@ var FooterComponent = class {
|
|
|
1579
1736
|
} else {
|
|
1580
1737
|
let availableForRight = width - statsLeftWidth - minPadding;
|
|
1581
1738
|
if (availableForRight > 0) {
|
|
1582
|
-
let truncatedRight =
|
|
1739
|
+
let truncatedRight = truncateToWidth2(rightSide, availableForRight, ""), truncatedRightWidth = visibleWidth(truncatedRight), padding = " ".repeat(Math.max(0, width - statsLeftWidth - truncatedRightWidth));
|
|
1583
1740
|
statsLine = statsLeft + padding + truncatedRight;
|
|
1584
1741
|
} else
|
|
1585
1742
|
statsLine = statsLeft;
|
|
1586
1743
|
}
|
|
1587
|
-
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();
|
|
1588
1745
|
if (extensionStatuses.size > 0) {
|
|
1589
1746
|
let statusLine = Array.from(extensionStatuses.entries()).sort(([a], [b]) => a.localeCompare(b)).map(([, text]) => sanitizeStatusText(text)).join(" ");
|
|
1590
|
-
lines.push(
|
|
1747
|
+
lines.push(truncateToWidth2(statusLine, width, theme.fg("dim", "...")));
|
|
1591
1748
|
}
|
|
1592
1749
|
return lines;
|
|
1593
1750
|
}
|
|
1594
1751
|
};
|
|
1595
1752
|
|
|
1596
1753
|
// packages/coding-agent/dist/modes/interactive/components/usage-view.js
|
|
1597
|
-
import { truncateToWidth as
|
|
1754
|
+
import { truncateToWidth as truncateToWidth3, visibleWidth as visibleWidth2 } from "@ashx-j/lunr-tui";
|
|
1598
1755
|
var BAR_CELLS = 20;
|
|
1599
1756
|
function usageLevelColor(percent) {
|
|
1600
1757
|
return percent > 90 ? "error" : percent > 70 ? "warning" : "success";
|
|
@@ -1634,7 +1791,7 @@ function planWindowLine(window, labelWidth) {
|
|
|
1634
1791
|
function renderThemedBox(headerText, content, maxWidth) {
|
|
1635
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];
|
|
1636
1793
|
for (let rawLine of content) {
|
|
1637
|
-
let line = rawLine.length > 0 ?
|
|
1794
|
+
let line = rawLine.length > 0 ? truncateToWidth3(rawLine, innerWidth, "") : "", padding = " ".repeat(Math.max(0, innerWidth - visibleWidth2(line)));
|
|
1638
1795
|
lines.push(`${border("\u2502 ")}${line}${padding}${border(" \u2502")}`);
|
|
1639
1796
|
}
|
|
1640
1797
|
return lines.push(bottom), lines;
|
|
@@ -1726,6 +1883,9 @@ var CustomEntryComponent = class extends Container4 {
|
|
|
1726
1883
|
setExpanded(expanded) {
|
|
1727
1884
|
this._expanded !== expanded && (this._expanded = expanded, this.rebuild());
|
|
1728
1885
|
}
|
|
1886
|
+
handleClick(localY, width) {
|
|
1887
|
+
return super.handleClick(localY, width) ? !0 : !this.customComponent || localY < 1 ? !1 : (this.setExpanded(!this._expanded), !0);
|
|
1888
|
+
}
|
|
1729
1889
|
invalidate() {
|
|
1730
1890
|
super.invalidate(), this.rebuild();
|
|
1731
1891
|
}
|
|
@@ -1757,6 +1917,9 @@ var CustomMessageComponent = class extends Container5 {
|
|
|
1757
1917
|
setExpanded(expanded) {
|
|
1758
1918
|
this._expanded !== expanded && (this._expanded = expanded, this.rebuild());
|
|
1759
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
|
+
}
|
|
1760
1923
|
invalidate() {
|
|
1761
1924
|
super.invalidate(), this.rebuild();
|
|
1762
1925
|
}
|
|
@@ -2405,7 +2568,7 @@ var PlanMessageComponent = class extends Container10 {
|
|
|
2405
2568
|
};
|
|
2406
2569
|
|
|
2407
2570
|
// packages/coding-agent/dist/modes/interactive/components/processes-selector.js
|
|
2408
|
-
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";
|
|
2409
2572
|
function formatElapsed(startedAt) {
|
|
2410
2573
|
let ms = Date.now() - startedAt, s = Math.floor(ms / 1e3);
|
|
2411
2574
|
if (s < 60)
|
|
@@ -2442,7 +2605,7 @@ var ProcessesSelectorComponent = class extends Container11 {
|
|
|
2442
2605
|
continue;
|
|
2443
2606
|
let elapsed = formatElapsed(p.startedAt), status;
|
|
2444
2607
|
p.status === "exited" ? status = `exited(${p.exitCode ?? "?"})` : p.status === "paused" ? status = "paused" : status = "running";
|
|
2445
|
-
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);
|
|
2446
2609
|
this.addChild(new Text13(colored, 0, 0));
|
|
2447
2610
|
}
|
|
2448
2611
|
this.addChild(new Spacer12(1));
|
|
@@ -2834,11 +2997,56 @@ var SETTINGS_SUBMENU_SELECT_LIST_LAYOUT = {
|
|
|
2834
2997
|
handleInput(data) {
|
|
2835
2998
|
this.input.handleInput(data);
|
|
2836
2999
|
}
|
|
2837
|
-
}, SEARCH_CURATOR_VALUES = ["off", "on", "auto-summary"]
|
|
3000
|
+
}, SEARCH_CURATOR_VALUES = ["off", "on", "auto-summary"];
|
|
3001
|
+
function subagentSpinnerItems() {
|
|
3002
|
+
return SUBAGENT_SPINNER_NAMES.map((name) => ({
|
|
3003
|
+
value: name,
|
|
3004
|
+
label: SUBAGENT_SPINNER_LABELS[name],
|
|
3005
|
+
description: getSubagentSpinnerDefinition(name).frames.slice(0, 4).join(" ")
|
|
3006
|
+
}));
|
|
3007
|
+
}
|
|
3008
|
+
var SubagentSpinnerSubmenu = class extends Container13 {
|
|
3009
|
+
preview;
|
|
3010
|
+
selectList;
|
|
3011
|
+
selected;
|
|
3012
|
+
timer;
|
|
3013
|
+
constructor(current, callbacks, done) {
|
|
3014
|
+
super(), this.selected = current, this.addChild(new Text15(theme.bold(theme.fg("accent", "Subagent spinner")), 0, 0)), this.addChild(new Spacer14(1)), this.preview = new Text15("", 0, 0), this.addChild(this.preview), this.addChild(new Spacer14(1));
|
|
3015
|
+
let options = subagentSpinnerItems();
|
|
3016
|
+
this.selectList = new SelectList(options, options.length, getSelectListTheme(), SETTINGS_SUBMENU_SELECT_LIST_LAYOUT), this.selectList.setSelectedIndex(Math.max(0, SUBAGENT_SPINNER_NAMES.indexOf(current))), this.selectList.onSelectionChange = (item) => {
|
|
3017
|
+
this.selected = item.value, this.updatePreview(), callbacks.requestRender();
|
|
3018
|
+
}, this.selectList.onSelect = (item) => {
|
|
3019
|
+
this.dispose();
|
|
3020
|
+
let selected = item.value;
|
|
3021
|
+
callbacks.onSubagentSpinnerChange(selected), done(SUBAGENT_SPINNER_LABELS[selected]);
|
|
3022
|
+
}, this.selectList.onCancel = () => {
|
|
3023
|
+
this.dispose(), done();
|
|
3024
|
+
}, this.addChild(this.selectList), this.addChild(new Spacer14(1)), this.addChild(new Text15(theme.fg("dim", " Enter to select \xB7 Esc to go back"), 0, 0)), this.updatePreview(), this.timer = setInterval(() => {
|
|
3025
|
+
this.updatePreview(), callbacks.requestRender();
|
|
3026
|
+
}, 80), this.timer.unref?.();
|
|
3027
|
+
}
|
|
3028
|
+
updatePreview() {
|
|
3029
|
+
let definition = getSubagentSpinnerDefinition(this.selected), frame = definition.frames[Math.floor(Date.now() / definition.interval) % definition.frames.length];
|
|
3030
|
+
this.preview.setText(`${theme.fg("muted", "Preview")} ${theme.fg("accent", frame)}`);
|
|
3031
|
+
}
|
|
3032
|
+
dispose() {
|
|
3033
|
+
this.timer && (clearInterval(this.timer), this.timer = void 0);
|
|
3034
|
+
}
|
|
3035
|
+
handleInput(data) {
|
|
3036
|
+
this.selectList.handleInput(data);
|
|
3037
|
+
}
|
|
3038
|
+
}, CustomizeSubmenu = class extends Container13 {
|
|
2838
3039
|
settingsList;
|
|
2839
|
-
constructor(
|
|
3040
|
+
constructor(config, callbacks, done) {
|
|
2840
3041
|
super();
|
|
2841
|
-
let bridge = getCustomizeBridge(), items = [
|
|
3042
|
+
let bridge = getCustomizeBridge(), currentSpinner = bridge?.getSubagentSpinner() ?? config.subagentSpinner, items = [
|
|
3043
|
+
{
|
|
3044
|
+
id: "subagent-spinner",
|
|
3045
|
+
label: "Subagent spinner",
|
|
3046
|
+
description: "Running child indicator",
|
|
3047
|
+
currentValue: SUBAGENT_SPINNER_LABELS[currentSpinner],
|
|
3048
|
+
submenu: (_currentValue, submenuDone) => new SubagentSpinnerSubmenu(bridge?.getSubagentSpinner() ?? currentSpinner, callbacks, submenuDone)
|
|
3049
|
+
},
|
|
2842
3050
|
{
|
|
2843
3051
|
id: "footer-mcp",
|
|
2844
3052
|
label: "MCP status",
|
|
@@ -3402,6 +3610,13 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3402
3610
|
currentValue: config.smoothStreaming ? "true" : "false",
|
|
3403
3611
|
values: ["true", "false"]
|
|
3404
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
|
+
},
|
|
3405
3620
|
{
|
|
3406
3621
|
id: "agent-memory",
|
|
3407
3622
|
label: "Agent memory",
|
|
@@ -3409,6 +3624,13 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3409
3624
|
currentValue: config.memoryEnabled ? "on" : "off",
|
|
3410
3625
|
values: ["on", "off"]
|
|
3411
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
|
+
},
|
|
3412
3634
|
{
|
|
3413
3635
|
id: "memory-char-cap",
|
|
3414
3636
|
label: "Memory character cap",
|
|
@@ -3437,6 +3659,23 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3437
3659
|
currentValue: DEFAULT_PROJECT_TRUST_LABELS[config.defaultProjectTrust],
|
|
3438
3660
|
values: Object.values(DEFAULT_PROJECT_TRUST_LABELS)
|
|
3439
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
|
+
},
|
|
3440
3679
|
{
|
|
3441
3680
|
id: "default-permission-mode",
|
|
3442
3681
|
label: "Default permission mode",
|
|
@@ -3688,9 +3927,15 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3688
3927
|
case "memory-char-cap":
|
|
3689
3928
|
callbacks.onMemoryCharCapChange(parseInt(newValue, 10));
|
|
3690
3929
|
break;
|
|
3930
|
+
case "browser-enabled":
|
|
3931
|
+
callbacks.onBrowserEnabledChange(newValue === "on");
|
|
3932
|
+
break;
|
|
3691
3933
|
case "agent-memory":
|
|
3692
3934
|
callbacks.onMemoryEnabledChange(newValue === "on");
|
|
3693
3935
|
break;
|
|
3936
|
+
case "todos":
|
|
3937
|
+
callbacks.onTodosEnabledChange(newValue === "on");
|
|
3938
|
+
break;
|
|
3694
3939
|
case "search-curator":
|
|
3695
3940
|
callbacks.onSearchCuratorChange(newValue);
|
|
3696
3941
|
break;
|
|
@@ -4119,7 +4364,7 @@ function applySameToolGrouping(previous, next) {
|
|
|
4119
4364
|
}
|
|
4120
4365
|
|
|
4121
4366
|
// packages/coding-agent/dist/modes/interactive/components/tree-selector.js
|
|
4122
|
-
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";
|
|
4123
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;
|
|
4124
4369
|
function renderHorizontalViewport(rows, width) {
|
|
4125
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;
|
|
@@ -4132,7 +4377,7 @@ function renderHorizontalViewport(rows, width) {
|
|
|
4132
4377
|
}
|
|
4133
4378
|
return rows.map((row) => {
|
|
4134
4379
|
let line = horizontalScroll > 0 ? `${row.gutter}${sliceByColumn(row.body, horizontalScroll, viewportWidth, !0)}\x1B[0m` : row.gutter + row.body;
|
|
4135
|
-
return
|
|
4380
|
+
return truncateToWidth5(line, width, "");
|
|
4136
4381
|
});
|
|
4137
4382
|
}
|
|
4138
4383
|
var TreeList = class {
|
|
@@ -4450,7 +4695,7 @@ var TreeList = class {
|
|
|
4450
4695
|
render(width) {
|
|
4451
4696
|
let lines = [];
|
|
4452
4697
|
if (this.filteredNodes.length === 0)
|
|
4453
|
-
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;
|
|
4454
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 = [];
|
|
4455
4700
|
for (let i = startIndex; i < endIndex; i++) {
|
|
4456
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);
|
|
@@ -4472,7 +4717,7 @@ var TreeList = class {
|
|
|
4472
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;
|
|
4473
4718
|
isSelected && (gutter = theme.bg("selectedBg", gutter), body = theme.bg("selectedBg", body)), renderedRows.push({ gutter, body, anchorCol, bodyWidth: visibleWidth3(body), isSelected });
|
|
4474
4719
|
}
|
|
4475
|
-
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;
|
|
4476
4721
|
}
|
|
4477
4722
|
getEntryDisplayText(node, isSelected) {
|
|
4478
4723
|
let entry = node.entry, result, normalize = (s) => s.replace(/[\n\t]/g, " ").trim();
|
|
@@ -4731,7 +4976,7 @@ var TreeList = class {
|
|
|
4731
4976
|
}
|
|
4732
4977
|
render(width) {
|
|
4733
4978
|
let query = this.treeList.getSearchQuery();
|
|
4734
|
-
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)];
|
|
4735
4980
|
}
|
|
4736
4981
|
handleInput(_keyData) {
|
|
4737
4982
|
}
|
|
@@ -4749,9 +4994,9 @@ var TreeList = class {
|
|
|
4749
4994
|
currentLine = candidate;
|
|
4750
4995
|
continue;
|
|
4751
4996
|
}
|
|
4752
|
-
lines.push(...
|
|
4997
|
+
lines.push(...wrapTextWithAnsi2(currentLine.trimEnd(), availableWidth)), currentLine = visibleWidth3(`${indent}${item}`) <= availableWidth ? `${indent}${item}` : item;
|
|
4753
4998
|
}
|
|
4754
|
-
return currentLine && lines.push(...
|
|
4999
|
+
return currentLine && lines.push(...wrapTextWithAnsi2(currentLine.trimEnd(), availableWidth)), lines.map((line) => theme.fg("muted", line));
|
|
4755
5000
|
}
|
|
4756
5001
|
}, TREE_HELP_ITEMS = [
|
|
4757
5002
|
{ keys: ["tui.select.up", "tui.select.down"], label: "move" },
|
|
@@ -4810,7 +5055,7 @@ var LabelInput = class {
|
|
|
4810
5055
|
}
|
|
4811
5056
|
render(width) {
|
|
4812
5057
|
let lines = [], availableWidth = width - 2;
|
|
4813
|
-
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;
|
|
4814
5059
|
}
|
|
4815
5060
|
handleInput(keyData) {
|
|
4816
5061
|
let kb = getKeybindings8();
|
|
@@ -4927,7 +5172,7 @@ var OSC133_ZONE_START2 = "\x1B]133;A\x07", OSC133_ZONE_END2 = "\x1B]133;B\x07",
|
|
|
4927
5172
|
};
|
|
4928
5173
|
|
|
4929
5174
|
// packages/coding-agent/dist/modes/interactive/components/user-message-selector.js
|
|
4930
|
-
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";
|
|
4931
5176
|
var UserMessageList = class {
|
|
4932
5177
|
messages = [];
|
|
4933
5178
|
selectedIndex = 0;
|
|
@@ -4948,7 +5193,7 @@ var UserMessageList = class {
|
|
|
4948
5193
|
return lines.push(theme.fg("muted", " No user messages found")), lines;
|
|
4949
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);
|
|
4950
5195
|
for (let i = startIndex; i < endIndex; i++) {
|
|
4951
|
-
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);
|
|
4952
5197
|
lines.push(messageLine);
|
|
4953
5198
|
let metadata = ` Message ${i + 1} of ${this.messages.length}`, metadataLine = theme.fg("muted", metadata);
|
|
4954
5199
|
lines.push(metadataLine), lines.push("");
|
|
@@ -4980,6 +5225,29 @@ var UserMessageList = class {
|
|
|
4980
5225
|
}
|
|
4981
5226
|
};
|
|
4982
5227
|
|
|
5228
|
+
// packages/coding-agent/dist/modes/interactive/extension-widget-order.js
|
|
5229
|
+
var BUILTIN_WIDGET_ORDER = /* @__PURE__ */ new Map([
|
|
5230
|
+
["todos", 0],
|
|
5231
|
+
["subagent-async", 1]
|
|
5232
|
+
]);
|
|
5233
|
+
function replaceExtensionWidget(above, below, key, component, placement) {
|
|
5234
|
+
let target = placement === "belowEditor" ? below : above, other = placement === "belowEditor" ? above : below, existingTarget = target.get(key), existingOther = other.get(key);
|
|
5235
|
+
if (existingTarget && existingTarget !== component && existingTarget.dispose?.(), existingOther && existingOther !== component && existingOther.dispose?.(), other.delete(key), component === void 0) {
|
|
5236
|
+
target.delete(key);
|
|
5237
|
+
return;
|
|
5238
|
+
}
|
|
5239
|
+
target.set(key, component);
|
|
5240
|
+
}
|
|
5241
|
+
function orderedExtensionWidgets(widgets) {
|
|
5242
|
+
return [...widgets.entries()].map(([key, component], insertionIndex) => ({ key, component, insertionIndex })).sort((left, right) => {
|
|
5243
|
+
let leftOrder = BUILTIN_WIDGET_ORDER.get(left.key), rightOrder = BUILTIN_WIDGET_ORDER.get(right.key);
|
|
5244
|
+
return leftOrder !== void 0 || rightOrder !== void 0 ? (leftOrder ?? Number.MAX_SAFE_INTEGER) - (rightOrder ?? Number.MAX_SAFE_INTEGER) : left.insertionIndex - right.insertionIndex;
|
|
5245
|
+
}).map(({ key, component }) => [key, component]);
|
|
5246
|
+
}
|
|
5247
|
+
function widgetSeparatorNeedsSpacer(previousKey, key) {
|
|
5248
|
+
return !(previousKey === "todos" && key === "subagent-async");
|
|
5249
|
+
}
|
|
5250
|
+
|
|
4983
5251
|
// packages/coding-agent/dist/modes/interactive/skill-tag-autocomplete.js
|
|
4984
5252
|
import { fuzzyFilter as fuzzyFilter4 } from "@ashx-j/lunr-tui";
|
|
4985
5253
|
function extractSkillTagPrefix(textBeforeCursor, character) {
|
|
@@ -5433,11 +5701,13 @@ var InteractiveMode = class _InteractiveMode {
|
|
|
5433
5701
|
this.runtimeHost = runtimeHost, this.options = options, this.autoTrustOnReloadCwd = options.autoTrustOnReloadCwd, this.runtimeHost.setBeforeSessionInvalidate((reason) => {
|
|
5434
5702
|
this.resetExtensionUI(), this.previousPermissionMode = void 0, this.preGoalPermissionMode = void 0, resetPermissions(this.settingsManager.getDefaultPermissionMode()), clearRegistry(), reason !== "fork" && clearRollback(this.sessionManager.getSessionId());
|
|
5435
5703
|
}), this.runtimeHost.setRebindSession(async () => {
|
|
5436
|
-
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);
|
|
5437
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({
|
|
5438
5708
|
enterGoalAuto: () => this.enterGoalAuto(),
|
|
5439
5709
|
leaveGoalAuto: () => this.leaveGoalAuto()
|
|
5440
|
-
}), 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);
|
|
5441
5711
|
let editorPaddingX = this.settingsManager.getEditorPaddingX(), autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();
|
|
5442
5712
|
this.defaultEditor = options.startupView?.editor ?? new CustomEditor(this.ui, getEditorTheme(), this.keybindings, {
|
|
5443
5713
|
paddingX: editorPaddingX,
|
|
@@ -5556,7 +5826,7 @@ var InteractiveMode = class _InteractiveMode {
|
|
|
5556
5826
|
return (typeof resp == "string" ? resp : resp.decision) !== "reject" && this.applyPermissionMode(this.restoreTargetAfterPlan()), resp;
|
|
5557
5827
|
}
|
|
5558
5828
|
return this.showApprovalDialog(req);
|
|
5559
|
-
}), 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()) {
|
|
5560
5830
|
let header = theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
|
|
5561
5831
|
this.builtInHeader = new BootScreenComponent(header, this.buildBootRows()), this.headerContainer.addChild(new Spacer19(1)), this.headerContainer.addChild(this.builtInHeader);
|
|
5562
5832
|
} else
|
|
@@ -6076,8 +6346,18 @@ ${warningLines}`, 0, 0)), this.loadedResourcesContainer.addChild(new Spacer19(1)
|
|
|
6076
6346
|
], skillsCount = this.session.resourceLoader.getSkills().skills.length;
|
|
6077
6347
|
return skillsCount > 0 && bootRows.push({ label: "skills", value: String(skillsCount) }), bootRows;
|
|
6078
6348
|
}
|
|
6349
|
+
unregisterSessionTransfer;
|
|
6350
|
+
transferInProgress = !1;
|
|
6351
|
+
detachedDraft = "";
|
|
6079
6352
|
async rebindCurrentSession(options = {}) {
|
|
6080
|
-
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();
|
|
6081
6361
|
}
|
|
6082
6362
|
async handleFatalRuntimeError(prefix, error) {
|
|
6083
6363
|
let message = error instanceof Error ? error.message : String(error);
|
|
@@ -6175,23 +6455,14 @@ ${warningLines}`, 0, 0)), this.loadedResourcesContainer.addChild(new Spacer19(1)
|
|
|
6175
6455
|
* Set an extension widget (string array or custom component).
|
|
6176
6456
|
*/
|
|
6177
6457
|
setExtensionWidget(key, content, options) {
|
|
6178
|
-
let placement = options?.placement ?? "aboveEditor",
|
|
6179
|
-
let existing = map.get(key);
|
|
6180
|
-
existing?.dispose && existing.dispose(), map.delete(key);
|
|
6181
|
-
};
|
|
6182
|
-
if (removeExisting(this.extensionWidgetsAbove), removeExisting(this.extensionWidgetsBelow), content === void 0) {
|
|
6183
|
-
this.renderWidgets();
|
|
6184
|
-
return;
|
|
6185
|
-
}
|
|
6186
|
-
let component;
|
|
6458
|
+
let placement = options?.placement ?? "aboveEditor", component;
|
|
6187
6459
|
if (Array.isArray(content)) {
|
|
6188
6460
|
let container = new Container19();
|
|
6189
6461
|
for (let line of content.slice(0, _InteractiveMode.MAX_WIDGET_LINES))
|
|
6190
6462
|
container.addChild(new Text21(line, 1, 0));
|
|
6191
6463
|
content.length > _InteractiveMode.MAX_WIDGET_LINES && container.addChild(new Text21(theme.fg("muted", "... (widget truncated)"), 1, 0)), component = container;
|
|
6192
|
-
} else
|
|
6193
|
-
|
|
6194
|
-
(placement === "belowEditor" ? this.extensionWidgetsBelow : this.extensionWidgetsAbove).set(key, component), this.renderWidgets();
|
|
6464
|
+
} else content && (component = content(this.ui, theme));
|
|
6465
|
+
replaceExtensionWidget(this.extensionWidgetsAbove, this.extensionWidgetsBelow, key, component, placement), this.renderWidgets();
|
|
6195
6466
|
}
|
|
6196
6467
|
clearExtensionWidgets() {
|
|
6197
6468
|
for (let widget of this.extensionWidgetsAbove.values())
|
|
@@ -6217,9 +6488,9 @@ ${warningLines}`, 0, 0)), this.loadedResourcesContainer.addChild(new Spacer19(1)
|
|
|
6217
6488
|
return;
|
|
6218
6489
|
}
|
|
6219
6490
|
leadingSpacer && container.addChild(new Spacer19(1));
|
|
6220
|
-
let
|
|
6221
|
-
for (let component of widgets
|
|
6222
|
-
|
|
6491
|
+
let previousKey;
|
|
6492
|
+
for (let [key, component] of orderedExtensionWidgets(widgets))
|
|
6493
|
+
previousKey !== void 0 && (widgetSeparatorNeedsSpacer(previousKey, key) && container.addChild(new Spacer19(1)), container.addChild(new DynamicBorder((s) => theme.fg("dim", s)))), previousKey = key, container.addChild(component);
|
|
6223
6494
|
}
|
|
6224
6495
|
/**
|
|
6225
6496
|
* Set a custom footer component, or restore the built-in footer.
|
|
@@ -6608,7 +6879,35 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
6608
6879
|
}
|
|
6609
6880
|
setupEditorSubmitHandler() {
|
|
6610
6881
|
this.defaultEditor.onSubmit = async (text) => {
|
|
6611
|
-
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) {
|
|
6612
6911
|
this.takeSubmittedImages(text);
|
|
6613
6912
|
return;
|
|
6614
6913
|
}
|
|
@@ -6880,7 +7179,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
6880
7179
|
this.footer.invalidate(), this.updateEditorBorderColor();
|
|
6881
7180
|
break;
|
|
6882
7181
|
case "message_start":
|
|
6883
|
-
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());
|
|
6884
7183
|
break;
|
|
6885
7184
|
case "message_update":
|
|
6886
7185
|
if (this.streamingComponent && event.message.role === "assistant")
|
|
@@ -7061,7 +7360,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
7061
7360
|
break;
|
|
7062
7361
|
}
|
|
7063
7362
|
case "assistant": {
|
|
7064
|
-
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() });
|
|
7065
7364
|
assistantComponent.setThinkingTimings(this.thinkingTimingsByMessage.get(message)), assistantComponent.setExpanded(this.toolOutputExpanded), this.chatContainer.addChild(assistantComponent);
|
|
7066
7365
|
break;
|
|
7067
7366
|
}
|
|
@@ -7189,7 +7488,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
7189
7488
|
async shutdown(options) {
|
|
7190
7489
|
if (this.isShuttingDown)
|
|
7191
7490
|
return;
|
|
7192
|
-
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) {
|
|
7193
7492
|
await this.runtimeHost.dispose(), this.themeController.disableAutoSync(), await this.ui.terminal.drainInput(1e3);
|
|
7194
7493
|
try {
|
|
7195
7494
|
killAll();
|
|
@@ -7290,6 +7589,10 @@ Kill them before exit?`) && killAll(), this.stop(), await this.runtimeHost.dispo
|
|
|
7290
7589
|
}
|
|
7291
7590
|
}
|
|
7292
7591
|
async handleFollowUp() {
|
|
7592
|
+
if (this.runtimeHost.isDetached || this.transferInProgress) {
|
|
7593
|
+
this.showError("Use /reclaim before sending more work. Draft retained.");
|
|
7594
|
+
return;
|
|
7595
|
+
}
|
|
7293
7596
|
let text = (this.editor.getExpandedText?.() ?? this.editor.getText()).trim();
|
|
7294
7597
|
if (text) {
|
|
7295
7598
|
if (this.session.isCompacting) {
|
|
@@ -7324,21 +7627,26 @@ Kill them before exit?`) && killAll(), this.stop(), await this.runtimeHost.dispo
|
|
|
7324
7627
|
this.ui.requestRender();
|
|
7325
7628
|
}
|
|
7326
7629
|
cycleThinkingLevel() {
|
|
7327
|
-
|
|
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());
|
|
7328
7633
|
}
|
|
7329
7634
|
cyclePermissionMode() {
|
|
7330
7635
|
this.applyPermissionMode(nextPermissionMode(getPermissionMode()), { silent: !0 });
|
|
7331
7636
|
}
|
|
7332
7637
|
async cycleModel(direction) {
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
let
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
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
|
+
}
|
|
7342
7650
|
}
|
|
7343
7651
|
}
|
|
7344
7652
|
toggleToolOutputExpansion() {
|
|
@@ -7569,6 +7877,7 @@ Pi will resume when the editor exits.
|
|
|
7569
7877
|
autocompleteMaxVisible: this.settingsManager.getAutocompleteMaxVisible(),
|
|
7570
7878
|
quietStartup: this.settingsManager.getQuietStartup(),
|
|
7571
7879
|
smoothStreaming: this.settingsManager.getSmoothStreaming(),
|
|
7880
|
+
subagentSpinner: this.settingsManager.getSubagentSpinner(),
|
|
7572
7881
|
sessionRetentionDays: this.settingsManager.getSessionRetentionDays(),
|
|
7573
7882
|
clearOnShrink: this.settingsManager.getClearOnShrink(),
|
|
7574
7883
|
showTerminalProgress: this.settingsManager.getShowTerminalProgress(),
|
|
@@ -7577,8 +7886,10 @@ Pi will resume when the editor exits.
|
|
|
7577
7886
|
globalInstructionsPath: getGlobalInstructionsPath(getAgentDir()),
|
|
7578
7887
|
modelInstructionsPath: getModelInstructionsPath(getAgentDir(), this.session.model?.id ?? "no-model-selected"),
|
|
7579
7888
|
confirmLargeSubagentLaunches: this.settingsManager.getConfirmLargeSubagentLaunches(),
|
|
7889
|
+
browserEnabled: this.settingsManager.getBrowserEnabled(),
|
|
7580
7890
|
memoryEnabled: this.settingsManager.getMemoryEnabled(),
|
|
7581
7891
|
memoryCharCap: this.settingsManager.getMemoryCharCap(),
|
|
7892
|
+
todosEnabled: this.settingsManager.getTodosEnabled(),
|
|
7582
7893
|
searchCurator: getSearchCuratorSetting(),
|
|
7583
7894
|
// lunr: TUI customize settings
|
|
7584
7895
|
footerMcp: this.settingsManager.getFooterMcp(),
|
|
@@ -7669,6 +7980,9 @@ Pi will resume when the editor exits.
|
|
|
7669
7980
|
onSmoothStreamingChange: (enabled) => {
|
|
7670
7981
|
this.applySmoothStreamingSettingChange(enabled);
|
|
7671
7982
|
},
|
|
7983
|
+
onSubagentSpinnerChange: (spinner) => {
|
|
7984
|
+
this.settingsManager.setSubagentSpinner(spinner), this.ui.requestRender();
|
|
7985
|
+
},
|
|
7672
7986
|
onSessionRetentionDaysChange: (days) => {
|
|
7673
7987
|
this.settingsManager.setSessionRetentionDays(days);
|
|
7674
7988
|
},
|
|
@@ -7730,9 +8044,15 @@ Pi will resume when the editor exits.
|
|
|
7730
8044
|
onMemoryCharCapChange: (cap) => {
|
|
7731
8045
|
this.settingsManager.setMemoryCharCap(cap);
|
|
7732
8046
|
},
|
|
8047
|
+
onBrowserEnabledChange: (enabled) => {
|
|
8048
|
+
this.settingsManager.setBrowserEnabled(enabled), this.session.refreshToolRegistry();
|
|
8049
|
+
},
|
|
7733
8050
|
onMemoryEnabledChange: (enabled) => {
|
|
7734
8051
|
this.settingsManager.setMemoryEnabled(enabled), this.session.refreshToolRegistry(), this.showStatus(`Agent memory: ${enabled ? "on" : "off"}`);
|
|
7735
8052
|
},
|
|
8053
|
+
onTodosEnabledChange: (enabled) => {
|
|
8054
|
+
this.settingsManager.setTodosEnabled(enabled), notifyTodosEnabledChanged(enabled), this.session.refreshToolRegistry();
|
|
8055
|
+
},
|
|
7736
8056
|
onSearchCuratorChange: (setting) => {
|
|
7737
8057
|
setSearchCuratorSetting(setting) || this.showError("pi-web-access is not loaded; curator setting unavailable.");
|
|
7738
8058
|
},
|
|
@@ -7770,6 +8090,31 @@ Pi will resume when the editor exits.
|
|
|
7770
8090
|
onPlanUsageWindowChange: (window) => {
|
|
7771
8091
|
this.settingsManager.setPlanUsageWindow(window);
|
|
7772
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
|
+
},
|
|
7773
8118
|
onDefaultPermissionModeChange: (mode) => {
|
|
7774
8119
|
this.settingsManager.setDefaultPermissionMode(mode);
|
|
7775
8120
|
},
|
|
@@ -7799,6 +8144,7 @@ Pi will resume when the editor exits.
|
|
|
7799
8144
|
autoManage: () => this.settingsManager.getAutoManageSubscriptions(),
|
|
7800
8145
|
requestRender: () => this.ui.requestRender()
|
|
7801
8146
|
},
|
|
8147
|
+
requestRender: () => this.ui.requestRender(),
|
|
7802
8148
|
createModelTierPicker: (_tier, currentModelRef, done2) => new ModelSelectorComponent(this.ui, this.resolveModelReference(currentModelRef), this.settingsManager, this.session.modelRuntime, this.session.scopedModels, (model) => {
|
|
7803
8149
|
done2(`${model.provider}/${model.id}`), this.ui.requestRender();
|
|
7804
8150
|
}, () => {
|
|
@@ -7940,6 +8286,8 @@ Pi will resume when the editor exits.
|
|
|
7940
8286
|
});
|
|
7941
8287
|
}
|
|
7942
8288
|
async showModelSelector(initialSearchInput) {
|
|
8289
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
8290
|
+
return;
|
|
7943
8291
|
let subscriptionNames = await this.getActiveSubscriptionNames();
|
|
7944
8292
|
this.showSelector((done) => {
|
|
7945
8293
|
let selector = new ModelSelectorComponent(this.ui, this.session.model, this.settingsManager, this.session.modelRuntime, this.session.scopedModels, async (model) => {
|
|
@@ -8076,6 +8424,8 @@ Pi will resume when the editor exits.
|
|
|
8076
8424
|
});
|
|
8077
8425
|
}
|
|
8078
8426
|
showUserMessageSelector() {
|
|
8427
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
8428
|
+
return;
|
|
8079
8429
|
let userMessages = this.session.getUserMessagesForForking();
|
|
8080
8430
|
if (userMessages.length === 0) {
|
|
8081
8431
|
this.showStatus("No messages to fork from");
|
|
@@ -8118,6 +8468,8 @@ Pi will resume when the editor exits.
|
|
|
8118
8468
|
}
|
|
8119
8469
|
}
|
|
8120
8470
|
showTreeSelector(initialSelectedId) {
|
|
8471
|
+
if (this.runtimeHost.isDetached || this.transferInProgress)
|
|
8472
|
+
return;
|
|
8121
8473
|
let tree = this.sessionManager.getTree(), realLeafId = this.sessionManager.getLeafId(), initialFilterMode = this.settingsManager.getTreeFilterMode();
|
|
8122
8474
|
if (tree.length === 0) {
|
|
8123
8475
|
this.showStatus("No entries in session");
|
|
@@ -8199,7 +8551,16 @@ Pi will resume when the editor exits.
|
|
|
8199
8551
|
let next = (nextName ?? "").trim();
|
|
8200
8552
|
if (!next)
|
|
8201
8553
|
return;
|
|
8202
|
-
|
|
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
|
+
}
|
|
8203
8564
|
},
|
|
8204
8565
|
showRenameHint: !0,
|
|
8205
8566
|
keybindings: this.keybindings
|
|
@@ -9167,7 +9528,7 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9167
9528
|
}
|
|
9168
9529
|
/** Apply addendum + auto-rollback for a mode without a status toast. */
|
|
9169
9530
|
syncPermissionModeEffects(mode) {
|
|
9170
|
-
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));
|
|
9171
9532
|
}
|
|
9172
9533
|
// lunr: `/goal` forces session auto without writing settings.
|
|
9173
9534
|
enterGoalAuto() {
|
|
@@ -9179,6 +9540,9 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9179
9540
|
this.preGoalPermissionMode = next.saved, next.mode !== getPermissionMode() && this.applyPermissionMode(next.mode, { silent: !0 });
|
|
9180
9541
|
}
|
|
9181
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);
|
|
9182
9546
|
let prev = getPermissionMode();
|
|
9183
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}`));
|
|
9184
9548
|
}
|
|
@@ -9364,6 +9728,10 @@ ${toggleThinking ? `| \`${toggleThinking}\` | Toggle thinking block visibility |
|
|
|
9364
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();
|
|
9365
9729
|
}
|
|
9366
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
|
+
}
|
|
9367
9735
|
this.clearStatusIndicator(), this.ui.setChatScroll(0), await this.waitForDeferredBuiltins();
|
|
9368
9736
|
let previousModel = this.session.model;
|
|
9369
9737
|
try {
|