gsd-pi 2.77.0-dev.538325aea → 2.77.0-dev.eaa4973bc
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/dist/cli-web-branch.d.ts +1 -0
- package/dist/cli-web-branch.js +3 -0
- package/dist/cli.js +59 -15
- package/dist/extension-discovery.d.ts +6 -0
- package/dist/extension-discovery.js +37 -0
- package/dist/extension-registry.d.ts +3 -0
- package/dist/extension-registry.js +1 -1
- package/dist/extension-sort.d.ts +18 -0
- package/dist/extension-sort.js +114 -0
- package/dist/extension-validator.d.ts +47 -0
- package/dist/extension-validator.js +127 -0
- package/dist/headless-ui.d.ts +1 -1
- package/dist/headless.js +4 -2
- package/dist/loader.js +36 -7
- package/dist/onboarding.js +5 -5
- package/dist/provider-migrations.d.ts +20 -2
- package/dist/provider-migrations.js +15 -2
- package/dist/remote-questions-config.js +1 -1
- package/dist/resources/extensions/async-jobs/async-bash-tool.js +1 -1
- package/dist/resources/extensions/aws-auth/index.js +1 -2
- package/dist/resources/extensions/bg-shell/bg-shell-lifecycle.js +9 -6
- package/dist/resources/extensions/bg-shell/process-manager.js +1 -2
- package/dist/resources/extensions/browser-tools/index.js +1 -0
- package/dist/resources/extensions/claude-code-cli/index.js +1 -1
- package/dist/resources/extensions/claude-code-cli/partial-builder.js +17 -106
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +71 -57
- package/dist/resources/extensions/cmux/index.js +20 -0
- package/dist/resources/extensions/google-search/extension-manifest.json +5 -4
- package/dist/resources/extensions/google-search/index.js +2 -375
- package/dist/resources/extensions/gsd/abandon-detect.js +44 -0
- package/dist/resources/extensions/gsd/auto/resolve.js +24 -0
- package/dist/resources/extensions/gsd/auto/run-unit.js +10 -2
- package/dist/resources/extensions/gsd/auto/turn-epoch.js +95 -0
- package/dist/resources/extensions/gsd/auto-dispatch.js +24 -0
- package/dist/resources/extensions/gsd/auto-loop.js +1 -1
- package/dist/resources/extensions/gsd/auto-post-unit.js +31 -0
- package/dist/resources/extensions/gsd/auto-timeout-recovery.js +11 -5
- package/dist/resources/extensions/gsd/auto-unit-closeout.js +11 -2
- package/dist/resources/extensions/gsd/auto-worktree.js +58 -8
- package/dist/resources/extensions/gsd/auto.js +31 -14
- package/dist/resources/extensions/gsd/bootstrap/provider-error-resume.js +4 -2
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +11 -0
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +11 -6
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +31 -4
- package/dist/resources/extensions/gsd/commands-cmux.js +9 -6
- package/dist/resources/extensions/gsd/commands-extensions.js +634 -43
- package/dist/resources/extensions/gsd/file-lock.js +49 -9
- package/dist/resources/extensions/gsd/git-service.js +1 -0
- package/dist/resources/extensions/gsd/gitignore.js +1 -0
- package/dist/resources/extensions/gsd/guided-flow-queue.js +4 -1
- package/dist/resources/extensions/gsd/guided-flow.js +1 -1
- package/dist/resources/extensions/gsd/journal.js +17 -2
- package/dist/resources/extensions/gsd/milestone-actions.js +15 -0
- package/dist/resources/extensions/gsd/notifications.js +30 -16
- package/dist/resources/extensions/gsd/reports.js +5 -4
- package/dist/resources/extensions/gsd/tools/complete-slice.js +21 -0
- package/dist/resources/extensions/gsd/tools/complete-task.js +31 -0
- package/dist/resources/extensions/gsd/uok/audit.js +18 -2
- package/dist/resources/extensions/gsd/workflow-logger.js +10 -2
- package/dist/resources/extensions/gsd/worktree-manager.js +1 -0
- package/dist/resources/extensions/mcp-client/auth.js +10 -1
- package/dist/resources/extensions/mcp-client/index.js +119 -10
- package/dist/resources/extensions/ollama/index.js +2 -1
- package/dist/resources/extensions/ollama/ollama-chat-provider.js +15 -5
- package/dist/resources/extensions/remote-questions/config.js +1 -12
- package/dist/resources/extensions/shared/cmux-events.js +12 -0
- package/dist/resources/extensions/shared/rtk-session-stats.js +1 -2
- package/dist/resources/extensions/universal-config/index.js +1 -1
- package/dist/resources/skills/create-skill/SKILL.md +2 -2
- package/dist/resources/skills/create-skill/references/gsd-skill-ecosystem.md +4 -4
- package/dist/resources/skills/create-skill/workflows/audit-skill.md +4 -4
- package/dist/resources/skills/create-skill/workflows/create-new-skill.md +5 -5
- package/dist/security-overrides.d.ts +1 -4
- package/dist/security-overrides.js +3 -16
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +11 -11
- package/dist/web/standalone/.next/build-manifest.json +3 -3
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +11 -11
- package/dist/web/standalone/.next/server/chunks/1926.js +1 -0
- package/dist/web/standalone/.next/server/chunks/6897.js +2 -2
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-manifest.json +5 -5
- package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/chunks/2826.e9f5195e91f9cad2.js +11 -0
- package/dist/web/standalone/.next/static/chunks/{webpack-1832629448831fdc.js → webpack-2e68521d7c82f7c2.js} +1 -1
- package/dist/web-mode.js +1 -1
- package/dist/welcome-screen.js +20 -19
- package/dist/wizard.js +5 -2
- package/package.json +16 -32
- package/packages/mcp-server/README.md +3 -3
- package/packages/mcp-server/dist/env-writer.d.ts +1 -0
- package/packages/mcp-server/dist/env-writer.d.ts.map +1 -1
- package/packages/mcp-server/dist/env-writer.js +74 -6
- package/packages/mcp-server/dist/env-writer.js.map +1 -1
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +36 -17
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/package.json +5 -0
- package/packages/mcp-server/src/env-writer.test.ts +79 -1
- package/packages/mcp-server/src/env-writer.ts +76 -6
- package/packages/mcp-server/src/readers/readers.test.ts +5 -1
- package/packages/mcp-server/src/server.ts +45 -19
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/package.json +5 -0
- package/packages/native/src/__tests__/clipboard.test.mjs +69 -23
- package/packages/native/tsconfig.json +1 -2
- package/packages/native/tsconfig.tsbuildinfo +1 -0
- package/packages/pi-agent-core/package.json +5 -0
- package/packages/pi-agent-core/src/agent-loop.test.ts +220 -15
- package/packages/pi-ai/package.json +5 -0
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts +25 -0
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js +105 -6
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.test.js +230 -28
- package/packages/pi-coding-agent/dist/core/compaction/compaction.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/utils.d.ts +30 -2
- package/packages/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/utils.js +113 -12
- package/packages/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.js +29 -18
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.js +130 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/compaction-utils.test.js +56 -1
- package/packages/pi-coding-agent/dist/core/compaction-utils.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/discovery-cache.test.js +8 -15
- package/packages/pi-coding-agent/dist/core/discovery-cache.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-discovery.d.ts +25 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-discovery.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-discovery.js +109 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-discovery.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-registry.d.ts +67 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-registry.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-registry.js +167 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-registry.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts +3 -2
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +24 -8
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +7 -0
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.js +11 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +2 -2
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +4 -1
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.test.js +19 -1
- package/packages/pi-coding-agent/dist/core/sdk.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +3 -3
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/path-utils.test.js +2 -1
- package/packages/pi-coding-agent/dist/core/tools/path-utils.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/provider-display-name.test.js +15 -6
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/provider-display-name.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +14 -5
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.d.ts +7 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.js +31 -9
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js +14 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js.map +1 -1
- package/packages/pi-coding-agent/package.json +5 -0
- package/packages/pi-coding-agent/src/core/compaction/compaction.test.ts +368 -28
- package/packages/pi-coding-agent/src/core/compaction/compaction.ts +122 -6
- package/packages/pi-coding-agent/src/core/compaction/utils.ts +111 -13
- package/packages/pi-coding-agent/src/core/compaction-orchestrator.test.ts +154 -0
- package/packages/pi-coding-agent/src/core/compaction-orchestrator.ts +32 -18
- package/packages/pi-coding-agent/src/core/compaction-utils.test.ts +68 -1
- package/packages/pi-coding-agent/src/core/discovery-cache.test.ts +9 -18
- package/packages/pi-coding-agent/src/core/extensions/extension-discovery.ts +119 -0
- package/packages/pi-coding-agent/src/core/extensions/extension-registry.ts +222 -0
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +24 -11
- package/packages/pi-coding-agent/src/core/extensions/types.ts +8 -0
- package/packages/pi-coding-agent/src/core/lsp/lsp-integration.test.ts +13 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +2 -2
- package/packages/pi-coding-agent/src/core/resource-loader.ts +1 -1
- package/packages/pi-coding-agent/src/core/sdk.test.ts +25 -1
- package/packages/pi-coding-agent/src/core/sdk.ts +10 -3
- package/packages/pi-coding-agent/src/core/system-prompt.ts +3 -3
- package/packages/pi-coding-agent/src/core/tools/path-utils.test.ts +2 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/provider-display-name.test.ts +17 -7
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +14 -5
- package/packages/pi-coding-agent/src/modes/interactive/components/model-selector.ts +45 -11
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.ts +14 -0
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/dist/__tests__/autocomplete.test.js +12 -5
- package/packages/pi-tui/dist/__tests__/autocomplete.test.js.map +1 -1
- package/packages/pi-tui/dist/__tests__/stdin-buffer.test.js +19 -0
- package/packages/pi-tui/dist/__tests__/stdin-buffer.test.js.map +1 -1
- package/packages/pi-tui/dist/stdin-buffer.d.ts +7 -0
- package/packages/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
- package/packages/pi-tui/dist/stdin-buffer.js +20 -0
- package/packages/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/packages/pi-tui/package.json +5 -0
- package/packages/pi-tui/src/__tests__/autocomplete.test.ts +20 -5
- package/packages/pi-tui/src/__tests__/stdin-buffer.test.ts +25 -0
- package/packages/pi-tui/src/stdin-buffer.ts +26 -0
- package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
- package/packages/rpc-client/package.json +5 -0
- package/pkg/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/pkg/dist/core/export-html/ansi-to-html.js +0 -1
- package/pkg/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/pkg/dist/core/export-html/index.d.ts +1 -1
- package/pkg/dist/core/export-html/index.d.ts.map +1 -1
- package/pkg/dist/core/export-html/index.js +5 -39
- package/pkg/dist/core/export-html/index.js.map +1 -1
- package/pkg/dist/core/export-html/tool-renderer.d.ts +2 -2
- package/pkg/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/pkg/dist/core/export-html/tool-renderer.js.map +1 -1
- package/scripts/ensure-workspace-builds.cjs +0 -2
- package/scripts/lib/workspace-manifest.cjs +86 -0
- package/scripts/link-workspace-packages.cjs +5 -19
- package/src/resources/extensions/async-jobs/async-bash-tool.ts +1 -1
- package/src/resources/extensions/aws-auth/index.ts +1 -2
- package/src/resources/extensions/bg-shell/bg-shell-lifecycle.ts +7 -4
- package/src/resources/extensions/bg-shell/index.ts +1 -2
- package/src/resources/extensions/bg-shell/process-manager.ts +1 -2
- package/src/resources/extensions/browser-tools/index.ts +1 -2
- package/src/resources/extensions/claude-code-cli/index.ts +1 -1
- package/src/resources/extensions/claude-code-cli/partial-builder.ts +23 -115
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +81 -61
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +91 -22
- package/src/resources/extensions/cmux/index.ts +35 -10
- package/src/resources/extensions/google-search/extension-manifest.json +5 -4
- package/src/resources/extensions/google-search/index.ts +8 -470
- package/src/resources/extensions/gsd/abandon-detect.ts +62 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +1 -1
- package/src/resources/extensions/gsd/auto/resolve.ts +29 -0
- package/src/resources/extensions/gsd/auto/run-unit.ts +16 -2
- package/src/resources/extensions/gsd/auto/turn-epoch.ts +108 -0
- package/src/resources/extensions/gsd/auto/types.ts +1 -1
- package/src/resources/extensions/gsd/auto-dispatch.ts +20 -0
- package/src/resources/extensions/gsd/auto-loop.ts +1 -1
- package/src/resources/extensions/gsd/auto-post-unit.ts +30 -0
- package/src/resources/extensions/gsd/auto-timeout-recovery.ts +12 -5
- package/src/resources/extensions/gsd/auto-unit-closeout.ts +14 -3
- package/src/resources/extensions/gsd/auto-worktree.ts +60 -5
- package/src/resources/extensions/gsd/auto.ts +37 -18
- package/src/resources/extensions/gsd/bootstrap/provider-error-resume.ts +6 -2
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +11 -0
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +13 -9
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +27 -8
- package/src/resources/extensions/gsd/commands-cmux.ts +10 -6
- package/src/resources/extensions/gsd/commands-extensions.ts +747 -41
- package/src/resources/extensions/gsd/file-lock.ts +84 -11
- package/src/resources/extensions/gsd/git-service.ts +1 -0
- package/src/resources/extensions/gsd/gitignore.ts +1 -0
- package/src/resources/extensions/gsd/guided-flow-queue.ts +4 -1
- package/src/resources/extensions/gsd/guided-flow.ts +1 -1
- package/src/resources/extensions/gsd/journal.ts +27 -2
- package/src/resources/extensions/gsd/milestone-actions.ts +18 -0
- package/src/resources/extensions/gsd/notifications.ts +27 -15
- package/src/resources/extensions/gsd/reports.ts +5 -4
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +11 -2
- package/src/resources/extensions/gsd/tests/auto-mode-guards.test.ts +79 -0
- package/src/resources/extensions/gsd/tests/cmux.test.ts +5 -9
- package/src/resources/extensions/gsd/tests/file-lock.test.ts +86 -12
- package/src/resources/extensions/gsd/tests/google-search-stub.test.ts +121 -0
- package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +3 -2
- package/src/resources/extensions/gsd/tests/mcp-client-security.test.ts +76 -0
- package/src/resources/extensions/gsd/tests/milestone-transition-state-rebuild.test.ts +4 -2
- package/src/resources/extensions/gsd/tests/parallel-commit-scope.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/parallel-skill-prompt-integration.test.ts +150 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +39 -25
- package/src/resources/extensions/gsd/tests/queue-auto-guard.test.ts +181 -0
- package/src/resources/extensions/gsd/tests/quick-auto-guard.test.ts +13 -7
- package/src/resources/extensions/gsd/tests/require-slice-discussion-dispatch.test.ts +170 -0
- package/src/resources/extensions/gsd/tests/rewrite-docs-abandon-detect.test.ts +195 -0
- package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/triage-resolution.test.ts +50 -2
- package/src/resources/extensions/gsd/tests/turn-epoch.test.ts +162 -0
- package/src/resources/extensions/gsd/tests/validate-extension-package.test.ts +168 -0
- package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +25 -2
- package/src/resources/extensions/gsd/tools/complete-slice.ts +38 -0
- package/src/resources/extensions/gsd/tools/complete-task.ts +49 -0
- package/src/resources/extensions/gsd/uok/audit.ts +20 -2
- package/src/resources/extensions/gsd/workflow-logger.ts +22 -3
- package/src/resources/extensions/gsd/worktree-manager.ts +1 -0
- package/src/resources/extensions/mcp-client/auth.ts +12 -1
- package/src/resources/extensions/mcp-client/index.ts +130 -11
- package/src/resources/extensions/ollama/index.ts +3 -3
- package/src/resources/extensions/ollama/ollama-chat-provider.ts +18 -6
- package/src/resources/extensions/remote-questions/config.ts +4 -15
- package/src/resources/extensions/search-the-web/index.ts +1 -2
- package/src/resources/extensions/shared/cmux-events.ts +59 -0
- package/src/resources/extensions/shared/rtk-session-stats.ts +1 -2
- package/src/resources/extensions/shared/tests/format-utils.test.ts +3 -5
- package/src/resources/extensions/universal-config/index.ts +1 -1
- package/src/resources/skills/create-skill/SKILL.md +2 -2
- package/src/resources/skills/create-skill/references/gsd-skill-ecosystem.md +4 -4
- package/src/resources/skills/create-skill/workflows/audit-skill.md +4 -4
- package/src/resources/skills/create-skill/workflows/create-new-skill.md +5 -5
- package/dist/web/standalone/.next/server/chunks/7461.js +0 -1
- package/dist/web/standalone/.next/static/chunks/2826.d445fb428ef41fa1.js +0 -9
- package/packages/gsd-agent-core/dist/agent-session.d.ts +0 -716
- package/packages/gsd-agent-core/dist/agent-session.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/agent-session.js +0 -2595
- package/packages/gsd-agent-core/dist/agent-session.js.map +0 -1
- package/packages/gsd-agent-core/dist/artifact-manager.d.ts +0 -52
- package/packages/gsd-agent-core/dist/artifact-manager.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/artifact-manager.js +0 -118
- package/packages/gsd-agent-core/dist/artifact-manager.js.map +0 -1
- package/packages/gsd-agent-core/dist/bash-executor.d.ts +0 -57
- package/packages/gsd-agent-core/dist/bash-executor.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/bash-executor.js +0 -282
- package/packages/gsd-agent-core/dist/bash-executor.js.map +0 -1
- package/packages/gsd-agent-core/dist/blob-store.d.ts +0 -39
- package/packages/gsd-agent-core/dist/blob-store.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/blob-store.js +0 -151
- package/packages/gsd-agent-core/dist/blob-store.js.map +0 -1
- package/packages/gsd-agent-core/dist/compaction/branch-summarization.d.ts +0 -90
- package/packages/gsd-agent-core/dist/compaction/branch-summarization.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/compaction/branch-summarization.js +0 -207
- package/packages/gsd-agent-core/dist/compaction/branch-summarization.js.map +0 -1
- package/packages/gsd-agent-core/dist/compaction/compaction.d.ts +0 -137
- package/packages/gsd-agent-core/dist/compaction/compaction.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/compaction/compaction.js +0 -621
- package/packages/gsd-agent-core/dist/compaction/compaction.js.map +0 -1
- package/packages/gsd-agent-core/dist/compaction/index.d.ts +0 -7
- package/packages/gsd-agent-core/dist/compaction/index.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/compaction/index.js +0 -7
- package/packages/gsd-agent-core/dist/compaction/index.js.map +0 -1
- package/packages/gsd-agent-core/dist/compaction/utils.d.ts +0 -78
- package/packages/gsd-agent-core/dist/compaction/utils.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/compaction/utils.js +0 -263
- package/packages/gsd-agent-core/dist/compaction/utils.js.map +0 -1
- package/packages/gsd-agent-core/dist/compaction-orchestrator.d.ts +0 -90
- package/packages/gsd-agent-core/dist/compaction-orchestrator.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/compaction-orchestrator.js +0 -338
- package/packages/gsd-agent-core/dist/compaction-orchestrator.js.map +0 -1
- package/packages/gsd-agent-core/dist/contextual-tips.d.ts +0 -43
- package/packages/gsd-agent-core/dist/contextual-tips.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/contextual-tips.js +0 -208
- package/packages/gsd-agent-core/dist/contextual-tips.js.map +0 -1
- package/packages/gsd-agent-core/dist/export-html/ansi-to-html.d.ts +0 -18
- package/packages/gsd-agent-core/dist/export-html/ansi-to-html.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/export-html/ansi-to-html.js +0 -250
- package/packages/gsd-agent-core/dist/export-html/ansi-to-html.js.map +0 -1
- package/packages/gsd-agent-core/dist/export-html/index.d.ts +0 -37
- package/packages/gsd-agent-core/dist/export-html/index.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/export-html/index.js +0 -257
- package/packages/gsd-agent-core/dist/export-html/index.js.map +0 -1
- package/packages/gsd-agent-core/dist/export-html/template.css +0 -971
- package/packages/gsd-agent-core/dist/export-html/template.html +0 -54
- package/packages/gsd-agent-core/dist/export-html/template.js +0 -1583
- package/packages/gsd-agent-core/dist/export-html/tool-renderer.d.ts +0 -38
- package/packages/gsd-agent-core/dist/export-html/tool-renderer.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/export-html/tool-renderer.js +0 -70
- package/packages/gsd-agent-core/dist/export-html/tool-renderer.js.map +0 -1
- package/packages/gsd-agent-core/dist/export-html/vendor/highlight.min.js +0 -1213
- package/packages/gsd-agent-core/dist/export-html/vendor/marked.min.js +0 -6
- package/packages/gsd-agent-core/dist/fallback-resolver.d.ts +0 -75
- package/packages/gsd-agent-core/dist/fallback-resolver.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/fallback-resolver.js +0 -118
- package/packages/gsd-agent-core/dist/fallback-resolver.js.map +0 -1
- package/packages/gsd-agent-core/dist/image-overflow-recovery.d.ts +0 -44
- package/packages/gsd-agent-core/dist/image-overflow-recovery.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/image-overflow-recovery.js +0 -99
- package/packages/gsd-agent-core/dist/image-overflow-recovery.js.map +0 -1
- package/packages/gsd-agent-core/dist/index.d.ts +0 -14
- package/packages/gsd-agent-core/dist/index.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/index.js +0 -19
- package/packages/gsd-agent-core/dist/index.js.map +0 -1
- package/packages/gsd-agent-core/dist/keybindings.d.ts +0 -47
- package/packages/gsd-agent-core/dist/keybindings.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/keybindings.js +0 -156
- package/packages/gsd-agent-core/dist/keybindings.js.map +0 -1
- package/packages/gsd-agent-core/dist/lifecycle-hooks.d.ts +0 -42
- package/packages/gsd-agent-core/dist/lifecycle-hooks.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/lifecycle-hooks.js +0 -204
- package/packages/gsd-agent-core/dist/lifecycle-hooks.js.map +0 -1
- package/packages/gsd-agent-core/dist/retry-handler.d.ts +0 -128
- package/packages/gsd-agent-core/dist/retry-handler.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/retry-handler.js +0 -518
- package/packages/gsd-agent-core/dist/retry-handler.js.map +0 -1
- package/packages/gsd-agent-core/dist/sdk.d.ts +0 -159
- package/packages/gsd-agent-core/dist/sdk.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/sdk.js +0 -375
- package/packages/gsd-agent-core/dist/sdk.js.map +0 -1
- package/packages/gsd-agent-core/dist/system-prompt.d.ts +0 -28
- package/packages/gsd-agent-core/dist/system-prompt.d.ts.map +0 -1
- package/packages/gsd-agent-core/dist/system-prompt.js +0 -201
- package/packages/gsd-agent-core/dist/system-prompt.js.map +0 -1
- package/packages/gsd-agent-core/package.json +0 -25
- package/packages/gsd-agent-core/scripts/copy-assets.cjs +0 -43
- package/packages/gsd-agent-core/src/agent-session.test.ts +0 -169
- package/packages/gsd-agent-core/src/agent-session.ts +0 -3358
- package/packages/gsd-agent-core/src/artifact-manager.ts +0 -126
- package/packages/gsd-agent-core/src/bash-executor.ts +0 -352
- package/packages/gsd-agent-core/src/blob-store.ts +0 -154
- package/packages/gsd-agent-core/src/compaction/branch-summarization.ts +0 -317
- package/packages/gsd-agent-core/src/compaction/compaction.ts +0 -855
- package/packages/gsd-agent-core/src/compaction/index.ts +0 -7
- package/packages/gsd-agent-core/src/compaction/utils.ts +0 -312
- package/packages/gsd-agent-core/src/compaction-orchestrator.ts +0 -449
- package/packages/gsd-agent-core/src/contextual-tips.ts +0 -232
- package/packages/gsd-agent-core/src/export-html/ansi-to-html.ts +0 -259
- package/packages/gsd-agent-core/src/export-html/index.ts +0 -345
- package/packages/gsd-agent-core/src/export-html/template.css +0 -971
- package/packages/gsd-agent-core/src/export-html/template.html +0 -54
- package/packages/gsd-agent-core/src/export-html/template.js +0 -1583
- package/packages/gsd-agent-core/src/export-html/tool-renderer.ts +0 -114
- package/packages/gsd-agent-core/src/export-html/vendor/highlight.min.js +0 -1213
- package/packages/gsd-agent-core/src/export-html/vendor/marked.min.js +0 -6
- package/packages/gsd-agent-core/src/fallback-resolver.ts +0 -193
- package/packages/gsd-agent-core/src/image-overflow-recovery.ts +0 -120
- package/packages/gsd-agent-core/src/index.ts +0 -68
- package/packages/gsd-agent-core/src/keybindings.ts +0 -220
- package/packages/gsd-agent-core/src/lifecycle-hooks.ts +0 -284
- package/packages/gsd-agent-core/src/retry-handler.ts +0 -620
- package/packages/gsd-agent-core/src/sdk.ts +0 -550
- package/packages/gsd-agent-core/src/system-prompt.ts +0 -270
- package/packages/gsd-agent-core/tsconfig.json +0 -28
- package/packages/gsd-agent-core/tsconfig.tsbuildinfo +0 -1
- package/packages/gsd-agent-modes/dist/cli/args.d.ts +0 -58
- package/packages/gsd-agent-modes/dist/cli/args.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/cli/args.js +0 -324
- package/packages/gsd-agent-modes/dist/cli/args.js.map +0 -1
- package/packages/gsd-agent-modes/dist/cli/config-selector.d.ts +0 -13
- package/packages/gsd-agent-modes/dist/cli/config-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/cli/config-selector.js +0 -32
- package/packages/gsd-agent-modes/dist/cli/config-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/cli/file-processor.d.ts +0 -15
- package/packages/gsd-agent-modes/dist/cli/file-processor.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/cli/file-processor.js +0 -86
- package/packages/gsd-agent-modes/dist/cli/file-processor.js.map +0 -1
- package/packages/gsd-agent-modes/dist/cli/list-models.d.ts +0 -21
- package/packages/gsd-agent-modes/dist/cli/list-models.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/cli/list-models.js +0 -114
- package/packages/gsd-agent-modes/dist/cli/list-models.js.map +0 -1
- package/packages/gsd-agent-modes/dist/cli/session-picker.d.ts +0 -10
- package/packages/gsd-agent-modes/dist/cli/session-picker.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/cli/session-picker.js +0 -37
- package/packages/gsd-agent-modes/dist/cli/session-picker.js.map +0 -1
- package/packages/gsd-agent-modes/dist/index.d.ts +0 -7
- package/packages/gsd-agent-modes/dist/index.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/index.js +0 -7
- package/packages/gsd-agent-modes/dist/index.js.map +0 -1
- package/packages/gsd-agent-modes/dist/main.d.ts +0 -8
- package/packages/gsd-agent-modes/dist/main.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/main.js +0 -491
- package/packages/gsd-agent-modes/dist/main.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/armin.d.ts +0 -34
- package/packages/gsd-agent-modes/dist/modes/interactive/components/armin.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/armin.js +0 -330
- package/packages/gsd-agent-modes/dist/modes/interactive/components/armin.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.d.ts +0 -29
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.js +0 -141
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/bash-execution.d.ts +0 -36
- package/packages/gsd-agent-modes/dist/modes/interactive/components/bash-execution.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/bash-execution.js +0 -157
- package/packages/gsd-agent-modes/dist/modes/interactive/components/bash-execution.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/bordered-loader.d.ts +0 -16
- package/packages/gsd-agent-modes/dist/modes/interactive/components/bordered-loader.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/bordered-loader.js +0 -48
- package/packages/gsd-agent-modes/dist/modes/interactive/components/bordered-loader.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.d.ts +0 -16
- package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.js +0 -43
- package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-frame.d.ts +0 -11
- package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-frame.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-frame.js +0 -47
- package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-frame.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -16
- package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.js +0 -44
- package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/config-selector.d.ts +0 -71
- package/packages/gsd-agent-modes/dist/modes/interactive/components/config-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/config-selector.js +0 -474
- package/packages/gsd-agent-modes/dist/modes/interactive/components/config-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/countdown-timer.d.ts +0 -15
- package/packages/gsd-agent-modes/dist/modes/interactive/components/countdown-timer.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/countdown-timer.js +0 -32
- package/packages/gsd-agent-modes/dist/modes/interactive/components/countdown-timer.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.d.ts +0 -22
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.js +0 -70
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-message.d.ts +0 -20
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-message.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-message.js +0 -75
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-message.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/daxnuts.d.ts +0 -23
- package/packages/gsd-agent-modes/dist/modes/interactive/components/daxnuts.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/daxnuts.js +0 -140
- package/packages/gsd-agent-modes/dist/modes/interactive/components/daxnuts.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/diff.d.ts +0 -12
- package/packages/gsd-agent-modes/dist/modes/interactive/components/diff.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/diff.js +0 -133
- package/packages/gsd-agent-modes/dist/modes/interactive/components/diff.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/dynamic-border.d.ts +0 -33
- package/packages/gsd-agent-modes/dist/modes/interactive/components/dynamic-border.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/dynamic-border.js +0 -82
- package/packages/gsd-agent-modes/dist/modes/interactive/components/dynamic-border.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.d.ts +0 -20
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.js +0 -111
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.d.ts +0 -24
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.js +0 -63
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.d.ts +0 -33
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.js +0 -118
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.d.ts +0 -32
- package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.js +0 -230
- package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/index.d.ts +0 -34
- package/packages/gsd-agent-modes/dist/modes/interactive/components/index.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/index.js +0 -36
- package/packages/gsd-agent-modes/dist/modes/interactive/components/index.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/keybinding-hints.d.ts +0 -48
- package/packages/gsd-agent-modes/dist/modes/interactive/components/keybinding-hints.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/keybinding-hints.js +0 -72
- package/packages/gsd-agent-modes/dist/modes/interactive/components/keybinding-hints.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.d.ts +0 -63
- package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.js +0 -213
- package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/model-selector.d.ts +0 -86
- package/packages/gsd-agent-modes/dist/modes/interactive/components/model-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/model-selector.js +0 -536
- package/packages/gsd-agent-modes/dist/modes/interactive/components/model-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.d.ts +0 -19
- package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.js +0 -93
- package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/provider-manager.d.ts +0 -30
- package/packages/gsd-agent-modes/dist/modes/interactive/components/provider-manager.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/provider-manager.js +0 -169
- package/packages/gsd-agent-modes/dist/modes/interactive/components/provider-manager.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -49
- package/packages/gsd-agent-modes/dist/modes/interactive/components/scoped-models-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/scoped-models-selector.js +0 -267
- package/packages/gsd-agent-modes/dist/modes/interactive/components/scoped-models-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/session-selector-search.d.ts +0 -21
- package/packages/gsd-agent-modes/dist/modes/interactive/components/session-selector-search.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/session-selector-search.js +0 -155
- package/packages/gsd-agent-modes/dist/modes/interactive/components/session-selector-search.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/session-selector.d.ts +0 -97
- package/packages/gsd-agent-modes/dist/modes/interactive/components/session-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/session-selector.js +0 -810
- package/packages/gsd-agent-modes/dist/modes/interactive/components/session-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/settings-selector.d.ts +0 -71
- package/packages/gsd-agent-modes/dist/modes/interactive/components/settings-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/settings-selector.js +0 -320
- package/packages/gsd-agent-modes/dist/modes/interactive/components/settings-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/show-images-selector.d.ts +0 -10
- package/packages/gsd-agent-modes/dist/modes/interactive/components/show-images-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/show-images-selector.js +0 -34
- package/packages/gsd-agent-modes/dist/modes/interactive/components/show-images-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -17
- package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.js +0 -46
- package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/theme-selector.d.ts +0 -11
- package/packages/gsd-agent-modes/dist/modes/interactive/components/theme-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/theme-selector.js +0 -45
- package/packages/gsd-agent-modes/dist/modes/interactive/components/theme-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/thinking-selector.d.ts +0 -11
- package/packages/gsd-agent-modes/dist/modes/interactive/components/thinking-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/thinking-selector.js +0 -46
- package/packages/gsd-agent-modes/dist/modes/interactive/components/thinking-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/timestamp.d.ts +0 -15
- package/packages/gsd-agent-modes/dist/modes/interactive/components/timestamp.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/timestamp.js +0 -40
- package/packages/gsd-agent-modes/dist/modes/interactive/components/timestamp.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.d.ts +0 -111
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.js +0 -984
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tree-render-utils.d.ts +0 -44
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tree-render-utils.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tree-render-utils.js +0 -61
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tree-render-utils.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tree-selector.d.ts +0 -109
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tree-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tree-selector.js +0 -1035
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tree-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message-selector.d.ts +0 -30
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message-selector.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message-selector.js +0 -112
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message-selector.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.d.ts +0 -12
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.js +0 -38
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/visual-truncate.d.ts +0 -24
- package/packages/gsd-agent-modes/dist/modes/interactive/components/visual-truncate.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/visual-truncate.js +0 -33
- package/packages/gsd-agent-modes/dist/modes/interactive/components/visual-truncate.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.d.ts +0 -27
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js +0 -793
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/extension-ui-controller.d.ts +0 -4
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/extension-ui-controller.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/extension-ui-controller.js +0 -62
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/extension-ui-controller.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.d.ts +0 -22
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.js +0 -118
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/model-controller.d.ts +0 -7
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/model-controller.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/model-controller.js +0 -68
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/model-controller.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-state.d.ts +0 -50
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-state.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-state.js +0 -2
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-state.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.d.ts +0 -358
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js +0 -3409
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/slash-command-handlers.d.ts +0 -77
- package/packages/gsd-agent-modes/dist/modes/interactive/slash-command-handlers.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/slash-command-handlers.js +0 -529
- package/packages/gsd-agent-modes/dist/modes/interactive/slash-command-handlers.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/utils/shorten-path.d.ts +0 -6
- package/packages/gsd-agent-modes/dist/modes/interactive/utils/shorten-path.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/utils/shorten-path.js +0 -15
- package/packages/gsd-agent-modes/dist/modes/interactive/utils/shorten-path.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/print-mode.d.ts +0 -28
- package/packages/gsd-agent-modes/dist/modes/print-mode.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/print-mode.js +0 -84
- package/packages/gsd-agent-modes/dist/modes/print-mode.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/jsonl.d.ts +0 -17
- package/packages/gsd-agent-modes/dist/modes/rpc/jsonl.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/jsonl.js +0 -49
- package/packages/gsd-agent-modes/dist/modes/rpc/jsonl.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/remote-terminal.d.ts +0 -37
- package/packages/gsd-agent-modes/dist/modes/rpc/remote-terminal.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/remote-terminal.js +0 -84
- package/packages/gsd-agent-modes/dist/modes/rpc/remote-terminal.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-client.d.ts +0 -243
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-client.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-client.js +0 -464
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-client.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-mode.d.ts +0 -25
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-mode.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-mode.js +0 -750
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-mode.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-types.d.ts +0 -511
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-types.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-types.js +0 -8
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-types.js.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/shared/command-context-actions.d.ts +0 -19
- package/packages/gsd-agent-modes/dist/modes/shared/command-context-actions.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/modes/shared/command-context-actions.js +0 -45
- package/packages/gsd-agent-modes/dist/modes/shared/command-context-actions.js.map +0 -1
- package/packages/gsd-agent-modes/dist/pi-coding-agent-compat.d.ts +0 -22
- package/packages/gsd-agent-modes/dist/pi-coding-agent-compat.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/pi-coding-agent-compat.js +0 -21
- package/packages/gsd-agent-modes/dist/pi-coding-agent-compat.js.map +0 -1
- package/packages/gsd-agent-modes/dist/pi-tui-compat.d.ts +0 -4
- package/packages/gsd-agent-modes/dist/pi-tui-compat.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/pi-tui-compat.js +0 -3
- package/packages/gsd-agent-modes/dist/pi-tui-compat.js.map +0 -1
- package/packages/gsd-agent-modes/dist/theme.d.ts +0 -15
- package/packages/gsd-agent-modes/dist/theme.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/theme.js +0 -23
- package/packages/gsd-agent-modes/dist/theme.js.map +0 -1
- package/packages/gsd-agent-modes/dist/utils/theme.d.ts +0 -16
- package/packages/gsd-agent-modes/dist/utils/theme.d.ts.map +0 -1
- package/packages/gsd-agent-modes/dist/utils/theme.js +0 -11
- package/packages/gsd-agent-modes/dist/utils/theme.js.map +0 -1
- package/packages/gsd-agent-modes/package.json +0 -23
- package/packages/gsd-agent-modes/src/cli/args.ts +0 -350
- package/packages/gsd-agent-modes/src/cli/config-selector.ts +0 -54
- package/packages/gsd-agent-modes/src/cli/file-processor.ts +0 -107
- package/packages/gsd-agent-modes/src/cli/list-models.ts +0 -141
- package/packages/gsd-agent-modes/src/cli/session-picker.ts +0 -59
- package/packages/gsd-agent-modes/src/index.ts +0 -6
- package/packages/gsd-agent-modes/src/main.ts +0 -614
- package/packages/gsd-agent-modes/src/modes/interactive/components/__tests__/login-dialog.test.ts +0 -24
- package/packages/gsd-agent-modes/src/modes/interactive/components/__tests__/provider-display-name.test.ts +0 -18
- package/packages/gsd-agent-modes/src/modes/interactive/components/__tests__/timestamp.test.ts +0 -38
- package/packages/gsd-agent-modes/src/modes/interactive/components/__tests__/tool-execution.test.ts +0 -171
- package/packages/gsd-agent-modes/src/modes/interactive/components/armin.ts +0 -382
- package/packages/gsd-agent-modes/src/modes/interactive/components/assistant-message.ts +0 -178
- package/packages/gsd-agent-modes/src/modes/interactive/components/bash-execution.ts +0 -212
- package/packages/gsd-agent-modes/src/modes/interactive/components/bordered-loader.ts +0 -66
- package/packages/gsd-agent-modes/src/modes/interactive/components/branch-summary-message.ts +0 -59
- package/packages/gsd-agent-modes/src/modes/interactive/components/chat-frame.ts +0 -67
- package/packages/gsd-agent-modes/src/modes/interactive/components/compaction-summary-message.ts +0 -60
- package/packages/gsd-agent-modes/src/modes/interactive/components/config-selector.ts +0 -597
- package/packages/gsd-agent-modes/src/modes/interactive/components/countdown-timer.ts +0 -41
- package/packages/gsd-agent-modes/src/modes/interactive/components/custom-editor.ts +0 -88
- package/packages/gsd-agent-modes/src/modes/interactive/components/custom-message.ts +0 -100
- package/packages/gsd-agent-modes/src/modes/interactive/components/daxnuts.ts +0 -165
- package/packages/gsd-agent-modes/src/modes/interactive/components/diff.ts +0 -147
- package/packages/gsd-agent-modes/src/modes/interactive/components/dynamic-border.test.ts +0 -73
- package/packages/gsd-agent-modes/src/modes/interactive/components/dynamic-border.ts +0 -89
- package/packages/gsd-agent-modes/src/modes/interactive/components/extension-editor.ts +0 -151
- package/packages/gsd-agent-modes/src/modes/interactive/components/extension-input.ts +0 -100
- package/packages/gsd-agent-modes/src/modes/interactive/components/extension-selector.ts +0 -156
- package/packages/gsd-agent-modes/src/modes/interactive/components/footer.ts +0 -257
- package/packages/gsd-agent-modes/src/modes/interactive/components/index.ts +0 -35
- package/packages/gsd-agent-modes/src/modes/interactive/components/keybinding-hints.ts +0 -84
- package/packages/gsd-agent-modes/src/modes/interactive/components/login-dialog.ts +0 -257
- package/packages/gsd-agent-modes/src/modes/interactive/components/model-selector.ts +0 -656
- package/packages/gsd-agent-modes/src/modes/interactive/components/oauth-selector.ts +0 -122
- package/packages/gsd-agent-modes/src/modes/interactive/components/provider-manager.ts +0 -210
- package/packages/gsd-agent-modes/src/modes/interactive/components/scoped-models-selector.ts +0 -342
- package/packages/gsd-agent-modes/src/modes/interactive/components/session-selector-search.ts +0 -194
- package/packages/gsd-agent-modes/src/modes/interactive/components/session-selector.ts +0 -1011
- package/packages/gsd-agent-modes/src/modes/interactive/components/settings-selector.ts +0 -452
- package/packages/gsd-agent-modes/src/modes/interactive/components/show-images-selector.ts +0 -45
- package/packages/gsd-agent-modes/src/modes/interactive/components/skill-invocation-message.ts +0 -56
- package/packages/gsd-agent-modes/src/modes/interactive/components/theme-selector.ts +0 -63
- package/packages/gsd-agent-modes/src/modes/interactive/components/thinking-selector.ts +0 -64
- package/packages/gsd-agent-modes/src/modes/interactive/components/timestamp.ts +0 -48
- package/packages/gsd-agent-modes/src/modes/interactive/components/tool-execution.ts +0 -1157
- package/packages/gsd-agent-modes/src/modes/interactive/components/tree-render-utils.ts +0 -81
- package/packages/gsd-agent-modes/src/modes/interactive/components/tree-selector.ts +0 -1208
- package/packages/gsd-agent-modes/src/modes/interactive/components/user-message-selector.ts +0 -145
- package/packages/gsd-agent-modes/src/modes/interactive/components/user-message.ts +0 -44
- package/packages/gsd-agent-modes/src/modes/interactive/components/visual-truncate.ts +0 -50
- package/packages/gsd-agent-modes/src/modes/interactive/controllers/chat-controller-ordering.test.ts +0 -1430
- package/packages/gsd-agent-modes/src/modes/interactive/controllers/chat-controller.test.ts +0 -71
- package/packages/gsd-agent-modes/src/modes/interactive/controllers/chat-controller.ts +0 -957
- package/packages/gsd-agent-modes/src/modes/interactive/controllers/extension-ui-controller.ts +0 -63
- package/packages/gsd-agent-modes/src/modes/interactive/controllers/input-controller.test.ts +0 -183
- package/packages/gsd-agent-modes/src/modes/interactive/controllers/input-controller.ts +0 -140
- package/packages/gsd-agent-modes/src/modes/interactive/controllers/model-controller.ts +0 -77
- package/packages/gsd-agent-modes/src/modes/interactive/interactive-mode-ordering.test.ts +0 -44
- package/packages/gsd-agent-modes/src/modes/interactive/interactive-mode-state.ts +0 -49
- package/packages/gsd-agent-modes/src/modes/interactive/interactive-mode.ts +0 -4195
- package/packages/gsd-agent-modes/src/modes/interactive/slash-command-handlers.ts +0 -670
- package/packages/gsd-agent-modes/src/modes/interactive/utils/shorten-path.ts +0 -14
- package/packages/gsd-agent-modes/src/modes/print-mode.ts +0 -106
- package/packages/gsd-agent-modes/src/modes/rpc/jsonl.ts +0 -58
- package/packages/gsd-agent-modes/src/modes/rpc/remote-terminal.ts +0 -109
- package/packages/gsd-agent-modes/src/modes/rpc/rpc-client.ts +0 -572
- package/packages/gsd-agent-modes/src/modes/rpc/rpc-mode.ts +0 -902
- package/packages/gsd-agent-modes/src/modes/rpc/rpc-protocol-v2.test.ts +0 -971
- package/packages/gsd-agent-modes/src/modes/rpc/rpc-types.ts +0 -335
- package/packages/gsd-agent-modes/src/modes/shared/command-context-actions.ts +0 -53
- package/packages/gsd-agent-modes/src/pi-coding-agent-compat.ts +0 -42
- package/packages/gsd-agent-modes/src/pi-tui-compat.ts +0 -4
- package/packages/gsd-agent-modes/src/theme.ts +0 -25
- package/packages/gsd-agent-modes/src/utils/theme.ts +0 -24
- package/packages/gsd-agent-modes/tsconfig.json +0 -28
- package/packages/gsd-agent-modes/tsconfig.tsbuildinfo +0 -1
- package/packages/gsd-agent-types/dist/index.d.ts +0 -176
- package/packages/gsd-agent-types/dist/index.d.ts.map +0 -1
- package/packages/gsd-agent-types/dist/index.js +0 -24
- package/packages/gsd-agent-types/dist/index.js.map +0 -1
- package/packages/gsd-agent-types/package.json +0 -24
- package/packages/gsd-agent-types/src/index.ts +0 -206
- package/packages/gsd-agent-types/tsconfig.json +0 -25
- package/packages/gsd-agent-types/tsconfig.tsbuildinfo +0 -1
- package/packages/native/dist/tsconfig.tsbuildinfo +0 -1
- package/src/resources/extensions/claude-code-cli/tests/provider-registration.test.ts +0 -27
- /package/dist/web/standalone/.next/static/{gy6_foLMsEzdGBT19c3hr → 5wbu35_C2_MQ3Jj1lEVDx}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{gy6_foLMsEzdGBT19c3hr → 5wbu35_C2_MQ3Jj1lEVDx}/_ssgManifest.js +0 -0
|
@@ -1,984 +0,0 @@
|
|
|
1
|
-
import { Box, Container, getCapabilities, Image, imageFallback, Spacer, Text, truncateToWidth, } from "@gsd/pi-tui";
|
|
2
|
-
import stripAnsi from "strip-ansi";
|
|
3
|
-
import { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize } from "@gsd/pi-coding-agent";
|
|
4
|
-
import { getLanguageFromPath, highlightCode } from "@gsd/pi-coding-agent";
|
|
5
|
-
import { allTools, computeEditDiff, convertToPng, sanitizeBinaryOutput } from "../../../pi-coding-agent-compat.js";
|
|
6
|
-
import { theme } from "../../../theme.js";
|
|
7
|
-
import { shortenPath } from "../utils/shorten-path.js";
|
|
8
|
-
import { renderDiff } from "./diff.js";
|
|
9
|
-
import { keyHint } from "./keybinding-hints.js";
|
|
10
|
-
import { truncateToVisualLines } from "./visual-truncate.js";
|
|
11
|
-
// Preview line limit for bash when not expanded
|
|
12
|
-
const BASH_PREVIEW_LINES = 5;
|
|
13
|
-
// During partial write tool-call streaming, re-highlight the first N lines fully
|
|
14
|
-
// to keep multiline tokenization mostly correct without re-highlighting the full file.
|
|
15
|
-
const WRITE_PARTIAL_FULL_HIGHLIGHT_LINES = 50;
|
|
16
|
-
/**
|
|
17
|
-
* Replace tabs with spaces for consistent rendering
|
|
18
|
-
*/
|
|
19
|
-
function replaceTabs(text) {
|
|
20
|
-
return text.replace(/\t/g, " ");
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Normalize control characters for terminal preview rendering.
|
|
24
|
-
* Keep tool arguments unchanged, sanitize only display text.
|
|
25
|
-
*/
|
|
26
|
-
function normalizeDisplayText(text) {
|
|
27
|
-
return text.replace(/\r/g, "");
|
|
28
|
-
}
|
|
29
|
-
/** Safely coerce value to string for display. Returns null if invalid type. */
|
|
30
|
-
function str(value) {
|
|
31
|
-
if (typeof value === "string")
|
|
32
|
-
return value;
|
|
33
|
-
if (value == null)
|
|
34
|
-
return "";
|
|
35
|
-
return null; // Invalid type
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Split a Claude Code MCP tool name (`mcp__<server>__<tool>`) into its parts.
|
|
39
|
-
* Returns null for non-prefixed names. Duplicated from the claude-code-cli
|
|
40
|
-
* extension (parseMcpToolName) so this package doesn't have to import across
|
|
41
|
-
* the resources/extensions boundary.
|
|
42
|
-
*/
|
|
43
|
-
function parseMcpToolName(name) {
|
|
44
|
-
if (!name.startsWith("mcp__"))
|
|
45
|
-
return null;
|
|
46
|
-
const rest = name.slice("mcp__".length);
|
|
47
|
-
const delim = rest.indexOf("__");
|
|
48
|
-
if (delim <= 0 || delim === rest.length - 2)
|
|
49
|
-
return null;
|
|
50
|
-
return { server: rest.slice(0, delim), tool: rest.slice(delim + 2) };
|
|
51
|
-
}
|
|
52
|
-
const COMPACT_ARG_VALUE_LIMIT = 60;
|
|
53
|
-
const GENERIC_OUTPUT_PREVIEW_LINES = 10;
|
|
54
|
-
const GENERIC_ARGS_JSON_PREVIEW_LINES = 10;
|
|
55
|
-
/**
|
|
56
|
-
* Format tool args for the generic-renderer fallback. Produces a one-line
|
|
57
|
-
* `k=v, k=v` summary when every value is a primitive that fits inline; falls
|
|
58
|
-
* back to a truncated JSON dump for structurally complex args.
|
|
59
|
-
*/
|
|
60
|
-
function formatCompactArgs(args, expanded) {
|
|
61
|
-
if (args == null)
|
|
62
|
-
return "";
|
|
63
|
-
if (typeof args !== "object")
|
|
64
|
-
return String(args);
|
|
65
|
-
const entries = Object.entries(args);
|
|
66
|
-
if (entries.length === 0)
|
|
67
|
-
return "";
|
|
68
|
-
const allPrimitive = entries.every(([, value]) => {
|
|
69
|
-
const t = typeof value;
|
|
70
|
-
if (t === "number" || t === "boolean")
|
|
71
|
-
return true;
|
|
72
|
-
if (t === "string")
|
|
73
|
-
return value.length <= COMPACT_ARG_VALUE_LIMIT;
|
|
74
|
-
return value == null;
|
|
75
|
-
});
|
|
76
|
-
if (allPrimitive) {
|
|
77
|
-
return entries
|
|
78
|
-
.map(([key, value]) => {
|
|
79
|
-
if (typeof value === "string")
|
|
80
|
-
return `${key}=${JSON.stringify(value)}`;
|
|
81
|
-
if (value == null)
|
|
82
|
-
return `${key}=null`;
|
|
83
|
-
return `${key}=${String(value)}`;
|
|
84
|
-
})
|
|
85
|
-
.join(", ");
|
|
86
|
-
}
|
|
87
|
-
// Complex args: show truncated JSON.
|
|
88
|
-
const lines = JSON.stringify(args, null, 2).split("\n");
|
|
89
|
-
const maxLines = expanded ? lines.length : GENERIC_ARGS_JSON_PREVIEW_LINES;
|
|
90
|
-
if (lines.length <= maxLines)
|
|
91
|
-
return lines.join("\n");
|
|
92
|
-
return lines.slice(0, maxLines).join("\n") + "\n...";
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Component that renders a tool call with its result (updateable)
|
|
96
|
-
*/
|
|
97
|
-
export class ToolExecutionComponent extends Container {
|
|
98
|
-
get normalizedToolName() {
|
|
99
|
-
return typeof this.toolName === "string" ? this.toolName.toLowerCase() : "";
|
|
100
|
-
}
|
|
101
|
-
constructor(toolName, args, options = {}, toolDefinition, ui, cwd = process.cwd()) {
|
|
102
|
-
super();
|
|
103
|
-
this.imageComponents = [];
|
|
104
|
-
this.imageSpacers = [];
|
|
105
|
-
this.expanded = false;
|
|
106
|
-
this.isPartial = true;
|
|
107
|
-
// Cached converted images for Kitty protocol (which requires PNG), keyed by index
|
|
108
|
-
this.convertedImages = new Map();
|
|
109
|
-
// Cached resolved image dimensions to avoid re-triggering async parsing
|
|
110
|
-
// when updateDisplay() recreates Image components (#3455).
|
|
111
|
-
this.resolvedImageDimensions = new Map();
|
|
112
|
-
// When true, this component intentionally renders no lines
|
|
113
|
-
this.hideComponent = false;
|
|
114
|
-
this.toolName = toolName;
|
|
115
|
-
this.args = args;
|
|
116
|
-
this.showImages = options.showImages ?? true;
|
|
117
|
-
this.toolDefinition = toolDefinition;
|
|
118
|
-
this.ui = ui;
|
|
119
|
-
this.cwd = cwd;
|
|
120
|
-
this.addChild(new Spacer(1));
|
|
121
|
-
// Always create both - contentBox for custom tools/bash, contentText for other built-ins
|
|
122
|
-
this.contentBox = new Box(1, 1, (text) => theme.bg("toolPendingBg", text));
|
|
123
|
-
this.contentText = new Text("", 1, 1, (text) => theme.bg("toolPendingBg", text));
|
|
124
|
-
// Use contentBox for bash (visual truncation) or custom tools with custom renderers
|
|
125
|
-
// Use contentText for built-in tools (including overrides without custom renderers)
|
|
126
|
-
if (this.normalizedToolName === "bash" || (toolDefinition && !this.shouldUseBuiltInRenderer())) {
|
|
127
|
-
this.addChild(this.contentBox);
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
this.addChild(this.contentText);
|
|
131
|
-
}
|
|
132
|
-
this.updateDisplay();
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Check if we should use built-in rendering for this tool.
|
|
136
|
-
* Returns true if the tool name is a built-in AND either there's no toolDefinition
|
|
137
|
-
* or the toolDefinition doesn't provide custom renderers.
|
|
138
|
-
*/
|
|
139
|
-
shouldUseBuiltInRenderer() {
|
|
140
|
-
const normalizedToolName = this.normalizedToolName;
|
|
141
|
-
const isBuiltInName = normalizedToolName in allTools;
|
|
142
|
-
const hasCustomRenderers = this.toolDefinition?.renderCall || this.toolDefinition?.renderResult;
|
|
143
|
-
return isBuiltInName && !hasCustomRenderers;
|
|
144
|
-
}
|
|
145
|
-
dispose() {
|
|
146
|
-
this.convertedImages.clear();
|
|
147
|
-
this.imageComponents = [];
|
|
148
|
-
this.imageSpacers = [];
|
|
149
|
-
this.editDiffPreview = undefined;
|
|
150
|
-
this.writeHighlightCache = undefined;
|
|
151
|
-
this.result = undefined;
|
|
152
|
-
}
|
|
153
|
-
updateArgs(args) {
|
|
154
|
-
this.args = args;
|
|
155
|
-
if (this.normalizedToolName === "write" && this.isPartial) {
|
|
156
|
-
this.updateWriteHighlightCacheIncremental();
|
|
157
|
-
}
|
|
158
|
-
this.updateDisplay();
|
|
159
|
-
}
|
|
160
|
-
highlightSingleLine(line, lang) {
|
|
161
|
-
const highlighted = highlightCode(line, lang);
|
|
162
|
-
return highlighted[0] ?? "";
|
|
163
|
-
}
|
|
164
|
-
refreshWriteHighlightPrefix(cache) {
|
|
165
|
-
const prefixCount = Math.min(WRITE_PARTIAL_FULL_HIGHLIGHT_LINES, cache.normalizedLines.length);
|
|
166
|
-
if (prefixCount === 0)
|
|
167
|
-
return;
|
|
168
|
-
const prefixSource = cache.normalizedLines.slice(0, prefixCount).join("\n");
|
|
169
|
-
const prefixHighlighted = highlightCode(prefixSource, cache.lang);
|
|
170
|
-
for (let i = 0; i < prefixCount; i++) {
|
|
171
|
-
cache.highlightedLines[i] =
|
|
172
|
-
prefixHighlighted[i] ?? this.highlightSingleLine(cache.normalizedLines[i] ?? "", cache.lang);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
rebuildWriteHighlightCacheFull(rawPath, fileContent) {
|
|
176
|
-
const lang = rawPath ? getLanguageFromPath(rawPath) : undefined;
|
|
177
|
-
if (!lang) {
|
|
178
|
-
this.writeHighlightCache = undefined;
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
const displayContent = normalizeDisplayText(fileContent);
|
|
182
|
-
const normalized = replaceTabs(displayContent);
|
|
183
|
-
this.writeHighlightCache = {
|
|
184
|
-
rawPath,
|
|
185
|
-
lang,
|
|
186
|
-
rawContent: fileContent,
|
|
187
|
-
normalizedLines: normalized.split("\n"),
|
|
188
|
-
highlightedLines: highlightCode(normalized, lang),
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
updateWriteHighlightCacheIncremental() {
|
|
192
|
-
const rawPath = str(this.args?.file_path ?? this.args?.path);
|
|
193
|
-
const fileContent = str(this.args?.content);
|
|
194
|
-
if (rawPath === null || fileContent === null) {
|
|
195
|
-
this.writeHighlightCache = undefined;
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
const lang = rawPath ? getLanguageFromPath(rawPath) : undefined;
|
|
199
|
-
if (!lang) {
|
|
200
|
-
this.writeHighlightCache = undefined;
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
if (!this.writeHighlightCache) {
|
|
204
|
-
this.rebuildWriteHighlightCacheFull(rawPath, fileContent);
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
const cache = this.writeHighlightCache;
|
|
208
|
-
if (cache.lang !== lang || cache.rawPath !== rawPath) {
|
|
209
|
-
this.rebuildWriteHighlightCacheFull(rawPath, fileContent);
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
if (!fileContent.startsWith(cache.rawContent)) {
|
|
213
|
-
this.rebuildWriteHighlightCacheFull(rawPath, fileContent);
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
if (fileContent.length === cache.rawContent.length) {
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
const deltaRaw = fileContent.slice(cache.rawContent.length);
|
|
220
|
-
const deltaDisplay = normalizeDisplayText(deltaRaw);
|
|
221
|
-
const deltaNormalized = replaceTabs(deltaDisplay);
|
|
222
|
-
cache.rawContent = fileContent;
|
|
223
|
-
if (cache.normalizedLines.length === 0) {
|
|
224
|
-
cache.normalizedLines.push("");
|
|
225
|
-
cache.highlightedLines.push("");
|
|
226
|
-
}
|
|
227
|
-
const segments = deltaNormalized.split("\n");
|
|
228
|
-
const lastIndex = cache.normalizedLines.length - 1;
|
|
229
|
-
cache.normalizedLines[lastIndex] += segments[0];
|
|
230
|
-
cache.highlightedLines[lastIndex] = this.highlightSingleLine(cache.normalizedLines[lastIndex], cache.lang);
|
|
231
|
-
for (let i = 1; i < segments.length; i++) {
|
|
232
|
-
cache.normalizedLines.push(segments[i]);
|
|
233
|
-
cache.highlightedLines.push(this.highlightSingleLine(segments[i], cache.lang));
|
|
234
|
-
}
|
|
235
|
-
this.refreshWriteHighlightPrefix(cache);
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Signal that args are complete (tool is about to execute).
|
|
239
|
-
* This triggers diff computation for edit tool.
|
|
240
|
-
*/
|
|
241
|
-
setArgsComplete() {
|
|
242
|
-
if (this.toolName === "write") {
|
|
243
|
-
const rawPath = str(this.args?.file_path ?? this.args?.path);
|
|
244
|
-
const fileContent = str(this.args?.content);
|
|
245
|
-
if (rawPath !== null && fileContent !== null) {
|
|
246
|
-
this.rebuildWriteHighlightCacheFull(rawPath, fileContent);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
this.maybeComputeEditDiff();
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Compute edit diff preview when we have complete args.
|
|
253
|
-
* This runs async and updates display when done.
|
|
254
|
-
* Handles both single-edit format (oldText/newText) and multi-edit format (edits[]).
|
|
255
|
-
*/
|
|
256
|
-
maybeComputeEditDiff() {
|
|
257
|
-
if (this.toolName !== "edit")
|
|
258
|
-
return;
|
|
259
|
-
const path = str(this.args?.path);
|
|
260
|
-
if (!path)
|
|
261
|
-
return;
|
|
262
|
-
const oldText = this.args?.oldText;
|
|
263
|
-
const newText = this.args?.newText;
|
|
264
|
-
const edits = this.args?.edits;
|
|
265
|
-
if (typeof oldText === "string" && typeof newText === "string") {
|
|
266
|
-
// Single-edit path: oldText + newText at top level
|
|
267
|
-
const argsKey = JSON.stringify({ path, oldText, newText });
|
|
268
|
-
if (this.editDiffArgsKey === argsKey)
|
|
269
|
-
return;
|
|
270
|
-
this.editDiffArgsKey = argsKey;
|
|
271
|
-
computeEditDiff(path, oldText, newText, this.cwd).then((result) => {
|
|
272
|
-
if (this.editDiffArgsKey === argsKey) {
|
|
273
|
-
this.editDiffPreview = result;
|
|
274
|
-
this.updateDisplay();
|
|
275
|
-
this.ui.requestRender();
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
else if (Array.isArray(edits)) {
|
|
280
|
-
// Multi-edit path: edits[] array format
|
|
281
|
-
// Validate each element has oldText and newText strings before passing to computeEditDiff
|
|
282
|
-
const firstValidEdit = edits.find((e) => e !== null &&
|
|
283
|
-
typeof e === "object" &&
|
|
284
|
-
typeof e.oldText === "string" &&
|
|
285
|
-
typeof e.newText === "string");
|
|
286
|
-
if (!firstValidEdit)
|
|
287
|
-
return;
|
|
288
|
-
const argsKey = JSON.stringify({ path, edits });
|
|
289
|
-
if (this.editDiffArgsKey === argsKey)
|
|
290
|
-
return;
|
|
291
|
-
this.editDiffArgsKey = argsKey;
|
|
292
|
-
// Preview the first edit; subsequent edits will be reflected in the post-execution diff
|
|
293
|
-
computeEditDiff(path, firstValidEdit.oldText, firstValidEdit.newText, this.cwd).then((result) => {
|
|
294
|
-
if (this.editDiffArgsKey === argsKey) {
|
|
295
|
-
this.editDiffPreview = result;
|
|
296
|
-
this.updateDisplay();
|
|
297
|
-
this.ui.requestRender();
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
updateResult(result, isPartial = false) {
|
|
303
|
-
this.result = result;
|
|
304
|
-
this.isPartial = isPartial;
|
|
305
|
-
if (this.normalizedToolName === "write" && !isPartial) {
|
|
306
|
-
const rawPath = str(this.args?.file_path ?? this.args?.path);
|
|
307
|
-
const fileContent = str(this.args?.content);
|
|
308
|
-
if (rawPath !== null && fileContent !== null) {
|
|
309
|
-
this.rebuildWriteHighlightCacheFull(rawPath, fileContent);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
this.updateDisplay();
|
|
313
|
-
// Convert non-PNG images to PNG for Kitty protocol (async)
|
|
314
|
-
this.maybeConvertImagesForKitty();
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Mark a pending tool call as finished with no result (e.g., squashed by compaction).
|
|
318
|
-
* Stops the "Running" indicator without providing a result.
|
|
319
|
-
*/
|
|
320
|
-
markHistoricalNoResult() {
|
|
321
|
-
this.isPartial = false;
|
|
322
|
-
this.updateDisplay();
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Finalize a pending tool call as failed/interrupted while preserving any streamed partial output.
|
|
326
|
-
*/
|
|
327
|
-
completeWithError(message) {
|
|
328
|
-
this.isPartial = false;
|
|
329
|
-
if (this.result) {
|
|
330
|
-
let content = this.result.content;
|
|
331
|
-
if (message) {
|
|
332
|
-
const alreadyHasMessage = content.some((block) => block.type === "text" && block.text === message);
|
|
333
|
-
if (!alreadyHasMessage) {
|
|
334
|
-
content = [...content, { type: "text", text: message }];
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
this.result = { ...this.result, content, isError: true };
|
|
338
|
-
}
|
|
339
|
-
else {
|
|
340
|
-
this.result = {
|
|
341
|
-
content: message ? [{ type: "text", text: message }] : [],
|
|
342
|
-
isError: true,
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
this.updateDisplay();
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* Convert non-PNG images to PNG for Kitty graphics protocol.
|
|
349
|
-
* Kitty requires PNG format (f=100), so JPEG/GIF/WebP won't display.
|
|
350
|
-
*/
|
|
351
|
-
maybeConvertImagesForKitty() {
|
|
352
|
-
const caps = getCapabilities();
|
|
353
|
-
// Only needed for Kitty protocol
|
|
354
|
-
if (caps.images !== "kitty")
|
|
355
|
-
return;
|
|
356
|
-
if (!this.result)
|
|
357
|
-
return;
|
|
358
|
-
const imageBlocks = this.result.content?.filter((c) => c.type === "image") || [];
|
|
359
|
-
for (let i = 0; i < imageBlocks.length; i++) {
|
|
360
|
-
const img = imageBlocks[i];
|
|
361
|
-
if (!img.data || !img.mimeType)
|
|
362
|
-
continue;
|
|
363
|
-
// Skip if already PNG or already converted
|
|
364
|
-
if (img.mimeType === "image/png")
|
|
365
|
-
continue;
|
|
366
|
-
if (this.convertedImages.has(i))
|
|
367
|
-
continue;
|
|
368
|
-
// Convert async
|
|
369
|
-
const index = i;
|
|
370
|
-
convertToPng(img.data, img.mimeType).then((converted) => {
|
|
371
|
-
if (converted) {
|
|
372
|
-
this.convertedImages.set(index, converted);
|
|
373
|
-
this.updateDisplay();
|
|
374
|
-
this.ui.requestRender();
|
|
375
|
-
}
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
setExpanded(expanded) {
|
|
380
|
-
this.expanded = expanded;
|
|
381
|
-
this.updateDisplay();
|
|
382
|
-
}
|
|
383
|
-
setShowImages(show) {
|
|
384
|
-
this.showImages = show;
|
|
385
|
-
this.updateDisplay();
|
|
386
|
-
}
|
|
387
|
-
invalidate() {
|
|
388
|
-
super.invalidate();
|
|
389
|
-
this.updateDisplay();
|
|
390
|
-
}
|
|
391
|
-
render(width) {
|
|
392
|
-
if (this.hideComponent) {
|
|
393
|
-
return [];
|
|
394
|
-
}
|
|
395
|
-
return super.render(width);
|
|
396
|
-
}
|
|
397
|
-
updateDisplay() {
|
|
398
|
-
// Set background based on state
|
|
399
|
-
const bgFn = this.isPartial
|
|
400
|
-
? (text) => theme.bg("toolPendingBg", text)
|
|
401
|
-
: this.result?.isError
|
|
402
|
-
? (text) => theme.bg("toolErrorBg", text)
|
|
403
|
-
: (text) => theme.bg("toolSuccessBg", text);
|
|
404
|
-
const useBuiltInRenderer = this.shouldUseBuiltInRenderer();
|
|
405
|
-
let customRendererHasContent = false;
|
|
406
|
-
this.hideComponent = false;
|
|
407
|
-
// Use built-in rendering for built-in tools (or overrides without custom renderers)
|
|
408
|
-
if (useBuiltInRenderer) {
|
|
409
|
-
if (this.normalizedToolName === "bash") {
|
|
410
|
-
// Bash uses Box with visual line truncation
|
|
411
|
-
this.contentBox.setBgFn(bgFn);
|
|
412
|
-
this.contentBox.clear();
|
|
413
|
-
this.renderBashContent();
|
|
414
|
-
}
|
|
415
|
-
else {
|
|
416
|
-
// Other built-in tools: use Text directly with caching
|
|
417
|
-
this.contentText.setCustomBgFn(bgFn);
|
|
418
|
-
this.contentText.setText(this.formatToolExecution());
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
else if (this.toolDefinition) {
|
|
422
|
-
// Custom tools use Box for flexible component rendering
|
|
423
|
-
this.contentBox.setBgFn(bgFn);
|
|
424
|
-
this.contentBox.clear();
|
|
425
|
-
// Render call component
|
|
426
|
-
if (this.toolDefinition.renderCall) {
|
|
427
|
-
try {
|
|
428
|
-
const renderContext = {
|
|
429
|
-
args: this.args,
|
|
430
|
-
toolCallId: "",
|
|
431
|
-
invalidate: () => this.updateDisplay(),
|
|
432
|
-
lastComponent: undefined,
|
|
433
|
-
state: undefined,
|
|
434
|
-
cwd: this.cwd,
|
|
435
|
-
executionStarted: !this.isPartial,
|
|
436
|
-
argsComplete: true,
|
|
437
|
-
isPartial: this.isPartial,
|
|
438
|
-
expanded: this.expanded,
|
|
439
|
-
showImages: this.showImages,
|
|
440
|
-
isError: this.result?.isError ?? false,
|
|
441
|
-
};
|
|
442
|
-
// vendor-seam: dual-module-path -- ToolDefinition.renderCall signature diverges between pi dist and GSD usage
|
|
443
|
-
const callComponent = this.toolDefinition.renderCall(this.args, theme, renderContext);
|
|
444
|
-
if (callComponent !== undefined) {
|
|
445
|
-
this.contentBox.addChild(callComponent);
|
|
446
|
-
customRendererHasContent = true;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
catch {
|
|
450
|
-
// Fall back to default on error
|
|
451
|
-
this.contentBox.addChild(new Text(theme.fg("toolTitle", theme.bold(this.toolName)), 0, 0));
|
|
452
|
-
customRendererHasContent = true;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
else {
|
|
456
|
-
// No custom renderCall, show tool name
|
|
457
|
-
this.contentBox.addChild(new Text(theme.fg("toolTitle", theme.bold(this.toolName)), 0, 0));
|
|
458
|
-
customRendererHasContent = true;
|
|
459
|
-
}
|
|
460
|
-
// Render result component if we have a result
|
|
461
|
-
if (this.result && this.toolDefinition.renderResult) {
|
|
462
|
-
try {
|
|
463
|
-
const renderContext = {
|
|
464
|
-
args: this.args,
|
|
465
|
-
toolCallId: "",
|
|
466
|
-
invalidate: () => this.updateDisplay(),
|
|
467
|
-
lastComponent: undefined,
|
|
468
|
-
state: undefined,
|
|
469
|
-
cwd: this.cwd,
|
|
470
|
-
executionStarted: true,
|
|
471
|
-
argsComplete: true,
|
|
472
|
-
isPartial: this.isPartial,
|
|
473
|
-
expanded: this.expanded,
|
|
474
|
-
showImages: this.showImages,
|
|
475
|
-
isError: this.result.isError,
|
|
476
|
-
};
|
|
477
|
-
// vendor-seam: dual-module-path -- ToolDefinition.renderResult signature diverges between pi dist and GSD usage
|
|
478
|
-
const resultComponent = this.toolDefinition.renderResult({ content: this.result.content, details: this.result.details }, { expanded: this.expanded, isPartial: this.isPartial }, theme, renderContext);
|
|
479
|
-
if (resultComponent !== undefined) {
|
|
480
|
-
this.contentBox.addChild(resultComponent);
|
|
481
|
-
customRendererHasContent = true;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
catch {
|
|
485
|
-
// Fall back to showing raw output on error
|
|
486
|
-
const output = this.getTextOutput();
|
|
487
|
-
if (output) {
|
|
488
|
-
this.contentBox.addChild(new Text(theme.fg("toolOutput", output), 0, 0));
|
|
489
|
-
customRendererHasContent = true;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
else if (this.result) {
|
|
494
|
-
// Has result but no custom renderResult
|
|
495
|
-
const output = this.getTextOutput();
|
|
496
|
-
if (output) {
|
|
497
|
-
this.contentBox.addChild(new Text(theme.fg("toolOutput", output), 0, 0));
|
|
498
|
-
customRendererHasContent = true;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
else {
|
|
503
|
-
// Unknown tool with no registered definition - show generic fallback
|
|
504
|
-
this.contentText.setCustomBgFn(bgFn);
|
|
505
|
-
this.contentText.setText(this.formatToolExecution());
|
|
506
|
-
}
|
|
507
|
-
// Handle images (same for both custom and built-in)
|
|
508
|
-
for (const img of this.imageComponents) {
|
|
509
|
-
this.removeChild(img);
|
|
510
|
-
}
|
|
511
|
-
this.imageComponents = [];
|
|
512
|
-
for (const spacer of this.imageSpacers) {
|
|
513
|
-
this.removeChild(spacer);
|
|
514
|
-
}
|
|
515
|
-
this.imageSpacers = [];
|
|
516
|
-
if (this.result) {
|
|
517
|
-
const imageBlocks = this.result.content?.filter((c) => c.type === "image") || [];
|
|
518
|
-
const caps = getCapabilities();
|
|
519
|
-
for (let i = 0; i < imageBlocks.length; i++) {
|
|
520
|
-
const img = imageBlocks[i];
|
|
521
|
-
if (caps.images && this.showImages && img.data && img.mimeType) {
|
|
522
|
-
// Use converted PNG for Kitty protocol if available
|
|
523
|
-
const converted = this.convertedImages.get(i);
|
|
524
|
-
const imageData = converted?.data ?? img.data;
|
|
525
|
-
const imageMimeType = converted?.mimeType ?? img.mimeType;
|
|
526
|
-
// For Kitty, skip non-PNG images that haven't been converted yet
|
|
527
|
-
if (caps.images === "kitty" && imageMimeType !== "image/png") {
|
|
528
|
-
continue;
|
|
529
|
-
}
|
|
530
|
-
const spacer = new Spacer(1);
|
|
531
|
-
this.addChild(spacer);
|
|
532
|
-
this.imageSpacers.push(spacer);
|
|
533
|
-
// Pass cached dimensions to avoid re-triggering async parsing
|
|
534
|
-
// when updateDisplay() recreates Image components (#3455).
|
|
535
|
-
const cachedDims = this.resolvedImageDimensions.get(i);
|
|
536
|
-
const imageComponent = new Image(imageData, imageMimeType, { fallbackColor: (s) => theme.fg("toolOutput", s) }, { maxWidthCells: 60 }, cachedDims);
|
|
537
|
-
// setOnDimensionsResolved/getDimensions removed in pi-tui 0.67.2 —
|
|
538
|
-
// dimensions are passed to the Image constructor and resolved synchronously.
|
|
539
|
-
this.imageComponents.push(imageComponent);
|
|
540
|
-
this.addChild(imageComponent);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
if (!useBuiltInRenderer && this.toolDefinition) {
|
|
545
|
-
this.hideComponent = !customRendererHasContent && this.imageComponents.length === 0;
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Render bash content using visual line truncation (like bash-execution.ts)
|
|
550
|
-
*/
|
|
551
|
-
renderBashContent() {
|
|
552
|
-
const command = str(this.args?.command);
|
|
553
|
-
const timeout = this.args?.timeout;
|
|
554
|
-
// Header
|
|
555
|
-
const timeoutSuffix = timeout ? theme.fg("muted", ` (timeout ${timeout}s)`) : "";
|
|
556
|
-
const commandDisplay = command === null ? theme.fg("error", "[invalid arg]") : command ? command : theme.fg("toolOutput", "...");
|
|
557
|
-
this.contentBox.addChild(new Text(theme.fg("toolTitle", theme.bold(`$ ${commandDisplay}`)) + timeoutSuffix, 0, 0));
|
|
558
|
-
if (this.result) {
|
|
559
|
-
const output = this.getTextOutput().trim();
|
|
560
|
-
if (output) {
|
|
561
|
-
// Style each line for the output
|
|
562
|
-
const styledOutput = output
|
|
563
|
-
.split("\n")
|
|
564
|
-
.map((line) => theme.fg("toolOutput", line))
|
|
565
|
-
.join("\n");
|
|
566
|
-
if (this.expanded) {
|
|
567
|
-
// Show all lines when expanded
|
|
568
|
-
this.contentBox.addChild(new Text(`\n${styledOutput}`, 0, 0));
|
|
569
|
-
}
|
|
570
|
-
else {
|
|
571
|
-
// Use visual line truncation when collapsed with width-aware caching
|
|
572
|
-
let cachedWidth;
|
|
573
|
-
let cachedLines;
|
|
574
|
-
let cachedSkipped;
|
|
575
|
-
this.contentBox.addChild({
|
|
576
|
-
render: (width) => {
|
|
577
|
-
if (cachedLines === undefined || cachedWidth !== width) {
|
|
578
|
-
const result = truncateToVisualLines(styledOutput, BASH_PREVIEW_LINES, width);
|
|
579
|
-
cachedLines = result.visualLines;
|
|
580
|
-
cachedSkipped = result.skippedCount;
|
|
581
|
-
cachedWidth = width;
|
|
582
|
-
}
|
|
583
|
-
if (cachedSkipped && cachedSkipped > 0) {
|
|
584
|
-
const hint = theme.fg("muted", `... (${cachedSkipped} earlier lines,`) +
|
|
585
|
-
` ${keyHint("expandTools", "to expand")})`;
|
|
586
|
-
return ["", truncateToWidth(hint, width, "..."), ...cachedLines];
|
|
587
|
-
}
|
|
588
|
-
// Add blank line for spacing (matches expanded case)
|
|
589
|
-
return ["", ...cachedLines];
|
|
590
|
-
},
|
|
591
|
-
invalidate: () => {
|
|
592
|
-
cachedWidth = undefined;
|
|
593
|
-
cachedLines = undefined;
|
|
594
|
-
cachedSkipped = undefined;
|
|
595
|
-
},
|
|
596
|
-
});
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
// Truncation warnings
|
|
600
|
-
const truncation = this.result.details?.truncation;
|
|
601
|
-
const fullOutputPath = this.result.details?.fullOutputPath;
|
|
602
|
-
if (truncation?.truncated || fullOutputPath) {
|
|
603
|
-
const warnings = [];
|
|
604
|
-
if (fullOutputPath) {
|
|
605
|
-
warnings.push(`Full output: ${fullOutputPath}`);
|
|
606
|
-
}
|
|
607
|
-
if (truncation?.truncated) {
|
|
608
|
-
if (truncation.truncatedBy === "lines") {
|
|
609
|
-
warnings.push(`Truncated: showing ${truncation.outputLines} of ${truncation.totalLines} lines`);
|
|
610
|
-
}
|
|
611
|
-
else {
|
|
612
|
-
warnings.push(`Truncated: ${truncation.outputLines} lines shown (${formatSize(truncation.maxBytes ?? DEFAULT_MAX_BYTES)} limit)`);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
this.contentBox.addChild(new Text(`\n${theme.fg("warning", `[${warnings.join(". ")}]`)}`, 0, 0));
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
getTextOutput() {
|
|
620
|
-
if (!this.result)
|
|
621
|
-
return "";
|
|
622
|
-
const textBlocks = this.result.content?.filter((c) => c.type === "text") || [];
|
|
623
|
-
const imageBlocks = this.result.content?.filter((c) => c.type === "image") || [];
|
|
624
|
-
let output = textBlocks
|
|
625
|
-
.map((c) => {
|
|
626
|
-
// Use sanitizeBinaryOutput to handle binary data that crashes string-width
|
|
627
|
-
return sanitizeBinaryOutput(stripAnsi(c.text || "")).replace(/\r/g, "");
|
|
628
|
-
})
|
|
629
|
-
.join("\n");
|
|
630
|
-
const caps = getCapabilities();
|
|
631
|
-
if (imageBlocks.length > 0 && (!caps.images || !this.showImages)) {
|
|
632
|
-
const imageIndicators = imageBlocks
|
|
633
|
-
.map((img) => {
|
|
634
|
-
return imageFallback(typeof img.mimeType === "string" ? img.mimeType : "image/unknown");
|
|
635
|
-
})
|
|
636
|
-
.join("\n");
|
|
637
|
-
output = output ? `${output}\n${imageIndicators}` : imageIndicators;
|
|
638
|
-
}
|
|
639
|
-
return output;
|
|
640
|
-
}
|
|
641
|
-
formatToolExecution() {
|
|
642
|
-
let text;
|
|
643
|
-
const invalidArg = theme.fg("error", "[invalid arg]");
|
|
644
|
-
const normalizedToolName = this.normalizedToolName;
|
|
645
|
-
if (normalizedToolName === "read") {
|
|
646
|
-
const rawPath = str(this.args?.file_path ?? this.args?.path);
|
|
647
|
-
const path = rawPath !== null ? shortenPath(rawPath) : null;
|
|
648
|
-
const offset = typeof this.args?.offset === "number" ? this.args.offset : undefined;
|
|
649
|
-
const limit = typeof this.args?.limit === "number" ? this.args.limit : undefined;
|
|
650
|
-
let pathDisplay = path === null ? invalidArg : path ? theme.fg("accent", path) : theme.fg("toolOutput", "...");
|
|
651
|
-
if (offset !== undefined || limit !== undefined) {
|
|
652
|
-
const startLine = offset ?? 1;
|
|
653
|
-
const endLine = limit !== undefined ? startLine + limit - 1 : "";
|
|
654
|
-
pathDisplay += theme.fg("warning", `:${startLine}${endLine ? `-${endLine}` : ""}`);
|
|
655
|
-
}
|
|
656
|
-
text = `${theme.fg("toolTitle", theme.bold("read"))} ${pathDisplay}`;
|
|
657
|
-
if (this.result) {
|
|
658
|
-
if (this.result.isError) {
|
|
659
|
-
const errorText = this.getTextOutput().trim() || "read failed";
|
|
660
|
-
text += `\n\n${theme.fg("error", errorText)}`;
|
|
661
|
-
return text;
|
|
662
|
-
}
|
|
663
|
-
const rawOutput = this.getTextOutput();
|
|
664
|
-
// Strip hashline prefixes (e.g. "1#BQ:content") for TUI display
|
|
665
|
-
const output = rawOutput.replace(/^(\s*)\d+#[ZPMQVRWSNKTXJBYH]{2}:/gm, "$1");
|
|
666
|
-
const rawPath = str(this.args?.file_path ?? this.args?.path);
|
|
667
|
-
const lang = rawPath ? getLanguageFromPath(rawPath) : undefined;
|
|
668
|
-
const lines = lang ? highlightCode(replaceTabs(output), lang) : output.split("\n");
|
|
669
|
-
const maxLines = this.expanded ? lines.length : 10;
|
|
670
|
-
const displayLines = lines.slice(0, maxLines);
|
|
671
|
-
const remaining = lines.length - maxLines;
|
|
672
|
-
text +=
|
|
673
|
-
"\n\n" +
|
|
674
|
-
displayLines
|
|
675
|
-
.map((line) => (lang ? replaceTabs(line) : theme.fg("toolOutput", replaceTabs(line))))
|
|
676
|
-
.join("\n");
|
|
677
|
-
if (remaining > 0) {
|
|
678
|
-
text += `${theme.fg("muted", `\n... (${remaining} more lines,`)} ${keyHint("expandTools", "to expand")})`;
|
|
679
|
-
}
|
|
680
|
-
const truncation = this.result.details?.truncation;
|
|
681
|
-
if (truncation?.truncated) {
|
|
682
|
-
if (truncation.firstLineExceedsLimit) {
|
|
683
|
-
text +=
|
|
684
|
-
"\n" +
|
|
685
|
-
theme.fg("warning", `[First line exceeds ${formatSize(truncation.maxBytes ?? DEFAULT_MAX_BYTES)} limit]`);
|
|
686
|
-
}
|
|
687
|
-
else if (truncation.truncatedBy === "lines") {
|
|
688
|
-
text +=
|
|
689
|
-
"\n" +
|
|
690
|
-
theme.fg("warning", `[Truncated: showing ${truncation.outputLines} of ${truncation.totalLines} lines (${truncation.maxLines ?? DEFAULT_MAX_LINES} line limit)]`);
|
|
691
|
-
}
|
|
692
|
-
else {
|
|
693
|
-
text +=
|
|
694
|
-
"\n" +
|
|
695
|
-
theme.fg("warning", `[Truncated: ${truncation.outputLines} lines shown (${formatSize(truncation.maxBytes ?? DEFAULT_MAX_BYTES)} limit)]`);
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
else if (normalizedToolName === "write") {
|
|
701
|
-
const rawPath = str(this.args?.file_path ?? this.args?.path);
|
|
702
|
-
const fileContent = str(this.args?.content);
|
|
703
|
-
const path = rawPath !== null ? shortenPath(rawPath) : null;
|
|
704
|
-
text =
|
|
705
|
-
theme.fg("toolTitle", theme.bold("write")) +
|
|
706
|
-
" " +
|
|
707
|
-
(path === null ? invalidArg : path ? theme.fg("accent", path) : theme.fg("toolOutput", "..."));
|
|
708
|
-
if (fileContent === null) {
|
|
709
|
-
text += `\n\n${theme.fg("error", "[invalid content arg - expected string]")}`;
|
|
710
|
-
}
|
|
711
|
-
else if (fileContent) {
|
|
712
|
-
const lang = rawPath ? getLanguageFromPath(rawPath) : undefined;
|
|
713
|
-
let lines;
|
|
714
|
-
if (lang) {
|
|
715
|
-
const cache = this.writeHighlightCache;
|
|
716
|
-
if (cache && cache.lang === lang && cache.rawPath === rawPath && cache.rawContent === fileContent) {
|
|
717
|
-
lines = cache.highlightedLines;
|
|
718
|
-
}
|
|
719
|
-
else {
|
|
720
|
-
const displayContent = normalizeDisplayText(fileContent);
|
|
721
|
-
const normalized = replaceTabs(displayContent);
|
|
722
|
-
lines = highlightCode(normalized, lang);
|
|
723
|
-
this.writeHighlightCache = {
|
|
724
|
-
rawPath,
|
|
725
|
-
lang,
|
|
726
|
-
rawContent: fileContent,
|
|
727
|
-
normalizedLines: normalized.split("\n"),
|
|
728
|
-
highlightedLines: lines,
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
else {
|
|
733
|
-
lines = normalizeDisplayText(fileContent).split("\n");
|
|
734
|
-
this.writeHighlightCache = undefined;
|
|
735
|
-
}
|
|
736
|
-
const totalLines = lines.length;
|
|
737
|
-
const maxLines = this.expanded ? lines.length : 10;
|
|
738
|
-
const displayLines = lines.slice(0, maxLines);
|
|
739
|
-
const remaining = lines.length - maxLines;
|
|
740
|
-
text +=
|
|
741
|
-
"\n\n" +
|
|
742
|
-
displayLines.map((line) => (lang ? line : theme.fg("toolOutput", replaceTabs(line)))).join("\n");
|
|
743
|
-
if (remaining > 0) {
|
|
744
|
-
text +=
|
|
745
|
-
theme.fg("muted", `\n... (${remaining} more lines, ${totalLines} total,`) +
|
|
746
|
-
` ${keyHint("expandTools", "to expand")})`;
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
// Show error if tool execution failed
|
|
750
|
-
if (this.result?.isError) {
|
|
751
|
-
const errorText = this.getTextOutput();
|
|
752
|
-
if (errorText) {
|
|
753
|
-
text += `\n\n${theme.fg("error", errorText)}`;
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
else if (normalizedToolName === "edit") {
|
|
758
|
-
const rawPath = str(this.args?.file_path ?? this.args?.path);
|
|
759
|
-
const path = rawPath !== null ? shortenPath(rawPath) : null;
|
|
760
|
-
// Build path display, appending :line if we have diff info
|
|
761
|
-
let pathDisplay = path === null ? invalidArg : path ? theme.fg("accent", path) : theme.fg("toolOutput", "...");
|
|
762
|
-
const firstChangedLine = (this.editDiffPreview && "firstChangedLine" in this.editDiffPreview
|
|
763
|
-
? this.editDiffPreview.firstChangedLine
|
|
764
|
-
: undefined) ||
|
|
765
|
-
(this.result && !this.result.isError ? this.result.details?.firstChangedLine : undefined);
|
|
766
|
-
if (firstChangedLine) {
|
|
767
|
-
pathDisplay += theme.fg("warning", `:${firstChangedLine}`);
|
|
768
|
-
}
|
|
769
|
-
text = `${theme.fg("toolTitle", theme.bold("edit"))} ${pathDisplay}`;
|
|
770
|
-
if (this.result?.isError) {
|
|
771
|
-
// Show error from result
|
|
772
|
-
const errorText = this.getTextOutput();
|
|
773
|
-
if (errorText) {
|
|
774
|
-
text += `\n\n${theme.fg("error", errorText)}`;
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
else if (this.result?.details?.diff) {
|
|
778
|
-
// Tool executed successfully - use the diff from result
|
|
779
|
-
// This takes priority over editDiffPreview which may have a stale error
|
|
780
|
-
// due to race condition (async preview computed after file was modified)
|
|
781
|
-
text += `\n\n${renderDiff(this.result.details.diff, { filePath: rawPath ?? undefined })}`;
|
|
782
|
-
}
|
|
783
|
-
else if (this.editDiffPreview) {
|
|
784
|
-
// Use cached diff preview (before tool executes)
|
|
785
|
-
if ("error" in this.editDiffPreview) {
|
|
786
|
-
text += `\n\n${theme.fg("error", this.editDiffPreview.error)}`;
|
|
787
|
-
}
|
|
788
|
-
else if (this.editDiffPreview.diff) {
|
|
789
|
-
text += `\n\n${renderDiff(this.editDiffPreview.diff, { filePath: rawPath ?? undefined })}`;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
else if (normalizedToolName === "ls") {
|
|
794
|
-
const rawPath = str(this.args?.path);
|
|
795
|
-
const path = rawPath !== null ? shortenPath(rawPath || ".") : null;
|
|
796
|
-
const limit = this.args?.limit;
|
|
797
|
-
text = `${theme.fg("toolTitle", theme.bold("ls"))} ${path === null ? invalidArg : theme.fg("accent", path)}`;
|
|
798
|
-
if (limit !== undefined) {
|
|
799
|
-
text += theme.fg("toolOutput", ` (limit ${limit})`);
|
|
800
|
-
}
|
|
801
|
-
if (this.result) {
|
|
802
|
-
if (this.result.isError) {
|
|
803
|
-
const errorText = this.getTextOutput().trim() || "ls failed";
|
|
804
|
-
text += `\n\n${theme.fg("error", errorText)}`;
|
|
805
|
-
return text;
|
|
806
|
-
}
|
|
807
|
-
const output = this.getTextOutput().trim();
|
|
808
|
-
if (output) {
|
|
809
|
-
const lines = output.split("\n");
|
|
810
|
-
const maxLines = this.expanded ? lines.length : 20;
|
|
811
|
-
const displayLines = lines.slice(0, maxLines);
|
|
812
|
-
const remaining = lines.length - maxLines;
|
|
813
|
-
text += `\n\n${displayLines.map((line) => theme.fg("toolOutput", line)).join("\n")}`;
|
|
814
|
-
if (remaining > 0) {
|
|
815
|
-
text += `${theme.fg("muted", `\n... (${remaining} more lines,`)} ${keyHint("expandTools", "to expand")})`;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
const entryLimit = this.result.details?.entryLimitReached;
|
|
819
|
-
const truncation = this.result.details?.truncation;
|
|
820
|
-
if (entryLimit || truncation?.truncated) {
|
|
821
|
-
const warnings = [];
|
|
822
|
-
if (entryLimit) {
|
|
823
|
-
warnings.push(`${entryLimit} entries limit`);
|
|
824
|
-
}
|
|
825
|
-
if (truncation?.truncated) {
|
|
826
|
-
warnings.push(`${formatSize(truncation.maxBytes ?? DEFAULT_MAX_BYTES)} limit`);
|
|
827
|
-
}
|
|
828
|
-
text += `\n${theme.fg("warning", `[Truncated: ${warnings.join(", ")}]`)}`;
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
else if (normalizedToolName === "find") {
|
|
833
|
-
const pattern = str(this.args?.pattern);
|
|
834
|
-
const rawPath = str(this.args?.path);
|
|
835
|
-
const path = rawPath !== null ? shortenPath(rawPath || ".") : null;
|
|
836
|
-
const limit = this.args?.limit;
|
|
837
|
-
text =
|
|
838
|
-
theme.fg("toolTitle", theme.bold("find")) +
|
|
839
|
-
" " +
|
|
840
|
-
(pattern === null ? invalidArg : theme.fg("accent", pattern || "")) +
|
|
841
|
-
theme.fg("toolOutput", ` in ${path === null ? invalidArg : path}`);
|
|
842
|
-
if (limit !== undefined) {
|
|
843
|
-
text += theme.fg("toolOutput", ` (limit ${limit})`);
|
|
844
|
-
}
|
|
845
|
-
if (this.result) {
|
|
846
|
-
if (this.result.isError) {
|
|
847
|
-
const errorText = this.getTextOutput().trim() || "find failed";
|
|
848
|
-
text += `\n\n${theme.fg("error", errorText)}`;
|
|
849
|
-
return text;
|
|
850
|
-
}
|
|
851
|
-
const output = this.getTextOutput().trim();
|
|
852
|
-
if (output) {
|
|
853
|
-
const lines = output.split("\n");
|
|
854
|
-
const maxLines = this.expanded ? lines.length : 20;
|
|
855
|
-
const displayLines = lines.slice(0, maxLines);
|
|
856
|
-
const remaining = lines.length - maxLines;
|
|
857
|
-
text += `\n\n${displayLines.map((line) => theme.fg("toolOutput", line)).join("\n")}`;
|
|
858
|
-
if (remaining > 0) {
|
|
859
|
-
text += `${theme.fg("muted", `\n... (${remaining} more lines,`)} ${keyHint("expandTools", "to expand")})`;
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
const resultLimit = this.result.details?.resultLimitReached;
|
|
863
|
-
const truncation = this.result.details?.truncation;
|
|
864
|
-
if (resultLimit || truncation?.truncated) {
|
|
865
|
-
const warnings = [];
|
|
866
|
-
if (resultLimit) {
|
|
867
|
-
warnings.push(`${resultLimit} results limit`);
|
|
868
|
-
}
|
|
869
|
-
if (truncation?.truncated) {
|
|
870
|
-
warnings.push(`${formatSize(truncation.maxBytes ?? DEFAULT_MAX_BYTES)} limit`);
|
|
871
|
-
}
|
|
872
|
-
text += `\n${theme.fg("warning", `[Truncated: ${warnings.join(", ")}]`)}`;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
else if (normalizedToolName === "grep") {
|
|
877
|
-
const pattern = str(this.args?.pattern);
|
|
878
|
-
const rawPath = str(this.args?.path);
|
|
879
|
-
const path = rawPath !== null ? shortenPath(rawPath || ".") : null;
|
|
880
|
-
const glob = str(this.args?.glob);
|
|
881
|
-
const limit = this.args?.limit;
|
|
882
|
-
text =
|
|
883
|
-
theme.fg("toolTitle", theme.bold("grep")) +
|
|
884
|
-
" " +
|
|
885
|
-
(pattern === null ? invalidArg : theme.fg("accent", `/${pattern || ""}/`)) +
|
|
886
|
-
theme.fg("toolOutput", ` in ${path === null ? invalidArg : path}`);
|
|
887
|
-
if (glob) {
|
|
888
|
-
text += theme.fg("toolOutput", ` (${glob})`);
|
|
889
|
-
}
|
|
890
|
-
if (limit !== undefined) {
|
|
891
|
-
text += theme.fg("toolOutput", ` limit ${limit}`);
|
|
892
|
-
}
|
|
893
|
-
if (this.result) {
|
|
894
|
-
if (this.result.isError) {
|
|
895
|
-
const errorText = this.getTextOutput().trim() || "grep failed";
|
|
896
|
-
text += `\n\n${theme.fg("error", errorText)}`;
|
|
897
|
-
return text;
|
|
898
|
-
}
|
|
899
|
-
const output = this.getTextOutput().trim();
|
|
900
|
-
if (output) {
|
|
901
|
-
const lines = output.split("\n");
|
|
902
|
-
const maxLines = this.expanded ? lines.length : 15;
|
|
903
|
-
const displayLines = lines.slice(0, maxLines);
|
|
904
|
-
const remaining = lines.length - maxLines;
|
|
905
|
-
text += `\n\n${displayLines.map((line) => theme.fg("toolOutput", line)).join("\n")}`;
|
|
906
|
-
if (remaining > 0) {
|
|
907
|
-
text += `${theme.fg("muted", `\n... (${remaining} more lines,`)} ${keyHint("expandTools", "to expand")})`;
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
const matchLimit = this.result.details?.matchLimitReached;
|
|
911
|
-
const truncation = this.result.details?.truncation;
|
|
912
|
-
const linesTruncated = this.result.details?.linesTruncated;
|
|
913
|
-
if (matchLimit || truncation?.truncated || linesTruncated) {
|
|
914
|
-
const warnings = [];
|
|
915
|
-
if (matchLimit) {
|
|
916
|
-
warnings.push(`${matchLimit} matches limit`);
|
|
917
|
-
}
|
|
918
|
-
if (truncation?.truncated) {
|
|
919
|
-
warnings.push(`${formatSize(truncation.maxBytes ?? DEFAULT_MAX_BYTES)} limit`);
|
|
920
|
-
}
|
|
921
|
-
if (linesTruncated) {
|
|
922
|
-
warnings.push("some lines truncated");
|
|
923
|
-
}
|
|
924
|
-
text += `\n${theme.fg("warning", `[Truncated: ${warnings.join(", ")}]`)}`;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
else if (normalizedToolName === "web_search") {
|
|
929
|
-
// Server-side Anthropic web search
|
|
930
|
-
text = theme.fg("toolTitle", theme.bold("web search"));
|
|
931
|
-
if (process.env.PI_OFFLINE === "1") {
|
|
932
|
-
text += "\n\n" + theme.fg("muted", "\u{1F50C} Offline \u{2014} web search unavailable");
|
|
933
|
-
}
|
|
934
|
-
else if (this.result) {
|
|
935
|
-
const output = this.getTextOutput().trim();
|
|
936
|
-
if (output) {
|
|
937
|
-
const lines = output.split("\n");
|
|
938
|
-
const maxLines = this.expanded ? lines.length : 10;
|
|
939
|
-
const displayLines = lines.slice(0, maxLines);
|
|
940
|
-
const remaining = lines.length - maxLines;
|
|
941
|
-
text += `\n\n${displayLines.map((line) => theme.fg("toolOutput", line)).join("\n")}`;
|
|
942
|
-
if (remaining > 0) {
|
|
943
|
-
text += `${theme.fg("muted", `\n... (${remaining} more lines,`)} ${keyHint("expandTools", "to expand")})`;
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
else {
|
|
949
|
-
// Generic tool / MCP tool without a registered renderer.
|
|
950
|
-
// MCP tool names from Claude Code arrive as `mcp__<server>__<tool>`;
|
|
951
|
-
// render the server prefix in muted style so the tool name reads
|
|
952
|
-
// cleanly. GSD-registered MCP tools have already had their prefix
|
|
953
|
-
// stripped upstream in partial-builder.ts and won't reach this branch.
|
|
954
|
-
const parsed = parseMcpToolName(this.toolName);
|
|
955
|
-
const displayName = parsed ? parsed.tool : this.toolName;
|
|
956
|
-
const serverPrefix = parsed ? theme.fg("muted", `${parsed.server}\u00b7`) : "";
|
|
957
|
-
text = serverPrefix + theme.fg("toolTitle", theme.bold(displayName));
|
|
958
|
-
const argsText = formatCompactArgs(this.args, this.expanded);
|
|
959
|
-
if (argsText) {
|
|
960
|
-
if (argsText.includes("\n")) {
|
|
961
|
-
text += `\n\n${theme.fg("toolOutput", argsText)}`;
|
|
962
|
-
}
|
|
963
|
-
else {
|
|
964
|
-
text += " " + theme.fg("toolOutput", argsText);
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
if (this.result) {
|
|
968
|
-
const output = this.getTextOutput().trim();
|
|
969
|
-
if (output) {
|
|
970
|
-
const lines = output.split("\n");
|
|
971
|
-
const maxLines = this.expanded ? lines.length : GENERIC_OUTPUT_PREVIEW_LINES;
|
|
972
|
-
const displayLines = lines.slice(0, maxLines);
|
|
973
|
-
const remaining = lines.length - maxLines;
|
|
974
|
-
text += `\n\n${displayLines.map((line) => theme.fg("toolOutput", line)).join("\n")}`;
|
|
975
|
-
if (remaining > 0) {
|
|
976
|
-
text += `${theme.fg("muted", `\n... (${remaining} more lines,`)} ${keyHint("expandTools", "to expand")})`;
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
return text;
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
//# sourceMappingURL=tool-execution.js.map
|