gsd-pi 2.34.0 → 2.35.0-dev.cd3b7ea
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/resources/extensions/gsd/changelog.js +162 -0
- package/dist/resources/extensions/gsd/commands-bootstrap.js +1 -0
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +5 -1
- package/dist/resources/extensions/gsd/commands.js +8 -1
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +10 -0
- package/dist/resources/extensions/gsd/doctor-checks.js +113 -5
- package/dist/resources/extensions/gsd/doctor-proactive.js +22 -0
- package/dist/resources/extensions/gsd/doctor.js +36 -0
- package/dist/resources/extensions/gsd/guided-flow.js +4 -2
- package/dist/resources/extensions/gsd/preferences-validation.js +38 -0
- package/dist/resources/extensions/gsd/preferences.js +2 -0
- package/dist/resources/extensions/mcp-client/index.js +2 -1
- package/dist/resources/skills/create-gsd-extension/references/events-reference.md +4 -4
- package/package.json +1 -1
- package/packages/native/dist/native.d.ts +0 -2
- package/packages/native/dist/native.js +0 -2
- package/packages/native/src/native.ts +0 -3
- package/packages/pi-agent-core/dist/agent-loop.d.ts +14 -0
- package/packages/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +24 -27
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/dist/agent.d.ts +1 -0
- package/packages/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/agent.js +11 -22
- package/packages/pi-agent-core/dist/agent.js.map +1 -1
- package/packages/pi-agent-core/dist/proxy.d.ts +1 -25
- package/packages/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/proxy.js +3 -9
- package/packages/pi-agent-core/dist/proxy.js.map +1 -1
- package/packages/pi-agent-core/src/agent-loop.ts +30 -27
- package/packages/pi-agent-core/src/agent.ts +12 -23
- package/packages/pi-agent-core/src/proxy.ts +3 -9
- package/packages/pi-ai/dist/api-registry.d.ts +0 -2
- package/packages/pi-ai/dist/api-registry.d.ts.map +1 -1
- package/packages/pi-ai/dist/api-registry.js +0 -10
- package/packages/pi-ai/dist/api-registry.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts +0 -8
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/azure-openai-responses.js +5 -41
- package/packages/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
- package/packages/pi-ai/dist/providers/github-copilot-headers.d.ts +0 -1
- package/packages/pi-ai/dist/providers/github-copilot-headers.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/github-copilot-headers.js +1 -1
- package/packages/pi-ai/dist/providers/github-copilot-headers.js.map +1 -1
- package/packages/pi-ai/dist/providers/google-gemini-cli.d.ts +1 -43
- package/packages/pi-ai/dist/providers/google-gemini-cli.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/google-gemini-cli.js +2 -2
- package/packages/pi-ai/dist/providers/google-gemini-cli.js.map +1 -1
- package/packages/pi-ai/dist/providers/google-shared.d.ts +0 -4
- package/packages/pi-ai/dist/providers/google-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/google-shared.js +1 -1
- package/packages/pi-ai/dist/providers/google-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-completions.js +10 -73
- package/packages/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses.js +8 -79
- package/packages/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-shared.d.ts +65 -0
- package/packages/pi-ai/dist/providers/openai-shared.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/openai-shared.js +146 -0
- package/packages/pi-ai/dist/providers/openai-shared.js.map +1 -0
- package/packages/pi-ai/dist/providers/register-builtins.d.ts +0 -1
- package/packages/pi-ai/dist/providers/register-builtins.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/register-builtins.js +1 -1
- package/packages/pi-ai/dist/providers/register-builtins.js.map +1 -1
- package/packages/pi-ai/dist/utils/event-stream.d.ts +0 -2
- package/packages/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/event-stream.js +0 -4
- package/packages/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.js +7 -135
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.js +7 -135
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-oauth-utils.d.ts +46 -0
- package/packages/pi-ai/dist/utils/oauth/google-oauth-utils.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/google-oauth-utils.js +160 -0
- package/packages/pi-ai/dist/utils/oauth/google-oauth-utils.js.map +1 -0
- package/packages/pi-ai/dist/utils/overflow.d.ts +0 -4
- package/packages/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/overflow.js +0 -6
- package/packages/pi-ai/dist/utils/overflow.js.map +1 -1
- package/packages/pi-ai/dist/utils/validation.d.ts +0 -8
- package/packages/pi-ai/dist/utils/validation.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/validation.js +0 -14
- package/packages/pi-ai/dist/utils/validation.js.map +1 -1
- package/packages/pi-ai/src/api-registry.ts +0 -12
- package/packages/pi-ai/src/providers/anthropic.ts +1 -1
- package/packages/pi-ai/src/providers/azure-openai-responses.ts +11 -45
- package/packages/pi-ai/src/providers/github-copilot-headers.ts +1 -1
- package/packages/pi-ai/src/providers/google-gemini-cli.ts +2 -2
- package/packages/pi-ai/src/providers/google-shared.ts +1 -1
- package/packages/pi-ai/src/providers/openai-completions.ts +16 -86
- package/packages/pi-ai/src/providers/openai-responses.ts +15 -95
- package/packages/pi-ai/src/providers/openai-shared.ts +193 -0
- package/packages/pi-ai/src/providers/register-builtins.ts +1 -1
- package/packages/pi-ai/src/utils/event-stream.ts +0 -5
- package/packages/pi-ai/src/utils/oauth/google-antigravity.ts +14 -162
- package/packages/pi-ai/src/utils/oauth/google-gemini-cli.ts +13 -161
- package/packages/pi-ai/src/utils/oauth/google-oauth-utils.ts +201 -0
- package/packages/pi-ai/src/utils/overflow.ts +1 -8
- package/packages/pi-ai/src/utils/validation.ts +0 -15
- package/packages/pi-coding-agent/dist/config.d.ts +0 -9
- package/packages/pi-coding-agent/dist/config.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/config.js +4 -8
- package/packages/pi-coding-agent/dist/config.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts +16 -63
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +104 -641
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +0 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +4 -35
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/branch-summarization.js +5 -43
- package/packages/pi-coding-agent/dist/core/compaction/branch-summarization.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js +11 -69
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/utils.d.ts +40 -0
- package/packages/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/utils.js +78 -0
- package/packages/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.d.ts +77 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.js +331 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/export-html/ansi-to-html.d.ts +0 -4
- package/packages/pi-coding-agent/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/export-html/ansi-to-html.js +1 -1
- package/packages/pi-coding-agent/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts +2 -2
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.js +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +15 -5
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.js +129 -256
- package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +49 -42
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js +2 -21
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/keybindings.d.ts +0 -8
- package/packages/pi-coding-agent/dist/core/keybindings.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/keybindings.js +2 -2
- package/packages/pi-coding-agent/dist/core/keybindings.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lock-utils.d.ts +39 -0
- package/packages/pi-coding-agent/dist/core/lock-utils.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lock-utils.js +89 -0
- package/packages/pi-coding-agent/dist/core/lock-utils.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts +0 -17
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/client.js +3 -62
- package/packages/pi-coding-agent/dist/core/lsp/client.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/config.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/config.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/config.js +2 -6
- package/packages/pi-coding-agent/dist/core/lsp/config.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/edits.d.ts +0 -5
- package/packages/pi-coding-agent/dist/core/lsp/edits.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/edits.js +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/edits.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/index.js +52 -107
- package/packages/pi-coding-agent/dist/core/lsp/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts +0 -1
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.js +3 -22
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/types.d.ts +0 -1
- package/packages/pi-coding-agent/dist/core/lsp/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/types.js +0 -28
- package/packages/pi-coding-agent/dist/core/lsp/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts +1 -6
- package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/utils.js +1 -28
- package/packages/pi-coding-agent/dist/core/lsp/utils.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/messages.d.ts +0 -8
- package/packages/pi-coding-agent/dist/core/messages.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/messages.js +5 -5
- package/packages/pi-coding-agent/dist/core/messages.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts +0 -3
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +1 -3
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.d.ts +1 -26
- package/packages/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.js +3 -59
- package/packages/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/package-manager.js +2 -4
- package/packages/pi-coding-agent/dist/core/package-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/prompt-templates.d.ts +0 -17
- package/packages/pi-coding-agent/dist/core/prompt-templates.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/prompt-templates.js +2 -2
- package/packages/pi-coding-agent/dist/core/prompt-templates.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts +2 -4
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js +33 -58
- package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts +87 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.js +295 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/session-manager.d.ts +0 -5
- package/packages/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/session-manager.js +5 -32
- package/packages/pi-coding-agent/dist/core/session-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +8 -12
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +78 -168
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/skills.js +1 -3
- package/packages/pi-coding-agent/dist/core/skills.js.map +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/migrations.d.ts +0 -16
- package/packages/pi-coding-agent/dist/migrations.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/migrations.js +2 -2
- package/packages/pi-coding-agent/dist/migrations.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector-search.d.ts +0 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector-search.js +2 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector.d.ts +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector.js +9 -26
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +1 -13
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tree-render-utils.d.ts +44 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tree-render-utils.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tree-render-utils.js +61 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tree-render-utils.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tree-selector.js +6 -9
- package/packages/pi-coding-agent/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +1 -24
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +50 -512
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts +71 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +514 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +65 -4
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +6 -23
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts +12 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +175 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/utils/shorten-path.d.ts +6 -0
- package/packages/pi-coding-agent/dist/modes/interactive/utils/shorten-path.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/utils/shorten-path.js +15 -0
- package/packages/pi-coding-agent/dist/modes/interactive/utils/shorten-path.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/print-mode.js +2 -30
- package/packages/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/rpc/rpc-mode.js +2 -28
- package/packages/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/shared/command-context-actions.d.ts +19 -0
- package/packages/pi-coding-agent/dist/modes/shared/command-context-actions.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/shared/command-context-actions.js +45 -0
- package/packages/pi-coding-agent/dist/modes/shared/command-context-actions.js.map +1 -0
- package/packages/pi-coding-agent/dist/utils/changelog.d.ts +0 -4
- package/packages/pi-coding-agent/dist/utils/changelog.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/changelog.js +1 -1
- package/packages/pi-coding-agent/dist/utils/changelog.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.d.ts +0 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.js +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/error.d.ts +5 -0
- package/packages/pi-coding-agent/dist/utils/error.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/utils/error.js +7 -0
- package/packages/pi-coding-agent/dist/utils/error.js.map +1 -0
- package/packages/pi-coding-agent/dist/utils/photon.d.ts +0 -19
- package/packages/pi-coding-agent/dist/utils/photon.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/photon.js +1 -120
- package/packages/pi-coding-agent/dist/utils/photon.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/tools-manager.d.ts +0 -1
- package/packages/pi-coding-agent/dist/utils/tools-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/tools-manager.js +1 -1
- package/packages/pi-coding-agent/dist/utils/tools-manager.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/config.ts +5 -10
- package/packages/pi-coding-agent/src/core/agent-session.ts +117 -745
- package/packages/pi-coding-agent/src/core/auth-storage.ts +4 -38
- package/packages/pi-coding-agent/src/core/compaction/branch-summarization.ts +7 -53
- package/packages/pi-coding-agent/src/core/compaction/compaction.ts +14 -74
- package/packages/pi-coding-agent/src/core/compaction/utils.ts +100 -0
- package/packages/pi-coding-agent/src/core/compaction-orchestrator.ts +424 -0
- package/packages/pi-coding-agent/src/core/export-html/ansi-to-html.ts +1 -1
- package/packages/pi-coding-agent/src/core/extensions/index.ts +1 -21
- package/packages/pi-coding-agent/src/core/extensions/runner.ts +119 -256
- package/packages/pi-coding-agent/src/core/extensions/types.ts +50 -69
- package/packages/pi-coding-agent/src/core/keybindings.ts +2 -2
- package/packages/pi-coding-agent/src/core/lock-utils.ts +113 -0
- package/packages/pi-coding-agent/src/core/lsp/client.ts +3 -73
- package/packages/pi-coding-agent/src/core/lsp/config.ts +2 -10
- package/packages/pi-coding-agent/src/core/lsp/edits.ts +1 -1
- package/packages/pi-coding-agent/src/core/lsp/index.ts +83 -152
- package/packages/pi-coding-agent/src/core/lsp/lspmux.ts +3 -23
- package/packages/pi-coding-agent/src/core/lsp/types.ts +0 -29
- package/packages/pi-coding-agent/src/core/lsp/utils.ts +1 -33
- package/packages/pi-coding-agent/src/core/messages.ts +5 -5
- package/packages/pi-coding-agent/src/core/model-registry.ts +0 -2
- package/packages/pi-coding-agent/src/core/model-resolver.ts +3 -77
- package/packages/pi-coding-agent/src/core/package-manager.ts +1 -4
- package/packages/pi-coding-agent/src/core/prompt-templates.ts +2 -2
- package/packages/pi-coding-agent/src/core/resource-loader.ts +43 -67
- package/packages/pi-coding-agent/src/core/retry-handler.ts +359 -0
- package/packages/pi-coding-agent/src/core/session-manager.ts +5 -34
- package/packages/pi-coding-agent/src/core/settings-manager.ts +87 -166
- package/packages/pi-coding-agent/src/core/skills.ts +1 -4
- package/packages/pi-coding-agent/src/index.ts +1 -7
- package/packages/pi-coding-agent/src/migrations.ts +2 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/session-selector-search.ts +2 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/session-selector.ts +17 -29
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +1 -13
- package/packages/pi-coding-agent/src/modes/interactive/components/tree-render-utils.ts +81 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/tree-selector.ts +14 -19
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +50 -561
- package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +653 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +7 -26
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +196 -0
- package/packages/pi-coding-agent/src/modes/interactive/utils/shorten-path.ts +14 -0
- package/packages/pi-coding-agent/src/modes/print-mode.ts +2 -30
- package/packages/pi-coding-agent/src/modes/rpc/rpc-mode.ts +2 -28
- package/packages/pi-coding-agent/src/modes/shared/command-context-actions.ts +53 -0
- package/packages/pi-coding-agent/src/utils/changelog.ts +1 -1
- package/packages/pi-coding-agent/src/utils/clipboard-image.ts +1 -1
- package/packages/pi-coding-agent/src/utils/error.ts +6 -0
- package/packages/pi-coding-agent/src/utils/photon.ts +0 -137
- package/packages/pi-coding-agent/src/utils/tools-manager.ts +1 -1
- package/packages/pi-tui/dist/components/editor.d.ts +0 -10
- package/packages/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/editor.js +1 -1
- package/packages/pi-tui/dist/components/editor.js.map +1 -1
- package/packages/pi-tui/dist/components/markdown.d.ts +5 -0
- package/packages/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/markdown.js +25 -31
- package/packages/pi-tui/dist/components/markdown.js.map +1 -1
- package/packages/pi-tui/dist/keys.d.ts +0 -4
- package/packages/pi-tui/dist/keys.d.ts.map +1 -1
- package/packages/pi-tui/dist/keys.js +94 -162
- package/packages/pi-tui/dist/keys.js.map +1 -1
- package/packages/pi-tui/dist/overlay-layout.d.ts +55 -0
- package/packages/pi-tui/dist/overlay-layout.d.ts.map +1 -0
- package/packages/pi-tui/dist/overlay-layout.js +288 -0
- package/packages/pi-tui/dist/overlay-layout.js.map +1 -0
- package/packages/pi-tui/dist/tui.d.ts +0 -22
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +6 -272
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/dist/utils.d.ts +0 -7
- package/packages/pi-tui/dist/utils.d.ts.map +1 -1
- package/packages/pi-tui/dist/utils.js +0 -44
- package/packages/pi-tui/dist/utils.js.map +1 -1
- package/packages/pi-tui/src/components/editor.ts +1 -1
- package/packages/pi-tui/src/components/markdown.ts +25 -29
- package/packages/pi-tui/src/keys.ts +94 -173
- package/packages/pi-tui/src/overlay-layout.ts +372 -0
- package/packages/pi-tui/src/tui.ts +11 -312
- package/packages/pi-tui/src/utils.ts +0 -43
- package/pkg/dist/core/export-html/ansi-to-html.d.ts +0 -4
- package/pkg/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/pkg/dist/core/export-html/ansi-to-html.js +1 -1
- package/pkg/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.d.ts +65 -4
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +6 -23
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts +12 -0
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -0
- package/pkg/dist/modes/interactive/theme/themes.js +175 -0
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -0
- package/pkg/package.json +1 -1
- package/src/resources/extensions/gsd/changelog.ts +213 -0
- package/src/resources/extensions/gsd/commands-bootstrap.ts +1 -0
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +5 -1
- package/src/resources/extensions/gsd/commands.ts +9 -1
- package/src/resources/extensions/gsd/docs/preferences-reference.md +10 -0
- package/src/resources/extensions/gsd/doctor-checks.ts +107 -5
- package/src/resources/extensions/gsd/doctor-proactive.ts +24 -0
- package/src/resources/extensions/gsd/doctor-types.ts +9 -1
- package/src/resources/extensions/gsd/doctor.ts +35 -0
- package/src/resources/extensions/gsd/guided-flow.ts +4 -2
- package/src/resources/extensions/gsd/preferences-validation.ts +38 -0
- package/src/resources/extensions/gsd/preferences.ts +2 -0
- package/src/resources/extensions/gsd/tests/doctor-git.test.ts +98 -2
- package/src/resources/extensions/gsd/tests/doctor-runtime.test.ts +59 -3
- package/src/resources/extensions/gsd/tests/preferences.test.ts +28 -0
- package/src/resources/extensions/mcp-client/index.ts +2 -1
- package/src/resources/skills/create-gsd-extension/references/events-reference.md +4 -4
- package/packages/pi-coding-agent/dist/modes/interactive/theme/dark.json +0 -85
- package/packages/pi-coding-agent/dist/modes/interactive/theme/light.json +0 -84
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +0 -335
- package/packages/pi-coding-agent/src/modes/interactive/theme/dark.json +0 -85
- package/packages/pi-coding-agent/src/modes/interactive/theme/light.json +0 -84
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.json +0 -335
- package/pkg/dist/modes/interactive/theme/dark.json +0 -85
- package/pkg/dist/modes/interactive/theme/light.json +0 -84
- package/pkg/dist/modes/interactive/theme/theme-schema.json +0 -335
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
supportsLanguage,
|
|
10
10
|
type HighlightColors,
|
|
11
11
|
} from "@gsd/native";
|
|
12
|
-
import { getCustomThemesDir
|
|
12
|
+
import { getCustomThemesDir } from "../../../config.js";
|
|
13
|
+
import { builtinThemes } from "./themes.js";
|
|
13
14
|
|
|
14
15
|
// Issue #453: native preview highlighting can wedge the entire interactive
|
|
15
16
|
// session after a successful file tool. Keep the safer plain-text path as the
|
|
@@ -100,7 +101,7 @@ const ThemeJsonSchema = Type.Object({
|
|
|
100
101
|
),
|
|
101
102
|
});
|
|
102
103
|
|
|
103
|
-
type ThemeJson = Static<typeof ThemeJsonSchema>;
|
|
104
|
+
export type ThemeJson = Static<typeof ThemeJsonSchema>;
|
|
104
105
|
|
|
105
106
|
const validateThemeJson = TypeCompiler.Compile(ThemeJsonSchema);
|
|
106
107
|
|
|
@@ -450,19 +451,8 @@ export class Theme {
|
|
|
450
451
|
// Theme Loading
|
|
451
452
|
// ============================================================================
|
|
452
453
|
|
|
453
|
-
let BUILTIN_THEMES: Record<string, ThemeJson> | undefined;
|
|
454
|
-
|
|
455
454
|
function getBuiltinThemes(): Record<string, ThemeJson> {
|
|
456
|
-
|
|
457
|
-
const themesDir = getThemesDir();
|
|
458
|
-
const darkPath = path.join(themesDir, "dark.json");
|
|
459
|
-
const lightPath = path.join(themesDir, "light.json");
|
|
460
|
-
BUILTIN_THEMES = {
|
|
461
|
-
dark: JSON.parse(fs.readFileSync(darkPath, "utf-8")) as ThemeJson,
|
|
462
|
-
light: JSON.parse(fs.readFileSync(lightPath, "utf-8")) as ThemeJson,
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
return BUILTIN_THEMES;
|
|
455
|
+
return builtinThemes;
|
|
466
456
|
}
|
|
467
457
|
|
|
468
458
|
export function getAvailableThemes(): string[] {
|
|
@@ -488,13 +478,12 @@ export interface ThemeInfo {
|
|
|
488
478
|
}
|
|
489
479
|
|
|
490
480
|
export function getAvailableThemesWithPaths(): ThemeInfo[] {
|
|
491
|
-
const themesDir = getThemesDir();
|
|
492
481
|
const customThemesDir = getCustomThemesDir();
|
|
493
482
|
const result: ThemeInfo[] = [];
|
|
494
483
|
|
|
495
|
-
// Built-in themes
|
|
484
|
+
// Built-in themes (embedded in code, no file path)
|
|
496
485
|
for (const name of Object.keys(getBuiltinThemes())) {
|
|
497
|
-
result.push({ name, path:
|
|
486
|
+
result.push({ name, path: undefined });
|
|
498
487
|
}
|
|
499
488
|
|
|
500
489
|
// Custom themes
|
|
@@ -539,7 +528,7 @@ function parseThemeJson(label: string, json: unknown): ThemeJson {
|
|
|
539
528
|
errorMessage += "\nMissing required color tokens:\n";
|
|
540
529
|
errorMessage += missingColors.map((c) => ` - ${c}`).join("\n");
|
|
541
530
|
errorMessage += '\n\nPlease add these colors to your theme\'s "colors" object.';
|
|
542
|
-
errorMessage += "\nSee the built-in
|
|
531
|
+
errorMessage += "\nSee the built-in dark/light themes for reference values.";
|
|
543
532
|
}
|
|
544
533
|
if (otherErrors.length > 0) {
|
|
545
534
|
errorMessage += `\n\nOther errors:\n${otherErrors.join("\n")}`;
|
|
@@ -880,14 +869,6 @@ export function getResolvedThemeColors(themeName?: string): Record<string, strin
|
|
|
880
869
|
return cssColors;
|
|
881
870
|
}
|
|
882
871
|
|
|
883
|
-
/**
|
|
884
|
-
* Check if a theme is a "light" theme (for CSS that needs light/dark variants).
|
|
885
|
-
*/
|
|
886
|
-
export function isLightTheme(themeName?: string): boolean {
|
|
887
|
-
// Currently just check the name - could be extended to analyze colors
|
|
888
|
-
return themeName === "light";
|
|
889
|
-
}
|
|
890
|
-
|
|
891
872
|
/**
|
|
892
873
|
* Get explicit export colors from theme JSON, if specified.
|
|
893
874
|
* Returns undefined for each color that isn't explicitly set.
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in theme definitions.
|
|
3
|
+
*
|
|
4
|
+
* Each theme is a self-contained record of color values. Variable references
|
|
5
|
+
* (e.g. "accent") are resolved against the `vars` map at load time by the
|
|
6
|
+
* theme engine in theme.ts.
|
|
7
|
+
*
|
|
8
|
+
* To add a new built-in theme, add an entry to `builtinThemes` below.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// Re-use the ThemeJson type from the schema defined in theme.ts.
|
|
12
|
+
// We import only the type to avoid circular runtime dependencies.
|
|
13
|
+
import type { ThemeJson } from "./theme.js";
|
|
14
|
+
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// Dark theme
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
const dark: ThemeJson = {
|
|
20
|
+
name: "dark",
|
|
21
|
+
vars: {
|
|
22
|
+
cyan: "#00d7ff",
|
|
23
|
+
blue: "#5f87ff",
|
|
24
|
+
green: "#b5bd68",
|
|
25
|
+
red: "#cc6666",
|
|
26
|
+
yellow: "#ffff00",
|
|
27
|
+
gray: "#808080",
|
|
28
|
+
dimGray: "#666666",
|
|
29
|
+
darkGray: "#505050",
|
|
30
|
+
accent: "#8abeb7",
|
|
31
|
+
selectedBg: "#3a3a4a",
|
|
32
|
+
userMsgBg: "#343541",
|
|
33
|
+
toolPendingBg: "#282832",
|
|
34
|
+
toolSuccessBg: "#283228",
|
|
35
|
+
toolErrorBg: "#3c2828",
|
|
36
|
+
customMsgBg: "#2d2838",
|
|
37
|
+
},
|
|
38
|
+
colors: {
|
|
39
|
+
accent: "accent",
|
|
40
|
+
border: "blue",
|
|
41
|
+
borderAccent: "cyan",
|
|
42
|
+
borderMuted: "darkGray",
|
|
43
|
+
success: "green",
|
|
44
|
+
error: "red",
|
|
45
|
+
warning: "yellow",
|
|
46
|
+
muted: "gray",
|
|
47
|
+
dim: "dimGray",
|
|
48
|
+
text: "",
|
|
49
|
+
thinkingText: "gray",
|
|
50
|
+
|
|
51
|
+
selectedBg: "selectedBg",
|
|
52
|
+
userMessageBg: "userMsgBg",
|
|
53
|
+
userMessageText: "",
|
|
54
|
+
customMessageBg: "customMsgBg",
|
|
55
|
+
customMessageText: "",
|
|
56
|
+
customMessageLabel: "#9575cd",
|
|
57
|
+
toolPendingBg: "toolPendingBg",
|
|
58
|
+
toolSuccessBg: "toolSuccessBg",
|
|
59
|
+
toolErrorBg: "toolErrorBg",
|
|
60
|
+
toolTitle: "",
|
|
61
|
+
toolOutput: "gray",
|
|
62
|
+
|
|
63
|
+
mdHeading: "#f0c674",
|
|
64
|
+
mdLink: "#81a2be",
|
|
65
|
+
mdLinkUrl: "dimGray",
|
|
66
|
+
mdCode: "accent",
|
|
67
|
+
mdCodeBlock: "green",
|
|
68
|
+
mdCodeBlockBorder: "gray",
|
|
69
|
+
mdQuote: "gray",
|
|
70
|
+
mdQuoteBorder: "gray",
|
|
71
|
+
mdHr: "gray",
|
|
72
|
+
mdListBullet: "accent",
|
|
73
|
+
|
|
74
|
+
toolDiffAdded: "green",
|
|
75
|
+
toolDiffRemoved: "red",
|
|
76
|
+
toolDiffContext: "gray",
|
|
77
|
+
|
|
78
|
+
syntaxComment: "#6A9955",
|
|
79
|
+
syntaxKeyword: "#569CD6",
|
|
80
|
+
syntaxFunction: "#DCDCAA",
|
|
81
|
+
syntaxVariable: "#9CDCFE",
|
|
82
|
+
syntaxString: "#CE9178",
|
|
83
|
+
syntaxNumber: "#B5CEA8",
|
|
84
|
+
syntaxType: "#4EC9B0",
|
|
85
|
+
syntaxOperator: "#D4D4D4",
|
|
86
|
+
syntaxPunctuation: "#D4D4D4",
|
|
87
|
+
|
|
88
|
+
thinkingOff: "darkGray",
|
|
89
|
+
thinkingMinimal: "#6e6e6e",
|
|
90
|
+
thinkingLow: "#5f87af",
|
|
91
|
+
thinkingMedium: "#81a2be",
|
|
92
|
+
thinkingHigh: "#b294bb",
|
|
93
|
+
thinkingXhigh: "#d183e8",
|
|
94
|
+
|
|
95
|
+
bashMode: "green",
|
|
96
|
+
},
|
|
97
|
+
export: {
|
|
98
|
+
pageBg: "#18181e",
|
|
99
|
+
cardBg: "#1e1e24",
|
|
100
|
+
infoBg: "#3c3728",
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
// Light theme
|
|
106
|
+
// ---------------------------------------------------------------------------
|
|
107
|
+
|
|
108
|
+
const light: ThemeJson = {
|
|
109
|
+
name: "light",
|
|
110
|
+
vars: {
|
|
111
|
+
teal: "#5a8080",
|
|
112
|
+
blue: "#547da7",
|
|
113
|
+
green: "#588458",
|
|
114
|
+
red: "#aa5555",
|
|
115
|
+
yellow: "#9a7326",
|
|
116
|
+
mediumGray: "#6c6c6c",
|
|
117
|
+
dimGray: "#767676",
|
|
118
|
+
lightGray: "#b0b0b0",
|
|
119
|
+
selectedBg: "#d0d0e0",
|
|
120
|
+
userMsgBg: "#e8e8e8",
|
|
121
|
+
toolPendingBg: "#e8e8f0",
|
|
122
|
+
toolSuccessBg: "#e8f0e8",
|
|
123
|
+
toolErrorBg: "#f0e8e8",
|
|
124
|
+
customMsgBg: "#ede7f6",
|
|
125
|
+
},
|
|
126
|
+
colors: {
|
|
127
|
+
accent: "teal",
|
|
128
|
+
border: "blue",
|
|
129
|
+
borderAccent: "teal",
|
|
130
|
+
borderMuted: "lightGray",
|
|
131
|
+
success: "green",
|
|
132
|
+
error: "red",
|
|
133
|
+
warning: "yellow",
|
|
134
|
+
muted: "mediumGray",
|
|
135
|
+
dim: "dimGray",
|
|
136
|
+
text: "",
|
|
137
|
+
thinkingText: "mediumGray",
|
|
138
|
+
|
|
139
|
+
selectedBg: "selectedBg",
|
|
140
|
+
userMessageBg: "userMsgBg",
|
|
141
|
+
userMessageText: "",
|
|
142
|
+
customMessageBg: "customMsgBg",
|
|
143
|
+
customMessageText: "",
|
|
144
|
+
customMessageLabel: "#7e57c2",
|
|
145
|
+
toolPendingBg: "toolPendingBg",
|
|
146
|
+
toolSuccessBg: "toolSuccessBg",
|
|
147
|
+
toolErrorBg: "toolErrorBg",
|
|
148
|
+
toolTitle: "",
|
|
149
|
+
toolOutput: "mediumGray",
|
|
150
|
+
|
|
151
|
+
mdHeading: "yellow",
|
|
152
|
+
mdLink: "blue",
|
|
153
|
+
mdLinkUrl: "dimGray",
|
|
154
|
+
mdCode: "teal",
|
|
155
|
+
mdCodeBlock: "green",
|
|
156
|
+
mdCodeBlockBorder: "mediumGray",
|
|
157
|
+
mdQuote: "mediumGray",
|
|
158
|
+
mdQuoteBorder: "mediumGray",
|
|
159
|
+
mdHr: "mediumGray",
|
|
160
|
+
mdListBullet: "green",
|
|
161
|
+
|
|
162
|
+
toolDiffAdded: "green",
|
|
163
|
+
toolDiffRemoved: "red",
|
|
164
|
+
toolDiffContext: "mediumGray",
|
|
165
|
+
|
|
166
|
+
syntaxComment: "#008000",
|
|
167
|
+
syntaxKeyword: "#0000FF",
|
|
168
|
+
syntaxFunction: "#795E26",
|
|
169
|
+
syntaxVariable: "#001080",
|
|
170
|
+
syntaxString: "#A31515",
|
|
171
|
+
syntaxNumber: "#098658",
|
|
172
|
+
syntaxType: "#267F99",
|
|
173
|
+
syntaxOperator: "#000000",
|
|
174
|
+
syntaxPunctuation: "#000000",
|
|
175
|
+
|
|
176
|
+
thinkingOff: "lightGray",
|
|
177
|
+
thinkingMinimal: "#767676",
|
|
178
|
+
thinkingLow: "blue",
|
|
179
|
+
thinkingMedium: "teal",
|
|
180
|
+
thinkingHigh: "#875f87",
|
|
181
|
+
thinkingXhigh: "#8b008b",
|
|
182
|
+
|
|
183
|
+
bashMode: "green",
|
|
184
|
+
},
|
|
185
|
+
export: {
|
|
186
|
+
pageBg: "#f8f8f8",
|
|
187
|
+
cardBg: "#ffffff",
|
|
188
|
+
infoBg: "#fffae6",
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
193
|
+
// Export
|
|
194
|
+
// ---------------------------------------------------------------------------
|
|
195
|
+
|
|
196
|
+
export const builtinThemes: Record<string, ThemeJson> = { dark, light };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as os from "node:os";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Convert absolute path to tilde notation if it's in home directory.
|
|
5
|
+
* Returns empty string for non-string or empty inputs.
|
|
6
|
+
*/
|
|
7
|
+
export function shortenPath(path: unknown): string {
|
|
8
|
+
if (typeof path !== "string" || !path) return "";
|
|
9
|
+
const home = os.homedir();
|
|
10
|
+
if (path.startsWith(home)) {
|
|
11
|
+
return `~${path.slice(home.length)}`;
|
|
12
|
+
}
|
|
13
|
+
return path;
|
|
14
|
+
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import type { AssistantMessage, ImageContent } from "@gsd/pi-ai";
|
|
10
10
|
import type { AgentSession } from "../core/agent-session.js";
|
|
11
|
+
import { createDefaultCommandContextActions } from "./shared/command-context-actions.js";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Options for print mode.
|
|
@@ -37,36 +38,7 @@ export async function runPrintMode(session: AgentSession, options: PrintModeOpti
|
|
|
37
38
|
}
|
|
38
39
|
// Set up extensions for print mode (no UI)
|
|
39
40
|
await session.bindExtensions({
|
|
40
|
-
commandContextActions:
|
|
41
|
-
waitForIdle: () => session.agent.waitForIdle(),
|
|
42
|
-
newSession: async (options) => {
|
|
43
|
-
const success = await session.newSession({ parentSession: options?.parentSession });
|
|
44
|
-
if (success && options?.setup) {
|
|
45
|
-
await options.setup(session.sessionManager);
|
|
46
|
-
}
|
|
47
|
-
return { cancelled: !success };
|
|
48
|
-
},
|
|
49
|
-
fork: async (entryId) => {
|
|
50
|
-
const result = await session.fork(entryId);
|
|
51
|
-
return { cancelled: result.cancelled };
|
|
52
|
-
},
|
|
53
|
-
navigateTree: async (targetId, options) => {
|
|
54
|
-
const result = await session.navigateTree(targetId, {
|
|
55
|
-
summarize: options?.summarize,
|
|
56
|
-
customInstructions: options?.customInstructions,
|
|
57
|
-
replaceInstructions: options?.replaceInstructions,
|
|
58
|
-
label: options?.label,
|
|
59
|
-
});
|
|
60
|
-
return { cancelled: result.cancelled };
|
|
61
|
-
},
|
|
62
|
-
switchSession: async (sessionPath) => {
|
|
63
|
-
const success = await session.switchSession(sessionPath);
|
|
64
|
-
return { cancelled: !success };
|
|
65
|
-
},
|
|
66
|
-
reload: async () => {
|
|
67
|
-
await session.reload();
|
|
68
|
-
},
|
|
69
|
-
},
|
|
41
|
+
commandContextActions: createDefaultCommandContextActions(session),
|
|
70
42
|
onError: (err) => {
|
|
71
43
|
console.error(`Extension error (${err.extensionPath}): ${err.error}`);
|
|
72
44
|
},
|
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
ExtensionWidgetOptions,
|
|
20
20
|
} from "../../core/extensions/index.js";
|
|
21
21
|
import { type Theme, theme } from "../interactive/theme/theme.js";
|
|
22
|
+
import { createDefaultCommandContextActions } from "../shared/command-context-actions.js";
|
|
22
23
|
import { attachJsonlLineReader, serializeJsonLine } from "./jsonl.js";
|
|
23
24
|
import type {
|
|
24
25
|
RpcCommand,
|
|
@@ -285,34 +286,7 @@ export async function runRpcMode(session: AgentSession): Promise<never> {
|
|
|
285
286
|
// Set up extensions with RPC-based UI context
|
|
286
287
|
await session.bindExtensions({
|
|
287
288
|
uiContext: createExtensionUIContext(),
|
|
288
|
-
commandContextActions:
|
|
289
|
-
waitForIdle: () => session.agent.waitForIdle(),
|
|
290
|
-
newSession: async (options) => {
|
|
291
|
-
// Delegate to AgentSession (handles setup + agent state sync)
|
|
292
|
-
const success = await session.newSession(options);
|
|
293
|
-
return { cancelled: !success };
|
|
294
|
-
},
|
|
295
|
-
fork: async (entryId) => {
|
|
296
|
-
const result = await session.fork(entryId);
|
|
297
|
-
return { cancelled: result.cancelled };
|
|
298
|
-
},
|
|
299
|
-
navigateTree: async (targetId, options) => {
|
|
300
|
-
const result = await session.navigateTree(targetId, {
|
|
301
|
-
summarize: options?.summarize,
|
|
302
|
-
customInstructions: options?.customInstructions,
|
|
303
|
-
replaceInstructions: options?.replaceInstructions,
|
|
304
|
-
label: options?.label,
|
|
305
|
-
});
|
|
306
|
-
return { cancelled: result.cancelled };
|
|
307
|
-
},
|
|
308
|
-
switchSession: async (sessionPath) => {
|
|
309
|
-
const success = await session.switchSession(sessionPath);
|
|
310
|
-
return { cancelled: !success };
|
|
311
|
-
},
|
|
312
|
-
reload: async () => {
|
|
313
|
-
await session.reload();
|
|
314
|
-
},
|
|
315
|
-
},
|
|
289
|
+
commandContextActions: createDefaultCommandContextActions(session),
|
|
316
290
|
shutdownHandler: () => {
|
|
317
291
|
shutdownRequested = true;
|
|
318
292
|
},
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default (headless) implementations of ExtensionCommandContextActions.
|
|
3
|
+
*
|
|
4
|
+
* These delegate directly to AgentSession without any UI side-effects.
|
|
5
|
+
* Interactive mode layers TUI-specific behavior on top of these.
|
|
6
|
+
* RPC and print modes use them as-is.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { AgentSession } from "../../core/agent-session.js";
|
|
10
|
+
import type { ExtensionCommandContextActions } from "../../core/extensions/index.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Create the default set of command context actions that simply delegate
|
|
14
|
+
* to the corresponding AgentSession methods.
|
|
15
|
+
*
|
|
16
|
+
* Callers can spread the result and override individual actions to add
|
|
17
|
+
* mode-specific behavior (e.g., interactive mode clears TUI state after
|
|
18
|
+
* forking).
|
|
19
|
+
*/
|
|
20
|
+
export function createDefaultCommandContextActions(session: AgentSession): ExtensionCommandContextActions {
|
|
21
|
+
return {
|
|
22
|
+
waitForIdle: () => session.agent.waitForIdle(),
|
|
23
|
+
|
|
24
|
+
newSession: async (options) => {
|
|
25
|
+
const success = await session.newSession(options);
|
|
26
|
+
return { cancelled: !success };
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
fork: async (entryId) => {
|
|
30
|
+
const result = await session.fork(entryId);
|
|
31
|
+
return { cancelled: result.cancelled };
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
navigateTree: async (targetId, options) => {
|
|
35
|
+
const result = await session.navigateTree(targetId, {
|
|
36
|
+
summarize: options?.summarize,
|
|
37
|
+
customInstructions: options?.customInstructions,
|
|
38
|
+
replaceInstructions: options?.replaceInstructions,
|
|
39
|
+
label: options?.label,
|
|
40
|
+
});
|
|
41
|
+
return { cancelled: result.cancelled };
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
switchSession: async (sessionPath) => {
|
|
45
|
+
const success = await session.switchSession(sessionPath);
|
|
46
|
+
return { cancelled: !success };
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
reload: async () => {
|
|
50
|
+
await session.reload();
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -73,7 +73,7 @@ export function parseChangelog(changelogPath: string): ChangelogEntry[] {
|
|
|
73
73
|
/**
|
|
74
74
|
* Compare versions. Returns: -1 if v1 < v2, 0 if v1 === v2, 1 if v1 > v2
|
|
75
75
|
*/
|
|
76
|
-
|
|
76
|
+
function compareVersions(v1: ChangelogEntry, v2: ChangelogEntry): number {
|
|
77
77
|
if (v1.major !== v2.major) return v1.major - v2.major;
|
|
78
78
|
if (v1.minor !== v2.minor) return v1.minor - v2.minor;
|
|
79
79
|
return v1.patch - v2.patch;
|
|
@@ -14,7 +14,7 @@ const DEFAULT_LIST_TIMEOUT_MS = 1000;
|
|
|
14
14
|
const DEFAULT_READ_TIMEOUT_MS = 3000;
|
|
15
15
|
const DEFAULT_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
function isWaylandSession(env: NodeJS.ProcessEnv = process.env): boolean {
|
|
18
18
|
return Boolean(env.WAYLAND_DISPLAY) || env.XDG_SESSION_TYPE === "wayland";
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -1,139 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Photon image processing wrapper.
|
|
3
|
-
*
|
|
4
|
-
* This module provides a unified interface to @silvia-odwyer/photon-node that works in:
|
|
5
|
-
* 1. Node.js (development, npm run build)
|
|
6
|
-
* 2. Bun compiled binaries (standalone distribution)
|
|
7
|
-
*
|
|
8
|
-
* The challenge: photon-node's CJS entry uses fs.readFileSync(__dirname + '/photon_rs_bg.wasm')
|
|
9
|
-
* which bakes the build machine's absolute path into Bun compiled binaries.
|
|
10
|
-
*
|
|
11
|
-
* Solution:
|
|
12
|
-
* 1. Patch fs.readFileSync to redirect missing photon_rs_bg.wasm reads
|
|
13
|
-
* 2. Copy photon_rs_bg.wasm next to the executable in build:binary
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
import type { PathOrFileDescriptor } from "fs";
|
|
17
|
-
import { createRequire } from "module";
|
|
18
|
-
import * as path from "path";
|
|
19
|
-
import { fileURLToPath } from "url";
|
|
20
|
-
|
|
21
|
-
const require = createRequire(import.meta.url);
|
|
22
|
-
const fs = require("fs") as typeof import("fs");
|
|
23
|
-
|
|
24
1
|
// Re-export types from the main package
|
|
25
2
|
export type { PhotonImage as PhotonImageType } from "@silvia-odwyer/photon-node";
|
|
26
|
-
|
|
27
|
-
type ReadFileSync = typeof fs.readFileSync;
|
|
28
|
-
|
|
29
|
-
const WASM_FILENAME = "photon_rs_bg.wasm";
|
|
30
|
-
|
|
31
|
-
// Lazy-loaded photon module
|
|
32
|
-
let photonModule: typeof import("@silvia-odwyer/photon-node") | null = null;
|
|
33
|
-
let loadPromise: Promise<typeof import("@silvia-odwyer/photon-node") | null> | null = null;
|
|
34
|
-
|
|
35
|
-
function pathOrNull(file: PathOrFileDescriptor): string | null {
|
|
36
|
-
if (typeof file === "string") {
|
|
37
|
-
return file;
|
|
38
|
-
}
|
|
39
|
-
if (file instanceof URL) {
|
|
40
|
-
return fileURLToPath(file);
|
|
41
|
-
}
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function getFallbackWasmPaths(): string[] {
|
|
46
|
-
const execDir = path.dirname(process.execPath);
|
|
47
|
-
return [
|
|
48
|
-
path.join(execDir, WASM_FILENAME),
|
|
49
|
-
path.join(execDir, "photon", WASM_FILENAME),
|
|
50
|
-
path.join(process.cwd(), WASM_FILENAME),
|
|
51
|
-
];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function patchPhotonWasmRead(): () => void {
|
|
55
|
-
const originalReadFileSync: ReadFileSync = fs.readFileSync.bind(fs);
|
|
56
|
-
const fallbackPaths = getFallbackWasmPaths();
|
|
57
|
-
const mutableFs = fs as { readFileSync: ReadFileSync };
|
|
58
|
-
|
|
59
|
-
const patchedReadFileSync: ReadFileSync = ((...args: Parameters<ReadFileSync>) => {
|
|
60
|
-
const [file, options] = args;
|
|
61
|
-
const resolvedPath = pathOrNull(file);
|
|
62
|
-
|
|
63
|
-
if (resolvedPath?.endsWith(WASM_FILENAME)) {
|
|
64
|
-
try {
|
|
65
|
-
return originalReadFileSync(...args);
|
|
66
|
-
} catch (error) {
|
|
67
|
-
const err = error as NodeJS.ErrnoException;
|
|
68
|
-
if (err?.code && err.code !== "ENOENT") {
|
|
69
|
-
throw error;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
for (const fallbackPath of fallbackPaths) {
|
|
73
|
-
if (!fs.existsSync(fallbackPath)) {
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (options === undefined) {
|
|
77
|
-
return originalReadFileSync(fallbackPath);
|
|
78
|
-
}
|
|
79
|
-
return originalReadFileSync(fallbackPath, options);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
throw error;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return originalReadFileSync(...args);
|
|
87
|
-
}) as ReadFileSync;
|
|
88
|
-
|
|
89
|
-
try {
|
|
90
|
-
mutableFs.readFileSync = patchedReadFileSync;
|
|
91
|
-
} catch {
|
|
92
|
-
Object.defineProperty(fs, "readFileSync", {
|
|
93
|
-
value: patchedReadFileSync,
|
|
94
|
-
writable: true,
|
|
95
|
-
configurable: true,
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return () => {
|
|
100
|
-
try {
|
|
101
|
-
mutableFs.readFileSync = originalReadFileSync;
|
|
102
|
-
} catch {
|
|
103
|
-
Object.defineProperty(fs, "readFileSync", {
|
|
104
|
-
value: originalReadFileSync,
|
|
105
|
-
writable: true,
|
|
106
|
-
configurable: true,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Load the photon module asynchronously.
|
|
114
|
-
* Returns cached module on subsequent calls.
|
|
115
|
-
*/
|
|
116
|
-
export async function loadPhoton(): Promise<typeof import("@silvia-odwyer/photon-node") | null> {
|
|
117
|
-
if (photonModule) {
|
|
118
|
-
return photonModule;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (loadPromise) {
|
|
122
|
-
return loadPromise;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
loadPromise = (async () => {
|
|
126
|
-
const restoreReadFileSync = patchPhotonWasmRead();
|
|
127
|
-
try {
|
|
128
|
-
photonModule = await import("@silvia-odwyer/photon-node");
|
|
129
|
-
return photonModule;
|
|
130
|
-
} catch {
|
|
131
|
-
photonModule = null;
|
|
132
|
-
return photonModule;
|
|
133
|
-
} finally {
|
|
134
|
-
restoreReadFileSync();
|
|
135
|
-
}
|
|
136
|
-
})();
|
|
137
|
-
|
|
138
|
-
return loadPromise;
|
|
139
|
-
}
|
|
@@ -80,7 +80,7 @@ function commandExists(cmd: string): boolean {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// Get the path to a tool (system-wide or in our tools dir)
|
|
83
|
-
|
|
83
|
+
function getToolPath(tool: "fd" | "rg"): string | null {
|
|
84
84
|
const config = TOOLS[tool];
|
|
85
85
|
if (!config) return null;
|
|
86
86
|
|
|
@@ -10,16 +10,6 @@ export interface TextChunk {
|
|
|
10
10
|
startIndex: number;
|
|
11
11
|
endIndex: number;
|
|
12
12
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Split a line into word-wrapped chunks.
|
|
15
|
-
* Wraps at word boundaries when possible, falling back to character-level
|
|
16
|
-
* wrapping for words longer than the available width.
|
|
17
|
-
*
|
|
18
|
-
* @param line - The text line to wrap
|
|
19
|
-
* @param maxWidth - Maximum visible width per chunk
|
|
20
|
-
* @returns Array of chunks with text and position information
|
|
21
|
-
*/
|
|
22
|
-
export declare function wordWrapLine(line: string, maxWidth: number): TextChunk[];
|
|
23
13
|
export interface EditorTheme {
|
|
24
14
|
borderColor: (str: string) => string;
|
|
25
15
|
selectList: SelectListTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../src/components/editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAgC,MAAM,oBAAoB,CAAC;AAI7F,OAAO,EAAE,KAAK,SAAS,EAAiB,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;AAGpF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIpE;;;GAGG;AACH,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../src/components/editor.ts"],"names":[],"mappings":"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"}
|
|
@@ -15,7 +15,7 @@ const segmenter = getSegmenter();
|
|
|
15
15
|
* @param maxWidth - Maximum visible width per chunk
|
|
16
16
|
* @returns Array of chunks with text and position information
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
function wordWrapLine(line, maxWidth) {
|
|
19
19
|
if (!line || maxWidth <= 0) {
|
|
20
20
|
return [{ text: "", startIndex: 0, endIndex: 0 }];
|
|
21
21
|
}
|