@psnext/slingcli 2.4.20260507-3 → 2.4.20260509-1
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/LICENSE +1 -1
- package/README.md +1 -1
- package/bin/sling.js +12 -12
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/agent-loop.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/agent.js +4 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +526 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +243 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +616 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +348 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/factory.js +9 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js +102 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +194 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +92 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +31 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +196 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +170 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +90 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +258 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js +30 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +16 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +97 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +26 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/proxy.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/package.json +7 -5
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/cli.js +6 -6
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/env-api-keys.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +307 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js +23 -0
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/images.js +14 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/index.js +4 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/models.generated.js +427 -122
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js +129 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js +34 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-codex-responses.js +1 -1
- package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-completions.js +150 -122
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-responses-shared.js +14 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/openai-codex.js +25 -14
- package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/overflow.js +3 -0
- package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/package.json +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/bun/register-bedrock.js +4 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/args.js +1 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/config-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/list-models.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/session-picker.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/config.js +52 -30
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/auth-storage.js +2 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/branch-summarization.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/compaction.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +153 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.css +45 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.js +68 -4
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/loader.js +26 -12
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/keybindings.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/model-registry.js +3 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/model-resolver.js +2 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/package-manager.js +22 -5
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/provider-display-names.js +1 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/sdk.js +3 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/bash.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/edit.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/find.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/grep.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/ls.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/read.js +3 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/render-utils.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/truncate.js +205 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/write.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/main.js +2 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/migrations.js +3 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/bordered-loader.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/config-selector.js +25 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/custom-editor.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/custom-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/earendil-announcement.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-input.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/footer.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/keybinding-hints.js +36 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +4 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/model-selector.js +2 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/oauth-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/scoped-models-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/session-selector-search.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/session-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +4 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/show-images-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/theme-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/thinking-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/tree-selector.js +3 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/user-message-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/user-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/visual-truncate.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/interactive-mode.js +47 -32
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/dark.json +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/light.json +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/theme.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/package-manager-cli.js +42 -39
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard.js +9 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/paths.js +16 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/version-check.js +9 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/package.json +9 -8
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/image.js +14 -7
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/markdown.js +24 -84
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/terminal-image.js +10 -4
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/tui.js +73 -4
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/utils.js +33 -7
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/package.json +3 -3
- package/node_modules/@mariozechner/clipboard/README.md +58 -0
- package/node_modules/@mariozechner/clipboard/index.d.ts +23 -0
- package/node_modules/@mariozechner/clipboard-linux-x64-gnu/README.md +3 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/http2.d.ts +4 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/stream/web.d.ts +4 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +1 -1
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/fast-xml-builder/CHANGELOG.md +4 -0
- package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -1
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +91 -1
- package/node_modules/fast-xml-builder/lib/fxb.min.js +1 -1
- package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -1
- package/node_modules/fast-xml-builder/package.json +3 -2
- package/node_modules/fast-xml-builder/src/fxb.d.ts +92 -3
- package/node_modules/fast-xml-builder/src/fxb.js +92 -31
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +87 -33
- package/node_modules/get-east-asian-width/lookup-data.js +15 -12
- package/node_modules/get-east-asian-width/lookup.js +25 -22
- package/node_modules/get-east-asian-width/package.json +1 -1
- package/node_modules/jiti/README.md +258 -0
- package/node_modules/jiti/dist/babel.cjs +257 -0
- package/node_modules/jiti/dist/jiti.cjs +1 -0
- package/node_modules/jiti/lib/jiti.mjs +29 -0
- package/node_modules/jiti/lib/types.d.ts +420 -0
- package/node_modules/jiti/package.json +146 -0
- package/node_modules/protobufjs/dist/light/protobuf.js +5 -3
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +5 -3
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/protobufjs/src/namespace.js +3 -1
- package/node_modules/semver/README.md +19 -4
- package/node_modules/semver/bin/semver.js +14 -10
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/index.js +2 -0
- package/node_modules/semver/internal/re.js +1 -1
- package/node_modules/semver/package.json +3 -3
- package/node_modules/semver/range.bnf +5 -4
- package/node_modules/socks/package.json +2 -2
- package/node_modules/xml-naming/README.md +189 -0
- package/node_modules/xml-naming/package.json +54 -0
- package/node_modules/xml-naming/src/index.d.ts +74 -0
- package/node_modules/xml-naming/src/index.js +270 -0
- package/package.json +6 -6
- package/sling-default-packages.json +2 -1
- package/slingshot/index.js +442 -23
- package/node_modules/@mariozechner/jiti/dist/babel.cjs +0 -246
- package/node_modules/@mariozechner/jiti/dist/jiti.cjs +0 -1
- package/node_modules/@mariozechner/jiti/package.json +0 -96
- package/node_modules/@mariozechner/pi-agent-core/dist/index.js +0 -9
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/cli.js +0 -116
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/env-api-keys.js +0 -166
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/index.js +0 -15
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/models.generated.js +0 -16568
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/amazon-bedrock.js +0 -753
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/openai-codex-responses.js +0 -909
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/openai-responses-shared.js +0 -479
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/utils/oauth/openai-codex.js +0 -374
- package/node_modules/@mariozechner/pi-ai/dist/api-registry.js +0 -44
- package/node_modules/@mariozechner/pi-ai/dist/bedrock-provider.js +0 -6
- package/node_modules/@mariozechner/pi-ai/dist/models.js +0 -71
- package/node_modules/@mariozechner/pi-ai/dist/oauth.js +0 -2
- package/node_modules/@mariozechner/pi-ai/dist/providers/anthropic.js +0 -951
- package/node_modules/@mariozechner/pi-ai/dist/providers/azure-openai-responses.js +0 -208
- package/node_modules/@mariozechner/pi-ai/dist/providers/cloudflare.js +0 -26
- package/node_modules/@mariozechner/pi-ai/dist/providers/faux.js +0 -368
- package/node_modules/@mariozechner/pi-ai/dist/providers/github-copilot-headers.js +0 -29
- package/node_modules/@mariozechner/pi-ai/dist/providers/google-shared.js +0 -329
- package/node_modules/@mariozechner/pi-ai/dist/providers/google-vertex.js +0 -442
- package/node_modules/@mariozechner/pi-ai/dist/providers/google.js +0 -400
- package/node_modules/@mariozechner/pi-ai/dist/providers/mistral.js +0 -535
- package/node_modules/@mariozechner/pi-ai/dist/providers/openai-completions.js +0 -908
- package/node_modules/@mariozechner/pi-ai/dist/providers/openai-responses.js +0 -220
- package/node_modules/@mariozechner/pi-ai/dist/providers/register-builtins.js +0 -243
- package/node_modules/@mariozechner/pi-ai/dist/providers/simple-options.js +0 -39
- package/node_modules/@mariozechner/pi-ai/dist/providers/transform-messages.js +0 -184
- package/node_modules/@mariozechner/pi-ai/dist/stream.js +0 -27
- package/node_modules/@mariozechner/pi-ai/dist/types.js +0 -2
- package/node_modules/@mariozechner/pi-ai/dist/utils/event-stream.js +0 -81
- package/node_modules/@mariozechner/pi-ai/dist/utils/hash.js +0 -14
- package/node_modules/@mariozechner/pi-ai/dist/utils/headers.js +0 -8
- package/node_modules/@mariozechner/pi-ai/dist/utils/json-parse.js +0 -113
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/anthropic.js +0 -335
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/github-copilot.js +0 -292
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/index.js +0 -121
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/oauth-page.js +0 -105
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/pkce.js +0 -31
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/types.js +0 -2
- package/node_modules/@mariozechner/pi-ai/dist/utils/overflow.js +0 -146
- package/node_modules/@mariozechner/pi-ai/dist/utils/sanitize-unicode.js +0 -26
- package/node_modules/@mariozechner/pi-ai/dist/utils/typebox-helpers.js +0 -21
- package/node_modules/@mariozechner/pi-ai/dist/utils/validation.js +0 -281
- package/node_modules/@mariozechner/pi-ai/package.json +0 -108
- package/node_modules/@mariozechner/pi-coding-agent/dist/bun/register-bedrock.js +0 -4
- package/node_modules/@mariozechner/pi-coding-agent/dist/modes/interactive/components/keybinding-hints.js +0 -22
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/agent-loop.js +0 -458
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/agent.js +0 -398
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/index.js +0 -9
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/proxy.js +0 -278
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/types.js +0 -2
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/package.json +0 -45
- package/node_modules/socks/.claude/settings.local.json +0 -26
- package/node_modules/std-env/LICENCE +0 -22
- package/node_modules/std-env/README.md +0 -118
- package/node_modules/std-env/dist/index.cjs +0 -1
- package/node_modules/std-env/dist/index.d.cts +0 -92
- package/node_modules/std-env/dist/index.d.mts +0 -92
- package/node_modules/std-env/dist/index.d.ts +0 -92
- package/node_modules/std-env/dist/index.mjs +0 -1
- package/node_modules/std-env/package.json +0 -46
- package/node_modules/yoctocolors/base.d.ts +0 -47
- package/node_modules/yoctocolors/base.js +0 -94
- package/node_modules/yoctocolors/index.d.ts +0 -2
- package/node_modules/yoctocolors/index.js +0 -2
- package/node_modules/yoctocolors/license +0 -9
- package/node_modules/yoctocolors/package.json +0 -69
- package/node_modules/yoctocolors/readme.md +0 -138
- /package/node_modules/{@mariozechner/pi-coding-agent/dist/core → @earendil-works/pi-agent-core/dist/harness}/compaction/utils.js +0 -0
- /package/node_modules/{@mariozechner/pi-coding-agent/dist/core/tools → @earendil-works/pi-agent-core/dist/harness/utils}/truncate.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/types.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/api-registry.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/bedrock-provider.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/models.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/oauth.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/amazon-bedrock.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/anthropic.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/azure-openai-responses.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/cloudflare.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/faux.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/github-copilot-headers.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google-shared.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google-vertex.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/mistral.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-responses.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/register-builtins.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/simple-options.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/transform-messages.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/session-resources.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/stream.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/types.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/utils/diagnostics.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/event-stream.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/hash.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/headers.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/json-parse.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/anthropic.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/github-copilot.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/index.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/oauth-page.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/pkce.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/types.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/sanitize-unicode.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/typebox-helpers.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/validation.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/bun/cli.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/bun/restore-sandbox-env.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/file-processor.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/initial-message.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session-runtime.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session-services.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/auth-guidance.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/bash-executor.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/defaults.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/diagnostics.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/event-bus.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/exec.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/ansi-to-html.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.html +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/tool-renderer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/vendor/highlight.min.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/vendor/marked.min.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/runner.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/types.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/wrapper.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/footer-data-provider.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/messages.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/output-guard.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/prompt-templates.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/resolve-config-value.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/resource-loader.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/session-cwd.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/session-manager.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/settings-manager.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/skills.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/slash-commands.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/source-info.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/system-prompt.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/telemetry.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/timings.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/edit-diff.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/file-mutation-queue.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/output-accumulator.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/path-utils.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/tool-definition-wrapper.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/assets/clankolas.png +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/armin.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/countdown-timer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/daxnuts.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/diff.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/dynamic-border.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/print-mode.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/jsonl.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-client.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-mode.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-types.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/changelog.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/child-process.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard-image.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard-native.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/exif-orientation.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/frontmatter.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/fs-watch.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/git.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/image-convert.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/image-resize.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/mime.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/photon.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/pi-user-agent.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/shell.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/sleep.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/tools-manager.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/autocomplete.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/box.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/cancellable-loader.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/editor.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/input.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/loader.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/select-list.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/settings-list.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/spacer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/text.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/truncated-text.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/editor-component.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/fuzzy.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/keybindings.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/keys.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/kill-ring.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/stdin-buffer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/terminal.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/undo-stack.js +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/LICENSE +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-cli.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-hooks.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-native.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-register.d.mts +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-register.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti/lib/jiti.mjs → jiti/lib/jiti-static.mjs} +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.cjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.d.cts +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.d.mts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Simple text input component for extensions.
|
|
3
3
|
*/
|
|
4
|
-
import { Container, getKeybindings, Input, Spacer, Text } from "@
|
|
4
|
+
import { Container, getKeybindings, Input, Spacer, Text } from "@earendil-works/pi-tui";
|
|
5
5
|
import { theme } from "../theme/theme.js";
|
|
6
6
|
import { CountdownTimer } from "./countdown-timer.js";
|
|
7
7
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generic selector component for extensions.
|
|
3
3
|
* Displays a list of string options with keyboard navigation.
|
|
4
4
|
*/
|
|
5
|
-
import { Container, getKeybindings, Spacer, Text } from "@
|
|
5
|
+
import { Container, getKeybindings, Spacer, Text } from "@earendil-works/pi-tui";
|
|
6
6
|
import { theme } from "../theme/theme.js";
|
|
7
7
|
import { CountdownTimer } from "./countdown-timer.js";
|
|
8
8
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities for formatting keybinding hints in the UI.
|
|
3
|
+
*/
|
|
4
|
+
import { getKeybindings } from "@earendil-works/pi-tui";
|
|
5
|
+
import { theme } from "../theme/theme.js";
|
|
6
|
+
function formatKeyPart(part, options) {
|
|
7
|
+
const displayPart = process.platform === "darwin" && part.toLowerCase() === "alt" ? "option" : part;
|
|
8
|
+
return options.capitalize ? displayPart.charAt(0).toUpperCase() + displayPart.slice(1) : displayPart;
|
|
9
|
+
}
|
|
10
|
+
export function formatKeyText(key, options = {}) {
|
|
11
|
+
return key
|
|
12
|
+
.split("/")
|
|
13
|
+
.map((k) => k
|
|
14
|
+
.split("+")
|
|
15
|
+
.map((part) => formatKeyPart(part, options))
|
|
16
|
+
.join("+"))
|
|
17
|
+
.join("/");
|
|
18
|
+
}
|
|
19
|
+
function formatKeys(keys, options = {}) {
|
|
20
|
+
if (keys.length === 0)
|
|
21
|
+
return "";
|
|
22
|
+
return formatKeyText(keys.join("/"), options);
|
|
23
|
+
}
|
|
24
|
+
export function keyText(keybinding) {
|
|
25
|
+
return formatKeys(getKeybindings().getKeys(keybinding));
|
|
26
|
+
}
|
|
27
|
+
export function keyDisplayText(keybinding) {
|
|
28
|
+
return formatKeys(getKeybindings().getKeys(keybinding), { capitalize: true });
|
|
29
|
+
}
|
|
30
|
+
export function keyHint(keybinding, description) {
|
|
31
|
+
return theme.fg("dim", keyText(keybinding)) + theme.fg("muted", ` ${description}`);
|
|
32
|
+
}
|
|
33
|
+
export function rawKeyHint(key, description) {
|
|
34
|
+
return theme.fg("dim", formatKeyText(key)) + theme.fg("muted", ` ${description}`);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=keybinding-hints.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getOAuthProviders } from "@
|
|
2
|
-
import { Container, getKeybindings, Input, Spacer, Text } from "@
|
|
1
|
+
import { getOAuthProviders } from "@earendil-works/pi-ai/oauth";
|
|
2
|
+
import { Container, getKeybindings, Input, Spacer, Text } from "@earendil-works/pi-tui";
|
|
3
3
|
import { exec } from "child_process";
|
|
4
4
|
import { theme } from "../theme/theme.js";
|
|
5
5
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
@@ -71,7 +71,8 @@ export class LoginDialogComponent extends Container {
|
|
|
71
71
|
showAuth(url, instructions) {
|
|
72
72
|
this.contentContainer.clear();
|
|
73
73
|
this.contentContainer.addChild(new Spacer(1));
|
|
74
|
-
|
|
74
|
+
const linkedUrl = `\x1b]8;;${url}\x07${url}\x1b]8;;\x07`;
|
|
75
|
+
this.contentContainer.addChild(new Text(theme.fg("accent", linkedUrl), 1, 0));
|
|
75
76
|
const clickHint = process.platform === "darwin" ? "Cmd+click to open" : "Ctrl+click to open";
|
|
76
77
|
const hyperlink = `\x1b]8;;${url}\x07${clickHint}\x1b]8;;\x07`;
|
|
77
78
|
this.contentContainer.addChild(new Text(theme.fg("dim", hyperlink), 1, 0));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { modelsAreEqual } from "@
|
|
2
|
-
import { Container, fuzzyFilter, getKeybindings, Input, Spacer, Text, } from "@
|
|
1
|
+
import { modelsAreEqual } from "@earendil-works/pi-ai";
|
|
2
|
+
import { Container, fuzzyFilter, getKeybindings, Input, Spacer, Text, } from "@earendil-works/pi-tui";
|
|
3
3
|
import { theme } from "../theme/theme.js";
|
|
4
4
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
5
5
|
import { keyHint } from "./keybinding-hints.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, fuzzyFilter, getKeybindings, Input, Spacer, TruncatedText, } from "@
|
|
1
|
+
import { Container, fuzzyFilter, getKeybindings, Input, Spacer, TruncatedText, } from "@earendil-works/pi-tui";
|
|
2
2
|
import { theme } from "../theme/theme.js";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, fuzzyFilter, getKeybindings, Input, Key, matchesKey, Spacer, Text, } from "@
|
|
1
|
+
import { Container, fuzzyFilter, getKeybindings, Input, Key, matchesKey, Spacer, Text, } from "@earendil-works/pi-tui";
|
|
2
2
|
import { theme } from "../theme/theme.js";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
4
4
|
import { keyText } from "./keybinding-hints.js";
|
|
@@ -2,7 +2,7 @@ import { spawnSync } from "node:child_process";
|
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { unlink } from "node:fs/promises";
|
|
4
4
|
import * as os from "node:os";
|
|
5
|
-
import { Container, getKeybindings, Input, Spacer, Text, truncateToWidth, visibleWidth, } from "@
|
|
5
|
+
import { Container, getKeybindings, Input, Spacer, Text, truncateToWidth, visibleWidth, } from "@earendil-works/pi-tui";
|
|
6
6
|
import { KeybindingsManager } from "../../../core/keybindings.js";
|
|
7
7
|
import { canonicalizePath as _canonicalizePath } from "../../../utils/paths.js";
|
|
8
8
|
import { theme } from "../theme/theme.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Container, getCapabilities, SelectList, SettingsList, Spacer, Text, } from "@
|
|
1
|
+
import { Container, getCapabilities, SelectList, SettingsList, Spacer, Text, } from "@earendil-works/pi-tui";
|
|
2
2
|
import { getSelectListTheme, getSettingsListTheme, theme } from "../theme/theme.js";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
4
|
+
import { keyDisplayText } from "./keybinding-hints.js";
|
|
4
5
|
const SETTINGS_SUBMENU_SELECT_LIST_LAYOUT = {
|
|
5
6
|
minPrimaryColumnWidth: 12,
|
|
6
7
|
maxPrimaryColumnWidth: 32,
|
|
@@ -91,6 +92,7 @@ export class SettingsSelectorComponent extends Container {
|
|
|
91
92
|
constructor(config, callbacks) {
|
|
92
93
|
super();
|
|
93
94
|
const supportsImages = getCapabilities().images;
|
|
95
|
+
const followUpKey = keyDisplayText("app.message.followUp");
|
|
94
96
|
let currentWarnings = { ...config.warnings };
|
|
95
97
|
const items = [
|
|
96
98
|
{
|
|
@@ -110,7 +112,7 @@ export class SettingsSelectorComponent extends Container {
|
|
|
110
112
|
{
|
|
111
113
|
id: "follow-up-mode",
|
|
112
114
|
label: "Follow-up mode",
|
|
113
|
-
description:
|
|
115
|
+
description: `${followUpKey} queues follow-up messages until agent stops. 'one-at-a-time': deliver one, wait for response. 'all': deliver all at once.`,
|
|
114
116
|
currentValue: config.followUpMode,
|
|
115
117
|
values: ["one-at-a-time", "all"],
|
|
116
118
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, SelectList } from "@
|
|
1
|
+
import { Container, SelectList } from "@earendil-works/pi-tui";
|
|
2
2
|
import { getSelectListTheme } from "../theme/theme.js";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
4
4
|
const SHOW_IMAGES_SELECT_LIST_LAYOUT = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, SelectList } from "@
|
|
1
|
+
import { Container, SelectList } from "@earendil-works/pi-tui";
|
|
2
2
|
import { getAvailableThemes, getSelectListTheme } from "../theme/theme.js";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
4
4
|
const THEME_SELECT_LIST_LAYOUT = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, SelectList } from "@
|
|
1
|
+
import { Container, SelectList } from "@earendil-works/pi-tui";
|
|
2
2
|
import { getSelectListTheme } from "../theme/theme.js";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
4
4
|
const THINKING_SELECT_LIST_LAYOUT = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, Container, getCapabilities, Image, Spacer, Text } from "@
|
|
1
|
+
import { Box, Container, getCapabilities, Image, Spacer, Text } from "@earendil-works/pi-tui";
|
|
2
2
|
import { createAllToolDefinitions } from "../../../core/tools/index.js";
|
|
3
3
|
import { getTextOutput as getRenderedTextOutput } from "../../../core/tools/render-utils.js";
|
|
4
4
|
import { convertToPng } from "../../../utils/image-convert.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, getKeybindings, Input, Spacer, Text, TruncatedText, truncateToWidth, } from "@
|
|
1
|
+
import { Container, getKeybindings, Input, Spacer, Text, TruncatedText, truncateToWidth, } from "@earendil-works/pi-tui";
|
|
2
2
|
import { theme } from "../theme/theme.js";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
4
4
|
import { keyHint, keyText } from "./keybinding-hints.js";
|
|
@@ -1045,7 +1045,8 @@ export class TreeSelectorComponent extends Container {
|
|
|
1045
1045
|
keyText("app.tree.filter.all"),
|
|
1046
1046
|
].join("/");
|
|
1047
1047
|
const cycleKeys = `${keyText("app.tree.filter.cycleForward")}/${keyText("app.tree.filter.cycleBackward")}`;
|
|
1048
|
-
|
|
1048
|
+
const branchKeys = `${keyText("app.tree.foldOrUp")}/${keyText("app.tree.unfoldOrDown")}`;
|
|
1049
|
+
this.addChild(new TruncatedText(theme.fg("muted", ` ↑/↓: move. ←/→: page. ${branchKeys}: fold/branch. ${keyText("app.tree.editLabel")}: label. ${filterKeys}: filters (${cycleKeys} cycle). ${keyText("app.tree.toggleLabelTimestamp")}: label time`), 0, 0));
|
|
1049
1050
|
this.addChild(new SearchLine(this.treeList));
|
|
1050
1051
|
this.addChild(new DynamicBorder());
|
|
1051
1052
|
this.addChild(new Spacer(1));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, getKeybindings, Spacer, Text, truncateToWidth } from "@
|
|
1
|
+
import { Container, getKeybindings, Spacer, Text, truncateToWidth } from "@earendil-works/pi-tui";
|
|
2
2
|
import { theme } from "../theme/theme.js";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, Container, Markdown } from "@
|
|
1
|
+
import { Box, Container, Markdown } from "@earendil-works/pi-tui";
|
|
2
2
|
import { getMarkdownTheme, theme } from "../theme/theme.js";
|
|
3
3
|
const OSC133_ZONE_START = "\x1b]133;A\x07";
|
|
4
4
|
const OSC133_ZONE_END = "\x1b]133;B\x07";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Shared utility for truncating text to visual lines (accounting for line wrapping).
|
|
3
3
|
* Used by both tool-execution.ts and bash-execution.ts for consistent behavior.
|
|
4
4
|
*/
|
|
5
|
-
import { Text } from "@
|
|
5
|
+
import { Text } from "@earendil-works/pi-tui";
|
|
6
6
|
/**
|
|
7
7
|
* Truncate text to a maximum number of visual lines (from the end).
|
|
8
8
|
* This accounts for line wrapping based on terminal width.
|
|
@@ -6,8 +6,8 @@ import * as crypto from "node:crypto";
|
|
|
6
6
|
import * as fs from "node:fs";
|
|
7
7
|
import * as os from "node:os";
|
|
8
8
|
import * as path from "node:path";
|
|
9
|
-
import { getProviders, } from "@
|
|
10
|
-
import { CombinedAutocompleteProvider, Container, fuzzyFilter, Loader, Markdown, matchesKey, ProcessTerminal, Spacer, setKeybindings, Text, TruncatedText, TUI, visibleWidth, } from "@
|
|
9
|
+
import { getProviders, } from "@earendil-works/pi-ai";
|
|
10
|
+
import { CombinedAutocompleteProvider, Container, fuzzyFilter, getCapabilities, hyperlink, Loader, Markdown, matchesKey, ProcessTerminal, Spacer, setKeybindings, Text, TruncatedText, TUI, visibleWidth, } from "@earendil-works/pi-tui";
|
|
11
11
|
import { spawn, spawnSync } from "child_process";
|
|
12
12
|
import { APP_NAME, APP_TITLE, getAgentDir, getAuthPath, getDebugLogPath, getDocsPath, getShareViewerUrl, VERSION, } from "../../config.js";
|
|
13
13
|
import { parseSkillBlock } from "../../core/agent-session.js";
|
|
@@ -26,6 +26,7 @@ import { getChangelogPath, getNewEntries, parseChangelog } from "../../utils/cha
|
|
|
26
26
|
import { copyToClipboard } from "../../utils/clipboard.js";
|
|
27
27
|
import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
|
|
28
28
|
import { parseGitUrl } from "../../utils/git.js";
|
|
29
|
+
import { getCwdRelativePath } from "../../utils/paths.js";
|
|
29
30
|
import { getPiUserAgent } from "../../utils/pi-user-agent.js";
|
|
30
31
|
import { killTrackedDetachedChildren } from "../../utils/shell.js";
|
|
31
32
|
import { ensureTool } from "../../utils/tools-manager.js";
|
|
@@ -46,7 +47,7 @@ import { ExtensionEditorComponent } from "./components/extension-editor.js";
|
|
|
46
47
|
import { ExtensionInputComponent } from "./components/extension-input.js";
|
|
47
48
|
import { ExtensionSelectorComponent } from "./components/extension-selector.js";
|
|
48
49
|
import { FooterComponent } from "./components/footer.js";
|
|
49
|
-
import { keyHint, keyText, rawKeyHint } from "./components/keybinding-hints.js";
|
|
50
|
+
import { formatKeyText, keyDisplayText, keyHint, keyText, rawKeyHint } from "./components/keybinding-hints.js";
|
|
50
51
|
import { LoginDialogComponent } from "./components/login-dialog.js";
|
|
51
52
|
import { ModelSelectorComponent } from "./components/model-selector.js";
|
|
52
53
|
import { OAuthSelectorComponent } from "./components/oauth-selector.js";
|
|
@@ -676,13 +677,9 @@ export class InteractiveMode {
|
|
|
676
677
|
formatContextPath(p) {
|
|
677
678
|
const cwd = path.resolve(this.sessionManager.getCwd());
|
|
678
679
|
const absolutePath = path.isAbsolute(p) ? path.resolve(p) : path.resolve(cwd, p);
|
|
679
|
-
const relativePath =
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
!relativePath.startsWith(`..${path.sep}`) &&
|
|
683
|
-
!path.isAbsolute(relativePath));
|
|
684
|
-
if (isInsideCwd) {
|
|
685
|
-
return relativePath || ".";
|
|
680
|
+
const relativePath = getCwdRelativePath(absolutePath, cwd);
|
|
681
|
+
if (relativePath !== undefined) {
|
|
682
|
+
return relativePath;
|
|
686
683
|
}
|
|
687
684
|
return this.formatDisplayPath(absolutePath);
|
|
688
685
|
}
|
|
@@ -2128,6 +2125,7 @@ export class InteractiveMode {
|
|
|
2128
2125
|
this.footer.invalidate();
|
|
2129
2126
|
switch (event.type) {
|
|
2130
2127
|
case "agent_start":
|
|
2128
|
+
this.pendingTools.clear();
|
|
2131
2129
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
2132
2130
|
this.ui.terminal.setProgress(true);
|
|
2133
2131
|
}
|
|
@@ -2518,6 +2516,7 @@ export class InteractiveMode {
|
|
|
2518
2516
|
*/
|
|
2519
2517
|
renderSessionContext(sessionContext, options = {}) {
|
|
2520
2518
|
this.pendingTools.clear();
|
|
2519
|
+
const renderedPendingTools = new Map();
|
|
2521
2520
|
if (options.updateFooter) {
|
|
2522
2521
|
this.footer.invalidate();
|
|
2523
2522
|
this.updateEditorBorderColor();
|
|
@@ -2550,17 +2549,17 @@ export class InteractiveMode {
|
|
|
2550
2549
|
component.updateResult({ content: [{ type: "text", text: errorMessage }], isError: true });
|
|
2551
2550
|
}
|
|
2552
2551
|
else {
|
|
2553
|
-
|
|
2552
|
+
renderedPendingTools.set(content.id, component);
|
|
2554
2553
|
}
|
|
2555
2554
|
}
|
|
2556
2555
|
}
|
|
2557
2556
|
}
|
|
2558
2557
|
else if (message.role === "toolResult") {
|
|
2559
2558
|
// Match tool results to pending tool components
|
|
2560
|
-
const component =
|
|
2559
|
+
const component = renderedPendingTools.get(message.toolCallId);
|
|
2561
2560
|
if (component) {
|
|
2562
2561
|
component.updateResult(message);
|
|
2563
|
-
|
|
2562
|
+
renderedPendingTools.delete(message.toolCallId);
|
|
2564
2563
|
}
|
|
2565
2564
|
}
|
|
2566
2565
|
else {
|
|
@@ -2568,7 +2567,9 @@ export class InteractiveMode {
|
|
|
2568
2567
|
this.addMessageToChat(message, options);
|
|
2569
2568
|
}
|
|
2570
2569
|
}
|
|
2571
|
-
|
|
2570
|
+
for (const [toolCallId, component] of renderedPendingTools) {
|
|
2571
|
+
this.pendingTools.set(toolCallId, component);
|
|
2572
|
+
}
|
|
2572
2573
|
this.ui.requestRender();
|
|
2573
2574
|
}
|
|
2574
2575
|
renderInitialMessages() {
|
|
@@ -2834,7 +2835,7 @@ export class InteractiveMode {
|
|
|
2834
2835
|
return;
|
|
2835
2836
|
}
|
|
2836
2837
|
const currentText = this.editor.getExpandedText?.() ?? this.editor.getText();
|
|
2837
|
-
const tmpFile = path.join(os.tmpdir(), `
|
|
2838
|
+
const tmpFile = path.join(os.tmpdir(), `pi-editor-${Date.now()}.pi.md`);
|
|
2838
2839
|
try {
|
|
2839
2840
|
// Write current content to temp file
|
|
2840
2841
|
fs.writeFileSync(tmpFile, currentText, "utf-8");
|
|
@@ -2888,8 +2889,11 @@ export class InteractiveMode {
|
|
|
2888
2889
|
showNewVersionNotification(newVersion) {
|
|
2889
2890
|
const action = theme.fg("accent", `${APP_NAME} update`);
|
|
2890
2891
|
const updateInstruction = theme.fg("muted", `New version ${newVersion} is available. Run `) + action;
|
|
2891
|
-
const changelogUrl =
|
|
2892
|
-
const
|
|
2892
|
+
const changelogUrl = "https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md";
|
|
2893
|
+
const changelogLink = getCapabilities().hyperlinks
|
|
2894
|
+
? hyperlink(theme.fg("accent", "open changelog"), changelogUrl)
|
|
2895
|
+
: theme.fg("accent", changelogUrl);
|
|
2896
|
+
const changelogLine = theme.fg("muted", "Changelog: ") + changelogLink;
|
|
2893
2897
|
this.chatContainer.addChild(new Spacer(1));
|
|
2894
2898
|
this.chatContainer.addChild(new DynamicBorder((text) => theme.fg("warning", text)));
|
|
2895
2899
|
this.chatContainer.addChild(new Text(`${theme.bold(theme.fg("warning", "Update Available"))}\n${updateInstruction}\n${changelogLine}`, 1, 0));
|
|
@@ -3837,6 +3841,28 @@ export class InteractiveMode {
|
|
|
3837
3841
|
}
|
|
3838
3842
|
}
|
|
3839
3843
|
}
|
|
3844
|
+
showOAuthLoginSelect(dialog, prompt) {
|
|
3845
|
+
return new Promise((resolve) => {
|
|
3846
|
+
const restoreDialog = () => {
|
|
3847
|
+
this.editorContainer.clear();
|
|
3848
|
+
this.editorContainer.addChild(dialog);
|
|
3849
|
+
this.ui.setFocus(dialog);
|
|
3850
|
+
this.ui.requestRender();
|
|
3851
|
+
};
|
|
3852
|
+
const labels = prompt.options.map((option) => option.label);
|
|
3853
|
+
const selector = new ExtensionSelectorComponent(prompt.message, labels, (optionLabel) => {
|
|
3854
|
+
restoreDialog();
|
|
3855
|
+
resolve(prompt.options.find((option) => option.label === optionLabel)?.id);
|
|
3856
|
+
}, () => {
|
|
3857
|
+
restoreDialog();
|
|
3858
|
+
resolve(undefined);
|
|
3859
|
+
});
|
|
3860
|
+
this.editorContainer.clear();
|
|
3861
|
+
this.editorContainer.addChild(selector);
|
|
3862
|
+
this.ui.setFocus(selector);
|
|
3863
|
+
this.ui.requestRender();
|
|
3864
|
+
});
|
|
3865
|
+
}
|
|
3840
3866
|
async showLoginDialog(providerId, providerName) {
|
|
3841
3867
|
const providerInfo = this.session.modelRegistry.authStorage
|
|
3842
3868
|
.getOAuthProviders()
|
|
@@ -3900,6 +3926,7 @@ export class InteractiveMode {
|
|
|
3900
3926
|
onProgress: (message) => {
|
|
3901
3927
|
dialog.showProgress(message);
|
|
3902
3928
|
},
|
|
3929
|
+
onSelect: (prompt) => this.showOAuthLoginSelect(dialog, prompt),
|
|
3903
3930
|
onManualCodeInput: () => manualCodePromise,
|
|
3904
3931
|
signal: dialog.signal,
|
|
3905
3932
|
});
|
|
@@ -4250,29 +4277,17 @@ export class InteractiveMode {
|
|
|
4250
4277
|
this.chatContainer.addChild(new DynamicBorder());
|
|
4251
4278
|
this.ui.requestRender();
|
|
4252
4279
|
}
|
|
4253
|
-
/**
|
|
4254
|
-
* Capitalize keybinding for display (e.g., "ctrl+c" -> "Ctrl+C").
|
|
4255
|
-
*/
|
|
4256
|
-
capitalizeKey(key) {
|
|
4257
|
-
return key
|
|
4258
|
-
.split("/")
|
|
4259
|
-
.map((k) => k
|
|
4260
|
-
.split("+")
|
|
4261
|
-
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
4262
|
-
.join("+"))
|
|
4263
|
-
.join("/");
|
|
4264
|
-
}
|
|
4265
4280
|
/**
|
|
4266
4281
|
* Get capitalized display string for an app keybinding action.
|
|
4267
4282
|
*/
|
|
4268
4283
|
getAppKeyDisplay(action) {
|
|
4269
|
-
return
|
|
4284
|
+
return keyDisplayText(action);
|
|
4270
4285
|
}
|
|
4271
4286
|
/**
|
|
4272
4287
|
* Get capitalized display string for an editor keybinding action.
|
|
4273
4288
|
*/
|
|
4274
4289
|
getEditorKeyDisplay(action) {
|
|
4275
|
-
return
|
|
4290
|
+
return keyDisplayText(action);
|
|
4276
4291
|
}
|
|
4277
4292
|
handleHotkeysCommand() {
|
|
4278
4293
|
// Navigation keybindings
|
|
@@ -4371,7 +4386,7 @@ export class InteractiveMode {
|
|
|
4371
4386
|
`;
|
|
4372
4387
|
for (const [key, shortcut] of shortcuts) {
|
|
4373
4388
|
const description = shortcut.description ?? shortcut.extensionPath;
|
|
4374
|
-
const keyDisplay = key
|
|
4389
|
+
const keyDisplay = formatKeyText(key, { capitalize: true });
|
|
4375
4390
|
hotkeys += `| \`${keyDisplay}\` | ${description} |\n`;
|
|
4376
4391
|
}
|
|
4377
4392
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/earendil-works/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
3
|
"name": "dark",
|
|
4
4
|
"vars": {
|
|
5
5
|
"cyan": "#00d7ff",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/earendil-works/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
3
|
"name": "light",
|
|
4
4
|
"vars": {
|
|
5
5
|
"teal": "#5a8080",
|
|
@@ -526,7 +526,7 @@ function getDefaultTheme() {
|
|
|
526
526
|
// Global Theme Instance
|
|
527
527
|
// ============================================================================
|
|
528
528
|
// Use globalThis to share theme across module loaders (tsx + jiti in dev mode)
|
|
529
|
-
const THEME_KEY = Symbol.for("@
|
|
529
|
+
const THEME_KEY = Symbol.for("@earendil-works/pi-coding-agent:theme");
|
|
530
530
|
// Export theme as a getter that reads from globalThis
|
|
531
531
|
// This ensures all module instances (tsx, jiti) see the same theme
|
|
532
532
|
export const theme = new Proxy({}, {
|
package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/package-manager-cli.js
RENAMED
|
@@ -5,7 +5,7 @@ import { APP_NAME, getAgentDir, getSelfUpdateCommand, getSelfUpdateUnavailableIn
|
|
|
5
5
|
import { DefaultPackageManager } from "./core/package-manager.js";
|
|
6
6
|
import { SettingsManager } from "./core/settings-manager.js";
|
|
7
7
|
import { shouldUseWindowsShell } from "./utils/child-process.js";
|
|
8
|
-
import {
|
|
8
|
+
import { getLatestPiRelease, isNewerPackageVersion } from "./utils/version-check.js";
|
|
9
9
|
function reportSettingsErrors(settingsManager, context) {
|
|
10
10
|
const errors = settingsManager.drainErrors();
|
|
11
11
|
for (const { scope, error } of errors) {
|
|
@@ -36,7 +36,7 @@ function printPackageCommandHelp(command) {
|
|
|
36
36
|
Install a package and add it to settings.
|
|
37
37
|
|
|
38
38
|
Options:
|
|
39
|
-
-l, --local Install project-locally (
|
|
39
|
+
-l, --local Install project-locally (.pi/settings.json)
|
|
40
40
|
|
|
41
41
|
Examples:
|
|
42
42
|
${APP_NAME} install npm:@foo/bar
|
|
@@ -55,7 +55,7 @@ Remove a package and its source from settings.
|
|
|
55
55
|
Alias: ${APP_NAME} uninstall <source> [-l]
|
|
56
56
|
|
|
57
57
|
Options:
|
|
58
|
-
-l, --local Remove from project settings (
|
|
58
|
+
-l, --local Remove from project settings (.pi/settings.json)
|
|
59
59
|
|
|
60
60
|
Examples:
|
|
61
61
|
${APP_NAME} remove npm:@foo/bar
|
|
@@ -240,9 +240,9 @@ function updateTargetIncludesSelf(target) {
|
|
|
240
240
|
function updateTargetIncludesExtensions(target) {
|
|
241
241
|
return target.type === "all" || target.type === "extensions";
|
|
242
242
|
}
|
|
243
|
-
function printSelfUpdateUnavailable(npmCommand) {
|
|
243
|
+
function printSelfUpdateUnavailable(npmCommand, updatePackageName = PACKAGE_NAME) {
|
|
244
244
|
console.error(`error: ${APP_NAME} cannot self-update this installation.`);
|
|
245
|
-
console.error(getSelfUpdateUnavailableInstruction(PACKAGE_NAME, npmCommand));
|
|
245
|
+
console.error(getSelfUpdateUnavailableInstruction(PACKAGE_NAME, npmCommand, updatePackageName));
|
|
246
246
|
const entrypoint = process.argv[1];
|
|
247
247
|
if (entrypoint) {
|
|
248
248
|
console.error("");
|
|
@@ -252,46 +252,48 @@ function printSelfUpdateUnavailable(npmCommand) {
|
|
|
252
252
|
function printSelfUpdateFallback(command) {
|
|
253
253
|
console.error(chalk.dim(`If this keeps failing, run this command yourself: ${command.display}`));
|
|
254
254
|
}
|
|
255
|
-
async function
|
|
255
|
+
async function getSelfUpdatePlan(force) {
|
|
256
256
|
if (force) {
|
|
257
|
-
return true;
|
|
257
|
+
return { packageName: PACKAGE_NAME, shouldRun: true };
|
|
258
258
|
}
|
|
259
|
-
let latestVersion;
|
|
260
259
|
try {
|
|
261
|
-
|
|
260
|
+
const latestRelease = await getLatestPiRelease(VERSION);
|
|
261
|
+
const packageName = latestRelease?.packageName ?? PACKAGE_NAME;
|
|
262
|
+
if (!latestRelease || packageName !== PACKAGE_NAME || isNewerPackageVersion(latestRelease.version, VERSION)) {
|
|
263
|
+
return { packageName, shouldRun: true };
|
|
264
|
+
}
|
|
262
265
|
}
|
|
263
266
|
catch {
|
|
264
|
-
return true;
|
|
265
|
-
}
|
|
266
|
-
if (!latestVersion || isNewerPackageVersion(latestVersion, VERSION)) {
|
|
267
|
-
return true;
|
|
267
|
+
return { packageName: PACKAGE_NAME, shouldRun: true };
|
|
268
268
|
}
|
|
269
269
|
console.log(chalk.green(`${APP_NAME} is already up to date (v${VERSION})`));
|
|
270
|
-
return false;
|
|
270
|
+
return { packageName: PACKAGE_NAME, shouldRun: false };
|
|
271
271
|
}
|
|
272
272
|
async function runSelfUpdate(command) {
|
|
273
273
|
console.log(chalk.dim(`Updating ${APP_NAME} with ${command.display}...`));
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
274
|
+
for (const step of command.steps ?? [command]) {
|
|
275
|
+
await new Promise((resolve, reject) => {
|
|
276
|
+
// Windows package managers are commonly .cmd shims. Use the shell so Node can execute them.
|
|
277
|
+
const child = spawn(step.command, step.args, {
|
|
278
|
+
stdio: "inherit",
|
|
279
|
+
shell: shouldUseWindowsShell(step.command),
|
|
280
|
+
});
|
|
281
|
+
child.on("error", (error) => {
|
|
282
|
+
reject(error);
|
|
283
|
+
});
|
|
284
|
+
child.on("close", (code, signal) => {
|
|
285
|
+
if (code === 0) {
|
|
286
|
+
resolve();
|
|
287
|
+
}
|
|
288
|
+
else if (signal) {
|
|
289
|
+
reject(new Error(`${step.display} terminated by signal ${signal}`));
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
reject(new Error(`${step.display} exited with code ${code ?? "unknown"}`));
|
|
293
|
+
}
|
|
294
|
+
});
|
|
293
295
|
});
|
|
294
|
-
}
|
|
296
|
+
}
|
|
295
297
|
}
|
|
296
298
|
export async function handleConfigCommand(args) {
|
|
297
299
|
if (args[0] !== "config") {
|
|
@@ -422,13 +424,14 @@ export async function handlePackageCommand(args) {
|
|
|
422
424
|
}
|
|
423
425
|
}
|
|
424
426
|
if (updateTargetIncludesSelf(target)) {
|
|
425
|
-
const
|
|
426
|
-
if (!
|
|
427
|
-
printSelfUpdateUnavailable(selfUpdateNpmCommand);
|
|
428
|
-
process.exitCode = 1;
|
|
427
|
+
const selfUpdatePlan = await getSelfUpdatePlan(options.force);
|
|
428
|
+
if (!selfUpdatePlan.shouldRun) {
|
|
429
429
|
return true;
|
|
430
430
|
}
|
|
431
|
-
|
|
431
|
+
const selfUpdateCommand = getSelfUpdateCommand(PACKAGE_NAME, selfUpdateNpmCommand, selfUpdatePlan.packageName);
|
|
432
|
+
if (!selfUpdateCommand) {
|
|
433
|
+
printSelfUpdateUnavailable(selfUpdateNpmCommand, selfUpdatePlan.packageName);
|
|
434
|
+
process.exitCode = 1;
|
|
432
435
|
return true;
|
|
433
436
|
}
|
|
434
437
|
try {
|
package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard.js
RENAMED
|
@@ -24,11 +24,19 @@ function emitOsc52(text) {
|
|
|
24
24
|
}
|
|
25
25
|
export async function copyToClipboard(text) {
|
|
26
26
|
let copied = false;
|
|
27
|
+
const p = platform();
|
|
27
28
|
// Prefer direct clipboard writes. Emitting OSC 52 first can make terminals
|
|
28
29
|
// write the same native clipboard concurrently with the addon, and very large
|
|
29
30
|
// OSC 52 payloads can desynchronize terminal rendering.
|
|
31
|
+
//
|
|
32
|
+
// On Linux, skip the native addon. The underlying `clipboard-rs` crate is
|
|
33
|
+
// X11-only and does not retain selection ownership after `set_text`
|
|
34
|
+
// resolves, so on Wayland-only compositors (Hyprland, Niri, ...) and even
|
|
35
|
+
// some X11 sessions the call resolves successfully without populating the
|
|
36
|
+
// clipboard. The platform tools below (wl-copy, xclip, xsel) properly
|
|
37
|
+
// daemonize and keep ownership.
|
|
30
38
|
try {
|
|
31
|
-
if (clipboard) {
|
|
39
|
+
if (clipboard && p !== "linux") {
|
|
32
40
|
await clipboard.setText(text);
|
|
33
41
|
copied = true;
|
|
34
42
|
}
|
|
@@ -40,7 +48,6 @@ export async function copyToClipboard(text) {
|
|
|
40
48
|
if (copied && !remote) {
|
|
41
49
|
return;
|
|
42
50
|
}
|
|
43
|
-
const p = platform();
|
|
44
51
|
const options = { input: text, timeout: 5000, stdio: ["pipe", "ignore", "ignore"] };
|
|
45
52
|
if (!copied) {
|
|
46
53
|
try {
|