@greppleai/grip 0.1.5 → 0.1.6
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 +16 -0
- package/README.md +1 -1
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/embedded-assets.d.ts.map +1 -1
- package/dist/bun/embedded-assets.js.map +1 -1
- package/dist/bun/register-bedrock.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.js.map +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/initial-message.d.ts +1 -1
- package/dist/cli/initial-message.d.ts.map +1 -1
- package/dist/cli/initial-message.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +27 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +117 -152
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/auth-storage.d.ts +4 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +3 -10
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +19 -23
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/compression-detection-ledger.d.ts.map +1 -1
- package/dist/core/compaction/compression-detection-ledger.js.map +1 -1
- package/dist/core/compaction/compression-detector.d.ts +1 -0
- package/dist/core/compaction/compression-detector.d.ts.map +1 -1
- package/dist/core/compaction/compression-detector.js +10 -21
- package/dist/core/compaction/compression-detector.js.map +1 -1
- package/dist/core/compaction/compression-economics.d.ts.map +1 -1
- package/dist/core/compaction/compression-economics.js.map +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +18 -30
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +15 -16
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/grip-agent.d.ts.map +1 -1
- package/dist/core/grip-agent.js +7 -21
- package/dist/core/grip-agent.js.map +1 -1
- package/dist/core/grip-manifest.d.ts.map +1 -1
- package/dist/core/grip-manifest.js.map +1 -1
- package/dist/core/hooks/aggregate.d.ts.map +1 -1
- package/dist/core/hooks/aggregate.js.map +1 -1
- package/dist/core/hooks/config.d.ts.map +1 -1
- package/dist/core/hooks/config.js.map +1 -1
- package/dist/core/hooks/executor.d.ts.map +1 -1
- package/dist/core/hooks/executor.js.map +1 -1
- package/dist/core/hooks/index.d.ts.map +1 -1
- package/dist/core/hooks/index.js.map +1 -1
- package/dist/core/hooks/matcher.d.ts.map +1 -1
- package/dist/core/hooks/matcher.js.map +1 -1
- package/dist/core/hooks/trust-store.d.ts.map +1 -1
- package/dist/core/hooks/trust-store.js +0 -3
- package/dist/core/hooks/trust-store.js.map +1 -1
- package/dist/core/hooks/types.d.ts.map +1 -1
- package/dist/core/hooks/types.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/instruction-resource-loader.d.ts.map +1 -1
- package/dist/core/instruction-resource-loader.js +0 -3
- package/dist/core/instruction-resource-loader.js.map +1 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +0 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/lsp/abort.d.ts.map +1 -1
- package/dist/core/lsp/abort.js.map +1 -1
- package/dist/core/lsp/client.d.ts.map +1 -1
- package/dist/core/lsp/client.js +8 -22
- package/dist/core/lsp/client.js.map +1 -1
- package/dist/core/lsp/config-loader.d.ts.map +1 -1
- package/dist/core/lsp/config-loader.js.map +1 -1
- package/dist/core/lsp/config.d.ts.map +1 -1
- package/dist/core/lsp/config.js.map +1 -1
- package/dist/core/lsp/diagnostics.d.ts.map +1 -1
- package/dist/core/lsp/diagnostics.js.map +1 -1
- package/dist/core/lsp/file-sync.d.ts.map +1 -1
- package/dist/core/lsp/file-sync.js +7 -9
- package/dist/core/lsp/file-sync.js.map +1 -1
- package/dist/core/lsp/integration.d.ts.map +1 -1
- package/dist/core/lsp/integration.js.map +1 -1
- package/dist/core/lsp/language-map.d.ts.map +1 -1
- package/dist/core/lsp/language-map.js +2 -7
- package/dist/core/lsp/language-map.js.map +1 -1
- package/dist/core/lsp/manager.d.ts.map +1 -1
- package/dist/core/lsp/manager.js +18 -29
- package/dist/core/lsp/manager.js.map +1 -1
- package/dist/core/lsp/navigation.d.ts.map +1 -1
- package/dist/core/lsp/navigation.js.map +1 -1
- package/dist/core/lsp/portable-path.d.ts.map +1 -1
- package/dist/core/lsp/portable-path.js.map +1 -1
- package/dist/core/lsp/refactor.d.ts.map +1 -1
- package/dist/core/lsp/refactor.js.map +1 -1
- package/dist/core/lsp/transport.d.ts.map +1 -1
- package/dist/core/lsp/transport.js.map +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +5 -7
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +0 -6
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/remote-workspace-protocol/contract.d.ts.map +1 -1
- package/dist/core/remote-workspace-protocol/contract.js +4 -2
- package/dist/core/remote-workspace-protocol/contract.js.map +1 -1
- package/dist/core/remote-workspace-protocol/guest-shared-client.d.ts.map +1 -1
- package/dist/core/remote-workspace-protocol/guest-shared-client.js +1 -5
- package/dist/core/remote-workspace-protocol/guest-shared-client.js.map +1 -1
- package/dist/core/remote-workspace-protocol/guest-shared-outbound-scheduler.d.ts.map +1 -1
- package/dist/core/remote-workspace-protocol/guest-shared-outbound-scheduler.js +5 -10
- package/dist/core/remote-workspace-protocol/guest-shared-outbound-scheduler.js.map +1 -1
- package/dist/core/remote-workspace-protocol/guest-shared-uplink.d.ts.map +1 -1
- package/dist/core/remote-workspace-protocol/guest-shared-uplink.js +2 -9
- package/dist/core/remote-workspace-protocol/guest-shared-uplink.js.map +1 -1
- package/dist/core/remote-workspace-protocol/lima-owner-directory.d.ts.map +1 -1
- package/dist/core/remote-workspace-protocol/lima-owner-directory.js.map +1 -1
- package/dist/core/remote-workspace-protocol/lima-owner-lock.d.ts.map +1 -1
- package/dist/core/remote-workspace-protocol/lima-owner-lock.js.map +1 -1
- package/dist/core/remote-workspace-protocol/session.d.ts.map +1 -1
- package/dist/core/remote-workspace-protocol/session.js +27 -65
- package/dist/core/remote-workspace-protocol/session.js.map +1 -1
- package/dist/core/remote-workspace-protocol/shared-transport.d.ts.map +1 -1
- package/dist/core/remote-workspace-protocol/shared-transport.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +0 -48
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/rules.d.ts.map +1 -1
- package/dist/core/rules.js.map +1 -1
- package/dist/core/sandbox/command.d.ts.map +1 -1
- package/dist/core/sandbox/command.js.map +1 -1
- package/dist/core/sandbox/config.d.ts.map +1 -1
- package/dist/core/sandbox/config.js.map +1 -1
- package/dist/core/sandbox/lima-guest-binary.d.ts.map +1 -1
- package/dist/core/sandbox/lima-guest-binary.js.map +1 -1
- package/dist/core/sandbox/lima.d.ts +2 -0
- package/dist/core/sandbox/lima.d.ts.map +1 -1
- package/dist/core/sandbox/lima.js +3 -9
- package/dist/core/sandbox/lima.js.map +1 -1
- package/dist/core/sandbox/shared-lima-roots.d.ts.map +1 -1
- package/dist/core/sandbox/shared-lima-roots.js.map +1 -1
- package/dist/core/sandbox/update-shared-guest-binary.d.ts.map +1 -1
- package/dist/core/sandbox/update-shared-guest-binary.js.map +1 -1
- package/dist/core/session/constants.d.ts.map +1 -1
- package/dist/core/session/context-metadata.d.ts.map +1 -1
- package/dist/core/session/context-metadata.js.map +1 -1
- package/dist/core/session/context.d.ts.map +1 -1
- package/dist/core/session/context.js.map +1 -1
- package/dist/core/session/ids.d.ts.map +1 -1
- package/dist/core/session/ids.js.map +1 -1
- package/dist/core/session/in-memory-session-manager.d.ts.map +1 -1
- package/dist/core/session/in-memory-session-manager.js +0 -1
- package/dist/core/session/in-memory-session-manager.js.map +1 -1
- package/dist/core/session/in-memory-session.d.ts.map +1 -1
- package/dist/core/session/in-memory-session.js.map +1 -1
- package/dist/core/session/jsonl-errors.d.ts.map +1 -1
- package/dist/core/session/jsonl-errors.js +0 -11
- package/dist/core/session/jsonl-errors.js.map +1 -1
- package/dist/core/session/jsonl-helpers.d.ts.map +1 -1
- package/dist/core/session/jsonl-helpers.js.map +1 -1
- package/dist/core/session/local-session-manager.d.ts.map +1 -1
- package/dist/core/session/local-session-manager.js +4 -6
- package/dist/core/session/local-session-manager.js.map +1 -1
- package/dist/core/session/local-session.d.ts.map +1 -1
- package/dist/core/session/local-session.js.map +1 -1
- package/dist/core/session/migrations.d.ts.map +1 -1
- package/dist/core/session/migrations.js.map +1 -1
- package/dist/core/session/remote-session-client.d.ts.map +1 -1
- package/dist/core/session/remote-session-client.js +0 -6
- package/dist/core/session/remote-session-client.js.map +1 -1
- package/dist/core/session/remote-session-manager.d.ts.map +1 -1
- package/dist/core/session/remote-session-manager.js +0 -3
- package/dist/core/session/remote-session-manager.js.map +1 -1
- package/dist/core/session/remote-session.d.ts.map +1 -1
- package/dist/core/session/remote-session.js +0 -1
- package/dist/core/session/remote-session.js.map +1 -1
- package/dist/core/session/session-manager.d.ts.map +1 -1
- package/dist/core/session/session.d.ts.map +1 -1
- package/dist/core/session/session.js +1 -5
- package/dist/core/session/session.js.map +1 -1
- package/dist/core/session/stores/in-memory-session-store.d.ts.map +1 -1
- package/dist/core/session/stores/in-memory-session-store.js +7 -6
- package/dist/core/session/stores/in-memory-session-store.js.map +1 -1
- package/dist/core/session/stores/jsonl-session-store.d.ts.map +1 -1
- package/dist/core/session/stores/jsonl-session-store.js +6 -14
- package/dist/core/session/stores/jsonl-session-store.js.map +1 -1
- package/dist/core/session/stores/remote-session-store.d.ts.map +1 -1
- package/dist/core/session/stores/remote-session-store.js +3 -8
- package/dist/core/session/stores/remote-session-store.js.map +1 -1
- package/dist/core/session/stores/session-store.d.ts.map +1 -1
- package/dist/core/session/types.d.ts.map +1 -1
- package/dist/core/session/usage-ledger.d.ts.map +1 -1
- package/dist/core/session/usage-ledger.js.map +1 -1
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js +0 -1
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +9 -17
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +8 -5
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/compress-context.d.ts.map +1 -1
- package/dist/core/tools/compress-context.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/core/tools/hash-store.d.ts.map +1 -1
- package/dist/core/tools/hash-store.js.map +1 -1
- package/dist/core/tools/hashline/apply.d.ts.map +1 -1
- package/dist/core/tools/hashline/apply.js.map +1 -1
- package/dist/core/tools/hashline/hash.d.ts.map +1 -1
- package/dist/core/tools/hashline/hash.js.map +1 -1
- package/dist/core/tools/hashline/parse.d.ts.map +1 -1
- package/dist/core/tools/hashline/parse.js.map +1 -1
- package/dist/core/tools/hashline/resolve.d.ts.map +1 -1
- package/dist/core/tools/hashline/resolve.js.map +1 -1
- package/dist/core/tools/hashline-utils.d.ts.map +1 -1
- package/dist/core/tools/hashline-utils.js.map +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/operations.d.ts +5 -0
- package/dist/core/tools/operations.d.ts.map +1 -1
- package/dist/core/tools/operations.js +26 -24
- package/dist/core/tools/operations.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +12 -18
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/replace-diff.d.ts.map +1 -1
- package/dist/core/tools/replace-diff.js.map +1 -1
- package/dist/core/tools/replace-normalize.d.ts.map +1 -1
- package/dist/core/tools/replace-normalize.js.map +1 -1
- package/dist/core/tools/replace-render.d.ts +1 -1
- package/dist/core/tools/replace-render.d.ts.map +1 -1
- package/dist/core/tools/replace-render.js.map +1 -1
- package/dist/core/tools/runtime.d.ts.map +1 -1
- package/dist/core/tools/runtime.js.map +1 -1
- package/dist/core/tools/session-history.d.ts.map +1 -1
- package/dist/core/tools/session-history.js.map +1 -1
- package/dist/core/tools/subagent-agents.d.ts.map +1 -1
- package/dist/core/tools/subagent-agents.js.map +1 -1
- package/dist/core/tools/subagent.d.ts.map +1 -1
- package/dist/core/tools/subagent.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/websearch.d.ts.map +1 -1
- package/dist/core/tools/websearch.js.map +1 -1
- package/dist/core/tools/workspace-tool-host.d.ts +1 -0
- package/dist/core/tools/workspace-tool-host.d.ts.map +1 -1
- package/dist/core/tools/workspace-tool-host.js +36 -22
- package/dist/core/tools/workspace-tool-host.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +0 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/workspace-identity.d.ts.map +1 -1
- package/dist/daemon/activity-budget.d.ts.map +1 -1
- package/dist/daemon/activity-budget.js +2 -3
- package/dist/daemon/activity-budget.js.map +1 -1
- package/dist/daemon/command.d.ts.map +1 -1
- package/dist/daemon/command.js.map +1 -1
- package/dist/daemon/config.d.ts +2 -0
- package/dist/daemon/config.d.ts.map +1 -1
- package/dist/daemon/config.js +4 -0
- package/dist/daemon/config.js.map +1 -1
- package/dist/daemon/help.d.ts.map +1 -1
- package/dist/daemon/help.js +4 -3
- package/dist/daemon/help.js.map +1 -1
- package/dist/daemon/lsp-config.d.ts.map +1 -1
- package/dist/daemon/lsp-config.js.map +1 -1
- package/dist/daemon/outbound-budget.d.ts.map +1 -1
- package/dist/daemon/outbound-budget.js +2 -4
- package/dist/daemon/outbound-budget.js.map +1 -1
- package/dist/daemon/security.d.ts.map +1 -1
- package/dist/daemon/security.js.map +1 -1
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js.map +1 -1
- package/dist/daemon/shared-connection.d.ts.map +1 -1
- package/dist/daemon/shared-connection.js +10 -15
- package/dist/daemon/shared-connection.js.map +1 -1
- package/dist/daemon/shared-revision.d.ts.map +1 -1
- package/dist/daemon/shared-revision.js +2 -1
- package/dist/daemon/shared-revision.js.map +1 -1
- package/dist/daemon/shared-roots.d.ts.map +1 -1
- package/dist/daemon/shared-roots.js +0 -1
- package/dist/daemon/shared-roots.js.map +1 -1
- package/dist/daemon/workspace-runtime.d.ts +2 -0
- package/dist/daemon/workspace-runtime.d.ts.map +1 -1
- package/dist/daemon/workspace-runtime.js +43 -15
- package/dist/daemon/workspace-runtime.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +3 -10
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +4 -9
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -3
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +1 -3
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +1 -3
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +6 -16
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -5
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +1 -8
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -6
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -7
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +2 -8
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +1 -9
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +1 -3
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/hook-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/hook-execution.js +2 -5
- package/dist/modes/interactive/components/hook-execution.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +3 -9
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
- package/dist/modes/interactive/components/mermaid.js.map +1 -1
- package/dist/modes/interactive/components/message-card.d.ts.map +1 -1
- package/dist/modes/interactive/components/message-card.js +0 -1
- package/dist/modes/interactive/components/message-card.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +13 -28
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +3 -12
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +9 -13
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +33 -58
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +0 -4
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +1 -3
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -2
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +9 -24
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +18 -34
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +3 -6
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +0 -4
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +14 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +159 -135
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +0 -7
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/json-event.d.ts.map +1 -1
- package/dist/modes/json-event.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +10 -11
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/deprecation.d.ts.map +1 -1
- package/dist/utils/deprecation.js.map +1 -1
- package/dist/utils/directory-completions.d.ts.map +1 -1
- package/dist/utils/directory-completions.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/grip-user-agent.d.ts.map +1 -1
- package/dist/utils/grip-user-agent.js.map +1 -1
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-process.d.ts.map +1 -1
- package/dist/utils/image-process.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.d.ts.map +1 -1
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js +10 -5
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +1 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/docs/sandbox.md +6 -0
- package/docs/sessions.md +1 -1
- package/docs/usage.md +2 -1
- package/examples/extensions/custom-provider-anthropic/package.json +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +601 -833
- package/package.json +20 -21
|
@@ -72,8 +72,6 @@ function isExpandable(obj) {
|
|
|
72
72
|
return typeof obj === "object" && obj !== null && "setExpanded" in obj && typeof obj.setExpanded === "function";
|
|
73
73
|
}
|
|
74
74
|
class ExpandableText extends Text {
|
|
75
|
-
getCollapsedText;
|
|
76
|
-
getExpandedText;
|
|
77
75
|
constructor(getCollapsedText, getExpandedText, expanded = false, paddingX = 0, paddingY = 0) {
|
|
78
76
|
super(expanded ? getExpandedText() : getCollapsedText(), paddingX, paddingY);
|
|
79
77
|
this.getCollapsedText = getCollapsedText;
|
|
@@ -196,123 +194,6 @@ export function createInteractiveTuiReference(getTui) {
|
|
|
196
194
|
});
|
|
197
195
|
}
|
|
198
196
|
export class InteractiveMode {
|
|
199
|
-
runtimeHost;
|
|
200
|
-
options;
|
|
201
|
-
onRightClickPaste = () => {
|
|
202
|
-
void this.handleRightClickPaste();
|
|
203
|
-
};
|
|
204
|
-
renderer;
|
|
205
|
-
ui;
|
|
206
|
-
mainScreenRenderState;
|
|
207
|
-
loadedResourcesContainer;
|
|
208
|
-
chatContainer;
|
|
209
|
-
documentContainer;
|
|
210
|
-
transcriptScrollView;
|
|
211
|
-
fullscreenLayoutRoot;
|
|
212
|
-
pendingMessagesContainer;
|
|
213
|
-
statusContainer;
|
|
214
|
-
defaultEditor;
|
|
215
|
-
editor;
|
|
216
|
-
editorComponentFactory;
|
|
217
|
-
autocompleteProvider;
|
|
218
|
-
autocompleteProviderWrappers = [];
|
|
219
|
-
fdPath;
|
|
220
|
-
editorContainer;
|
|
221
|
-
footer;
|
|
222
|
-
footerContainer;
|
|
223
|
-
footerDataProvider;
|
|
224
|
-
// Stored so the same manager can be injected into custom editors, selectors, and extension UI.
|
|
225
|
-
keybindings;
|
|
226
|
-
version;
|
|
227
|
-
isInitialized = false;
|
|
228
|
-
transcriptRendered = false;
|
|
229
|
-
onInputCallback;
|
|
230
|
-
pendingUserInputs = [];
|
|
231
|
-
loadingAnimation = undefined;
|
|
232
|
-
workingMessage = undefined;
|
|
233
|
-
compressionDetectionActive = false;
|
|
234
|
-
compressionDetectionOwnsLoader = false;
|
|
235
|
-
workingVisible = true;
|
|
236
|
-
workingIndicatorOptions = undefined;
|
|
237
|
-
defaultWorkingMessage = "Working...";
|
|
238
|
-
defaultHiddenThinkingLabel = "Thinking...";
|
|
239
|
-
hiddenThinkingLabel = this.defaultHiddenThinkingLabel;
|
|
240
|
-
lastSigintTime = 0;
|
|
241
|
-
lastEscapeTime = 0;
|
|
242
|
-
changelogMarkdown = undefined;
|
|
243
|
-
startupNoticesShown = false;
|
|
244
|
-
anthropicSubscriptionWarningShown = false;
|
|
245
|
-
// Status line tracking (for mutating immediately-sequential status updates)
|
|
246
|
-
lastStatusSpacer = undefined;
|
|
247
|
-
lastStatusText = undefined;
|
|
248
|
-
// Streaming message tracking
|
|
249
|
-
streamingComponent = undefined;
|
|
250
|
-
streamingMessage = undefined;
|
|
251
|
-
// Tool execution tracking: toolCallId -> component
|
|
252
|
-
pendingTools = new Map();
|
|
253
|
-
// Tool output expansion state
|
|
254
|
-
toolOutputExpanded = false;
|
|
255
|
-
activeSandboxContainerId;
|
|
256
|
-
activeSandboxBackendConnected = false;
|
|
257
|
-
sessionSandboxStates = new Map();
|
|
258
|
-
managedLimaInstances = new Map();
|
|
259
|
-
// Thinking block visibility state
|
|
260
|
-
hideThinkingBlock = false;
|
|
261
|
-
outputPad = 1;
|
|
262
|
-
mermaidMarkdownTransformer;
|
|
263
|
-
// Skill commands: command name -> skill file path
|
|
264
|
-
skillCommands = new Map();
|
|
265
|
-
// Agent subscription unsubscribe function
|
|
266
|
-
unsubscribe;
|
|
267
|
-
hookExecutionUnsubscribe;
|
|
268
|
-
hookExecutionActivityUnsubscribe;
|
|
269
|
-
hookExecutionActivityDepth = 0;
|
|
270
|
-
hookExecutionActivityOwnsLoader = false;
|
|
271
|
-
hookExecutionSession;
|
|
272
|
-
hookExecutionNotices = [];
|
|
273
|
-
hookExecutionComponents = [];
|
|
274
|
-
pendingStopHookNotifications = [];
|
|
275
|
-
activeToolHookExecutionGroups = new Map();
|
|
276
|
-
hookExecutionTurnActive = false;
|
|
277
|
-
signalCleanupHandlers = [];
|
|
278
|
-
// Track if editor is in bash mode (text starts with !)
|
|
279
|
-
isBashMode = false;
|
|
280
|
-
// Track current bash execution component
|
|
281
|
-
bashComponent = undefined;
|
|
282
|
-
// Track pending bash components (shown in pending area, moved to chat on submit)
|
|
283
|
-
pendingBashComponents = [];
|
|
284
|
-
// Auto-compaction state
|
|
285
|
-
autoCompactionLoader = undefined;
|
|
286
|
-
autoCompactionEscapeHandler;
|
|
287
|
-
branchSummaryLoader;
|
|
288
|
-
summarizationRetryLoader;
|
|
289
|
-
summarizationRetryCountdown;
|
|
290
|
-
// Auto-retry state
|
|
291
|
-
retryLoader = undefined;
|
|
292
|
-
retryCountdown = undefined;
|
|
293
|
-
retryEscapeHandler;
|
|
294
|
-
// Messages queued while compaction is running
|
|
295
|
-
compactionQueuedMessages = [];
|
|
296
|
-
// Shutdown state
|
|
297
|
-
shutdownRequested = false;
|
|
298
|
-
// Extension UI state
|
|
299
|
-
extensionSelector = undefined;
|
|
300
|
-
extensionInput = undefined;
|
|
301
|
-
extensionEditor = undefined;
|
|
302
|
-
extensionTerminalInputSubscriptions = new Set();
|
|
303
|
-
// Extension widgets (components rendered above/below the editor)
|
|
304
|
-
extensionWidgetsAbove = new Map();
|
|
305
|
-
extensionWidgetsBelow = new Map();
|
|
306
|
-
widgetContainerAbove;
|
|
307
|
-
widgetContainerBelow;
|
|
308
|
-
// Custom footer from extension (undefined = use built-in footer)
|
|
309
|
-
customFooter = undefined;
|
|
310
|
-
// Header container that holds the built-in or custom header
|
|
311
|
-
headerContainer;
|
|
312
|
-
// Built-in header (logo + keybinding hints + changelog)
|
|
313
|
-
builtInHeader = undefined;
|
|
314
|
-
// Custom header from extension (undefined = use built-in header)
|
|
315
|
-
customHeader = undefined;
|
|
316
197
|
// Convenience accessors
|
|
317
198
|
get session() {
|
|
318
199
|
return this.runtimeHost.session;
|
|
@@ -327,6 +208,88 @@ export class InteractiveMode {
|
|
|
327
208
|
return this.session.settingsManager;
|
|
328
209
|
}
|
|
329
210
|
constructor(runtimeHost, options = {}) {
|
|
211
|
+
this.onRightClickPaste = () => {
|
|
212
|
+
void this.handleRightClickPaste();
|
|
213
|
+
};
|
|
214
|
+
this.autocompleteProviderWrappers = [];
|
|
215
|
+
this.isInitialized = false;
|
|
216
|
+
this.transcriptRendered = false;
|
|
217
|
+
this.pendingUserInputs = [];
|
|
218
|
+
this.loadingAnimation = undefined;
|
|
219
|
+
this.workingMessage = undefined;
|
|
220
|
+
this.compressionDetectionActive = false;
|
|
221
|
+
this.compressionDetectionOwnsLoader = false;
|
|
222
|
+
this.workingVisible = true;
|
|
223
|
+
this.workingIndicatorOptions = undefined;
|
|
224
|
+
this.defaultWorkingMessage = "Working...";
|
|
225
|
+
this.defaultHiddenThinkingLabel = "Thinking...";
|
|
226
|
+
this.hiddenThinkingLabel = this.defaultHiddenThinkingLabel;
|
|
227
|
+
this.lastSigintTime = 0;
|
|
228
|
+
this.lastEscapeTime = 0;
|
|
229
|
+
this.changelogMarkdown = undefined;
|
|
230
|
+
this.startupNoticesShown = false;
|
|
231
|
+
this.anthropicSubscriptionWarningShown = false;
|
|
232
|
+
// Status line tracking (for mutating immediately-sequential status updates)
|
|
233
|
+
this.lastStatusSpacer = undefined;
|
|
234
|
+
this.lastStatusText = undefined;
|
|
235
|
+
// Streaming message tracking
|
|
236
|
+
this.streamingComponent = undefined;
|
|
237
|
+
this.streamingMessage = undefined;
|
|
238
|
+
// Tool execution tracking: toolCallId -> component
|
|
239
|
+
this.pendingTools = new Map();
|
|
240
|
+
// Tool output expansion state
|
|
241
|
+
this.toolOutputExpanded = false;
|
|
242
|
+
this.activeSandboxBackendConnected = false;
|
|
243
|
+
this.sessionSandboxStates = new Map();
|
|
244
|
+
this.managedLimaInstances = new Map();
|
|
245
|
+
// Thinking block visibility state
|
|
246
|
+
this.hideThinkingBlock = false;
|
|
247
|
+
this.outputPad = 1;
|
|
248
|
+
// Skill commands: command name -> skill file path
|
|
249
|
+
this.skillCommands = new Map();
|
|
250
|
+
this.hookExecutionActivityDepth = 0;
|
|
251
|
+
this.hookExecutionActivityOwnsLoader = false;
|
|
252
|
+
this.hookExecutionNotices = [];
|
|
253
|
+
this.hookExecutionComponents = [];
|
|
254
|
+
this.pendingStopHookNotifications = [];
|
|
255
|
+
this.activeToolHookExecutionGroups = new Map();
|
|
256
|
+
this.hookExecutionTurnActive = false;
|
|
257
|
+
this.signalCleanupHandlers = [];
|
|
258
|
+
// Track if editor is in bash mode (text starts with !)
|
|
259
|
+
this.isBashMode = false;
|
|
260
|
+
// Track current bash execution component
|
|
261
|
+
this.bashComponent = undefined;
|
|
262
|
+
// Track pending bash components (shown in pending area, moved to chat on submit)
|
|
263
|
+
this.pendingBashComponents = [];
|
|
264
|
+
// Auto-compaction state
|
|
265
|
+
this.autoCompactionLoader = undefined;
|
|
266
|
+
// Auto-retry state
|
|
267
|
+
this.retryLoader = undefined;
|
|
268
|
+
this.retryCountdown = undefined;
|
|
269
|
+
// Messages queued while compaction is running
|
|
270
|
+
this.compactionQueuedMessages = [];
|
|
271
|
+
// Shutdown state
|
|
272
|
+
this.shutdownRequested = false;
|
|
273
|
+
// Extension UI state
|
|
274
|
+
this.extensionSelector = undefined;
|
|
275
|
+
this.extensionInput = undefined;
|
|
276
|
+
this.extensionEditor = undefined;
|
|
277
|
+
this.extensionTerminalInputSubscriptions = new Set();
|
|
278
|
+
// Extension widgets (components rendered above/below the editor)
|
|
279
|
+
this.extensionWidgetsAbove = new Map();
|
|
280
|
+
this.extensionWidgetsBelow = new Map();
|
|
281
|
+
// Custom footer from extension (undefined = use built-in footer)
|
|
282
|
+
this.customFooter = undefined;
|
|
283
|
+
// Built-in header (logo + keybinding hints + changelog)
|
|
284
|
+
this.builtInHeader = undefined;
|
|
285
|
+
// Custom header from extension (undefined = use built-in header)
|
|
286
|
+
this.customHeader = undefined;
|
|
287
|
+
/**
|
|
288
|
+
* Gracefully shutdown the agent.
|
|
289
|
+
* Stops the TUI before emitting shutdown events so extension UI cleanup cannot
|
|
290
|
+
* repaint the final frame while the process is exiting.
|
|
291
|
+
*/
|
|
292
|
+
this.isShuttingDown = false;
|
|
330
293
|
this.runtimeHost = runtimeHost;
|
|
331
294
|
const tuiMode = options.tuiMode ?? this.settingsManager.getTuiMode();
|
|
332
295
|
this.options = { ...options, tuiMode };
|
|
@@ -427,8 +390,22 @@ export class InteractiveMode {
|
|
|
427
390
|
path: command.sourceInfo.path,
|
|
428
391
|
}));
|
|
429
392
|
}
|
|
393
|
+
configureNewCommandAutocomplete(commandsByName) {
|
|
394
|
+
const command = commandsByName.get("new");
|
|
395
|
+
if (!command)
|
|
396
|
+
return;
|
|
397
|
+
command.argumentHint = "[--sandbox]";
|
|
398
|
+
command.getArgumentCompletions = (prefix) => {
|
|
399
|
+
if (prefix.includes(" "))
|
|
400
|
+
return null;
|
|
401
|
+
return fuzzyFilter(["--sandbox"], prefix, (option) => option).map((option) => ({
|
|
402
|
+
value: option,
|
|
403
|
+
label: option,
|
|
404
|
+
}));
|
|
405
|
+
};
|
|
406
|
+
}
|
|
430
407
|
createBaseAutocompleteProvider() {
|
|
431
|
-
// Commands without arguments remain selectable after a trailing space (e.g. /
|
|
408
|
+
// Commands without arguments remain selectable after a trailing space (e.g. /quit ).
|
|
432
409
|
const noArgumentCommands = new Set([
|
|
433
410
|
"settings",
|
|
434
411
|
"scoped-models",
|
|
@@ -442,7 +419,6 @@ export class InteractiveMode {
|
|
|
442
419
|
"tree",
|
|
443
420
|
"login",
|
|
444
421
|
"logout",
|
|
445
|
-
"new",
|
|
446
422
|
"reload",
|
|
447
423
|
"resume",
|
|
448
424
|
"quit",
|
|
@@ -481,6 +457,7 @@ export class InteractiveMode {
|
|
|
481
457
|
command.getArgumentCompletions = choiceCompletions(choices);
|
|
482
458
|
}
|
|
483
459
|
}
|
|
460
|
+
this.configureNewCommandAutocomplete(commandsByName);
|
|
484
461
|
const sandboxCommand = slashCommands.find((command) => command.name === "sandbox");
|
|
485
462
|
if (sandboxCommand) {
|
|
486
463
|
sandboxCommand.argumentHint = "<status|clear|--attach|start|list|stop>";
|
|
@@ -491,10 +468,10 @@ export class InteractiveMode {
|
|
|
491
468
|
label: item,
|
|
492
469
|
}));
|
|
493
470
|
}
|
|
494
|
-
const startMatch = prefix.match(/^start\s+(--[^\s]*)
|
|
471
|
+
const startMatch = prefix.match(/^start\s+(--[^\s]*)?$/);
|
|
495
472
|
if (!startMatch)
|
|
496
473
|
return null;
|
|
497
|
-
return fuzzyFilter(["--name", "--template", "--update"], startMatch[1], (item) => item).map((item) => ({
|
|
474
|
+
return fuzzyFilter(["--name", "--template", "--update"], startMatch[1] ?? "", (item) => item).map((item) => ({
|
|
498
475
|
value: `start ${item}${item === "--update" ? "" : " "}`,
|
|
499
476
|
label: item,
|
|
500
477
|
}));
|
|
@@ -1901,7 +1878,7 @@ export class InteractiveMode {
|
|
|
1901
1878
|
this.setHiddenThinkingLabel();
|
|
1902
1879
|
}
|
|
1903
1880
|
// Maximum total widget lines to prevent viewport overflow
|
|
1904
|
-
static MAX_WIDGET_LINES = 10;
|
|
1881
|
+
static { this.MAX_WIDGET_LINES = 10; }
|
|
1905
1882
|
/**
|
|
1906
1883
|
* Render all extension widgets to the widget container.
|
|
1907
1884
|
*/
|
|
@@ -2561,6 +2538,19 @@ export class InteractiveMode {
|
|
|
2561
2538
|
},
|
|
2562
2539
|
};
|
|
2563
2540
|
}
|
|
2541
|
+
if (this.matchesEditorCommand(text, "/new")) {
|
|
2542
|
+
return {
|
|
2543
|
+
run: async () => {
|
|
2544
|
+
this.editor.setText("");
|
|
2545
|
+
const option = text.slice("/new".length).trim();
|
|
2546
|
+
if (option && option !== "--sandbox") {
|
|
2547
|
+
this.showWarning("Usage: /new [--sandbox]");
|
|
2548
|
+
return;
|
|
2549
|
+
}
|
|
2550
|
+
await this.handleClearCommand(option === "--sandbox");
|
|
2551
|
+
},
|
|
2552
|
+
};
|
|
2553
|
+
}
|
|
2564
2554
|
if (this.matchesEditorCommand(text, "/compact")) {
|
|
2565
2555
|
const customInstructions = text.slice("/compact".length).trim() || undefined;
|
|
2566
2556
|
return {
|
|
@@ -3465,12 +3455,6 @@ export class InteractiveMode {
|
|
|
3465
3455
|
// Only called when editor is empty (enforced by CustomEditor)
|
|
3466
3456
|
void this.shutdown();
|
|
3467
3457
|
}
|
|
3468
|
-
/**
|
|
3469
|
-
* Gracefully shutdown the agent.
|
|
3470
|
-
* Stops the TUI before emitting shutdown events so extension UI cleanup cannot
|
|
3471
|
-
* repaint the final frame while the process is exiting.
|
|
3472
|
-
*/
|
|
3473
|
-
isShuttingDown = false;
|
|
3474
3458
|
async shutdown(options) {
|
|
3475
3459
|
if (this.isShuttingDown)
|
|
3476
3460
|
return;
|
|
@@ -4951,13 +4935,40 @@ export class InteractiveMode {
|
|
|
4951
4935
|
}
|
|
4952
4936
|
// =========================================================================
|
|
4953
4937
|
// Command handlers
|
|
4938
|
+
async handleSandboxCdCommand(text) {
|
|
4939
|
+
const backend = this.session.getToolBackendInfo();
|
|
4940
|
+
if (backend.type !== "remote" || !backend.configured) {
|
|
4941
|
+
this.showWarning("Changing directories is not supported with the active workspace backend.");
|
|
4942
|
+
return;
|
|
4943
|
+
}
|
|
4944
|
+
const argument = this.getPathCommandArgument(text, "/cd");
|
|
4945
|
+
if (text !== "/cd" && !argument) {
|
|
4946
|
+
this.showError("Usage: /cd [directory]");
|
|
4947
|
+
return;
|
|
4948
|
+
}
|
|
4949
|
+
try {
|
|
4950
|
+
const directory = await this.session.changeSandboxWorkingDirectory(argument ?? backend.workspace.root);
|
|
4951
|
+
this.showStatus(`Working directory: ${directory}`);
|
|
4952
|
+
}
|
|
4953
|
+
catch (error) {
|
|
4954
|
+
this.showError(`Failed to change sandbox directory: ${error instanceof Error ? error.message : String(error)}`);
|
|
4955
|
+
}
|
|
4956
|
+
}
|
|
4957
|
+
async handleUnavailableCdCommand(text) {
|
|
4958
|
+
if (this.activeSandboxBackendConnected) {
|
|
4959
|
+
await this.handleSandboxCdCommand(text);
|
|
4960
|
+
}
|
|
4961
|
+
else {
|
|
4962
|
+
this.showWarning("Changing directories is not supported with the active workspace backend.");
|
|
4963
|
+
}
|
|
4964
|
+
}
|
|
4954
4965
|
async handleCdCommand(text) {
|
|
4955
4966
|
if (!this.session.isIdle || this.session.isBashRunning) {
|
|
4956
4967
|
this.showWarning("Wait for the current operation to finish before changing directories.");
|
|
4957
4968
|
return;
|
|
4958
4969
|
}
|
|
4959
4970
|
if (!this.session.supportsDirectoryChange()) {
|
|
4960
|
-
this.
|
|
4971
|
+
await this.handleUnavailableCdCommand(text);
|
|
4961
4972
|
return;
|
|
4962
4973
|
}
|
|
4963
4974
|
const argument = this.getPathCommandArgument(text, "/cd");
|
|
@@ -5820,23 +5831,36 @@ export class InteractiveMode {
|
|
|
5820
5831
|
this.chatContainer.addChild(new DynamicBorder());
|
|
5821
5832
|
this.ui.requestRender();
|
|
5822
5833
|
}
|
|
5823
|
-
async handleClearCommand() {
|
|
5834
|
+
async handleClearCommand(reuseSandbox = false) {
|
|
5824
5835
|
if (this.loadingAnimation) {
|
|
5825
5836
|
this.loadingAnimation.stop();
|
|
5826
5837
|
this.loadingAnimation = undefined;
|
|
5827
5838
|
}
|
|
5828
5839
|
this.statusContainer.clear();
|
|
5840
|
+
const sandboxState = reuseSandbox && this.activeSandboxBackendConnected
|
|
5841
|
+
? this.sessionSandboxStates.get(getSessionSandboxKey(this.activeSession))
|
|
5842
|
+
: undefined;
|
|
5843
|
+
let newSessionKey;
|
|
5829
5844
|
try {
|
|
5830
|
-
const result = await this.runtimeHost.newSession(
|
|
5831
|
-
|
|
5845
|
+
const result = await this.runtimeHost.newSession(sandboxState
|
|
5846
|
+
? {
|
|
5847
|
+
setup: async (nextSession) => {
|
|
5848
|
+
newSessionKey = getSessionSandboxKey(nextSession);
|
|
5849
|
+
this.sessionSandboxStates.set(newSessionKey, sandboxState);
|
|
5850
|
+
},
|
|
5851
|
+
}
|
|
5852
|
+
: undefined);
|
|
5853
|
+
if (result.cancelled)
|
|
5832
5854
|
return;
|
|
5833
|
-
}
|
|
5834
5855
|
this.renderCurrentSessionState();
|
|
5835
5856
|
this.chatContainer.addChild(new Spacer(1));
|
|
5836
5857
|
this.chatContainer.addChild(new Text(`${theme.fg("accent", "✓ New session started")}`, 1, 1));
|
|
5837
5858
|
this.ui.requestRender();
|
|
5838
5859
|
}
|
|
5839
5860
|
catch (error) {
|
|
5861
|
+
if (newSessionKey && newSessionKey !== getSessionSandboxKey(this.activeSession)) {
|
|
5862
|
+
this.sessionSandboxStates.delete(newSessionKey);
|
|
5863
|
+
}
|
|
5840
5864
|
await this.handleFatalRuntimeError("Failed to create session", error);
|
|
5841
5865
|
}
|
|
5842
5866
|
}
|