@oh-my-pi/pi-coding-agent 16.3.5 → 16.3.7
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 +78 -0
- package/dist/cli.js +3625 -3596
- package/dist/types/advisor/index.d.ts +6 -6
- package/dist/types/advisor/runtime.d.ts +1 -1
- package/dist/types/advisor/watchdog.d.ts +1 -1
- package/dist/types/async/index.d.ts +1 -1
- package/dist/types/auto-thinking/classifier.d.ts +2 -2
- package/dist/types/autolearn/controller.d.ts +2 -2
- package/dist/types/autoresearch/dashboard.d.ts +2 -2
- package/dist/types/autoresearch/git.d.ts +1 -1
- package/dist/types/autoresearch/helpers.d.ts +1 -1
- package/dist/types/autoresearch/index.d.ts +1 -1
- package/dist/types/autoresearch/state.d.ts +3 -3
- package/dist/types/autoresearch/storage.d.ts +1 -1
- package/dist/types/autoresearch/tools/init-experiment.d.ts +2 -2
- package/dist/types/autoresearch/tools/log-experiment.d.ts +2 -2
- package/dist/types/autoresearch/tools/run-experiment.d.ts +2 -2
- package/dist/types/autoresearch/tools/update-notes.d.ts +2 -2
- package/dist/types/autoresearch/types.d.ts +3 -3
- package/dist/types/capability/context-file.d.ts +2 -2
- package/dist/types/capability/extension-module.d.ts +2 -2
- package/dist/types/capability/extension.d.ts +3 -3
- package/dist/types/capability/hook.d.ts +2 -2
- package/dist/types/capability/index.d.ts +3 -3
- package/dist/types/capability/instruction.d.ts +2 -2
- package/dist/types/capability/mcp.d.ts +2 -2
- package/dist/types/capability/prompt.d.ts +2 -2
- package/dist/types/capability/rule-buckets.d.ts +2 -2
- package/dist/types/capability/rule.d.ts +2 -2
- package/dist/types/capability/settings.d.ts +2 -2
- package/dist/types/capability/skill.d.ts +2 -2
- package/dist/types/capability/slash-command.d.ts +2 -2
- package/dist/types/capability/ssh.d.ts +2 -2
- package/dist/types/capability/system-prompt.d.ts +2 -2
- package/dist/types/capability/tool.d.ts +2 -2
- package/dist/types/cli/args.d.ts +1 -1
- package/dist/types/cli/bench-cli.d.ts +2 -2
- package/dist/types/cli/dry-balance-cli.d.ts +1 -1
- package/dist/types/cli/extension-flags.d.ts +1 -1
- package/dist/types/cli/flag-tables.d.ts +2 -2
- package/dist/types/cli/gallery-cli.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/agentic.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/codeintel.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/edit.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/fs.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/index.d.ts +2 -2
- package/dist/types/cli/gallery-fixtures/interaction.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/memory.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/misc.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/search.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/shell.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/types.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/web.d.ts +1 -1
- package/dist/types/cli/gallery-screenshot.d.ts +1 -1
- package/dist/types/cli/initial-message.d.ts +1 -1
- package/dist/types/cli/models-cli.d.ts +1 -1
- package/dist/types/cli/plugin-cli.d.ts +1 -1
- package/dist/types/cli/session-picker.d.ts +1 -1
- package/dist/types/cli/startup-cwd.d.ts +1 -1
- package/dist/types/cli/tiny-models-cli.d.ts +1 -1
- package/dist/types/cli/web-search-cli.d.ts +1 -1
- package/dist/types/collab/crypto.d.ts +1 -1
- package/dist/types/collab/display-name.d.ts +1 -1
- package/dist/types/collab/guest.d.ts +4 -4
- package/dist/types/collab/host.d.ts +2 -2
- package/dist/types/collab/protocol.d.ts +3 -3
- package/dist/types/collab/relay-client.d.ts +1 -1
- package/dist/types/commands/auth-broker.d.ts +1 -1
- package/dist/types/commands/auth-gateway.d.ts +1 -1
- package/dist/types/commands/config.d.ts +1 -1
- package/dist/types/commands/plugin.d.ts +1 -1
- package/dist/types/commands/setup.d.ts +2 -2
- package/dist/types/commands/ssh.d.ts +1 -1
- package/dist/types/commands/tiny-models.d.ts +1 -1
- package/dist/types/commands/ttsr.d.ts +2 -2
- package/dist/types/commit/agentic/agent.d.ts +4 -4
- package/dist/types/commit/agentic/fallback.d.ts +2 -2
- package/dist/types/commit/agentic/index.d.ts +1 -1
- package/dist/types/commit/agentic/state.d.ts +1 -1
- package/dist/types/commit/agentic/tools/analyze-file.d.ts +5 -5
- package/dist/types/commit/agentic/tools/git-file-diff.d.ts +2 -2
- package/dist/types/commit/agentic/tools/git-hunk.d.ts +1 -1
- package/dist/types/commit/agentic/tools/git-overview.d.ts +2 -2
- package/dist/types/commit/agentic/tools/index.d.ts +5 -5
- package/dist/types/commit/agentic/tools/propose-changelog.d.ts +2 -2
- package/dist/types/commit/agentic/tools/propose-commit.d.ts +2 -2
- package/dist/types/commit/agentic/tools/recent-commits.d.ts +1 -1
- package/dist/types/commit/agentic/tools/split-commit.d.ts +2 -2
- package/dist/types/commit/agentic/topo-sort.d.ts +1 -1
- package/dist/types/commit/agentic/trivial.d.ts +1 -1
- package/dist/types/commit/agentic/validation.d.ts +1 -1
- package/dist/types/commit/analysis/conventional.d.ts +1 -1
- package/dist/types/commit/analysis/index.d.ts +4 -4
- package/dist/types/commit/analysis/scope.d.ts +1 -1
- package/dist/types/commit/analysis/summary.d.ts +1 -1
- package/dist/types/commit/analysis/validation.d.ts +1 -1
- package/dist/types/commit/changelog/detect.d.ts +1 -1
- package/dist/types/commit/changelog/generate.d.ts +1 -1
- package/dist/types/commit/changelog/parse.d.ts +1 -1
- package/dist/types/commit/cli.d.ts +1 -1
- package/dist/types/commit/git/diff.d.ts +1 -1
- package/dist/types/commit/index.d.ts +1 -1
- package/dist/types/commit/map-reduce/index.d.ts +1 -1
- package/dist/types/commit/map-reduce/map-phase.d.ts +1 -1
- package/dist/types/commit/map-reduce/reduce-phase.d.ts +1 -1
- package/dist/types/commit/message.d.ts +1 -1
- package/dist/types/commit/model-selection.d.ts +3 -3
- package/dist/types/commit/pipeline.d.ts +1 -1
- package/dist/types/commit/shared-llm.d.ts +1 -1
- package/dist/types/commit/utils.d.ts +1 -1
- package/dist/types/config/model-discovery.d.ts +1 -1
- package/dist/types/config/model-registry.d.ts +3 -3
- package/dist/types/config/model-resolver.d.ts +4 -4
- package/dist/types/config/model-roles.d.ts +2 -2
- package/dist/types/config/models-config.d.ts +2 -2
- package/dist/types/config/service-tier.d.ts +1 -1
- package/dist/types/config/settings-schema.d.ts +7 -13
- package/dist/types/config/settings.d.ts +7 -7
- package/dist/types/config.d.ts +1 -1
- package/dist/types/dap/client.d.ts +1 -1
- package/dist/types/dap/config.d.ts +1 -1
- package/dist/types/dap/index.d.ts +4 -4
- package/dist/types/dap/session.d.ts +3 -3
- package/dist/types/debug/index.d.ts +1 -1
- package/dist/types/debug/log-viewer.d.ts +1 -1
- package/dist/types/debug/raw-sse.d.ts +1 -1
- package/dist/types/debug/report-bundle.d.ts +1 -1
- package/dist/types/discovery/agents.d.ts +1 -1
- package/dist/types/discovery/helpers.d.ts +4 -4
- package/dist/types/discovery/index.d.ts +47 -47
- package/dist/types/discovery/omp-extension-roots.d.ts +1 -1
- package/dist/types/edit/apply-patch/index.d.ts +2 -2
- package/dist/types/edit/apply-patch/parser.d.ts +1 -1
- package/dist/types/edit/diff.d.ts +1 -1
- package/dist/types/edit/file-snapshot-store.d.ts +4 -2
- package/dist/types/edit/hashline/execute.d.ts +4 -4
- package/dist/types/edit/hashline/filesystem.d.ts +3 -3
- package/dist/types/edit/hashline/index.d.ts +5 -5
- package/dist/types/edit/index.d.ts +19 -19
- package/dist/types/edit/modes/apply-patch.d.ts +1 -1
- package/dist/types/edit/modes/patch.d.ts +3 -3
- package/dist/types/edit/modes/replace.d.ts +3 -3
- package/dist/types/edit/renderer.d.ts +15 -16
- package/dist/types/edit/snapshot-details.d.ts +1 -1
- package/dist/types/edit/streaming.d.ts +2 -2
- package/dist/types/eval/agent-bridge.d.ts +4 -4
- package/dist/types/eval/backend-helpers.d.ts +3 -3
- package/dist/types/eval/backend.d.ts +2 -2
- package/dist/types/eval/bridge-timeout.d.ts +1 -1
- package/dist/types/eval/budget-bridge.d.ts +2 -2
- package/dist/types/eval/completion-bridge.d.ts +2 -2
- package/dist/types/eval/concurrency-bridge.d.ts +2 -2
- package/dist/types/eval/executor-base.d.ts +3 -3
- package/dist/types/eval/index.d.ts +6 -6
- package/dist/types/eval/jl/executor.d.ts +4 -4
- package/dist/types/eval/jl/index.d.ts +2 -2
- package/dist/types/eval/jl/kernel.d.ts +5 -5
- package/dist/types/eval/js/context-manager.d.ts +4 -4
- package/dist/types/eval/js/executor.d.ts +3 -3
- package/dist/types/eval/js/index.d.ts +2 -2
- package/dist/types/eval/js/shared/helpers.d.ts +1 -1
- package/dist/types/eval/js/shared/runtime.d.ts +2 -2
- package/dist/types/eval/js/tool-bridge.d.ts +5 -5
- package/dist/types/eval/js/worker-core.d.ts +1 -1
- package/dist/types/eval/js/worker-protocol.d.ts +2 -2
- package/dist/types/eval/kernel-base.d.ts +1 -1
- package/dist/types/eval/py/executor.d.ts +3 -3
- package/dist/types/eval/py/index.d.ts +2 -2
- package/dist/types/eval/py/kernel.d.ts +5 -5
- package/dist/types/eval/py/tool-bridge.d.ts +2 -2
- package/dist/types/eval/rb/executor.d.ts +3 -3
- package/dist/types/eval/rb/index.d.ts +2 -2
- package/dist/types/eval/rb/kernel.d.ts +6 -6
- package/dist/types/eval/session-id.d.ts +1 -1
- package/dist/types/eval/types.d.ts +1 -1
- package/dist/types/exa/index.d.ts +2 -2
- package/dist/types/exa/mcp-client.d.ts +3 -3
- package/dist/types/exec/bash-executor.d.ts +1 -1
- package/dist/types/export/html/index.d.ts +2 -2
- package/dist/types/export/share.d.ts +3 -3
- package/dist/types/export/ttsr.d.ts +2 -2
- package/dist/types/extensibility/custom-commands/bundled/ci-green/index.d.ts +2 -2
- package/dist/types/extensibility/custom-commands/bundled/review/index.d.ts +2 -2
- package/dist/types/extensibility/custom-commands/index.d.ts +2 -2
- package/dist/types/extensibility/custom-commands/loader.d.ts +1 -1
- package/dist/types/extensibility/custom-commands/types.d.ts +3 -3
- package/dist/types/extensibility/custom-tools/index.d.ts +3 -3
- package/dist/types/extensibility/custom-tools/loader.d.ts +3 -3
- package/dist/types/extensibility/custom-tools/types.d.ts +13 -11
- package/dist/types/extensibility/custom-tools/wrapper.d.ts +2 -2
- package/dist/types/extensibility/extensions/compact-handler.d.ts +1 -1
- package/dist/types/extensibility/extensions/get-commands-handler.d.ts +5 -5
- package/dist/types/extensibility/extensions/index.d.ts +5 -5
- package/dist/types/extensibility/extensions/loader.d.ts +2 -2
- package/dist/types/extensibility/extensions/model-api.d.ts +3 -3
- package/dist/types/extensibility/extensions/runner.d.ts +6 -6
- package/dist/types/extensibility/extensions/types.d.ts +43 -31
- package/dist/types/extensibility/extensions/wrapper.d.ts +2 -2
- package/dist/types/extensibility/hooks/index.d.ts +6 -6
- package/dist/types/extensibility/hooks/loader.d.ts +4 -4
- package/dist/types/extensibility/hooks/runner.d.ts +5 -5
- package/dist/types/extensibility/hooks/tool-wrapper.d.ts +1 -1
- package/dist/types/extensibility/hooks/types.d.ts +18 -18
- package/dist/types/extensibility/legacy-pi-ai-shim.d.ts +12 -4
- package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +194 -5
- package/dist/types/extensibility/plugins/doctor.d.ts +1 -1
- package/dist/types/extensibility/plugins/index.d.ts +7 -7
- package/dist/types/extensibility/plugins/installer.d.ts +1 -1
- package/dist/types/extensibility/plugins/legacy-pi-compat.d.ts +1 -1
- package/dist/types/extensibility/plugins/loader.d.ts +1 -1
- package/dist/types/extensibility/plugins/manager.d.ts +1 -1
- package/dist/types/extensibility/plugins/marketplace/fetcher.d.ts +1 -1
- package/dist/types/extensibility/plugins/marketplace/index.d.ts +6 -6
- package/dist/types/extensibility/plugins/marketplace/manager.d.ts +1 -1
- package/dist/types/extensibility/plugins/marketplace/registry.d.ts +1 -1
- package/dist/types/extensibility/plugins/marketplace/source-resolver.d.ts +1 -1
- package/dist/types/extensibility/plugins/runtime-config.d.ts +1 -1
- package/dist/types/extensibility/session-handler-types.d.ts +1 -1
- package/dist/types/extensibility/shared-events.d.ts +12 -5
- package/dist/types/extensibility/skills.d.ts +3 -3
- package/dist/types/extensibility/slash-commands.d.ts +1 -1
- package/dist/types/extensibility/typebox.d.ts +1 -1
- package/dist/types/extensibility/utils.d.ts +1 -1
- package/dist/types/goals/guided-setup.d.ts +1 -1
- package/dist/types/goals/index.d.ts +3 -3
- package/dist/types/goals/runtime.d.ts +1 -1
- package/dist/types/goals/state.d.ts +1 -1
- package/dist/types/goals/tools/goal-tool.d.ts +4 -4
- package/dist/types/hindsight/backend.d.ts +2 -2
- package/dist/types/hindsight/bank.d.ts +2 -2
- package/dist/types/hindsight/client.d.ts +1 -1
- package/dist/types/hindsight/config.d.ts +1 -1
- package/dist/types/hindsight/index.d.ts +8 -8
- package/dist/types/hindsight/mental-models.d.ts +3 -3
- package/dist/types/hindsight/state.d.ts +5 -5
- package/dist/types/hindsight/transcript.d.ts +2 -2
- package/dist/types/index.d.ts +38 -38
- package/dist/types/internal-urls/agent-protocol.d.ts +1 -1
- package/dist/types/internal-urls/artifact-protocol.d.ts +1 -1
- package/dist/types/internal-urls/filesystem-resource.d.ts +1 -1
- package/dist/types/internal-urls/history-protocol.d.ts +1 -1
- package/dist/types/internal-urls/index.d.ts +16 -16
- package/dist/types/internal-urls/issue-pr-protocol.d.ts +1 -1
- package/dist/types/internal-urls/local-protocol.d.ts +1 -1
- package/dist/types/internal-urls/mcp-protocol.d.ts +1 -1
- package/dist/types/internal-urls/memory-protocol.d.ts +1 -1
- package/dist/types/internal-urls/omp-protocol.d.ts +1 -1
- package/dist/types/internal-urls/parse.d.ts +1 -1
- package/dist/types/internal-urls/router.d.ts +1 -1
- package/dist/types/internal-urls/rule-protocol.d.ts +1 -1
- package/dist/types/internal-urls/skill-protocol.d.ts +1 -1
- package/dist/types/internal-urls/ssh-protocol.d.ts +1 -1
- package/dist/types/internal-urls/types.d.ts +2 -2
- package/dist/types/internal-urls/vault-protocol.d.ts +1 -1
- package/dist/types/irc/bus.d.ts +2 -2
- package/dist/types/lib/xai-http.d.ts +1 -1
- package/dist/types/lsp/client.d.ts +23 -1
- package/dist/types/lsp/clients/biome-client.d.ts +1 -1
- package/dist/types/lsp/clients/index.d.ts +4 -4
- package/dist/types/lsp/clients/lsp-linter-client.d.ts +1 -1
- package/dist/types/lsp/clients/swiftlint-client.d.ts +1 -1
- package/dist/types/lsp/config.d.ts +1 -1
- package/dist/types/lsp/diagnostics-ledger.d.ts +1 -1
- package/dist/types/lsp/edits.d.ts +1 -1
- package/dist/types/lsp/index.d.ts +6 -6
- package/dist/types/lsp/render.d.ts +2 -2
- package/dist/types/lsp/startup-events.d.ts +1 -1
- package/dist/types/lsp/utils.d.ts +2 -2
- package/dist/types/main.d.ts +12 -12
- package/dist/types/markit/converters/docx.d.ts +1 -1
- package/dist/types/markit/converters/epub.d.ts +1 -1
- package/dist/types/markit/converters/pdf/columns.d.ts +1 -1
- package/dist/types/markit/converters/pdf/extract.d.ts +1 -1
- package/dist/types/markit/converters/pdf/grid.d.ts +1 -1
- package/dist/types/markit/converters/pdf/headers.d.ts +1 -1
- package/dist/types/markit/converters/pdf/index.d.ts +1 -1
- package/dist/types/markit/converters/pdf/render.d.ts +1 -1
- package/dist/types/markit/converters/pptx.d.ts +1 -1
- package/dist/types/markit/converters/xlsx.d.ts +1 -1
- package/dist/types/markit/index.d.ts +2 -2
- package/dist/types/markit/registry.d.ts +1 -1
- package/dist/types/mcp/client.d.ts +1 -1
- package/dist/types/mcp/config-writer.d.ts +1 -1
- package/dist/types/mcp/config.d.ts +2 -2
- package/dist/types/mcp/index.d.ts +12 -12
- package/dist/types/mcp/loader.d.ts +5 -5
- package/dist/types/mcp/manager.d.ts +7 -7
- package/dist/types/mcp/oauth-credentials.d.ts +3 -3
- package/dist/types/mcp/oauth-flow.d.ts +1 -1
- package/dist/types/mcp/render.d.ts +3 -3
- package/dist/types/mcp/smithery-registry.d.ts +1 -1
- package/dist/types/mcp/tool-bridge.d.ts +5 -5
- package/dist/types/mcp/tool-cache.d.ts +2 -2
- package/dist/types/mcp/transports/http.d.ts +1 -1
- package/dist/types/mcp/transports/index.d.ts +3 -3
- package/dist/types/mcp/transports/sse.d.ts +1 -1
- package/dist/types/mcp/transports/stdio.d.ts +1 -1
- package/dist/types/mcp/types.d.ts +1 -1
- package/dist/types/memories/index.d.ts +4 -4
- package/dist/types/memory-backend/index.d.ts +7 -7
- package/dist/types/memory-backend/local-backend.d.ts +1 -1
- package/dist/types/memory-backend/off-backend.d.ts +1 -1
- package/dist/types/memory-backend/resolve.d.ts +2 -2
- package/dist/types/memory-backend/runtime.d.ts +2 -2
- package/dist/types/memory-backend/types.d.ts +5 -5
- package/dist/types/mnemopi/backend.d.ts +2 -2
- package/dist/types/mnemopi/config.d.ts +1 -1
- package/dist/types/mnemopi/embed-client.d.ts +2 -2
- package/dist/types/mnemopi/embed-worker.d.ts +1 -1
- package/dist/types/mnemopi/index.d.ts +3 -3
- package/dist/types/mnemopi/state.d.ts +38 -2
- package/dist/types/modes/acp/acp-agent.d.ts +2 -2
- package/dist/types/modes/acp/acp-client-bridge.d.ts +1 -1
- package/dist/types/modes/acp/acp-event-mapper.d.ts +1 -1
- package/dist/types/modes/acp/acp-mode.d.ts +1 -1
- package/dist/types/modes/acp/index.d.ts +2 -2
- package/dist/types/modes/components/advisor-config.d.ts +3 -3
- package/dist/types/modes/components/advisor-message.d.ts +2 -2
- package/dist/types/modes/components/agent-dashboard.d.ts +2 -2
- package/dist/types/modes/components/agent-hub.d.ts +11 -9
- package/dist/types/modes/components/agent-transcript-viewer.d.ts +6 -6
- package/dist/types/modes/components/assistant-message.d.ts +17 -12
- package/dist/types/modes/components/background-tan-message.d.ts +2 -2
- package/dist/types/modes/components/bash-execution.d.ts +7 -1
- package/dist/types/modes/components/bordered-loader.d.ts +1 -1
- package/dist/types/modes/components/chat-transcript-builder.d.ts +3 -3
- package/dist/types/modes/components/collab-prompt-message.d.ts +2 -2
- package/dist/types/modes/components/compaction-summary-message.d.ts +1 -1
- package/dist/types/modes/components/copy-selector.d.ts +1 -1
- package/dist/types/modes/components/custom-editor.d.ts +1 -1
- package/dist/types/modes/components/custom-message.d.ts +2 -2
- package/dist/types/modes/components/eval-execution.d.ts +7 -1
- package/dist/types/modes/components/execution-shared.d.ts +1 -1
- package/dist/types/modes/components/extensions/extension-dashboard.d.ts +2 -2
- package/dist/types/modes/components/extensions/extension-list.d.ts +1 -1
- package/dist/types/modes/components/extensions/index.d.ts +5 -5
- package/dist/types/modes/components/extensions/inspector-panel.d.ts +1 -1
- package/dist/types/modes/components/extensions/state-manager.d.ts +1 -1
- package/dist/types/modes/components/extensions/types.d.ts +1 -1
- package/dist/types/modes/components/footer.d.ts +1 -1
- package/dist/types/modes/components/history-search.d.ts +1 -1
- package/dist/types/modes/components/hook-message.d.ts +2 -2
- package/dist/types/modes/components/index.d.ts +38 -38
- package/dist/types/modes/components/keybinding-hints.d.ts +1 -1
- package/dist/types/modes/components/logout-account-selector.d.ts +1 -1
- package/dist/types/modes/components/mcp-add-wizard.d.ts +1 -1
- package/dist/types/modes/components/message-frame.d.ts +1 -1
- package/dist/types/modes/components/model-selector.d.ts +3 -3
- package/dist/types/modes/components/oauth-selector.d.ts +1 -1
- package/dist/types/modes/components/plan-review-overlay.d.ts +1 -1
- package/dist/types/modes/components/plugin-settings.d.ts +3 -3
- package/dist/types/modes/components/read-tool-group.d.ts +1 -1
- package/dist/types/modes/components/reset-usage-selector.d.ts +1 -1
- package/dist/types/modes/components/segment-track.d.ts +1 -1
- package/dist/types/modes/components/session-selector.d.ts +1 -1
- package/dist/types/modes/components/settings-defs.d.ts +1 -1
- package/dist/types/modes/components/settings-selector.d.ts +2 -2
- package/dist/types/modes/components/skill-message.d.ts +1 -1
- package/dist/types/modes/components/status-line/component.d.ts +2 -2
- package/dist/types/modes/components/status-line/context-thresholds.d.ts +1 -1
- package/dist/types/modes/components/status-line/index.d.ts +5 -5
- package/dist/types/modes/components/status-line/presets.d.ts +1 -1
- package/dist/types/modes/components/status-line/segments.d.ts +2 -2
- package/dist/types/modes/components/status-line/separators.d.ts +2 -2
- package/dist/types/modes/components/status-line/types.d.ts +8 -4
- package/dist/types/modes/components/tiny-title-download-progress.d.ts +2 -2
- package/dist/types/modes/components/todo-reminder.d.ts +1 -1
- package/dist/types/modes/components/tool-execution.d.ts +4 -14
- package/dist/types/modes/components/transcript-container.d.ts +26 -28
- package/dist/types/modes/components/tree-selector.d.ts +2 -2
- package/dist/types/modes/components/ttsr-notification.d.ts +1 -1
- package/dist/types/modes/controllers/btw-controller.d.ts +1 -1
- package/dist/types/modes/controllers/command-controller-shared.d.ts +2 -2
- package/dist/types/modes/controllers/command-controller.d.ts +7 -7
- package/dist/types/modes/controllers/event-controller.d.ts +3 -3
- package/dist/types/modes/controllers/extension-ui-controller.d.ts +5 -5
- package/dist/types/modes/controllers/extension-ui-controller.test.d.ts +1 -0
- package/dist/types/modes/controllers/input-controller.d.ts +2 -2
- package/dist/types/modes/controllers/mcp-command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/omfg-controller.d.ts +1 -1
- package/dist/types/modes/controllers/omfg-rule.d.ts +1 -1
- package/dist/types/modes/controllers/selector-controller.d.ts +2 -2
- package/dist/types/modes/controllers/session-focus-controller.d.ts +4 -4
- package/dist/types/modes/controllers/ssh-command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/streaming-reveal.d.ts +11 -3
- package/dist/types/modes/controllers/tan-command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/todo-command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/tool-args-reveal.d.ts +6 -2
- package/dist/types/modes/image-references.d.ts +1 -1
- package/dist/types/modes/index.d.ts +3 -3
- package/dist/types/modes/interactive-mode.d.ts +34 -34
- package/dist/types/modes/orchestrate.d.ts +1 -1
- package/dist/types/modes/print-mode.d.ts +1 -1
- package/dist/types/modes/prompt-action-autocomplete.d.ts +1 -1
- package/dist/types/modes/rpc/host-tools.d.ts +1 -1
- package/dist/types/modes/rpc/host-uris.d.ts +3 -3
- package/dist/types/modes/rpc/rpc-client.d.ts +3 -3
- package/dist/types/modes/rpc/rpc-mode.d.ts +6 -6
- package/dist/types/modes/rpc/rpc-subagents.d.ts +3 -3
- package/dist/types/modes/rpc/rpc-types.d.ts +7 -7
- package/dist/types/modes/running-subagent-badge.d.ts +1 -1
- package/dist/types/modes/runtime-init.d.ts +2 -2
- package/dist/types/modes/session-observer-registry.d.ts +2 -2
- package/dist/types/modes/setup-wizard/index.d.ts +6 -6
- package/dist/types/modes/setup-wizard/lazy.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/glyph.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/providers.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/sign-in.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/theme.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/types.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/web-search.d.ts +1 -1
- package/dist/types/modes/setup-wizard/startup-splash.d.ts +1 -1
- package/dist/types/modes/setup-wizard/wizard-overlay.d.ts +2 -2
- package/dist/types/modes/shared.d.ts +1 -1
- package/dist/types/modes/skill-command.d.ts +2 -2
- package/dist/types/modes/theme/shimmer.d.ts +1 -1
- package/dist/types/modes/theme/theme.d.ts +1 -1
- package/dist/types/modes/types.d.ts +31 -31
- package/dist/types/modes/ultrathink.d.ts +1 -1
- package/dist/types/modes/utils/context-usage.d.ts +5 -5
- package/dist/types/modes/utils/hotkeys-markdown.d.ts +1 -1
- package/dist/types/modes/utils/interactive-context-helpers.d.ts +2 -2
- package/dist/types/modes/utils/tools-markdown.d.ts +1 -1
- package/dist/types/modes/utils/transcript-render-helpers.d.ts +25 -8
- package/dist/types/modes/utils/transcript-render-helpers.test.d.ts +1 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +2 -2
- package/dist/types/modes/workflow.d.ts +1 -1
- package/dist/types/plan-mode/plan-handoff.d.ts +1 -1
- package/dist/types/registry/agent-lifecycle.d.ts +2 -2
- package/dist/types/registry/agent-registry.d.ts +1 -1
- package/dist/types/sdk.d.ts +40 -36
- package/dist/types/secrets/index.d.ts +2 -2
- package/dist/types/secrets/obfuscator.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +57 -41
- package/dist/types/session/agent-storage.d.ts +1 -1
- package/dist/types/session/auth-broker-config.d.ts +1 -1
- package/dist/types/session/codex-auto-reset.d.ts +1 -1
- package/dist/types/session/exit-diagnostics.d.ts +1 -1
- package/dist/types/session/indexed-session-storage.d.ts +2 -2
- package/dist/types/session/messages.d.ts +22 -3
- package/dist/types/session/redis-session-storage.d.ts +1 -1
- package/dist/types/session/session-context.d.ts +1 -1
- package/dist/types/session/session-entries.d.ts +4 -0
- package/dist/types/session/session-listing.d.ts +1 -1
- package/dist/types/session/session-loader.d.ts +4 -4
- package/dist/types/session/session-manager.d.ts +9 -8
- package/dist/types/session/session-migrations.d.ts +1 -1
- package/dist/types/session/session-paths.d.ts +1 -1
- package/dist/types/session/session-persistence.d.ts +2 -2
- package/dist/types/session/session-storage.d.ts +1 -1
- package/dist/types/session/session-title-slot.d.ts +1 -1
- package/dist/types/session/settings-stream-fn.d.ts +1 -1
- package/dist/types/session/sql-session-storage.d.ts +1 -1
- package/dist/types/session/unexpected-stop-classifier.d.ts +2 -2
- package/dist/types/slash-commands/acp-builtins.d.ts +2 -2
- package/dist/types/slash-commands/available-commands.d.ts +5 -5
- package/dist/types/slash-commands/builtin-registry.d.ts +2 -2
- package/dist/types/slash-commands/helpers/active-oauth-account.d.ts +1 -1
- package/dist/types/slash-commands/helpers/context-report.d.ts +1 -1
- package/dist/types/slash-commands/helpers/format.d.ts +1 -1
- package/dist/types/slash-commands/helpers/logout.d.ts +1 -1
- package/dist/types/slash-commands/helpers/marketplace-manager.d.ts +2 -2
- package/dist/types/slash-commands/helpers/mcp.d.ts +1 -1
- package/dist/types/slash-commands/helpers/parse.d.ts +1 -1
- package/dist/types/slash-commands/helpers/reset-usage.d.ts +1 -1
- package/dist/types/slash-commands/helpers/ssh.d.ts +1 -1
- package/dist/types/slash-commands/helpers/todo.d.ts +1 -1
- package/dist/types/slash-commands/helpers/usage-report.d.ts +1 -1
- package/dist/types/slash-commands/types.d.ts +6 -4
- package/dist/types/ssh/file-transfer.d.ts +1 -1
- package/dist/types/ssh/ssh-executor.d.ts +1 -1
- package/dist/types/ssh/sshfs-mount.d.ts +1 -1
- package/dist/types/stt/asr-client.d.ts +3 -3
- package/dist/types/stt/asr-protocol.d.ts +1 -1
- package/dist/types/stt/asr-worker.d.ts +1 -1
- package/dist/types/stt/downloader.d.ts +1 -1
- package/dist/types/stt/index.d.ts +8 -8
- package/dist/types/stt/models.d.ts +1 -1
- package/dist/types/system-prompt.d.ts +4 -4
- package/dist/types/task/agents.d.ts +1 -1
- package/dist/types/task/discovery.d.ts +1 -1
- package/dist/types/task/executor.d.ts +20 -20
- package/dist/types/task/index.d.ts +11 -11
- package/dist/types/task/isolation-runner.d.ts +7 -6
- package/dist/types/task/persisted-revive.d.ts +5 -5
- package/dist/types/task/provider-concurrency.d.ts +2 -2
- package/dist/types/task/render.d.ts +3 -3
- package/dist/types/task/renderer.d.ts +1 -1
- package/dist/types/task/repair-args.d.ts +1 -1
- package/dist/types/task/subprocess-tool-registry.d.ts +1 -1
- package/dist/types/task/types.d.ts +2 -2
- package/dist/types/task/yield-assembly.d.ts +1 -1
- package/dist/types/tiny/title-client.d.ts +2 -2
- package/dist/types/tiny/title-protocol.d.ts +1 -1
- package/dist/types/tiny/worker.d.ts +1 -1
- package/dist/types/tool-discovery/mode.d.ts +2 -2
- package/dist/types/tools/__tests__/glob.test.d.ts +1 -0
- package/dist/types/tools/acp-bridge.d.ts +2 -2
- package/dist/types/tools/ask.d.ts +3 -3
- package/dist/types/tools/ast-edit.d.ts +4 -4
- package/dist/types/tools/ast-grep.d.ts +4 -4
- package/dist/types/tools/bash-command-fixup.d.ts +3 -11
- package/dist/types/tools/bash-interactive.d.ts +1 -1
- package/dist/types/tools/bash-interceptor.d.ts +1 -1
- package/dist/types/tools/bash-skill-urls.d.ts +3 -3
- package/dist/types/tools/bash.d.ts +4 -6
- package/dist/types/tools/browser/cmux/cmux-tab.d.ts +6 -6
- package/dist/types/tools/browser/cmux/rpc.d.ts +1 -1
- package/dist/types/tools/browser/registry.d.ts +3 -3
- package/dist/types/tools/browser/render.d.ts +3 -3
- package/dist/types/tools/browser/tab-supervisor.d.ts +14 -4
- package/dist/types/tools/browser/tab-worker.d.ts +1 -1
- package/dist/types/tools/browser.d.ts +9 -9
- package/dist/types/tools/checkpoint.d.ts +2 -2
- package/dist/types/tools/conflict-detect.d.ts +1 -1
- package/dist/types/tools/context.d.ts +2 -2
- package/dist/types/tools/debug.d.ts +4 -4
- package/dist/types/tools/eval-backends.d.ts +1 -1
- package/dist/types/tools/eval-render.d.ts +3 -5
- package/dist/types/tools/eval.d.ts +3 -3
- package/dist/types/tools/fetch.d.ts +7 -7
- package/dist/types/tools/gh-renderer.d.ts +3 -3
- package/dist/types/tools/gh.d.ts +5 -5
- package/dist/types/tools/github-cache.d.ts +1 -1
- package/dist/types/tools/glob.d.ts +7 -5
- package/dist/types/tools/grep.d.ts +5 -5
- package/dist/types/tools/image-gen.d.ts +2 -2
- package/dist/types/tools/index.d.ts +70 -70
- package/dist/types/tools/inspect-image-renderer.d.ts +2 -2
- package/dist/types/tools/inspect-image.d.ts +2 -2
- package/dist/types/tools/irc.d.ts +5 -5
- package/dist/types/tools/job.d.ts +3 -3
- package/dist/types/tools/json-tree.d.ts +1 -1
- package/dist/types/tools/learn.d.ts +1 -1
- package/dist/types/tools/list-limit.d.ts +1 -1
- package/dist/types/tools/manage-skill.d.ts +1 -1
- package/dist/types/tools/memory-edit.d.ts +1 -1
- package/dist/types/tools/memory-recall.d.ts +1 -1
- package/dist/types/tools/memory-reflect.d.ts +1 -1
- package/dist/types/tools/memory-render.d.ts +2 -2
- package/dist/types/tools/memory-retain.d.ts +1 -1
- package/dist/types/tools/output-meta.d.ts +3 -3
- package/dist/types/tools/path-utils.d.ts +2 -2
- package/dist/types/tools/plan-mode-guard.d.ts +1 -1
- package/dist/types/tools/read.d.ts +7 -7
- package/dist/types/tools/render-utils.d.ts +3 -3
- package/dist/types/tools/renderers.d.ts +2 -22
- package/dist/types/tools/report-tool-issue.d.ts +2 -2
- package/dist/types/tools/resolve.d.ts +3 -3
- package/dist/types/tools/review.d.ts +2 -2
- package/dist/types/tools/search-tool-bm25.d.ts +4 -4
- package/dist/types/tools/ssh.d.ts +5 -7
- package/dist/types/tools/todo.d.ts +4 -4
- package/dist/types/tools/tool-result.d.ts +2 -2
- package/dist/types/tools/tts.d.ts +1 -1
- package/dist/types/tools/write.d.ts +8 -8
- package/dist/types/tools/yield.d.ts +1 -1
- package/dist/types/tts/index.d.ts +10 -10
- package/dist/types/tts/models.d.ts +1 -1
- package/dist/types/tts/speech-enhancer.d.ts +2 -2
- package/dist/types/tts/streaming-player.d.ts +1 -1
- package/dist/types/tts/tts-client.d.ts +2 -2
- package/dist/types/tts/tts-protocol.d.ts +1 -1
- package/dist/types/tts/tts-worker.d.ts +1 -1
- package/dist/types/tts/vocalizer.d.ts +7 -1
- package/dist/types/tui/code-cell.d.ts +1 -1
- package/dist/types/tui/file-list.d.ts +1 -1
- package/dist/types/tui/index.d.ts +9 -9
- package/dist/types/tui/output-block.d.ts +2 -2
- package/dist/types/tui/status-line.d.ts +2 -2
- package/dist/types/tui/tree-list.d.ts +2 -2
- package/dist/types/tui/types.d.ts +1 -1
- package/dist/types/tui/utils.d.ts +2 -2
- package/dist/types/utils/changelog.d.ts +1 -1
- package/dist/types/utils/commit-message-generator.d.ts +2 -2
- package/dist/types/utils/git.d.ts +1 -1
- package/dist/types/utils/image-loading.d.ts +1 -1
- package/dist/types/utils/image-vision-fallback.d.ts +3 -3
- package/dist/types/utils/markit.d.ts +1 -1
- package/dist/types/utils/title-generator.d.ts +2 -2
- package/dist/types/web/parallel.d.ts +1 -1
- package/dist/types/web/scrapers/artifacthub.d.ts +1 -1
- package/dist/types/web/scrapers/arxiv.d.ts +1 -1
- package/dist/types/web/scrapers/aur.d.ts +1 -1
- package/dist/types/web/scrapers/biorxiv.d.ts +1 -1
- package/dist/types/web/scrapers/bluesky.d.ts +1 -1
- package/dist/types/web/scrapers/brew.d.ts +1 -1
- package/dist/types/web/scrapers/cheatsh.d.ts +1 -1
- package/dist/types/web/scrapers/chocolatey.d.ts +1 -1
- package/dist/types/web/scrapers/choosealicense.d.ts +1 -1
- package/dist/types/web/scrapers/cisa-kev.d.ts +1 -1
- package/dist/types/web/scrapers/clojars.d.ts +1 -1
- package/dist/types/web/scrapers/coingecko.d.ts +1 -1
- package/dist/types/web/scrapers/crates-io.d.ts +1 -1
- package/dist/types/web/scrapers/crossref.d.ts +1 -1
- package/dist/types/web/scrapers/devto.d.ts +1 -1
- package/dist/types/web/scrapers/discogs.d.ts +1 -1
- package/dist/types/web/scrapers/discourse.d.ts +1 -1
- package/dist/types/web/scrapers/dockerhub.d.ts +1 -1
- package/dist/types/web/scrapers/docs-rs.d.ts +8 -1
- package/dist/types/web/scrapers/fdroid.d.ts +1 -1
- package/dist/types/web/scrapers/firefox-addons.d.ts +1 -1
- package/dist/types/web/scrapers/flathub.d.ts +1 -1
- package/dist/types/web/scrapers/github-gist.d.ts +1 -1
- package/dist/types/web/scrapers/github.d.ts +1 -1
- package/dist/types/web/scrapers/gitlab.d.ts +1 -1
- package/dist/types/web/scrapers/go-pkg.d.ts +1 -1
- package/dist/types/web/scrapers/hackage.d.ts +1 -1
- package/dist/types/web/scrapers/hackernews.d.ts +1 -1
- package/dist/types/web/scrapers/hex.d.ts +1 -1
- package/dist/types/web/scrapers/huggingface.d.ts +1 -1
- package/dist/types/web/scrapers/iacr.d.ts +1 -1
- package/dist/types/web/scrapers/index.d.ts +77 -77
- package/dist/types/web/scrapers/jetbrains-marketplace.d.ts +1 -1
- package/dist/types/web/scrapers/lemmy.d.ts +1 -1
- package/dist/types/web/scrapers/lobsters.d.ts +1 -1
- package/dist/types/web/scrapers/mastodon.d.ts +1 -1
- package/dist/types/web/scrapers/maven.d.ts +1 -1
- package/dist/types/web/scrapers/mdn.d.ts +1 -1
- package/dist/types/web/scrapers/metacpan.d.ts +1 -1
- package/dist/types/web/scrapers/musicbrainz.d.ts +1 -1
- package/dist/types/web/scrapers/npm.d.ts +1 -1
- package/dist/types/web/scrapers/nuget.d.ts +1 -1
- package/dist/types/web/scrapers/nvd.d.ts +1 -1
- package/dist/types/web/scrapers/ollama.d.ts +1 -1
- package/dist/types/web/scrapers/open-vsx.d.ts +1 -1
- package/dist/types/web/scrapers/opencorporates.d.ts +1 -1
- package/dist/types/web/scrapers/openlibrary.d.ts +1 -1
- package/dist/types/web/scrapers/orcid.d.ts +1 -1
- package/dist/types/web/scrapers/osv.d.ts +1 -1
- package/dist/types/web/scrapers/packagist.d.ts +1 -1
- package/dist/types/web/scrapers/pub-dev.d.ts +1 -1
- package/dist/types/web/scrapers/pubmed.d.ts +1 -1
- package/dist/types/web/scrapers/pypi.d.ts +1 -1
- package/dist/types/web/scrapers/rawg.d.ts +1 -1
- package/dist/types/web/scrapers/readthedocs.d.ts +1 -1
- package/dist/types/web/scrapers/reddit.d.ts +1 -1
- package/dist/types/web/scrapers/repology.d.ts +1 -1
- package/dist/types/web/scrapers/rfc.d.ts +1 -1
- package/dist/types/web/scrapers/rubygems.d.ts +1 -1
- package/dist/types/web/scrapers/searchcode.d.ts +1 -1
- package/dist/types/web/scrapers/sec-edgar.d.ts +1 -1
- package/dist/types/web/scrapers/semantic-scholar.d.ts +1 -1
- package/dist/types/web/scrapers/snapcraft.d.ts +1 -1
- package/dist/types/web/scrapers/sourcegraph.d.ts +1 -1
- package/dist/types/web/scrapers/spdx.d.ts +1 -1
- package/dist/types/web/scrapers/spotify.d.ts +1 -1
- package/dist/types/web/scrapers/stackoverflow.d.ts +1 -1
- package/dist/types/web/scrapers/terraform.d.ts +1 -1
- package/dist/types/web/scrapers/tldr.d.ts +1 -1
- package/dist/types/web/scrapers/twitter.d.ts +1 -1
- package/dist/types/web/scrapers/types.d.ts +1 -1
- package/dist/types/web/scrapers/vimeo.d.ts +1 -1
- package/dist/types/web/scrapers/vscode-marketplace.d.ts +1 -1
- package/dist/types/web/scrapers/w3c.d.ts +1 -1
- package/dist/types/web/scrapers/wikidata.d.ts +1 -1
- package/dist/types/web/scrapers/wikipedia.d.ts +1 -1
- package/dist/types/web/scrapers/youtube.d.ts +1 -1
- package/dist/types/web/search/index.d.ts +7 -7
- package/dist/types/web/search/provider.d.ts +5 -5
- package/dist/types/web/search/providers/anthropic.d.ts +3 -3
- package/dist/types/web/search/providers/base.d.ts +1 -1
- package/dist/types/web/search/providers/brave.d.ts +3 -3
- package/dist/types/web/search/providers/codex.d.ts +3 -3
- package/dist/types/web/search/providers/duckduckgo.d.ts +3 -3
- package/dist/types/web/search/providers/exa.d.ts +3 -3
- package/dist/types/web/search/providers/firecrawl.d.ts +3 -3
- package/dist/types/web/search/providers/gemini.d.ts +3 -3
- package/dist/types/web/search/providers/jina.d.ts +3 -3
- package/dist/types/web/search/providers/kagi.d.ts +3 -3
- package/dist/types/web/search/providers/kimi.d.ts +3 -3
- package/dist/types/web/search/providers/parallel.d.ts +3 -3
- package/dist/types/web/search/providers/perplexity.d.ts +3 -3
- package/dist/types/web/search/providers/searxng.d.ts +3 -3
- package/dist/types/web/search/providers/synthetic.d.ts +3 -3
- package/dist/types/web/search/providers/tavily.d.ts +3 -3
- package/dist/types/web/search/providers/tinyfish.d.ts +3 -3
- package/dist/types/web/search/providers/utils.d.ts +2 -2
- package/dist/types/web/search/providers/xai.d.ts +3 -3
- package/dist/types/web/search/providers/zai.d.ts +3 -3
- package/dist/types/web/search/render.d.ts +3 -3
- package/package.json +12 -12
- package/src/advisor/__tests__/advisor.test.ts +59 -0
- package/src/auto-thinking/classifier.ts +6 -5
- package/src/collab/relay-client.ts +73 -7
- package/src/config/model-registry.ts +43 -2
- package/src/config/model-resolver.ts +1 -1
- package/src/config/settings-schema.ts +5 -12
- package/src/config/settings.ts +25 -5
- package/src/edit/file-snapshot-store.ts +5 -2
- package/src/edit/hashline/filesystem.ts +19 -1
- package/src/edit/modes/patch.ts +9 -1
- package/src/edit/modes/replace.ts +1 -1
- package/src/edit/renderer.ts +42 -35
- package/src/eval/__tests__/agent-bridge.test.ts +19 -0
- package/src/eval/__tests__/budget-bridge.test.ts +12 -1
- package/src/eval/agent-bridge.ts +27 -19
- package/src/eval/js/context-manager.ts +3 -0
- package/src/export/ttsr.ts +10 -0
- package/src/extensibility/custom-tools/types.ts +2 -0
- package/src/extensibility/extensions/loader.ts +2 -2
- package/src/extensibility/extensions/types.ts +16 -4
- package/src/extensibility/hooks/loader.ts +3 -3
- package/src/extensibility/hooks/types.ts +4 -4
- package/src/extensibility/legacy-pi-ai-shim.ts +17 -4
- package/src/extensibility/legacy-pi-coding-agent-shim.ts +554 -2
- package/src/extensibility/plugins/legacy-pi-compat.ts +190 -58
- package/src/extensibility/shared-events.ts +9 -1
- package/src/internal-urls/docs-index.generated.txt +1 -1
- package/src/internal-urls/memory-protocol.ts +105 -3
- package/src/lsp/client.ts +70 -0
- package/src/lsp/index.ts +65 -12
- package/src/main.ts +5 -3
- package/src/markit/converters/pdf/extract.ts +26 -2
- package/src/mnemopi/state.ts +76 -0
- package/src/modes/acp/acp-agent.ts +5 -1
- package/src/modes/components/agent-hub.ts +27 -9
- package/src/modes/components/assistant-message.ts +134 -82
- package/src/modes/components/bash-execution.ts +9 -0
- package/src/modes/components/chat-transcript-builder.ts +15 -7
- package/src/modes/components/copy-selector.ts +16 -4
- package/src/modes/components/eval-execution.ts +9 -0
- package/src/modes/components/model-selector.ts +17 -17
- package/src/modes/components/session-selector.ts +12 -4
- package/src/modes/components/status-line/component.ts +4 -0
- package/src/modes/components/status-line/segments.ts +6 -5
- package/src/modes/components/status-line/types.ts +4 -0
- package/src/modes/components/tool-execution.ts +12 -53
- package/src/modes/components/transcript-container.ts +82 -432
- package/src/modes/components/tree-selector.ts +9 -3
- package/src/modes/controllers/command-controller.ts +10 -3
- package/src/modes/controllers/event-controller.ts +78 -17
- package/src/modes/controllers/extension-ui-controller.test.ts +58 -0
- package/src/modes/controllers/extension-ui-controller.ts +12 -7
- package/src/modes/controllers/input-controller.ts +12 -10
- package/src/modes/controllers/selector-controller.ts +18 -9
- package/src/modes/controllers/streaming-reveal.ts +12 -5
- package/src/modes/controllers/tool-args-reveal.ts +13 -6
- package/src/modes/interactive-mode.ts +66 -36
- package/src/modes/prompt-action-autocomplete.ts +18 -0
- package/src/modes/theme/shimmer.ts +37 -1
- package/src/modes/utils/transcript-render-helpers.test.ts +38 -0
- package/src/modes/utils/transcript-render-helpers.ts +54 -13
- package/src/modes/utils/ui-helpers.ts +17 -8
- package/src/prompts/system/workflow-notice.md +1 -1
- package/src/prompts/tools/bash.md +9 -7
- package/src/prompts/tools/grep.md +1 -1
- package/src/prompts/tools/memory-edit.md +2 -0
- package/src/prompts/tools/recall.md +2 -0
- package/src/sdk.ts +113 -12
- package/src/session/agent-session.ts +350 -61
- package/src/session/messages.ts +102 -2
- package/src/session/session-context.ts +67 -10
- package/src/session/session-entries.ts +4 -0
- package/src/session/session-history-format.ts +12 -0
- package/src/session/session-manager.ts +129 -10
- package/src/session/settings-stream-fn.ts +1 -0
- package/src/session/unexpected-stop-classifier.ts +6 -3
- package/src/slash-commands/builtin-registry.ts +7 -4
- package/src/slash-commands/helpers/usage-report.ts +3 -0
- package/src/slash-commands/types.ts +2 -0
- package/src/task/executor.ts +23 -3
- package/src/task/isolation-runner.ts +38 -9
- package/src/tools/__tests__/glob.test.ts +37 -0
- package/src/tools/acp-bridge.ts +11 -1
- package/src/tools/bash-command-fixup.ts +3 -36
- package/src/tools/bash.ts +4 -17
- package/src/tools/browser/render.ts +6 -4
- package/src/tools/browser/tab-supervisor.ts +47 -3
- package/src/tools/eval-render.ts +0 -20
- package/src/tools/glob.ts +11 -1
- package/src/tools/index.ts +1 -1
- package/src/tools/inspect-image-renderer.ts +5 -4
- package/src/tools/read.ts +76 -28
- package/src/tools/render-utils.ts +4 -1
- package/src/tools/renderers.ts +0 -20
- package/src/tools/ssh.ts +0 -16
- package/src/tools/write.ts +22 -13
- package/src/tts/speech-enhancer.ts +7 -5
- package/src/tts/vocalizer.ts +9 -0
- package/src/utils/commit-message-generator.ts +7 -5
- package/src/utils/shell-snapshot.ts +10 -0
- package/src/utils/title-generator.ts +12 -7
- package/src/web/scrapers/docs-rs.ts +12 -1
- package/src/web/search/providers/xai.ts +43 -47
|
@@ -4,9 +4,9 @@ import { formatNumber } from "@oh-my-pi/pi-utils";
|
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import type { AssistantThinkingRenderer } from "../../extensibility/extensions/types";
|
|
6
6
|
import { getMarkdownTheme, theme } from "../../modes/theme/theme";
|
|
7
|
-
import { resolveAbortLabel, shouldRenderAbortReason } from "../../session/messages";
|
|
8
7
|
import { getPreviewLines, resolveImageOptions, TRUNCATE_LENGTHS } from "../../tools/render-utils";
|
|
9
8
|
import { canonicalizeMessage, formatThinkingForDisplay, hasDisplayableThinking } from "../../utils/thinking-display";
|
|
9
|
+
import { resolveAssistantErrorPresentation } from "../utils/transcript-render-helpers";
|
|
10
10
|
import { type CacheInvalidation, CacheInvalidationMarkerComponent } from "./cache-invalidation-marker";
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -18,15 +18,6 @@ import { type CacheInvalidation, CacheInvalidationMarkerComponent } from "./cach
|
|
|
18
18
|
*/
|
|
19
19
|
const MAX_TRANSCRIPT_ERROR_LINES = 8;
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* A GFM table delimiter row (`| --- | :--: |`, with or without bounding pipes).
|
|
23
|
-
* The header row alone does not render a table — this delimiter is what makes
|
|
24
|
-
* Markdown lay one out, and a streaming table re-aligns its columns as rows
|
|
25
|
-
* arrive. Requires at least one column pipe so a bare thematic break (`---`)
|
|
26
|
-
* does not match.
|
|
27
|
-
*/
|
|
28
|
-
const MARKDOWN_TABLE_DELIMITER = /^ {0,3}\|?(?:[ \t]*:?-+:?[ \t]*\|)+[ \t]*:?-*:?[ \t]*$/;
|
|
29
|
-
|
|
30
21
|
/** Opening or closing fence of a code block: ≥3 backticks/tildes plus info string. */
|
|
31
22
|
const CODE_FENCE_LINE = /^ {0,3}(`{3,}|~{3,})(.*)$/;
|
|
32
23
|
|
|
@@ -48,20 +39,15 @@ function resolveThinkingDisplay(block: ThinkingContentBlock, proseOnly: boolean)
|
|
|
48
39
|
}
|
|
49
40
|
|
|
50
41
|
/**
|
|
51
|
-
* Whether `text`
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* inside ordinary fenced code (shell pipes, ASCII separators, doc examples) are
|
|
58
|
-
* ignored so a long streamed code block is never held out of native scrollback.
|
|
59
|
-
* A delimiter counts only directly under a pipe-bearing header row, outside any
|
|
60
|
-
* code fence.
|
|
42
|
+
* Whether `text` contains a ` ```mermaid ` fence (open or closed) outside
|
|
43
|
+
* ordinary code fences. Mermaid defers native-scrollback settling wholesale
|
|
44
|
+
* (see {@link AssistantMessageComponent.getTranscriptBlockSettledRows}): its
|
|
45
|
+
* ASCII rendering resolves asynchronously, so even a completed fence can
|
|
46
|
+
* re-layout rows that already looked settled. Fence-aware so a mermaid
|
|
47
|
+
* example inside a regular code block never triggers the deferral.
|
|
61
48
|
*/
|
|
62
|
-
function
|
|
49
|
+
function containsMermaidFence(text: string): boolean {
|
|
63
50
|
let fence: string | null = null;
|
|
64
|
-
let prevLine = "";
|
|
65
51
|
for (const line of text.split("\n")) {
|
|
66
52
|
const fenceMatch = CODE_FENCE_LINE.exec(line);
|
|
67
53
|
if (fence !== null) {
|
|
@@ -79,11 +65,7 @@ function detectLiveReflowingMarkdown(text: string): boolean {
|
|
|
79
65
|
if (fenceMatch) {
|
|
80
66
|
if (/^mermaid\b/.test(fenceMatch[2]!.trim())) return true;
|
|
81
67
|
fence = fenceMatch[1]!;
|
|
82
|
-
prevLine = "";
|
|
83
|
-
continue;
|
|
84
68
|
}
|
|
85
|
-
if (prevLine.includes("|") && MARKDOWN_TABLE_DELIMITER.test(line)) return true;
|
|
86
|
-
prevLine = line;
|
|
87
69
|
}
|
|
88
70
|
return false;
|
|
89
71
|
}
|
|
@@ -194,14 +176,16 @@ export class AssistantMessageComponent extends Container {
|
|
|
194
176
|
#kittyConversionsInFlight = new Set<string>();
|
|
195
177
|
#transcriptBlockFinalized: boolean;
|
|
196
178
|
/**
|
|
197
|
-
* True while
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
* {@link
|
|
202
|
-
*
|
|
179
|
+
* True while any rendered item carries a ` ```mermaid ` fence. Mermaid's
|
|
180
|
+
* ASCII form resolves asynchronously and can re-layout rows that already
|
|
181
|
+
* looked settled, so settling defers until the message finalizes. See
|
|
182
|
+
* {@link getTranscriptBlockSettledRows}. Recomputed in
|
|
183
|
+
* {@link updateContent} ahead of the fast-path return, so it tracks every
|
|
184
|
+
* stream tick. Streaming GFM tables need no gate: they live in markdown's
|
|
185
|
+
* unfrozen tail while re-aligning and render deterministically once their
|
|
186
|
+
* block completes.
|
|
203
187
|
*/
|
|
204
|
-
#
|
|
188
|
+
#containsMermaidSource = false;
|
|
205
189
|
/**
|
|
206
190
|
* When true, the turn-ending `Error: …` line for `stopReason === "error"` is
|
|
207
191
|
* suppressed because the same error is currently shown in the pinned banner
|
|
@@ -222,6 +206,9 @@ export class AssistantMessageComponent extends Container {
|
|
|
222
206
|
/** Whether the last updateContent carried an in-flight streaming partial; such
|
|
223
207
|
* renders bypass the markdown module LRU (see Markdown.transientRenderCache). */
|
|
224
208
|
#lastUpdateTransient = false;
|
|
209
|
+
/** Width of the most recent render(); the settled-rows walk reads child
|
|
210
|
+
* renders at exactly this width (L1 cache hits). */
|
|
211
|
+
#lastRenderWidth = 0;
|
|
225
212
|
// Fast-path state: reuse Markdown children when message shape is stable during streaming.
|
|
226
213
|
#fastPathKey: string | undefined;
|
|
227
214
|
#fastPathItems:
|
|
@@ -299,6 +286,11 @@ export class AssistantMessageComponent extends Container {
|
|
|
299
286
|
}
|
|
300
287
|
}
|
|
301
288
|
|
|
289
|
+
override render(width: number): readonly string[] {
|
|
290
|
+
this.#lastRenderWidth = width;
|
|
291
|
+
return super.render(width);
|
|
292
|
+
}
|
|
293
|
+
|
|
302
294
|
setHideThinkingBlock(hide: boolean): void {
|
|
303
295
|
this.hideThinkingBlock = hide;
|
|
304
296
|
}
|
|
@@ -415,18 +407,44 @@ export class AssistantMessageComponent extends Container {
|
|
|
415
407
|
}
|
|
416
408
|
|
|
417
409
|
/**
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
410
|
+
* Settled leading rows for mid-stream native-scrollback commits (see
|
|
411
|
+
* `FinalizableBlock.getTranscriptBlockSettledRows`). Completed content
|
|
412
|
+
* blocks render in final form (non-transient) and settle in full; the
|
|
413
|
+
* actively streaming markdown contributes its rendered frozen-token
|
|
414
|
+
* prefix. The walk stops at the first child that is not declared
|
|
415
|
+
* byte-stable (the animated thinking pulse, extension components, images,
|
|
416
|
+
* error rows), and a cache-invalidation marker above the content defers
|
|
417
|
+
* settling entirely. Mermaid anywhere defers wholesale — its ASCII
|
|
418
|
+
* rendering resolves asynchronously and can re-layout settled-looking
|
|
419
|
+
* rows. Reads only L1-cached child renders at the width recorded by this
|
|
420
|
+
* frame's render().
|
|
427
421
|
*/
|
|
428
|
-
|
|
429
|
-
|
|
422
|
+
getTranscriptBlockSettledRows(): number {
|
|
423
|
+
if (this.#transcriptBlockFinalized || !this.#lastUpdateTransient) return 0;
|
|
424
|
+
if (this.#containsMermaidSource) return 0;
|
|
425
|
+
if (this.#markerSlot.children.length > 0) return 0;
|
|
426
|
+
const items = this.#fastPathItems;
|
|
427
|
+
const width = this.#lastRenderWidth;
|
|
428
|
+
if (!items || items.length === 0 || width <= 0) return 0;
|
|
429
|
+
const streaming = items[items.length - 1]!.md;
|
|
430
|
+
// Items are captured in child order: match completed mds positionally.
|
|
431
|
+
let itemIndex = 0;
|
|
432
|
+
let settled = 0;
|
|
433
|
+
for (const child of this.#contentContainer.children) {
|
|
434
|
+
if (child === streaming) return settled + streaming.getLastRenderSettledRows();
|
|
435
|
+
if (itemIndex < items.length - 1 && items[itemIndex]!.md === child) {
|
|
436
|
+
itemIndex++;
|
|
437
|
+
settled += child.render(width).length;
|
|
438
|
+
continue;
|
|
439
|
+
}
|
|
440
|
+
if (child instanceof Spacer) {
|
|
441
|
+
settled += child.render(width).length;
|
|
442
|
+
continue;
|
|
443
|
+
}
|
|
444
|
+
// Not declared byte-stable: the boundary stops here.
|
|
445
|
+
return settled;
|
|
446
|
+
}
|
|
447
|
+
return settled;
|
|
430
448
|
}
|
|
431
449
|
|
|
432
450
|
getTranscriptBlockVersion(): number {
|
|
@@ -445,6 +463,24 @@ export class AssistantMessageComponent extends Container {
|
|
|
445
463
|
}
|
|
446
464
|
}
|
|
447
465
|
|
|
466
|
+
applyRetryRecovery(retryRecovery: AssistantMessage["retryRecovery"]): void {
|
|
467
|
+
if (!this.#lastMessage || !retryRecovery) return;
|
|
468
|
+
this.setErrorPinned(false);
|
|
469
|
+
this.updateContent({ ...this.#lastMessage, retryRecovery });
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
messagePersistenceKey(): string | undefined {
|
|
473
|
+
if (!this.#lastMessage) return undefined;
|
|
474
|
+
return [
|
|
475
|
+
"assistant",
|
|
476
|
+
this.#lastMessage.timestamp,
|
|
477
|
+
this.#lastMessage.provider,
|
|
478
|
+
this.#lastMessage.model,
|
|
479
|
+
this.#lastMessage.responseId ?? "",
|
|
480
|
+
this.#lastMessage.stopReason,
|
|
481
|
+
].join(":");
|
|
482
|
+
}
|
|
483
|
+
|
|
448
484
|
/**
|
|
449
485
|
* Render a turn-ending provider error inline. Drops blank lines, clamps the
|
|
450
486
|
* line count to {@link MAX_TRANSCRIPT_ERROR_LINES}, and width-truncates each
|
|
@@ -454,7 +490,7 @@ export class AssistantMessageComponent extends Container {
|
|
|
454
490
|
#appendErrorBlock(message: string): void {
|
|
455
491
|
const lines = getPreviewLines(message, MAX_TRANSCRIPT_ERROR_LINES, TRUNCATE_LENGTHS.LINE);
|
|
456
492
|
if (lines.length === 0) lines.push("Unknown error");
|
|
457
|
-
|
|
493
|
+
// The caller owns the separating Spacer; adding one here doubled the gap.
|
|
458
494
|
this.#contentContainer.addChild(new Text(theme.fg("error", `Error: ${lines[0]}`), 1, 0));
|
|
459
495
|
for (const line of lines.slice(1)) {
|
|
460
496
|
this.#contentContainer.addChild(new Text(theme.fg("error", ` ${line}`), 1, 0));
|
|
@@ -587,15 +623,11 @@ export class AssistantMessageComponent extends Container {
|
|
|
587
623
|
if (content.type === "toolCall") return false;
|
|
588
624
|
}
|
|
589
625
|
if (this.#toolImagesByCallId.size > 0) return false;
|
|
590
|
-
|
|
591
|
-
if (
|
|
592
|
-
if (
|
|
593
|
-
message.errorMessage &&
|
|
594
|
-
shouldRenderAbortReason(message) &&
|
|
595
|
-
message.stopReason !== "aborted" &&
|
|
596
|
-
message.stopReason !== "error"
|
|
597
|
-
)
|
|
626
|
+
const errorPresentation = resolveAssistantErrorPresentation(message);
|
|
627
|
+
if (errorPresentation.kind === "compact-recovered") return false;
|
|
628
|
+
if (errorPresentation.kind === "full" && !(message.stopReason === "error" && this.#errorPinned)) {
|
|
598
629
|
return false;
|
|
630
|
+
}
|
|
599
631
|
// Extension stability: if thinking renderers exist and any tracked thinking
|
|
600
632
|
// block's text changed, extensions may produce a different child count.
|
|
601
633
|
if (this.thinkingRenderers.length > 0 && this.#fastPathItems) {
|
|
@@ -626,8 +658,9 @@ export class AssistantMessageComponent extends Container {
|
|
|
626
658
|
}
|
|
627
659
|
const transient = opts?.transient === true;
|
|
628
660
|
// Shape is identical — setText only on Markdown children whose source changed.
|
|
629
|
-
|
|
630
|
-
|
|
661
|
+
this.#applyItemTransience(transient);
|
|
662
|
+
for (let i = 0; i < this.#fastPathItems.length; i++) {
|
|
663
|
+
const item = this.#fastPathItems[i]!;
|
|
631
664
|
const content = message.content[item.contentIndex];
|
|
632
665
|
if (!content) {
|
|
633
666
|
this.#fastPathKey = undefined;
|
|
@@ -645,6 +678,14 @@ export class AssistantMessageComponent extends Container {
|
|
|
645
678
|
return false;
|
|
646
679
|
}
|
|
647
680
|
if (newText !== item.lastText) {
|
|
681
|
+
// Only the last (actively streaming) block may mutate in place: a
|
|
682
|
+
// delta into an earlier block would invalidate rows the settled
|
|
683
|
+
// walk already declared final, so tear down and rebuild instead.
|
|
684
|
+
if (i < this.#fastPathItems.length - 1) {
|
|
685
|
+
this.#fastPathKey = undefined;
|
|
686
|
+
this.#fastPathItems = undefined;
|
|
687
|
+
return false;
|
|
688
|
+
}
|
|
648
689
|
item.md.setText(newText);
|
|
649
690
|
item.lastText = newText;
|
|
650
691
|
}
|
|
@@ -698,14 +739,19 @@ export class AssistantMessageComponent extends Container {
|
|
|
698
739
|
this.#thinkingRateLive = false;
|
|
699
740
|
}
|
|
700
741
|
|
|
701
|
-
//
|
|
702
|
-
//
|
|
703
|
-
//
|
|
704
|
-
// parser only resolves
|
|
705
|
-
//
|
|
706
|
-
this.#
|
|
707
|
-
|
|
708
|
-
|
|
742
|
+
// Mermaid ASCII rendering resolves asynchronously, so a fence anywhere
|
|
743
|
+
// in the rendered source (text or visible thinking) defers settling; see
|
|
744
|
+
// getTranscriptBlockSettledRows. Detected from raw source — a Markdown
|
|
745
|
+
// parser only resolves the fence once it closes, but the stale commits
|
|
746
|
+
// would happen mid-stream.
|
|
747
|
+
this.#containsMermaidSource = message.content.some(content => {
|
|
748
|
+
if (content.type === "text") return containsMermaidFence(content.text);
|
|
749
|
+
if (content.type === "thinking" && !this.hideThinkingBlock) {
|
|
750
|
+
const display = resolveThinkingDisplay(content, this.proseOnlyThinking);
|
|
751
|
+
return display.visible && containsMermaidFence(display.text);
|
|
752
|
+
}
|
|
753
|
+
return false;
|
|
754
|
+
});
|
|
709
755
|
|
|
710
756
|
// Fast path: reuse Markdown children when shape is stable during streaming
|
|
711
757
|
if (this.#tryFastPathUpdate(message, opts)) return;
|
|
@@ -781,37 +827,43 @@ export class AssistantMessageComponent extends Container {
|
|
|
781
827
|
}
|
|
782
828
|
|
|
783
829
|
this.#renderToolImages();
|
|
784
|
-
|
|
785
|
-
// But only if there are no tool calls (tool execution components will show the error)
|
|
830
|
+
const errorPresentation = resolveAssistantErrorPresentation(message);
|
|
786
831
|
const hasToolCalls = message.content.some(c => c.type === "toolCall");
|
|
787
|
-
if (
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
832
|
+
if (errorPresentation.kind === "compact-recovered") {
|
|
833
|
+
this.#contentContainer.addChild(new Spacer(1));
|
|
834
|
+
this.#contentContainer.addChild(new Text(theme.fg("dim", errorPresentation.text), 1, 0));
|
|
835
|
+
} else if (!hasToolCalls && errorPresentation.kind === "full") {
|
|
836
|
+
if (!(message.stopReason === "error" && this.#errorPinned)) {
|
|
837
|
+
this.#contentContainer.addChild(new Spacer(1));
|
|
838
|
+
if (message.stopReason === "aborted") {
|
|
839
|
+
this.#contentContainer.addChild(new Text(theme.fg("error", errorPresentation.text), 1, 0));
|
|
792
840
|
} else {
|
|
793
|
-
this.#
|
|
841
|
+
this.#appendErrorBlock(errorPresentation.text);
|
|
794
842
|
}
|
|
795
|
-
this.#contentContainer.addChild(new Text(theme.fg("error", abortMessage), 1, 0));
|
|
796
|
-
} else if (message.stopReason === "error" && !this.#errorPinned) {
|
|
797
|
-
this.#appendErrorBlock(message.errorMessage || "Unknown error");
|
|
798
843
|
}
|
|
799
844
|
}
|
|
800
|
-
if (
|
|
801
|
-
message.errorMessage &&
|
|
802
|
-
shouldRenderAbortReason(message) &&
|
|
803
|
-
message.stopReason !== "aborted" &&
|
|
804
|
-
message.stopReason !== "error"
|
|
805
|
-
) {
|
|
806
|
-
this.#appendErrorBlock(message.errorMessage);
|
|
807
|
-
}
|
|
808
845
|
// Store fast-path state for next call
|
|
809
846
|
if (shouldCapture) {
|
|
810
847
|
this.#fastPathItems = captureItems;
|
|
811
848
|
this.#fastPathKey = this.#computeShapeKey(message);
|
|
849
|
+
this.#applyItemTransience(this.#lastUpdateTransient);
|
|
812
850
|
} else {
|
|
813
851
|
this.#fastPathKey = undefined;
|
|
814
852
|
this.#fastPathItems = undefined;
|
|
815
853
|
}
|
|
816
854
|
}
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Only the actively streaming (last) markdown renders in transient mode;
|
|
858
|
+
* completed blocks render final — syntax-highlighted, module-LRU-cached,
|
|
859
|
+
* byte-stable — so their rows can settle into native scrollback mid-turn
|
|
860
|
+
* and are byte-identical to the finalize render.
|
|
861
|
+
*/
|
|
862
|
+
#applyItemTransience(transient: boolean): void {
|
|
863
|
+
const items = this.#fastPathItems;
|
|
864
|
+
if (!items) return;
|
|
865
|
+
for (let i = 0; i < items.length; i++) {
|
|
866
|
+
items[i]!.md.transientRenderCache = transient && i === items.length - 1;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
817
869
|
}
|
|
@@ -64,6 +64,15 @@ export class BashExecutionComponent extends Container {
|
|
|
64
64
|
this.#contentContainer.addChild(this.#loader);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Transcript finalization contract (see `FinalizableBlock`): the collapsed
|
|
69
|
+
* streaming preview rewrites its tail window every chunk, so the block must
|
|
70
|
+
* stay out of native scrollback until the command completes.
|
|
71
|
+
*/
|
|
72
|
+
isTranscriptBlockFinalized(): boolean {
|
|
73
|
+
return this.#status !== "running";
|
|
74
|
+
}
|
|
75
|
+
|
|
67
76
|
/**
|
|
68
77
|
* Set whether the output is expanded (shows full output) or collapsed (preview only).
|
|
69
78
|
*/
|
|
@@ -29,11 +29,12 @@ import type { SessionMessageEntry } from "../../session/session-entries";
|
|
|
29
29
|
import { theme } from "../theme/theme";
|
|
30
30
|
import {
|
|
31
31
|
assistantHasVisibleContent,
|
|
32
|
+
assistantUsageIsBilled,
|
|
32
33
|
buildAsyncResultBlock,
|
|
33
34
|
buildFileMentionBlock,
|
|
34
35
|
buildIrcMessageCard,
|
|
35
36
|
normalizeToolArgs,
|
|
36
|
-
|
|
37
|
+
resolveAssistantErrorPresentation,
|
|
37
38
|
} from "../utils/transcript-render-helpers";
|
|
38
39
|
import { createAdvisorMessageCard } from "./advisor-message";
|
|
39
40
|
import { AssistantMessageComponent } from "./assistant-message";
|
|
@@ -153,7 +154,7 @@ export class ChatTranscriptBuilder {
|
|
|
153
154
|
const previous = this.#waitingPoll;
|
|
154
155
|
if (!previous) return;
|
|
155
156
|
this.#waitingPoll = null;
|
|
156
|
-
if (nextToolName === "job" && previous.isDisplaceableBlock()) {
|
|
157
|
+
if (nextToolName === "job" && previous.isDisplaceableBlock() && this.container.isBlockUncommitted(previous)) {
|
|
157
158
|
this.container.removeChild(previous);
|
|
158
159
|
}
|
|
159
160
|
previous.seal();
|
|
@@ -168,7 +169,9 @@ export class ChatTranscriptBuilder {
|
|
|
168
169
|
}
|
|
169
170
|
if (previous.canBeDisplacedBy(nextToolName)) {
|
|
170
171
|
this.#todoSnapshot = null;
|
|
171
|
-
this.container.
|
|
172
|
+
if (this.container.isBlockUncommitted(previous)) {
|
|
173
|
+
this.container.removeChild(previous);
|
|
174
|
+
}
|
|
172
175
|
previous.seal();
|
|
173
176
|
return;
|
|
174
177
|
}
|
|
@@ -268,13 +271,15 @@ export class ChatTranscriptBuilder {
|
|
|
268
271
|
}
|
|
269
272
|
|
|
270
273
|
#appendAssistantMessage(message: Extract<AgentMessage, { role: "assistant" }>): void {
|
|
274
|
+
const hideThinkingBlock = this.deps.hideThinkingBlock?.() ?? false;
|
|
275
|
+
const proseOnlyThinking = this.deps.proseOnlyThinking ? this.deps.proseOnlyThinking() : true;
|
|
271
276
|
const assistantComponent = new AssistantMessageComponent(
|
|
272
277
|
message,
|
|
273
|
-
|
|
278
|
+
hideThinkingBlock,
|
|
274
279
|
() => this.deps.requestRender(),
|
|
275
280
|
this.deps.getMessageRenderer ? undefined : [], // placeholder for thinkingRenderers
|
|
276
281
|
undefined, // placeholder for imageBudget
|
|
277
|
-
|
|
282
|
+
proseOnlyThinking,
|
|
278
283
|
);
|
|
279
284
|
this.container.addChild(assistantComponent);
|
|
280
285
|
|
|
@@ -293,7 +298,9 @@ export class ChatTranscriptBuilder {
|
|
|
293
298
|
this.#readGroup = null;
|
|
294
299
|
}
|
|
295
300
|
|
|
296
|
-
const
|
|
301
|
+
const errorPresentation = resolveAssistantErrorPresentation(message);
|
|
302
|
+
const hasErrorStop = errorPresentation.kind === "full";
|
|
303
|
+
const errorMessage = hasErrorStop ? errorPresentation.text : null;
|
|
297
304
|
|
|
298
305
|
for (const content of message.content) {
|
|
299
306
|
if (content.type !== "toolCall") continue;
|
|
@@ -350,7 +357,8 @@ export class ChatTranscriptBuilder {
|
|
|
350
357
|
}
|
|
351
358
|
}
|
|
352
359
|
|
|
353
|
-
this.#pendingUsage =
|
|
360
|
+
this.#pendingUsage =
|
|
361
|
+
settings.get("display.showTokenUsage") && assistantUsageIsBilled(message.usage) ? message.usage : undefined;
|
|
354
362
|
this.#pendingUsageDuration = message.duration;
|
|
355
363
|
this.#pendingUsageTtft = message.ttft;
|
|
356
364
|
}
|
|
@@ -53,6 +53,8 @@ function gutterCells(hasNext: boolean): string {
|
|
|
53
53
|
export class CopySelectorComponent implements Component {
|
|
54
54
|
#roots: CopyTarget[];
|
|
55
55
|
#cursorId: string;
|
|
56
|
+
#lastSourceTarget?: CopyTarget;
|
|
57
|
+
#lastSource?: string;
|
|
56
58
|
#treeRows = MIN_TREE_ROWS;
|
|
57
59
|
// Reused across renders to wrap preview content to the pane width.
|
|
58
60
|
#previewText = new Text("", 0, 0);
|
|
@@ -65,7 +67,10 @@ export class CopySelectorComponent implements Component {
|
|
|
65
67
|
this.#cursorId = roots[0]?.id ?? "";
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
invalidate(): void {
|
|
70
|
+
invalidate(): void {
|
|
71
|
+
this.#lastSourceTarget = undefined;
|
|
72
|
+
this.#lastSource = undefined;
|
|
73
|
+
}
|
|
69
74
|
|
|
70
75
|
#flatten(): FlatNode[] {
|
|
71
76
|
const out: FlatNode[] = [];
|
|
@@ -153,9 +158,16 @@ export class CopySelectorComponent implements Component {
|
|
|
153
158
|
// Code/command previews are syntax-highlighted; everything else is shown
|
|
154
159
|
// as plain text. Both are wrapped (not hard-truncated) to the pane width.
|
|
155
160
|
const isCode = target.language !== undefined;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
161
|
+
let source: string;
|
|
162
|
+
if (target === this.#lastSourceTarget && this.#lastSource !== undefined) {
|
|
163
|
+
source = this.#lastSource;
|
|
164
|
+
} else {
|
|
165
|
+
source = isCode
|
|
166
|
+
? highlightCode(replaceTabs(target.preview), target.language).join("\n")
|
|
167
|
+
: replaceTabs(target.preview);
|
|
168
|
+
this.#lastSourceTarget = target;
|
|
169
|
+
this.#lastSource = source;
|
|
170
|
+
}
|
|
159
171
|
this.#previewText.setText(source);
|
|
160
172
|
const wrapped = this.#previewText.render(Math.max(1, width - 4));
|
|
161
173
|
|
|
@@ -61,6 +61,15 @@ export class EvalExecutionComponent extends Container {
|
|
|
61
61
|
this.#contentContainer.addChild(this.#loader);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Transcript finalization contract (see `FinalizableBlock`): the collapsed
|
|
66
|
+
* streaming preview rewrites its tail window every chunk, so the block must
|
|
67
|
+
* stay out of native scrollback until the cell completes.
|
|
68
|
+
*/
|
|
69
|
+
isTranscriptBlockFinalized(): boolean {
|
|
70
|
+
return this.#status !== "running";
|
|
71
|
+
}
|
|
72
|
+
|
|
64
73
|
setExpanded(expanded: boolean): void {
|
|
65
74
|
this.#expanded = expanded;
|
|
66
75
|
this.#updateDisplay();
|
|
@@ -704,29 +704,22 @@ export class ModelSelectorComponent extends Container {
|
|
|
704
704
|
#filterModels(query: string): void {
|
|
705
705
|
const activeProviderId = this.#getActiveProviderId();
|
|
706
706
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
}
|
|
707
|
+
const baseModels = activeProviderId
|
|
708
|
+
? this.#allModels.filter(m => m.provider === activeProviderId)
|
|
709
|
+
: this.#allModels;
|
|
711
710
|
|
|
712
711
|
if (query.trim()) {
|
|
713
|
-
// If user is searching from a provider tab, auto-switch to ALL to show global provider results.
|
|
714
|
-
if (activeProviderId) {
|
|
715
|
-
this.#activeTabIndex = 0;
|
|
716
|
-
if (this.#tabBar && this.#tabBar.getActiveIndex() !== 0) {
|
|
717
|
-
this.#tabBar.setActiveIndex(0);
|
|
718
|
-
return;
|
|
719
|
-
}
|
|
720
|
-
this.#updateTabBar();
|
|
721
|
-
baseModels = this.#allModels;
|
|
722
|
-
}
|
|
723
|
-
|
|
724
712
|
// Match against the displayed "provider/id" string so the user can
|
|
725
713
|
// type what they see: bare names (`mimo`, `kimi`), provider prefixes
|
|
726
714
|
// (`openrouter`), or scoped queries (`openrouter/mimo`) all flow
|
|
727
715
|
// through the same fuzzy matcher. The score is biased by provider-
|
|
728
716
|
// prefix length, so re-sort by MRU/version afterwards; skip role
|
|
729
717
|
// rank so a weakly matching default doesn't trump a stronger match.
|
|
718
|
+
//
|
|
719
|
+
// Search stays scoped to the active provider tab. Auto-escaping to
|
|
720
|
+
// ALL on non-empty queries used to let the user pick a same-named
|
|
721
|
+
// model from a different provider and silently persist it under
|
|
722
|
+
// their default role — see issue #4522.
|
|
730
723
|
const fuzzyMatches = fuzzyFilter(baseModels, query, ({ id, provider }) => `${provider}/${id}`);
|
|
731
724
|
this.#sortModels(fuzzyMatches, { skipRoleRank: true });
|
|
732
725
|
this.#filteredModels = fuzzyMatches;
|
|
@@ -891,8 +884,15 @@ export class ModelSelectorComponent extends Container {
|
|
|
891
884
|
this.#listContainer.addChild(new Text(theme.fg("error", line), 0, 0));
|
|
892
885
|
}
|
|
893
886
|
} else if (visibleItems.length === 0) {
|
|
894
|
-
const
|
|
895
|
-
this.#
|
|
887
|
+
const providerStatus = this.#getProviderEmptyStateMessage();
|
|
888
|
+
const activeProviderId = this.#getActiveProviderId();
|
|
889
|
+
const searching = this.#searchInput.getValue().trim().length > 0;
|
|
890
|
+
const message =
|
|
891
|
+
providerStatus ??
|
|
892
|
+
(searching && activeProviderId
|
|
893
|
+
? ` No matching models in ${formatProviderTabLabel(activeProviderId)}. Switch to ALL to search every provider.`
|
|
894
|
+
: " No matching models");
|
|
895
|
+
this.#listContainer.addChild(new Text(theme.fg("muted", message), 0, 0));
|
|
896
896
|
} else {
|
|
897
897
|
const selected = visibleItems[this.#selectedIndex];
|
|
898
898
|
if (!selected) {
|
|
@@ -414,15 +414,23 @@ class SessionList implements Component {
|
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
handleInput(keyData: string): void {
|
|
417
|
-
// Delete key
|
|
418
|
-
|
|
417
|
+
// Delete key — or Backspace on an empty search query — request delete
|
|
418
|
+
// confirmation from the parent. macOS laptops have no dedicated Forward
|
|
419
|
+
// Delete key: Fn+Backspace is the only way to send \e[3~, and many macOS
|
|
420
|
+
// terminals (Terminal.app, some iTerm2 profiles) deliver \x7f for that
|
|
421
|
+
// combo instead. Regular Backspace on an empty query means "delete
|
|
422
|
+
// session"; with a typed query it stays bound to the search Input so users
|
|
423
|
+
// can still edit their filter text.
|
|
424
|
+
if (
|
|
425
|
+
matchesKey(keyData, "delete") ||
|
|
426
|
+
(matchesKey(keyData, "backspace") && this.#searchInput.getValue().length === 0)
|
|
427
|
+
) {
|
|
419
428
|
const selected = this.#filteredSessions[this.#selectedIndex];
|
|
420
429
|
if (selected && this.onDeleteRequest) {
|
|
421
430
|
this.onDeleteRequest(selected);
|
|
422
431
|
}
|
|
423
432
|
return;
|
|
424
433
|
}
|
|
425
|
-
|
|
426
434
|
// Up arrow
|
|
427
435
|
if (matchesSelectUp(keyData)) {
|
|
428
436
|
this.#selectedIndex = Math.max(0, this.#selectedIndex - 1);
|
|
@@ -702,7 +710,7 @@ export class SessionSelectorComponent extends Container {
|
|
|
702
710
|
/** Blank · keybinding hint · bottom border. Rendered by {@link render}. */
|
|
703
711
|
#footerLines(width: number): string[] {
|
|
704
712
|
const scopeHint = this.#scope === "all" ? "current folder" : "all projects";
|
|
705
|
-
const hint = theme.fg("muted", ` [Del delete · Enter select · Tab ${scopeHint} · Esc cancel]`);
|
|
713
|
+
const hint = theme.fg("muted", ` [Del/⌫ delete · Enter select · Tab ${scopeHint} · Esc cancel]`);
|
|
706
714
|
return ["", hint, "", ...this.#bottomBorder.render(width)];
|
|
707
715
|
}
|
|
708
716
|
|
|
@@ -998,6 +998,10 @@ export class StatusLineComponent implements Component {
|
|
|
998
998
|
output: 0,
|
|
999
999
|
cacheRead: 0,
|
|
1000
1000
|
cacheWrite: 0,
|
|
1001
|
+
totalTokens: 0,
|
|
1002
|
+
orchestrationInput: 0,
|
|
1003
|
+
orchestrationOutput: 0,
|
|
1004
|
+
orchestrationCacheRead: 0,
|
|
1001
1005
|
premiumRequests: 0,
|
|
1002
1006
|
cost: 0,
|
|
1003
1007
|
};
|
|
@@ -362,10 +362,11 @@ const tokenTotalSegment: StatusLineSegment = {
|
|
|
362
362
|
id: "token_total",
|
|
363
363
|
render(ctx) {
|
|
364
364
|
// Excludes cacheRead: that field re-reads the full cached context every
|
|
365
|
-
// turn, making the cumulative sum N×context_size.
|
|
366
|
-
//
|
|
367
|
-
|
|
368
|
-
const
|
|
365
|
+
// turn, making the cumulative sum N×context_size. Orchestration cache read
|
|
366
|
+
// follows the same rule; orchestration input/output remain in the total so
|
|
367
|
+
// provider-side service work is preserved without labeling it prompt input.
|
|
368
|
+
const { input, output, cacheWrite, orchestrationInput, orchestrationOutput } = ctx.usageStats;
|
|
369
|
+
const total = input + output + cacheWrite + orchestrationInput + orchestrationOutput;
|
|
369
370
|
if (!total) return { content: "", visible: false };
|
|
370
371
|
|
|
371
372
|
const content = withIcon(theme.icon.tokens, formatNumber(total));
|
|
@@ -379,7 +380,7 @@ const tokenRateSegment: StatusLineSegment = {
|
|
|
379
380
|
const { tokensPerSecond } = ctx.usageStats;
|
|
380
381
|
if (!tokensPerSecond) return { content: "", visible: false };
|
|
381
382
|
|
|
382
|
-
const content = withIcon(theme.icon.throughput, `${tokensPerSecond.toFixed(1)}/s`);
|
|
383
|
+
const content = withIcon(theme.icon.throughput, `${tokensPerSecond.toFixed(1)} tok/s`);
|
|
383
384
|
return { content: theme.fg("statusLineOutput", content), visible: true };
|
|
384
385
|
},
|
|
385
386
|
};
|
|
@@ -74,6 +74,10 @@ export interface SegmentContext {
|
|
|
74
74
|
output: number;
|
|
75
75
|
cacheRead: number;
|
|
76
76
|
cacheWrite: number;
|
|
77
|
+
totalTokens: number;
|
|
78
|
+
orchestrationInput: number;
|
|
79
|
+
orchestrationOutput: number;
|
|
80
|
+
orchestrationCacheRead: number;
|
|
77
81
|
premiumRequests: number;
|
|
78
82
|
cost: number;
|
|
79
83
|
tokensPerSecond: number | null;
|