@dc99-tech/pi-agent-port 0.0.0-stage → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6869 -0
- package/README.md +94 -2
- package/dist/bun/cli.d.ts +5 -0
- package/dist/bun/cli.d.ts.map +1 -0
- package/dist/bun/cli.js +5 -0
- package/dist/bun/cli.js.map +1 -0
- package/dist/bun/restore-sandbox-env.d.ts +17 -0
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -0
- package/dist/bun/restore-sandbox-env.js +36 -0
- package/dist/bun/restore-sandbox-env.js.map +1 -0
- package/dist/bun/runtime-setup.d.ts +2 -0
- package/dist/bun/runtime-setup.d.ts.map +1 -0
- package/dist/bun/runtime-setup.js +12 -0
- package/dist/bun/runtime-setup.js.map +1 -0
- package/dist/bun/sandbox-env-setup.d.ts +2 -0
- package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
- package/dist/bun/sandbox-env-setup.js +4 -0
- package/dist/bun/sandbox-env-setup.js.map +1 -0
- package/dist/bundle/chunks/anthropic-messages-SWCN23VS.js +3 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-FRC5DTVL.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +89 -0
- package/dist/bundle/chunks/chunk-2BKJ4UF2.js +6 -0
- package/dist/bundle/chunks/chunk-33FKGSAH.js +16 -0
- package/dist/bundle/chunks/chunk-4B3RNLSW.js +2 -0
- package/dist/bundle/chunks/chunk-4DISLNSG.js +131 -0
- package/dist/bundle/chunks/chunk-4FWPIAHX.js +2 -0
- package/dist/bundle/chunks/chunk-4L3MQGA6.js +2 -0
- package/dist/bundle/chunks/chunk-6C7H734F.js +10 -0
- package/dist/bundle/chunks/chunk-6TM2SQMT.js +2 -0
- package/dist/bundle/chunks/chunk-7ZC4UXSL.js +2 -0
- package/dist/bundle/chunks/chunk-B3DKXRUQ.js +82 -0
- package/dist/bundle/chunks/chunk-BAOCMAMT.js +55 -0
- package/dist/bundle/chunks/chunk-BBP2Z2DD.js +8 -0
- package/dist/bundle/chunks/chunk-BPLBWOLJ.js +2 -0
- package/dist/bundle/chunks/chunk-BTGPNJEB.js +4 -0
- package/dist/bundle/chunks/chunk-DAYSTLCZ.js +6 -0
- package/dist/bundle/chunks/chunk-ECTDTFL5.js +20 -0
- package/dist/bundle/chunks/chunk-EHU5OVTX.js +31 -0
- package/dist/bundle/chunks/chunk-G5LK5KU5.js +6 -0
- package/dist/bundle/chunks/chunk-GBWJSTPQ.js +14 -0
- package/dist/bundle/chunks/chunk-HAJWZYW4.js +2 -0
- package/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
- package/dist/bundle/chunks/chunk-JKGU7UID.js +2 -0
- package/dist/bundle/chunks/chunk-K27W3G2V.js +2 -0
- package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
- package/dist/bundle/chunks/chunk-L6EYYEJG.js +2 -0
- package/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
- package/dist/bundle/chunks/chunk-N2K4QL4L.js +2 -0
- package/dist/bundle/chunks/chunk-OVXT2WQH.js +2 -0
- package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
- package/dist/bundle/chunks/chunk-PEHEJLCN.js +12 -0
- package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
- package/dist/bundle/chunks/chunk-PHM5C7IG.js +9 -0
- package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
- package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
- package/dist/bundle/chunks/chunk-R27YHKNY.js +20 -0
- package/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
- package/dist/bundle/chunks/chunk-SNECLPFF.js +2 -0
- package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
- package/dist/bundle/chunks/chunk-VCHTZPKH.js +44 -0
- package/dist/bundle/chunks/chunk-VZAIXDTE.js +1231 -0
- package/dist/bundle/chunks/chunk-XAIIWE4F.js +2 -0
- package/dist/bundle/chunks/chunk-XHDJEUAZ.js +2 -0
- package/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
- package/dist/bundle/chunks/chunk-ZI7BUGBL.js +2 -0
- package/dist/bundle/chunks/chunk-ZXP6YLJ3.js +30 -0
- package/dist/bundle/chunks/cli-A2LCJL6E.js +53 -0
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-ZWIKTC23.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +480 -0
- package/dist/bundle/chunks/easter-egg-3d-66LIJQZ5.js +2 -0
- package/dist/bundle/chunks/execute-NLWBUNAS.js +507 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-generative-ai-FF5STOZK.js +2 -0
- package/dist/bundle/chunks/google-vertex-JZ74TCHU.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-RQUICABB.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/bundle/chunks/jiti-loader-GBP77AXV.js +21 -0
- package/dist/bundle/chunks/jiti-static-loader-LHACV52N.js +2 -0
- package/dist/bundle/chunks/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-Z7PEFB5H.js +9 -0
- package/dist/bundle/chunks/llama-cpp-classify-ZW56O6EU.js +22 -0
- package/dist/bundle/chunks/meta.js +2 -0
- package/dist/bundle/chunks/mistral-conversations-7N4JLNBC.js +4 -0
- package/dist/bundle/chunks/multipart-parser-5Y3PUG54.js +3 -0
- package/dist/bundle/chunks/node-2ZBPDJEZ.js +2 -0
- package/dist/bundle/chunks/node-SPQY26DM.js +16 -0
- package/dist/bundle/chunks/openai-chatgpt.js +75 -0
- package/dist/bundle/chunks/openai-codex-responses-NNLPUFCK.js +2 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-NF2ENYQ5.js +7 -0
- package/dist/bundle/chunks/openai-decisions-CBP44RZ6.js +5 -0
- package/dist/bundle/chunks/openai-responses-ZNQ6ER6E.js +4 -0
- package/dist/bundle/chunks/openrouter-chat-images-2UBZZGSM.js +2 -0
- package/dist/bundle/chunks/openrouter-images-TMB5UU2K.js +4 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/pi-decision-OPRNN7CY.js +2 -0
- package/dist/bundle/chunks/pi-image-O2HLYVOH.js +2 -0
- package/dist/bundle/chunks/pi-messages-TZ7C2IOR.js +2 -0
- package/dist/bundle/chunks/radius.js +75 -0
- package/dist/bundle/chunks/runtime-BOID4AB3.js +2 -0
- package/dist/bundle/chunks/src-EGHG6VJB.js +4 -0
- package/dist/bundle/chunks/typesafe-system-one-5RYB4F72.js +2 -0
- package/dist/bundle/chunks/virtual-modules-T3EVEWPN.js +2 -0
- package/dist/bundle/chunks/xai.js +2 -0
- package/dist/bundle/cli-runtime.js +3 -0
- package/dist/bundle/cli.js +7 -0
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/rpc-entry.js +3 -0
- package/dist/cli/agent-dir-arg.d.ts +20 -0
- package/dist/cli/agent-dir-arg.d.ts.map +1 -0
- package/dist/cli/agent-dir-arg.js +38 -0
- package/dist/cli/agent-dir-arg.js.map +1 -0
- package/dist/cli/args.d.ts +68 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +518 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/auth-check.d.ts +19 -0
- package/dist/cli/auth-check.d.ts.map +1 -0
- package/dist/cli/auth-check.js +50 -0
- package/dist/cli/auth-check.js.map +1 -0
- package/dist/cli/auth-command.d.ts +24 -0
- package/dist/cli/auth-command.d.ts.map +1 -0
- package/dist/cli/auth-command.js +127 -0
- package/dist/cli/auth-command.js.map +1 -0
- package/dist/cli/auth-login.d.ts +15 -0
- package/dist/cli/auth-login.d.ts.map +1 -0
- package/dist/cli/auth-login.js +232 -0
- package/dist/cli/auth-login.js.map +1 -0
- package/dist/cli/auth-logout.d.ts +14 -0
- package/dist/cli/auth-logout.d.ts.map +1 -0
- package/dist/cli/auth-logout.js +57 -0
- package/dist/cli/auth-logout.js.map +1 -0
- package/dist/cli/auth-terminal.d.ts +17 -0
- package/dist/cli/auth-terminal.d.ts.map +1 -0
- package/dist/cli/auth-terminal.js +63 -0
- package/dist/cli/auth-terminal.js.map +1 -0
- package/dist/cli/config-selector.d.ts +16 -0
- package/dist/cli/config-selector.d.ts.map +1 -0
- package/dist/cli/config-selector.js +37 -0
- package/dist/cli/config-selector.js.map +1 -0
- package/dist/cli/credential-print.d.ts +13 -0
- package/dist/cli/credential-print.d.ts.map +1 -0
- package/dist/cli/credential-print.js +76 -0
- package/dist/cli/credential-print.js.map +1 -0
- package/dist/cli/file-processor.d.ts +15 -0
- package/dist/cli/file-processor.d.ts.map +1 -0
- package/dist/cli/file-processor.js +71 -0
- package/dist/cli/file-processor.js.map +1 -0
- package/dist/cli/initial-message.d.ts +18 -0
- package/dist/cli/initial-message.d.ts.map +1 -0
- package/dist/cli/initial-message.js +22 -0
- package/dist/cli/initial-message.js.map +1 -0
- package/dist/cli/list-models.d.ts +9 -0
- package/dist/cli/list-models.d.ts.map +1 -0
- package/dist/cli/list-models.js +93 -0
- package/dist/cli/list-models.js.map +1 -0
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +48 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/session-picker.d.ts +10 -0
- package/dist/cli/session-picker.d.ts.map +1 -0
- package/dist/cli/session-picker.js +39 -0
- package/dist/cli/session-picker.js.map +1 -0
- package/dist/cli/setup.d.ts +2 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +12 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +21 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +191 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +6 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +141 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +567 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +135 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/dist/core/agent-session-runtime.js +352 -0
- package/dist/core/agent-session-runtime.js.map +1 -0
- package/dist/core/agent-session-services.d.ts +86 -0
- package/dist/core/agent-session-services.d.ts.map +1 -0
- package/dist/core/agent-session-services.js +153 -0
- package/dist/core/agent-session-services.js.map +1 -0
- package/dist/core/agent-session.d.ts +979 -0
- package/dist/core/agent-session.d.ts.map +1 -0
- package/dist/core/agent-session.js +3772 -0
- package/dist/core/agent-session.js.map +1 -0
- package/dist/core/auth-guidance.d.ts +5 -0
- package/dist/core/auth-guidance.d.ts.map +1 -0
- package/dist/core/auth-guidance.js +21 -0
- package/dist/core/auth-guidance.js.map +1 -0
- package/dist/core/auth-storage.d.ts +72 -0
- package/dist/core/auth-storage.d.ts.map +1 -0
- package/dist/core/auth-storage.js +440 -0
- package/dist/core/auth-storage.js.map +1 -0
- package/dist/core/bash-executor.d.ts +34 -0
- package/dist/core/bash-executor.d.ts.map +1 -0
- package/dist/core/bash-executor.js +114 -0
- package/dist/core/bash-executor.js.map +1 -0
- package/dist/core/bug-report-upload.d.ts +12 -0
- package/dist/core/bug-report-upload.d.ts.map +1 -0
- package/dist/core/bug-report-upload.js +22 -0
- package/dist/core/bug-report-upload.js.map +1 -0
- package/dist/core/bug-report.d.ts +184 -0
- package/dist/core/bug-report.d.ts.map +1 -0
- package/dist/core/bug-report.js +292 -0
- package/dist/core/bug-report.js.map +1 -0
- package/dist/core/cache-stats.d.ts +49 -0
- package/dist/core/cache-stats.d.ts.map +1 -0
- package/dist/core/cache-stats.js +112 -0
- package/dist/core/cache-stats.js.map +1 -0
- package/dist/core/cache-warmer.d.ts +70 -0
- package/dist/core/cache-warmer.d.ts.map +1 -0
- package/dist/core/cache-warmer.js +278 -0
- package/dist/core/cache-warmer.js.map +1 -0
- package/dist/core/client-identity.d.ts +7 -0
- package/dist/core/client-identity.d.ts.map +1 -0
- package/dist/core/client-identity.js +14 -0
- package/dist/core/client-identity.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +100 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/core/compaction/branch-summarization.js +263 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +145 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -0
- package/dist/core/compaction/compaction.js +752 -0
- package/dist/core/compaction/compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +7 -0
- package/dist/core/compaction/index.d.ts.map +1 -0
- package/dist/core/compaction/index.js +7 -0
- package/dist/core/compaction/index.js.map +1 -0
- package/dist/core/compaction/utils.d.ts +45 -0
- package/dist/core/compaction/utils.d.ts.map +1 -0
- package/dist/core/compaction/utils.js +149 -0
- package/dist/core/compaction/utils.js.map +1 -0
- package/dist/core/crash-log.d.ts +28 -0
- package/dist/core/crash-log.d.ts.map +1 -0
- package/dist/core/crash-log.js +140 -0
- package/dist/core/crash-log.js.map +1 -0
- package/dist/core/defaults.d.ts +4 -0
- package/dist/core/defaults.d.ts.map +1 -0
- package/dist/core/defaults.js +11 -0
- package/dist/core/defaults.js.map +1 -0
- package/dist/core/diagnostics.d.ts +15 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +2 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/event-bus.d.ts +9 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +25 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/exec.d.ts +38 -0
- package/dist/core/exec.d.ts.map +1 -0
- package/dist/core/exec.js +122 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/experimental.d.ts +2 -0
- package/dist/core/experimental.d.ts.map +1 -0
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.js.map +1 -0
- package/dist/core/export-html/ansi-to-html.d.ts +27 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/dist/core/export-html/ansi-to-html.js +286 -0
- package/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/dist/core/export-html/index.d.ts +37 -0
- package/dist/core/export-html/index.d.ts.map +1 -0
- package/dist/core/export-html/index.js +230 -0
- package/dist/core/export-html/index.js.map +1 -0
- package/dist/core/export-html/template.css +1085 -0
- package/dist/core/export-html/template.html +56 -0
- package/dist/core/export-html/template.js +2044 -0
- package/dist/core/export-html/tool-renderer.d.ts +34 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/core/export-html/tool-renderer.js +112 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -0
- package/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
- package/dist/core/export-html/vendor/marked.min.js +79 -0
- package/dist/core/extensions/index.d.ts +12 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/index.js +9 -0
- package/dist/core/extensions/index.js.map +1 -0
- package/dist/core/extensions/jiti-loader.d.ts +2 -0
- package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
- package/dist/core/extensions/jiti-loader.js +4 -0
- package/dist/core/extensions/jiti-loader.js.map +1 -0
- package/dist/core/extensions/jiti-static-loader.d.ts +2 -0
- package/dist/core/extensions/jiti-static-loader.d.ts.map +1 -0
- package/dist/core/extensions/jiti-static-loader.js +4 -0
- package/dist/core/extensions/jiti-static-loader.js.map +1 -0
- package/dist/core/extensions/loader.d.ts +23 -0
- package/dist/core/extensions/loader.d.ts.map +1 -0
- package/dist/core/extensions/loader.js +732 -0
- package/dist/core/extensions/loader.js.map +1 -0
- package/dist/core/extensions/pi-ai-extension-view.d.ts +19 -0
- package/dist/core/extensions/pi-ai-extension-view.d.ts.map +1 -0
- package/dist/core/extensions/pi-ai-extension-view.js +22 -0
- package/dist/core/extensions/pi-ai-extension-view.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +216 -0
- package/dist/core/extensions/runner.d.ts.map +1 -0
- package/dist/core/extensions/runner.js +1253 -0
- package/dist/core/extensions/runner.js.map +1 -0
- package/dist/core/extensions/types.d.ts +1824 -0
- package/dist/core/extensions/types.d.ts.map +1 -0
- package/dist/core/extensions/types.js +48 -0
- package/dist/core/extensions/types.js.map +1 -0
- package/dist/core/extensions/virtual-modules.d.ts +3 -0
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
- package/dist/core/extensions/virtual-modules.js +42 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +20 -0
- package/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/dist/core/extensions/wrapper.js +22 -0
- package/dist/core/extensions/wrapper.js.map +1 -0
- package/dist/core/footer-data-provider.d.ts +64 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -0
- package/dist/core/footer-data-provider.js +336 -0
- package/dist/core/footer-data-provider.js.map +1 -0
- package/dist/core/http-dispatcher.d.ts +22 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -0
- package/dist/core/http-dispatcher.js +98 -0
- package/dist/core/http-dispatcher.js.map +1 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/key-id-schema.d.ts +6 -0
- package/dist/core/key-id-schema.d.ts.map +1 -0
- package/dist/core/key-id-schema.js +16 -0
- package/dist/core/key-id-schema.js.map +1 -0
- package/dist/core/keybindings-schema.d.ts +4 -0
- package/dist/core/keybindings-schema.d.ts.map +1 -0
- package/dist/core/keybindings-schema.js +16 -0
- package/dist/core/keybindings-schema.js.map +1 -0
- package/dist/core/keybindings.d.ts +560 -0
- package/dist/core/keybindings.d.ts.map +1 -0
- package/dist/core/keybindings.js +325 -0
- package/dist/core/keybindings.js.map +1 -0
- package/dist/core/mcp-config-schema.d.ts +83 -0
- package/dist/core/mcp-config-schema.d.ts.map +1 -0
- package/dist/core/mcp-config-schema.js +150 -0
- package/dist/core/mcp-config-schema.js.map +1 -0
- package/dist/core/mcp-servers.d.ts +80 -0
- package/dist/core/mcp-servers.d.ts.map +1 -0
- package/dist/core/mcp-servers.js +165 -0
- package/dist/core/mcp-servers.js.map +1 -0
- package/dist/core/messages.d.ts +81 -0
- package/dist/core/messages.d.ts.map +1 -0
- package/dist/core/messages.js +132 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/model-config.d.ts +2049 -0
- package/dist/core/model-config.d.ts.map +1 -0
- package/dist/core/model-config.js +167 -0
- package/dist/core/model-config.js.map +1 -0
- package/dist/core/model-registry.d.ts +63 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +144 -0
- package/dist/core/model-registry.js.map +1 -0
- package/dist/core/model-resolver.d.ts +129 -0
- package/dist/core/model-resolver.d.ts.map +1 -0
- package/dist/core/model-resolver.js +428 -0
- package/dist/core/model-resolver.js.map +1 -0
- package/dist/core/model-runtime.d.ts +150 -0
- package/dist/core/model-runtime.d.ts.map +1 -0
- package/dist/core/model-runtime.js +778 -0
- package/dist/core/model-runtime.js.map +1 -0
- package/dist/core/models-store.d.ts +22 -0
- package/dist/core/models-store.d.ts.map +1 -0
- package/dist/core/models-store.js +115 -0
- package/dist/core/models-store.js.map +1 -0
- package/dist/core/nested-tool-calls.d.ts +103 -0
- package/dist/core/nested-tool-calls.d.ts.map +1 -0
- package/dist/core/nested-tool-calls.js +179 -0
- package/dist/core/nested-tool-calls.js.map +1 -0
- package/dist/core/output-guard.d.ts +7 -0
- package/dist/core/output-guard.d.ts.map +1 -0
- package/dist/core/output-guard.js +89 -0
- package/dist/core/output-guard.js.map +1 -0
- package/dist/core/package-manager.d.ts +256 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +2427 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/pi-ai-schemas.d.ts +171 -0
- package/dist/core/pi-ai-schemas.d.ts.map +1 -0
- package/dist/core/pi-ai-schemas.js +21 -0
- package/dist/core/pi-ai-schemas.js.map +1 -0
- package/dist/core/pi-manifest.d.ts +9 -0
- package/dist/core/pi-manifest.d.ts.map +1 -0
- package/dist/core/pi-manifest.js +30 -0
- package/dist/core/pi-manifest.js.map +1 -0
- package/dist/core/preferred-providers.d.ts +17 -0
- package/dist/core/preferred-providers.d.ts.map +1 -0
- package/dist/core/preferred-providers.js +24 -0
- package/dist/core/preferred-providers.js.map +1 -0
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +60 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +59 -0
- package/dist/core/prompt-templates.d.ts.map +1 -0
- package/dist/core/prompt-templates.js +283 -0
- package/dist/core/prompt-templates.js.map +1 -0
- package/dist/core/provider-composer.d.ts +82 -0
- package/dist/core/provider-composer.d.ts.map +1 -0
- package/dist/core/provider-composer.js +495 -0
- package/dist/core/provider-composer.js.map +1 -0
- package/dist/core/provider-matching.d.ts +6 -0
- package/dist/core/provider-matching.d.ts.map +1 -0
- package/dist/core/provider-matching.js +8 -0
- package/dist/core/provider-matching.js.map +1 -0
- package/dist/core/radius-mcp.d.ts +13 -0
- package/dist/core/radius-mcp.d.ts.map +1 -0
- package/dist/core/radius-mcp.js +29 -0
- package/dist/core/radius-mcp.js.map +1 -0
- package/dist/core/radius.d.ts +7 -0
- package/dist/core/radius.d.ts.map +1 -0
- package/dist/core/radius.js +10 -0
- package/dist/core/radius.js.map +1 -0
- package/dist/core/remote-catalog-provider.d.ts +23 -0
- package/dist/core/remote-catalog-provider.d.ts.map +1 -0
- package/dist/core/remote-catalog-provider.js +213 -0
- package/dist/core/remote-catalog-provider.js.map +1 -0
- package/dist/core/resolve-config-value.d.ts +32 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -0
- package/dist/core/resolve-config-value.js +253 -0
- package/dist/core/resolve-config-value.js.map +1 -0
- package/dist/core/resource-loader.d.ts +237 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +1027 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/runtime-credentials.d.ts +23 -0
- package/dist/core/runtime-credentials.d.ts.map +1 -0
- package/dist/core/runtime-credentials.js +53 -0
- package/dist/core/runtime-credentials.js.map +1 -0
- package/dist/core/sdk.d.ts +117 -0
- package/dist/core/sdk.d.ts.map +1 -0
- package/dist/core/sdk.js +329 -0
- package/dist/core/sdk.js.map +1 -0
- package/dist/core/session-cwd.d.ts +26 -0
- package/dist/core/session-cwd.d.ts.map +1 -0
- package/dist/core/session-cwd.js +46 -0
- package/dist/core/session-cwd.js.map +1 -0
- package/dist/core/session-export.d.ts +8 -0
- package/dist/core/session-export.d.ts.map +1 -0
- package/dist/core/session-export.js +33 -0
- package/dist/core/session-export.js.map +1 -0
- package/dist/core/session-manager.d.ts +433 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +1569 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/settings-defaults.d.ts +70 -0
- package/dist/core/settings-defaults.d.ts.map +1 -0
- package/dist/core/settings-defaults.js +71 -0
- package/dist/core/settings-defaults.js.map +1 -0
- package/dist/core/settings-diagnostics.d.ts +9 -0
- package/dist/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/core/settings-diagnostics.js +21 -0
- package/dist/core/settings-diagnostics.js.map +1 -0
- package/dist/core/settings-manager.d.ts +253 -0
- package/dist/core/settings-manager.d.ts.map +1 -0
- package/dist/core/settings-manager.js +1161 -0
- package/dist/core/settings-manager.js.map +1 -0
- package/dist/core/settings-schema.d.ts +245 -0
- package/dist/core/settings-schema.d.ts.map +1 -0
- package/dist/core/settings-schema.js +313 -0
- package/dist/core/settings-schema.js.map +1 -0
- package/dist/core/skills.d.ts +63 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +409 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/slash-commands.d.ts +15 -0
- package/dist/core/slash-commands.d.ts.map +1 -0
- package/dist/core/slash-commands.js +28 -0
- package/dist/core/slash-commands.js.map +1 -0
- package/dist/core/source-info.d.ts +35 -0
- package/dist/core/source-info.d.ts.map +1 -0
- package/dist/core/source-info.js +48 -0
- package/dist/core/source-info.js.map +1 -0
- package/dist/core/system-prompt.d.ts +77 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +151 -0
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/timings.d.ts +10 -0
- package/dist/core/timings.d.ts.map +1 -0
- package/dist/core/timings.js +41 -0
- package/dist/core/timings.js.map +1 -0
- package/dist/core/tools/bash.d.ts +103 -0
- package/dist/core/tools/bash.d.ts.map +1 -0
- package/dist/core/tools/bash.js +380 -0
- package/dist/core/tools/bash.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +110 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/core/tools/edit-diff.js +562 -0
- package/dist/core/tools/edit-diff.js.map +1 -0
- package/dist/core/tools/edit.d.ts +44 -0
- package/dist/core/tools/edit.d.ts.map +1 -0
- package/dist/core/tools/edit.js +146 -0
- package/dist/core/tools/edit.js.map +1 -0
- package/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/dist/core/tools/file-mutation-queue.js +52 -0
- package/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/dist/core/tools/find.d.ts +42 -0
- package/dist/core/tools/find.d.ts.map +1 -0
- package/dist/core/tools/find.js +308 -0
- package/dist/core/tools/find.js.map +1 -0
- package/dist/core/tools/grep.d.ts +43 -0
- package/dist/core/tools/grep.d.ts.map +1 -0
- package/dist/core/tools/grep.js +266 -0
- package/dist/core/tools/grep.js.map +1 -0
- package/dist/core/tools/index.d.ts +43 -0
- package/dist/core/tools/index.d.ts.map +1 -0
- package/dist/core/tools/index.js +129 -0
- package/dist/core/tools/index.js.map +1 -0
- package/dist/core/tools/ls.d.ts +41 -0
- package/dist/core/tools/ls.d.ts.map +1 -0
- package/dist/core/tools/ls.js +127 -0
- package/dist/core/tools/ls.js.map +1 -0
- package/dist/core/tools/output-accumulator.d.ts +75 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -0
- package/dist/core/tools/output-accumulator.js +223 -0
- package/dist/core/tools/output-accumulator.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts +10 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -0
- package/dist/core/tools/path-utils.js +99 -0
- package/dist/core/tools/path-utils.js.map +1 -0
- package/dist/core/tools/powershell.d.ts +16 -0
- package/dist/core/tools/powershell.d.ts.map +1 -0
- package/dist/core/tools/powershell.js +52 -0
- package/dist/core/tools/powershell.js.map +1 -0
- package/dist/core/tools/read.d.ts +68 -0
- package/dist/core/tools/read.d.ts.map +1 -0
- package/dist/core/tools/read.js +297 -0
- package/dist/core/tools/read.js.map +1 -0
- package/dist/core/tools/render-utils.d.ts +50 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -0
- package/dist/core/tools/render-utils.js +153 -0
- package/dist/core/tools/render-utils.js.map +1 -0
- package/dist/core/tools/renderers/bash.d.ts +12 -0
- package/dist/core/tools/renderers/bash.d.ts.map +1 -0
- package/dist/core/tools/renderers/bash.js +95 -0
- package/dist/core/tools/renderers/bash.js.map +1 -0
- package/dist/core/tools/renderers/edit.d.ts +23 -0
- package/dist/core/tools/renderers/edit.d.ts.map +1 -0
- package/dist/core/tools/renderers/edit.js +168 -0
- package/dist/core/tools/renderers/edit.js.map +1 -0
- package/dist/core/tools/renderers/find.d.ts +10 -0
- package/dist/core/tools/renderers/find.d.ts.map +1 -0
- package/dist/core/tools/renderers/find.js +64 -0
- package/dist/core/tools/renderers/find.js.map +1 -0
- package/dist/core/tools/renderers/grep.d.ts +10 -0
- package/dist/core/tools/renderers/grep.d.ts.map +1 -0
- package/dist/core/tools/renderers/grep.js +69 -0
- package/dist/core/tools/renderers/grep.js.map +1 -0
- package/dist/core/tools/renderers/index.d.ts +28 -0
- package/dist/core/tools/renderers/index.d.ts.map +1 -0
- package/dist/core/tools/renderers/index.js +47 -0
- package/dist/core/tools/renderers/index.js.map +1 -0
- package/dist/core/tools/renderers/ls.d.ts +10 -0
- package/dist/core/tools/renderers/ls.d.ts.map +1 -0
- package/dist/core/tools/renderers/ls.js +58 -0
- package/dist/core/tools/renderers/ls.js.map +1 -0
- package/dist/core/tools/renderers/read.d.ts +11 -0
- package/dist/core/tools/renderers/read.d.ts.map +1 -0
- package/dist/core/tools/renderers/read.js +130 -0
- package/dist/core/tools/renderers/read.js.map +1 -0
- package/dist/core/tools/renderers/write.d.ts +10 -0
- package/dist/core/tools/renderers/write.d.ts.map +1 -0
- package/dist/core/tools/renderers/write.js +153 -0
- package/dist/core/tools/renderers/write.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +26 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.js +38 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/dist/core/tools/truncate.d.ts +74 -0
- package/dist/core/tools/truncate.d.ts.map +1 -0
- package/dist/core/tools/truncate.js +244 -0
- package/dist/core/tools/truncate.js.map +1 -0
- package/dist/core/tools/write.d.ts +30 -0
- package/dist/core/tools/write.d.ts.map +1 -0
- package/dist/core/tools/write.js +61 -0
- package/dist/core/tools/write.js.map +1 -0
- package/dist/core/trust-manager.d.ts +36 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +210 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/core/usage-totals.d.ts +21 -0
- package/dist/core/usage-totals.d.ts.map +1 -0
- package/dist/core/usage-totals.js +84 -0
- package/dist/core/usage-totals.js.map +1 -0
- package/dist/core/virtual-models.d.ts +117 -0
- package/dist/core/virtual-models.d.ts.map +1 -0
- package/dist/core/virtual-models.js +124 -0
- package/dist/core/virtual-models.js.map +1 -0
- package/dist/extensions/codemode/execute.d.ts +16 -0
- package/dist/extensions/codemode/execute.d.ts.map +1 -0
- package/dist/extensions/codemode/execute.js +775 -0
- package/dist/extensions/codemode/execute.js.map +1 -0
- package/dist/extensions/codemode/execute.lazy.d.ts +3 -0
- package/dist/extensions/codemode/execute.lazy.d.ts.map +1 -0
- package/dist/extensions/codemode/execute.lazy.js +3 -0
- package/dist/extensions/codemode/execute.lazy.js.map +1 -0
- package/dist/extensions/codemode/index.d.ts +21 -0
- package/dist/extensions/codemode/index.d.ts.map +1 -0
- package/dist/extensions/codemode/index.js +33 -0
- package/dist/extensions/codemode/index.js.map +1 -0
- package/dist/extensions/codemode/renderer.d.ts +12 -0
- package/dist/extensions/codemode/renderer.d.ts.map +1 -0
- package/dist/extensions/codemode/renderer.js +147 -0
- package/dist/extensions/codemode/renderer.js.map +1 -0
- package/dist/extensions/codemode/tool.d.ts +125 -0
- package/dist/extensions/codemode/tool.d.ts.map +1 -0
- package/dist/extensions/codemode/tool.js +335 -0
- package/dist/extensions/codemode/tool.js.map +1 -0
- package/dist/extensions/codemode/worker.d.ts +7 -0
- package/dist/extensions/codemode/worker.d.ts.map +1 -0
- package/dist/extensions/codemode/worker.js +7 -0
- package/dist/extensions/codemode/worker.js.map +1 -0
- package/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +13 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/llama/client.d.ts +74 -0
- package/dist/extensions/llama/client.d.ts.map +1 -0
- package/dist/extensions/llama/client.js +324 -0
- package/dist/extensions/llama/client.js.map +1 -0
- package/dist/extensions/llama/huggingface.d.ts +23 -0
- package/dist/extensions/llama/huggingface.d.ts.map +1 -0
- package/dist/extensions/llama/huggingface.js +141 -0
- package/dist/extensions/llama/huggingface.js.map +1 -0
- package/dist/extensions/llama/index.d.ts +3 -0
- package/dist/extensions/llama/index.d.ts.map +1 -0
- package/dist/extensions/llama/index.js +219 -0
- package/dist/extensions/llama/index.js.map +1 -0
- package/dist/extensions/llama/provider.d.ts +12 -0
- package/dist/extensions/llama/provider.d.ts.map +1 -0
- package/dist/extensions/llama/provider.js +238 -0
- package/dist/extensions/llama/provider.js.map +1 -0
- package/dist/extensions/llama/ui.d.ts +42 -0
- package/dist/extensions/llama/ui.d.ts.map +1 -0
- package/dist/extensions/llama/ui.js +441 -0
- package/dist/extensions/llama/ui.js.map +1 -0
- package/dist/extensions/mcp/cli.d.ts +23 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.js +555 -0
- package/dist/extensions/mcp/cli.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
- package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/cli.lazy.js +3 -0
- package/dist/extensions/mcp/cli.lazy.js.map +1 -0
- package/dist/extensions/mcp/config.d.ts +86 -0
- package/dist/extensions/mcp/config.d.ts.map +1 -0
- package/dist/extensions/mcp/config.js +193 -0
- package/dist/extensions/mcp/config.js.map +1 -0
- package/dist/extensions/mcp/index.d.ts +79 -0
- package/dist/extensions/mcp/index.d.ts.map +1 -0
- package/dist/extensions/mcp/index.js +1203 -0
- package/dist/extensions/mcp/index.js.map +1 -0
- package/dist/extensions/mcp/log.d.ts +16 -0
- package/dist/extensions/mcp/log.d.ts.map +1 -0
- package/dist/extensions/mcp/log.js +66 -0
- package/dist/extensions/mcp/log.js.map +1 -0
- package/dist/extensions/mcp/oauth.d.ts +64 -0
- package/dist/extensions/mcp/oauth.d.ts.map +1 -0
- package/dist/extensions/mcp/oauth.js +188 -0
- package/dist/extensions/mcp/oauth.js.map +1 -0
- package/dist/extensions/mcp/resources.d.ts +36 -0
- package/dist/extensions/mcp/resources.d.ts.map +1 -0
- package/dist/extensions/mcp/resources.js +262 -0
- package/dist/extensions/mcp/resources.js.map +1 -0
- package/dist/extensions/mcp/runtime.d.ts +105 -0
- package/dist/extensions/mcp/runtime.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.js +447 -0
- package/dist/extensions/mcp/runtime.js.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
- package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
- package/dist/extensions/mcp/runtime.lazy.js +3 -0
- package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
- package/dist/extensions/mcp/tools.d.ts +57 -0
- package/dist/extensions/mcp/tools.d.ts.map +1 -0
- package/dist/extensions/mcp/tools.js +141 -0
- package/dist/extensions/mcp/tools.js.map +1 -0
- package/dist/extensions/mcp/ui.d.ts +61 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -0
- package/dist/extensions/mcp/ui.js +195 -0
- package/dist/extensions/mcp/ui.js.map +1 -0
- package/dist/extensions/tool-search/index.d.ts +12 -0
- package/dist/extensions/tool-search/index.d.ts.map +1 -0
- package/dist/extensions/tool-search/index.js +15 -0
- package/dist/extensions/tool-search/index.js.map +1 -0
- package/dist/extensions/tool-search/tool.d.ts +86 -0
- package/dist/extensions/tool-search/tool.d.ts.map +1 -0
- package/dist/extensions/tool-search/tool.js +267 -0
- package/dist/extensions/tool-search/tool.js.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +16 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +920 -0
- package/dist/main.js.map +1 -0
- package/dist/migrations.d.ts +33 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +282 -0
- package/dist/migrations.js.map +1 -0
- package/dist/modes/diagnostics-stderr.d.ts +4 -0
- package/dist/modes/diagnostics-stderr.d.ts.map +1 -0
- package/dist/modes/diagnostics-stderr.js +11 -0
- package/dist/modes/diagnostics-stderr.js.map +1 -0
- package/dist/modes/index.d.ts +10 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +8 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/bug-report.d.ts +16 -0
- package/dist/modes/interactive/bug-report.d.ts.map +1 -0
- package/dist/modes/interactive/bug-report.js +210 -0
- package/dist/modes/interactive/bug-report.js.map +1 -0
- package/dist/modes/interactive/chat-viewport.d.ts +20 -0
- package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
- package/dist/modes/interactive/chat-viewport.js +28 -0
- package/dist/modes/interactive/chat-viewport.js.map +1 -0
- package/dist/modes/interactive/components/armin.d.ts +37 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -0
- package/dist/modes/interactive/components/armin.js +335 -0
- package/dist/modes/interactive/components/armin.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +30 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-message.js +188 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/dist/modes/interactive/components/auth-url.d.ts +14 -0
- package/dist/modes/interactive/components/auth-url.d.ts.map +1 -0
- package/dist/modes/interactive/components/auth-url.js +37 -0
- package/dist/modes/interactive/components/auth-url.js.map +1 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +39 -0
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/bash-execution.js +181 -0
- package/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.js +54 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts +21 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.js +62 -0
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +21 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.js +63 -0
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts +102 -0
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/config-selector.js +761 -0
- package/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts +30 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-editor.js +134 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/dist/modes/interactive/components/custom-entry.d.ts +21 -0
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-entry.js +59 -0
- package/dist/modes/interactive/components/custom-entry.js.map +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts +25 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-message.js +96 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/dist/modes/interactive/components/diff.d.ts +12 -0
- package/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/dist/modes/interactive/components/diff.js +139 -0
- package/dist/modes/interactive/components/diff.js.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/dist/modes/interactive/components/earendil-announcement.d.ts +5 -0
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -0
- package/dist/modes/interactive/components/earendil-announcement.js +40 -0
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.d.ts +104 -0
- package/dist/modes/interactive/components/easter-egg-3d.d.ts.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.js +1139 -0
- package/dist/modes/interactive/components/easter-egg-3d.js.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts +6 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.js +23 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.js.map +1 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +26 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-editor.js +107 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/dist/modes/interactive/components/extension-input.d.ts +25 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-input.js +67 -0
- package/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/dist/modes/interactive/components/extension-selector.d.ts +27 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-selector.js +95 -0
- package/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts +23 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.js +79 -0
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +39 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer.js +265 -0
- package/dist/modes/interactive/components/footer.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +33 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/modes/interactive/components/index.js +34 -0
- package/dist/modes/interactive/components/index.js.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +13 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.js +36 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts +59 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/modes/interactive/components/login-dialog.js +272 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts +4 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.js +20 -0
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/modes/interactive/components/mermaid.d.ts +12 -0
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
- package/dist/modes/interactive/components/mermaid.js +89 -0
- package/dist/modes/interactive/components/mermaid.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +61 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/model-selector.js +383 -0
- package/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts +59 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.js +207 -0
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/dist/modes/interactive/components/pi-logo.d.ts +19 -0
- package/dist/modes/interactive/components/pi-logo.d.ts.map +1 -0
- package/dist/modes/interactive/components/pi-logo.js +37 -0
- package/dist/modes/interactive/components/pi-logo.js.map +1 -0
- package/dist/modes/interactive/components/provider-brand.d.ts +14 -0
- package/dist/modes/interactive/components/provider-brand.d.ts.map +1 -0
- package/dist/modes/interactive/components/provider-brand.js +66 -0
- package/dist/modes/interactive/components/provider-brand.js.map +1 -0
- package/dist/modes/interactive/components/radius-login-selector.d.ts +14 -0
- package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/radius-login-selector.js +55 -0
- package/dist/modes/interactive/components/radius-login-selector.js.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +47 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.js +345 -0
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts +27 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.js +219 -0
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/dist/modes/interactive/components/session-selector.d.ts +103 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector.js +917 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +96 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-selector.js +764 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.js +171 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.js +39 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +22 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.js +65 -0
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/dist/modes/interactive/components/status-indicator.d.ts +30 -0
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -0
- package/dist/modes/interactive/components/status-indicator.js +67 -0
- package/dist/modes/interactive/components/status-indicator.js.map +1 -0
- package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/theme-selector.js +50 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/dist/modes/interactive/components/themed-text.d.ts +17 -0
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/themed-text.js +29 -0
- package/dist/modes/interactive/components/themed-text.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +23 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.js +113 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +79 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution.js +338 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +96 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-selector.js +1262 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +91 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts +31 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.js +122 -0
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +19 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message.js +60 -0
- package/dist/modes/interactive/components/user-message.js.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts +48 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.js +66 -0
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/dist/modes/interactive/external-editor.d.ts +13 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -0
- package/dist/modes/interactive/external-editor.js +60 -0
- package/dist/modes/interactive/external-editor.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +537 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +6209 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +34 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/model-search.d.ts +22 -0
- package/dist/modes/interactive/model-search.d.ts.map +1 -0
- package/dist/modes/interactive/model-search.js +36 -0
- package/dist/modes/interactive/model-search.js.map +1 -0
- package/dist/modes/interactive/program-resume-reporter.d.ts +32 -0
- package/dist/modes/interactive/program-resume-reporter.d.ts.map +1 -0
- package/dist/modes/interactive/program-resume-reporter.js +56 -0
- package/dist/modes/interactive/program-resume-reporter.js.map +1 -0
- package/dist/modes/interactive/program-status-reporter.d.ts +36 -0
- package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
- package/dist/modes/interactive/program-status-reporter.js +114 -0
- package/dist/modes/interactive/program-status-reporter.js.map +1 -0
- package/dist/modes/interactive/session-share.d.ts +18 -0
- package/dist/modes/interactive/session-share.d.ts.map +1 -0
- package/dist/modes/interactive/session-share.js +205 -0
- package/dist/modes/interactive/session-share.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +78 -0
- package/dist/modes/interactive/theme/light.json +78 -0
- package/dist/modes/interactive/theme/system-theme.d.ts +55 -0
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/system-theme.js +546 -0
- package/dist/modes/interactive/theme/system-theme.js.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +81 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.js +210 -0
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.js +105 -0
- package/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.js +94 -0
- package/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
- package/dist/modes/interactive/theme/theme.d.ts +165 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme.js +918 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -0
- package/dist/modes/interactive/tui-renderer.d.ts +22 -0
- package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
- package/dist/modes/interactive/tui-renderer.js +67 -0
- package/dist/modes/interactive/tui-renderer.js.map +1 -0
- package/dist/modes/json-event.d.ts +34 -0
- package/dist/modes/json-event.d.ts.map +1 -0
- package/dist/modes/json-event.js +29 -0
- package/dist/modes/json-event.js.map +1 -0
- package/dist/modes/print-mode.d.ts +28 -0
- package/dist/modes/print-mode.d.ts.map +1 -0
- package/dist/modes/print-mode.js +155 -0
- package/dist/modes/print-mode.js.map +1 -0
- package/dist/modes/rpc/jsonl.d.ts +17 -0
- package/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/dist/modes/rpc/jsonl.js +49 -0
- package/dist/modes/rpc/jsonl.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +254 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client.js +499 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-mode.js +677 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +478 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-types.js +8 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -0
- package/dist/package-manager-cli.d.ts +9 -0
- package/dist/package-manager-cli.d.ts.map +1 -0
- package/dist/package-manager-cli.js +1043 -0
- package/dist/package-manager-cli.js.map +1 -0
- package/dist/rpc-entry.d.ts +3 -0
- package/dist/rpc-entry.d.ts.map +1 -0
- package/dist/rpc-entry.js +11 -0
- package/dist/rpc-entry.js.map +1 -0
- package/dist/utils/abort.d.ts +5 -0
- package/dist/utils/abort.d.ts.map +1 -0
- package/dist/utils/abort.js +48 -0
- package/dist/utils/abort.js.map +1 -0
- package/dist/utils/ansi.d.ts +10 -0
- package/dist/utils/ansi.d.ts.map +1 -0
- package/dist/utils/ansi.js +74 -0
- package/dist/utils/ansi.js.map +1 -0
- package/dist/utils/changelog.d.ts +22 -0
- package/dist/utils/changelog.d.ts.map +1 -0
- package/dist/utils/changelog.js +172 -0
- package/dist/utils/changelog.js.map +1 -0
- package/dist/utils/child-process.d.ts +18 -0
- package/dist/utils/child-process.d.ts.map +1 -0
- package/dist/utils/child-process.js +106 -0
- package/dist/utils/child-process.js.map +1 -0
- package/dist/utils/clipboard-command.d.ts +7 -0
- package/dist/utils/clipboard-command.d.ts.map +1 -0
- package/dist/utils/clipboard-command.js +52 -0
- package/dist/utils/clipboard-command.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts +11 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -0
- package/dist/utils/clipboard-image.js +214 -0
- package/dist/utils/clipboard-image.js.map +1 -0
- package/dist/utils/clipboard.d.ts +6 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +162 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts +5 -0
- package/dist/utils/exif-orientation.d.ts.map +1 -0
- package/dist/utils/exif-orientation.js +157 -0
- package/dist/utils/exif-orientation.js.map +1 -0
- package/dist/utils/flush-stdout.d.ts +8 -0
- package/dist/utils/flush-stdout.d.ts.map +1 -0
- package/dist/utils/flush-stdout.js +23 -0
- package/dist/utils/flush-stdout.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +8 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +27 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/fs-watch.d.ts +5 -0
- package/dist/utils/fs-watch.d.ts.map +1 -0
- package/dist/utils/fs-watch.js +25 -0
- package/dist/utils/fs-watch.js.map +1 -0
- package/dist/utils/git.d.ts +26 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +195 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/html.d.ts +7 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +40 -0
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/image-convert.d.ts +22 -0
- package/dist/utils/image-convert.d.ts.map +1 -0
- package/dist/utils/image-convert.js +84 -0
- package/dist/utils/image-convert.js.map +1 -0
- package/dist/utils/image-process.d.ts +18 -0
- package/dist/utils/image-process.d.ts.map +1 -0
- package/dist/utils/image-process.js +83 -0
- package/dist/utils/image-process.js.map +1 -0
- package/dist/utils/image-resize-core.d.ts +42 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -0
- package/dist/utils/image-resize-core.js +131 -0
- package/dist/utils/image-resize-core.js.map +1 -0
- package/dist/utils/image-resize-worker.d.ts +2 -0
- package/dist/utils/image-resize-worker.d.ts.map +1 -0
- package/dist/utils/image-resize-worker.js +32 -0
- package/dist/utils/image-resize-worker.js.map +1 -0
- package/dist/utils/image-resize.d.ts +16 -0
- package/dist/utils/image-resize.d.ts.map +1 -0
- package/dist/utils/image-resize.js +98 -0
- package/dist/utils/image-resize.js.map +1 -0
- package/dist/utils/json.d.ts +3 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +7 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/management-http.d.ts +25 -0
- package/dist/utils/management-http.d.ts.map +1 -0
- package/dist/utils/management-http.js +54 -0
- package/dist/utils/management-http.js.map +1 -0
- package/dist/utils/mime.d.ts +3 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +110 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/open-browser.d.ts +9 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +25 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/dist/utils/output-files.d.ts +31 -0
- package/dist/utils/output-files.d.ts.map +1 -0
- package/dist/utils/output-files.js +65 -0
- package/dist/utils/output-files.js.map +1 -0
- package/dist/utils/paths.d.ts +51 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +156 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/photon.d.ts +21 -0
- package/dist/utils/photon.d.ts.map +1 -0
- package/dist/utils/photon.js +121 -0
- package/dist/utils/photon.js.map +1 -0
- package/dist/utils/pi-user-agent.d.ts +3 -0
- package/dist/utils/pi-user-agent.d.ts.map +1 -0
- package/dist/utils/pi-user-agent.js +6 -0
- package/dist/utils/pi-user-agent.js.map +1 -0
- package/dist/utils/shell.d.ts +36 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +308 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/syntax-highlight.d.ts +18 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -0
- package/dist/utils/syntax-highlight.js +191 -0
- package/dist/utils/syntax-highlight.js.map +1 -0
- package/dist/utils/terminal-question.d.ts +8 -0
- package/dist/utils/terminal-question.d.ts.map +1 -0
- package/dist/utils/terminal-question.js +24 -0
- package/dist/utils/terminal-question.js.map +1 -0
- package/dist/utils/text.d.ts +8 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +9 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/utils/tool-result-images.d.ts +21 -0
- package/dist/utils/tool-result-images.d.ts.map +1 -0
- package/dist/utils/tool-result-images.js +48 -0
- package/dist/utils/tool-result-images.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +14 -0
- package/dist/utils/tools-manager.d.ts.map +1 -0
- package/dist/utils/tools-manager.js +340 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/dist/utils/version-check.d.ts +18 -0
- package/dist/utils/version-check.d.ts.map +1 -0
- package/dist/utils/version-check.js +76 -0
- package/dist/utils/version-check.js.map +1 -0
- package/dist/utils/web-url.d.ts +12 -0
- package/dist/utils/web-url.d.ts.map +1 -0
- package/dist/utils/web-url.js +20 -0
- package/dist/utils/web-url.js.map +1 -0
- package/dist/utils/windows-self-update.d.ts +3 -0
- package/dist/utils/windows-self-update.d.ts.map +1 -0
- package/dist/utils/windows-self-update.js +77 -0
- package/dist/utils/windows-self-update.js.map +1 -0
- package/dist/utils/wsl.d.ts +8 -0
- package/dist/utils/wsl.d.ts.map +1 -0
- package/dist/utils/wsl.js +23 -0
- package/dist/utils/wsl.js.map +1 -0
- package/dist/utils/zip.d.ts +7 -0
- package/dist/utils/zip.d.ts.map +1 -0
- package/dist/utils/zip.js +60 -0
- package/dist/utils/zip.js.map +1 -0
- package/docs/cli-integration.md +106 -0
- package/docs/cli.md +358 -0
- package/docs/codemode.md +241 -0
- package/docs/compaction.md +463 -0
- package/docs/configuration.md +47 -0
- package/docs/containerization.md +183 -0
- package/docs/custom-provider.md +227 -0
- package/docs/docs.json +224 -0
- package/docs/environment-variables.md +103 -0
- package/docs/extensions.md +3394 -0
- package/docs/how-pi-works.md +49 -0
- package/docs/images/doom-extension.png +0 -0
- package/docs/images/exy.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/index.md +39 -0
- package/docs/json.md +226 -0
- package/docs/keybindings.md +195 -0
- package/docs/llama-cpp.md +138 -0
- package/docs/mcp.md +301 -0
- package/docs/message-types.md +280 -0
- package/docs/models-configuration.md +213 -0
- package/docs/models.md +248 -0
- package/docs/nvidia-rtx-llama-cpp.md +96 -0
- package/docs/packages.md +153 -0
- package/docs/prompt-templates.md +59 -0
- package/docs/providers.md +251 -0
- package/docs/quickstart.md +140 -0
- package/docs/rpc-commands.md +860 -0
- package/docs/rpc-extension-ui.md +200 -0
- package/docs/rpc.md +195 -0
- package/docs/sdk.md +147 -0
- package/docs/security.md +99 -0
- package/docs/session-format.md +293 -0
- package/docs/sessions.md +82 -0
- package/docs/settings.md +175 -0
- package/docs/shell-aliases.md +93 -0
- package/docs/skills.md +93 -0
- package/docs/slash-commands.md +61 -0
- package/docs/subscriptions.md +96 -0
- package/docs/terminal-setup.md +290 -0
- package/docs/termux.md +117 -0
- package/docs/themes.md +138 -0
- package/docs/tmux.md +61 -0
- package/docs/tui.md +199 -0
- package/docs/usage.md +94 -0
- package/docs/virtual-models.md +114 -0
- package/docs/windows.md +109 -0
- package/examples/README.md +36 -0
- package/examples/extensions/README.md +215 -0
- package/examples/extensions/auto-commit-on-exit.ts +49 -0
- package/examples/extensions/bash-spawn-hook.ts +30 -0
- package/examples/extensions/bookmark.ts +50 -0
- package/examples/extensions/border-status-editor.ts +150 -0
- package/examples/extensions/built-in-tool-renderer.ts +225 -0
- package/examples/extensions/claude-rules.ts +86 -0
- package/examples/extensions/commands.ts +72 -0
- package/examples/extensions/confirm-destructive.ts +59 -0
- package/examples/extensions/custom-compaction.ts +117 -0
- package/examples/extensions/custom-footer.ts +64 -0
- package/examples/extensions/custom-header.ts +73 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +613 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
- package/examples/extensions/custom-provider-anthropic/package.json +19 -0
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +405 -0
- package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
- package/examples/extensions/debug-provider.ts +90 -0
- package/examples/extensions/dirty-repo-guard.ts +56 -0
- package/examples/extensions/doom-overlay/README.md +46 -0
- package/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +152 -0
- package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
- package/examples/extensions/doom-overlay/doom-component.ts +132 -0
- package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
- package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
- package/examples/extensions/doom-overlay/index.ts +74 -0
- package/examples/extensions/doom-overlay/wad-finder.ts +55 -0
- package/examples/extensions/dynamic-resources/SKILL.md +8 -0
- package/examples/extensions/dynamic-resources/dynamic.json +81 -0
- package/examples/extensions/dynamic-resources/dynamic.md +5 -0
- package/examples/extensions/dynamic-resources/index.ts +15 -0
- package/examples/extensions/dynamic-tools.ts +74 -0
- package/examples/extensions/entry-renderer.ts +41 -0
- package/examples/extensions/event-bus.ts +43 -0
- package/examples/extensions/file-trigger.ts +41 -0
- package/examples/extensions/git-checkpoint.ts +53 -0
- package/examples/extensions/git-merge-and-resolve.ts +115 -0
- package/examples/extensions/github-issue-autocomplete.ts +185 -0
- package/examples/extensions/gondolin/index.ts +528 -0
- package/examples/extensions/gondolin/package-lock.json +175 -0
- package/examples/extensions/gondolin/package.json +19 -0
- package/examples/extensions/handoff.ts +190 -0
- package/examples/extensions/hello.ts +26 -0
- package/examples/extensions/hidden-thinking-label.ts +53 -0
- package/examples/extensions/inline-bash.ts +94 -0
- package/examples/extensions/input-transform-streaming.ts +39 -0
- package/examples/extensions/input-transform.ts +43 -0
- package/examples/extensions/interactive-shell.ts +196 -0
- package/examples/extensions/jev-router.ts +113 -0
- package/examples/extensions/mac-system-theme.ts +47 -0
- package/examples/extensions/message-renderer.ts +59 -0
- package/examples/extensions/minimal-mode.ts +353 -0
- package/examples/extensions/modal-editor.ts +85 -0
- package/examples/extensions/model-status.ts +31 -0
- package/examples/extensions/notify.ts +57 -0
- package/examples/extensions/overlay-qa-tests.ts +1456 -0
- package/examples/extensions/overlay-test.ts +165 -0
- package/examples/extensions/permission-gate.ts +34 -0
- package/examples/extensions/pirate.ts +47 -0
- package/examples/extensions/plan-mode/README.md +66 -0
- package/examples/extensions/plan-mode/index.ts +404 -0
- package/examples/extensions/plan-mode/utils.ts +194 -0
- package/examples/extensions/preset.ts +438 -0
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/prompt-customizer.ts +49 -0
- package/examples/extensions/protected-paths.ts +30 -0
- package/examples/extensions/provider-payload.ts +18 -0
- package/examples/extensions/qna.ts +118 -0
- package/examples/extensions/question.ts +278 -0
- package/examples/extensions/questionnaire.ts +440 -0
- package/examples/extensions/rainbow-editor.ts +88 -0
- package/examples/extensions/reload-runtime.ts +49 -0
- package/examples/extensions/rpc-demo.ts +118 -0
- package/examples/extensions/send-user-message.ts +97 -0
- package/examples/extensions/session-name.ts +27 -0
- package/examples/extensions/shutdown-command.ts +63 -0
- package/examples/extensions/snake.ts +343 -0
- package/examples/extensions/space-invaders.ts +560 -0
- package/examples/extensions/ssh.ts +220 -0
- package/examples/extensions/status-line.ts +32 -0
- package/examples/extensions/structured-output.ts +65 -0
- package/examples/extensions/subagent/README.md +180 -0
- package/examples/extensions/subagent/agents/planner.md +37 -0
- package/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/examples/extensions/subagent/agents/scout.md +50 -0
- package/examples/extensions/subagent/agents/worker.md +24 -0
- package/examples/extensions/subagent/agents.ts +157 -0
- package/examples/extensions/subagent/index.ts +1258 -0
- package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/examples/extensions/subagent/prompts/implement.md +10 -0
- package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/examples/extensions/summarize.ts +199 -0
- package/examples/extensions/system-prompt-header.ts +17 -0
- package/examples/extensions/tic-tac-toe.ts +1008 -0
- package/examples/extensions/timed-confirm.ts +70 -0
- package/examples/extensions/titlebar-spinner.ts +58 -0
- package/examples/extensions/todo.ts +304 -0
- package/examples/extensions/tool-override.ts +144 -0
- package/examples/extensions/tools.ts +148 -0
- package/examples/extensions/trigger-compact.ts +50 -0
- package/examples/extensions/truncated-tool.ts +195 -0
- package/examples/extensions/widget-placement.ts +9 -0
- package/examples/extensions/with-deps/index.ts +32 -0
- package/examples/extensions/with-deps/package-lock.json +31 -0
- package/examples/extensions/with-deps/package.json +22 -0
- package/examples/extensions/working-indicator.ts +123 -0
- package/examples/extensions/working-message-test.ts +25 -0
- package/examples/rpc-client.ts +35 -0
- package/examples/rpc-extension-ui.ts +662 -0
- package/examples/sdk/01-minimal.ts +26 -0
- package/examples/sdk/02-custom-model.ts +49 -0
- package/examples/sdk/03-custom-prompt.ts +70 -0
- package/examples/sdk/04-skills.ts +55 -0
- package/examples/sdk/05-tools.ts +48 -0
- package/examples/sdk/06-extensions.ts +94 -0
- package/examples/sdk/07-context-files.ts +42 -0
- package/examples/sdk/08-prompt-templates.ts +51 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +34 -0
- package/examples/sdk/10-settings.ts +53 -0
- package/examples/sdk/11-sessions.ts +52 -0
- package/examples/sdk/12-full-control.ts +74 -0
- package/examples/sdk/13-session-runtime.ts +67 -0
- package/examples/sdk/14-codemode-mcp.ts +61 -0
- package/examples/sdk/README.md +141 -0
- package/examples/tsconfig.json +208 -0
- package/package.json +98 -5
- package/schemas/keybindings.schema.json +393 -0
- package/schemas/mcp.schema.json +306 -0
- package/schemas/models.schema.json +1253 -0
- package/schemas/settings.schema.json +820 -0
- package/schemas/theme.schema.json +365 -0
package/docs/windows.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Run Pi on Windows
|
|
2
|
+
|
|
3
|
+
Run Pi either as a native Windows process or inside Windows Subsystem for Linux (WSL). Native Windows uses Git Bash by default for Bash commands and can optionally expose PowerShell to the model. Pi inside WSL uses the Linux environment and its Bash installation.
|
|
4
|
+
|
|
5
|
+
Follow the main [Quickstart](quickstart.md) to install and authenticate Pi. Use this page to choose and configure its command environment.
|
|
6
|
+
|
|
7
|
+
## Choose native Windows or WSL
|
|
8
|
+
|
|
9
|
+
| Environment | Command environment | Use it when |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Native Windows with Git Bash | Git Bash for the built-in `bash` tool and `!` commands | Your files and development tools primarily live on Windows |
|
|
12
|
+
| Native Windows with the `powershell` tool | PowerShell for model tool calls; Bash remains available for `!` commands | The task depends on PowerShell modules or Windows-native commands |
|
|
13
|
+
| WSL | Linux Bash and tools inside the selected WSL distribution | Your files and toolchain already live in Linux or WSL |
|
|
14
|
+
|
|
15
|
+
## Use Git Bash on native Windows
|
|
16
|
+
|
|
17
|
+
For most native Windows users, installing [Git for Windows](https://git-scm.com/download/win) is sufficient.
|
|
18
|
+
|
|
19
|
+
Pi resolves Bash in this order:
|
|
20
|
+
|
|
21
|
+
1. `shellPath` from `~/.pi/agent/settings.json`
|
|
22
|
+
2. Git Bash at `%ProgramFiles%\Git\bin\bash.exe`
|
|
23
|
+
3. Git Bash at `%ProgramFiles(x86)%\Git\bin\bash.exe`
|
|
24
|
+
4. Git Bash of the Git for Windows installation whose `git.exe` is on `PATH`, wherever it is installed (Git 2.47 or later)
|
|
25
|
+
5. `bash.exe` on `PATH`, including Cygwin, MSYS2, or legacy WSL Bash
|
|
26
|
+
|
|
27
|
+
Start Pi and enter this command to verify the shell:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
!printf 'Bash is working\n'
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If Pi cannot find Bash, it reports the locations it checked. Install Git for Windows, put another Bash executable on `PATH`, or configure `shellPath`.
|
|
34
|
+
|
|
35
|
+
## Let the model use PowerShell
|
|
36
|
+
|
|
37
|
+
The optional `powershell` tool runs commands through `pwsh.exe` when available, then falls back to Windows PowerShell. It starts PowerShell with `-NoProfile -NonInteractive -ExecutionPolicy Bypass`. Administrator-enforced execution policies can still take precedence.
|
|
38
|
+
|
|
39
|
+
PowerShell discovery checks these locations in order:
|
|
40
|
+
|
|
41
|
+
1. `pwsh.exe` on `PATH`
|
|
42
|
+
2. `%ProgramFiles%\PowerShell\7\pwsh.exe`
|
|
43
|
+
3. `powershell.exe` on `PATH`
|
|
44
|
+
4. `%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe`
|
|
45
|
+
|
|
46
|
+
To replace the model-facing `bash` tool with `powershell`, add this to `~/.pi/agent/settings.json`:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"defaultTools": ["read", "powershell", "edit", "write"]
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`["-bash", "+powershell"]` does the same while keeping any other default tools you configured.
|
|
55
|
+
|
|
56
|
+
Restart Pi, then ask it to run a harmless PowerShell command. The `!` and `!!` editor commands continue to use Bash. The `powershell` tool is available only when Pi runs as a native Windows process.
|
|
57
|
+
|
|
58
|
+
See [Settings](settings.md#tools) for other tool combinations.
|
|
59
|
+
|
|
60
|
+
## WSL
|
|
61
|
+
|
|
62
|
+
WSL path conversion on Windows and extra Git branch polling in WSL recognize `/mnt/<drive>`, not custom mount roots.
|
|
63
|
+
|
|
64
|
+
When using the legacy WSL `bash.exe` launcher from Windows, Pi sends commands over stdin to avoid command-line quoting problems.
|
|
65
|
+
|
|
66
|
+
## Use a custom Bash executable
|
|
67
|
+
|
|
68
|
+
Set `shellPath` when Bash is installed somewhere Pi does not discover automatically:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"shellPath": "C:\\cygwin64\\bin\\bash.exe"
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
JSON uses backslashes for escape sequences. When you write a Windows path with backslashes, write each backslash twice, as shown above.
|
|
77
|
+
|
|
78
|
+
See [Configure shell commands](shell-aliases.md) for command prefixes, aliases, and the complete shell-resolution behavior.
|
|
79
|
+
|
|
80
|
+
## Choose a terminal
|
|
81
|
+
|
|
82
|
+
Windows terminals run Pi through a console host (conhost). Some bundle an up-to-date copy; others use the older one built into Windows, which has bugs that affect Pi.
|
|
83
|
+
|
|
84
|
+
We recommend [Windows Terminal](https://aka.ms/terminal). It always ships an up-to-date conhost, and Pi is best tested with it.
|
|
85
|
+
|
|
86
|
+
Last updated: October 2026.
|
|
87
|
+
|
|
88
|
+
| Terminal | Conhost | Status |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| [Windows Terminal](https://aka.ms/terminal) | Bundled, current | Recommended |
|
|
91
|
+
| [VS Code](https://code.visualstudio.com), [Tabby](https://tabby.sh), [WezTerm](https://wezterm.org) nightly | Bundled, current | Works |
|
|
92
|
+
| [Alacritty](https://alacritty.org) | Built-in, unless `conpty.dll` and `OpenConsole.exe` from Windows Terminal are next to `alacritty.exe` | Works only with those files |
|
|
93
|
+
| WezTerm 20240203 and older | Bundled, old | [Known issues](#known-issues) |
|
|
94
|
+
| Classic console (`cmd.exe` or PowerShell without Windows Terminal), mintty (Git Bash), ConEmu, Cmder, [Hyper](https://hyper.is), Windows OpenSSH | Built-in | [Known issues](#known-issues) |
|
|
95
|
+
|
|
96
|
+
## Configure Windows Terminal
|
|
97
|
+
|
|
98
|
+
Windows Terminal reserves or rewrites some modified keys. See [Windows Terminal](terminal-setup.md#windows-terminal) to configure `Shift+Enter` and `Alt+Enter`, and [Keybindings](keybindings.md) for Pi's Windows and WSL shortcut defaults.
|
|
99
|
+
|
|
100
|
+
## Known issues
|
|
101
|
+
|
|
102
|
+
These issues come from conhost. Microsoft has fixed them in its source, but has not said when the built-in conhost will get the fixes.
|
|
103
|
+
|
|
104
|
+
| Issue | Affects | Remedy |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| Switching from fullscreen to regular mode, or `Ctrl+G` from fullscreen, crashes the session ([#9186](https://github.com/earendil-works/pi/issues/9186), [microsoft/terminal#17515](https://github.com/microsoft/terminal/issues/17515)) | Built-in conhost | Use a terminal with a current conhost, or start Pi with `--tui-mode regular` |
|
|
107
|
+
| Text such as `;0;rgb:0000/0000/0000` appears in the prompt, and BEL opens the external editor ([#10256](https://github.com/earendil-works/pi/issues/10256)) | Built-in conhost behind another terminal: mintty, Windows OpenSSH | Use a terminal with a current conhost |
|
|
108
|
+
| Fragments such as `79` or `55` appear in the prompt ([#10717](https://github.com/earendil-works/pi/issues/10717)) | WezTerm 20240203 | Use WezTerm nightly |
|
|
109
|
+
| In regular mode, each keystroke redraws the input line on a new row ([#6300](https://github.com/earendil-works/pi/issues/6300)) | Built-in conhost, classic console | Use fullscreen mode (the default), or a terminal with a current conhost |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
Example code for the pi-coding-agent SDK, process integration, and extensions.
|
|
4
|
+
|
|
5
|
+
## CLI integration
|
|
6
|
+
|
|
7
|
+
[`rpc-client.ts`](rpc-client.ts) uses the typed `RpcClient` to run Pi in a child process, stream events, and wait for the run to settle.
|
|
8
|
+
|
|
9
|
+
Build the coding-agent package before running it from a repository checkout:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
node examples/rpc-client.ts "Explain this repository"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Directories
|
|
16
|
+
|
|
17
|
+
### [sdk/](sdk/)
|
|
18
|
+
Programmatic usage via `createAgentSession()`. Shows how to customize models, prompts, tools, extensions, and session management.
|
|
19
|
+
|
|
20
|
+
### [extensions/](extensions/)
|
|
21
|
+
Example extensions demonstrating:
|
|
22
|
+
- Lifecycle event handlers (tool interception, safety gates, context modifications)
|
|
23
|
+
- Custom tools (todo lists, questions, subagents, output truncation)
|
|
24
|
+
- Commands and keyboard shortcuts
|
|
25
|
+
- Custom UI (footers, headers, editors, overlays)
|
|
26
|
+
- Git integration (checkpoints, auto-commit)
|
|
27
|
+
- System prompt modifications and custom compaction
|
|
28
|
+
- External integrations (SSH, file watchers, system theme sync)
|
|
29
|
+
- Custom providers (Anthropic with custom streaming, GitLab Duo)
|
|
30
|
+
|
|
31
|
+
## Documentation
|
|
32
|
+
|
|
33
|
+
- [SDK Examples](sdk/README.md)
|
|
34
|
+
- [CLI Integration](../docs/cli-integration.md)
|
|
35
|
+
- [Extensions Documentation](../docs/extensions.md)
|
|
36
|
+
- [Skills Documentation](../docs/skills.md)
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Extension Examples
|
|
2
|
+
|
|
3
|
+
Example extensions for pi-coding-agent.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Load an extension with --extension flag
|
|
9
|
+
pi --extension examples/extensions/permission-gate.ts
|
|
10
|
+
|
|
11
|
+
# Or copy to extensions directory for auto-discovery
|
|
12
|
+
cp permission-gate.ts ~/.pi/agent/extensions/
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
### Lifecycle & Safety
|
|
18
|
+
|
|
19
|
+
| Extension | Description |
|
|
20
|
+
|-----------|-------------|
|
|
21
|
+
| `permission-gate.ts` | Prompts for confirmation before dangerous bash commands (rm -rf, sudo, etc.) |
|
|
22
|
+
| `project-trust.ts` | Demonstrates the `project_trust` event for user/global and CLI extensions |
|
|
23
|
+
| `protected-paths.ts` | Blocks writes to protected paths (.env, .git/, node_modules/) |
|
|
24
|
+
| `confirm-destructive.ts` | Confirms before destructive session actions (clear, switch, fork) |
|
|
25
|
+
| `dirty-repo-guard.ts` | Prevents session changes with uncommitted git changes |
|
|
26
|
+
| `gondolin/` | Route built-in tools and `!` commands into a Gondolin micro-VM |
|
|
27
|
+
|
|
28
|
+
For isolation setup and limitations, see [Run Pi in an isolated environment](../../docs/containerization.md).
|
|
29
|
+
|
|
30
|
+
### Custom Tools
|
|
31
|
+
|
|
32
|
+
| Extension | Description |
|
|
33
|
+
|-----------|-------------|
|
|
34
|
+
| `todo.ts` | Todo list tool + `/todos` command with custom rendering and state persistence |
|
|
35
|
+
| `hello.ts` | Minimal custom tool example |
|
|
36
|
+
| `question.ts` | Demonstrates `ctx.ui.select()` for asking the user questions with custom UI |
|
|
37
|
+
| `questionnaire.ts` | Multi-question input with tab bar navigation between questions |
|
|
38
|
+
| `tool-override.ts` | Override built-in tools (e.g., add logging/access control to `read`) |
|
|
39
|
+
| `dynamic-tools.ts` | Register tools after startup (`session_start`) and at runtime via command, with prompt snippets and tool-specific prompt guidelines |
|
|
40
|
+
| `structured-output.ts` | Final structured-output tool that returns `terminate: true` so the agent can end on the tool call |
|
|
41
|
+
| `built-in-tool-renderer.ts` | Custom compact rendering for built-in tools (read, bash, edit, write) while keeping original behavior |
|
|
42
|
+
| `minimal-mode.ts` | Override built-in tool rendering for minimal display (only tool calls, no output in collapsed mode) |
|
|
43
|
+
| `truncated-tool.ts` | Wraps ripgrep with proper output truncation (50KB/2000 lines) |
|
|
44
|
+
| `ssh.ts` | Delegate all tools to a remote machine via SSH using pluggable operations |
|
|
45
|
+
| `subagent/` | Delegate tasks to specialized subagents with isolated context windows |
|
|
46
|
+
|
|
47
|
+
### Commands & UI
|
|
48
|
+
|
|
49
|
+
| Extension | Description |
|
|
50
|
+
|-----------|-------------|
|
|
51
|
+
| `preset.ts` | Named presets for model, thinking level, tools, and instructions via `--preset` flag and `/preset` command |
|
|
52
|
+
| `plan-mode/` | Claude Code-style plan mode for read-only exploration with `/plan` command and step tracking |
|
|
53
|
+
| `tools.ts` | Interactive `/tools` command to enable/disable tools with session persistence |
|
|
54
|
+
| `handoff.ts` | Transfer context to a new focused session via `/handoff <goal>` |
|
|
55
|
+
| `qna.ts` | Extracts questions from last response into editor via `ctx.ui.setEditorText()` |
|
|
56
|
+
| `status-line.ts` | Shows turn progress in footer via `ctx.ui.setStatus()` with themed colors |
|
|
57
|
+
| `github-issue-autocomplete.ts` | Adds `#1234` issue completions by stacking a custom autocomplete provider that preloads open issues from `gh issue list` |
|
|
58
|
+
| `widget-placement.ts` | Shows widgets above and below the editor via `ctx.ui.setWidget()` placement |
|
|
59
|
+
| `hidden-thinking-label.ts` | Customizes the collapsed thinking label via `ctx.ui.setHiddenThinkingLabel()` |
|
|
60
|
+
| `working-indicator.ts` | Customizes the streaming working indicator via `ctx.ui.setWorkingIndicator()` |
|
|
61
|
+
| `model-status.ts` | Shows model changes in status bar via `model_select` hook |
|
|
62
|
+
| `snake.ts` | Snake game with custom UI, keyboard handling, and session persistence |
|
|
63
|
+
| `tic-tac-toe.ts` | Tic-tac-toe vs the agent with `executionMode: "sequential"` tools to prevent race conditions on shared cursor state |
|
|
64
|
+
| `send-user-message.ts` | Demonstrates `pi.sendUserMessage()` for sending user messages from extensions |
|
|
65
|
+
| `timed-confirm.ts` | Demonstrates AbortSignal for auto-dismissing `ctx.ui.confirm()` and `ctx.ui.select()` dialogs |
|
|
66
|
+
| `rpc-demo.ts` | Exercises all RPC-supported extension UI methods; pair with [`examples/rpc-extension-ui.ts`](../rpc-extension-ui.ts) |
|
|
67
|
+
| `modal-editor.ts` | Custom vim-like modal editor via `ctx.ui.setEditorComponent()` |
|
|
68
|
+
| `rainbow-editor.ts` | Animated rainbow text effect via custom editor |
|
|
69
|
+
| `notify.ts` | Desktop notifications via OSC 777 when agent finishes (Ghostty, iTerm2, WezTerm) |
|
|
70
|
+
| `titlebar-spinner.ts` | Braille spinner animation in terminal title while the agent is working |
|
|
71
|
+
| `summarize.ts` | Summarize conversation with GPT-5.2 and show in transient UI |
|
|
72
|
+
| `custom-footer.ts` | Custom footer with git branch and token stats via `ctx.ui.setFooter()` |
|
|
73
|
+
| `custom-header.ts` | Custom header via `ctx.ui.setHeader()` |
|
|
74
|
+
| `overlay-test.ts` | Test overlay compositing with inline text inputs and edge cases |
|
|
75
|
+
| `overlay-qa-tests.ts` | Comprehensive overlay QA tests: anchors, margins, stacking, overflow, animation |
|
|
76
|
+
| `doom-overlay/` | DOOM game running as an overlay at 35 FPS (demonstrates real-time game rendering) |
|
|
77
|
+
| `shutdown-command.ts` | Adds `/quit` command demonstrating `ctx.shutdown()` |
|
|
78
|
+
| `reload-runtime.ts` | Adds `/reload-runtime` and `reload_runtime` tool showing safe reload flow |
|
|
79
|
+
| `interactive-shell.ts` | Run interactive commands (vim, htop) with full terminal via `user_bash` hook |
|
|
80
|
+
| `inline-bash.ts` | Expands `!{command}` patterns in prompts via `input` event transformation |
|
|
81
|
+
| `input-transform-streaming.ts` | Skips expensive input preprocessing for mid-stream steering via `streamingBehavior` |
|
|
82
|
+
|
|
83
|
+
### Git Integration
|
|
84
|
+
|
|
85
|
+
| Extension | Description |
|
|
86
|
+
|-----------|-------------|
|
|
87
|
+
| `git-checkpoint.ts` | Creates git stash checkpoints at each turn for code restoration on fork |
|
|
88
|
+
| `auto-commit-on-exit.ts` | Auto-commits on exit using last assistant message for commit message |
|
|
89
|
+
|
|
90
|
+
### System Prompt & Compaction
|
|
91
|
+
|
|
92
|
+
| Extension | Description |
|
|
93
|
+
|-----------|-------------|
|
|
94
|
+
| `pirate.ts` | Demonstrates `systemPromptAppend` to dynamically modify system prompt |
|
|
95
|
+
| `claude-rules.ts` | Scans `.claude/rules/` folder and lists rules in system prompt |
|
|
96
|
+
| `custom-compaction.ts` | Custom compaction that summarizes entire conversation |
|
|
97
|
+
| `trigger-compact.ts` | Triggers compaction when context usage exceeds 100k tokens and adds `/trigger-compact` command |
|
|
98
|
+
|
|
99
|
+
### System Integration
|
|
100
|
+
|
|
101
|
+
| Extension | Description |
|
|
102
|
+
|-----------|-------------|
|
|
103
|
+
| `mac-system-theme.ts` | Syncs pi theme with macOS dark/light mode |
|
|
104
|
+
|
|
105
|
+
### Resources
|
|
106
|
+
|
|
107
|
+
| Extension | Description |
|
|
108
|
+
|-----------|-------------|
|
|
109
|
+
| `dynamic-resources/` | Loads skills, prompts, and themes using `resources_discover` |
|
|
110
|
+
|
|
111
|
+
### Messages & Communication
|
|
112
|
+
|
|
113
|
+
| Extension | Description |
|
|
114
|
+
|-----------|-------------|
|
|
115
|
+
| `message-renderer.ts` | Custom message rendering with colors and expandable details via `registerMessageRenderer` |
|
|
116
|
+
| `entry-renderer.ts` | TUI-only session entry rendering via `appendEntry` and `registerEntryRenderer` |
|
|
117
|
+
| `debug-provider.ts` | Toggle raw provider stream capture with `/debug-provider` and inspect each assistant message in a TUI-only session entry |
|
|
118
|
+
| `event-bus.ts` | Inter-extension communication via `pi.events` |
|
|
119
|
+
|
|
120
|
+
### Session Metadata
|
|
121
|
+
|
|
122
|
+
| Extension | Description |
|
|
123
|
+
|-----------|-------------|
|
|
124
|
+
| `session-name.ts` | Name sessions for the session selector via `setSessionName` |
|
|
125
|
+
| `bookmark.ts` | Bookmark entries with labels for `/tree` navigation via `setLabel` |
|
|
126
|
+
|
|
127
|
+
### Custom Providers
|
|
128
|
+
|
|
129
|
+
| Extension | Description |
|
|
130
|
+
|-----------|-------------|
|
|
131
|
+
| `custom-provider-anthropic/` | Custom Anthropic provider with OAuth support and custom streaming implementation |
|
|
132
|
+
| `custom-provider-gitlab-duo/` | GitLab Duo provider using pi-ai's built-in Anthropic/OpenAI streaming via proxy |
|
|
133
|
+
| `jev-router.ts` | Virtual model via `registerVirtualModel` that plans on Codex Sol or Terra (picked by the Jev classifier) and switches to Luna after the first edit |
|
|
134
|
+
|
|
135
|
+
### External Dependencies
|
|
136
|
+
|
|
137
|
+
| Extension | Description |
|
|
138
|
+
|-----------|-------------|
|
|
139
|
+
| `with-deps/` | Extension with its own package.json and dependencies (demonstrates jiti module resolution) |
|
|
140
|
+
| `file-trigger.ts` | Watches a trigger file and injects contents into conversation |
|
|
141
|
+
|
|
142
|
+
## Writing Extensions
|
|
143
|
+
|
|
144
|
+
See [docs/extensions.md](../../docs/extensions.md) for full documentation.
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
import type { ExtensionAPI } from "@dc99-tech/pi-agent-port";
|
|
148
|
+
import { Type } from "typebox";
|
|
149
|
+
|
|
150
|
+
export default function (pi: ExtensionAPI) {
|
|
151
|
+
// Subscribe to lifecycle events
|
|
152
|
+
pi.on("tool_call", async (event, ctx) => {
|
|
153
|
+
if (event.toolName === "bash" && event.input.command?.includes("rm -rf")) {
|
|
154
|
+
const ok = await ctx.ui.confirm("Dangerous!", "Allow rm -rf?");
|
|
155
|
+
if (!ok) return { block: true, reason: "Blocked by user" };
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// Register custom tools
|
|
160
|
+
pi.registerTool({
|
|
161
|
+
name: "greet",
|
|
162
|
+
label: "Greeting",
|
|
163
|
+
description: "Generate a greeting",
|
|
164
|
+
parameters: Type.Object({
|
|
165
|
+
name: Type.String({ description: "Name to greet" }),
|
|
166
|
+
}),
|
|
167
|
+
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
168
|
+
return {
|
|
169
|
+
content: [{ type: "text", text: `Hello, ${params.name}!` }],
|
|
170
|
+
details: {},
|
|
171
|
+
};
|
|
172
|
+
},
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
// Register commands
|
|
176
|
+
pi.registerCommand("hello", {
|
|
177
|
+
description: "Say hello",
|
|
178
|
+
handler: async (args, ctx) => {
|
|
179
|
+
ctx.ui.notify("Hello!", "info");
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Key Patterns
|
|
186
|
+
|
|
187
|
+
**Use StringEnum for string parameters** (required for Google API compatibility):
|
|
188
|
+
```typescript
|
|
189
|
+
import { StringEnum } from "@dc99-tech/pi-ai";
|
|
190
|
+
|
|
191
|
+
// Good
|
|
192
|
+
action: StringEnum(["list", "add"] as const)
|
|
193
|
+
|
|
194
|
+
// Bad - doesn't work with Google
|
|
195
|
+
action: Type.Union([Type.Literal("list"), Type.Literal("add")])
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**State persistence via details:**
|
|
199
|
+
```typescript
|
|
200
|
+
// Store state in tool result details for proper forking support
|
|
201
|
+
return {
|
|
202
|
+
content: [{ type: "text", text: "Done" }],
|
|
203
|
+
details: { todos: [...todos], nextId }, // Persisted in session
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
// Reconstruct on session events
|
|
207
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
208
|
+
for (const entry of ctx.sessionManager.getBranch()) {
|
|
209
|
+
if (entry.type === "message" && entry.message.toolName === "my_tool") {
|
|
210
|
+
const details = entry.message.details;
|
|
211
|
+
// Reconstruct state from details
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-Commit on Exit Extension
|
|
3
|
+
*
|
|
4
|
+
* Automatically commits changes when the agent exits.
|
|
5
|
+
* Uses the last assistant message to generate a commit message.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ExtensionAPI } from "@dc99-tech/pi-agent-port";
|
|
9
|
+
|
|
10
|
+
export default function (pi: ExtensionAPI) {
|
|
11
|
+
pi.on("session_shutdown", async (_event, ctx) => {
|
|
12
|
+
// Check for uncommitted changes
|
|
13
|
+
const { stdout: status, code } = await pi.exec("git", ["status", "--porcelain"]);
|
|
14
|
+
|
|
15
|
+
if (code !== 0 || status.trim().length === 0) {
|
|
16
|
+
// Not a git repo or no changes
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Find the last assistant message for commit context
|
|
21
|
+
const entries = ctx.sessionManager.getEntries();
|
|
22
|
+
let lastAssistantText = "";
|
|
23
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
24
|
+
const entry = entries[i];
|
|
25
|
+
if (entry.type === "message" && entry.message.role === "assistant") {
|
|
26
|
+
const content = entry.message.content;
|
|
27
|
+
if (Array.isArray(content)) {
|
|
28
|
+
lastAssistantText = content
|
|
29
|
+
.filter((c): c is { type: "text"; text: string } => c.type === "text")
|
|
30
|
+
.map((c) => c.text)
|
|
31
|
+
.join("\n");
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Generate a simple commit message
|
|
38
|
+
const firstLine = lastAssistantText.split("\n")[0] || "Work in progress";
|
|
39
|
+
const commitMessage = `[pi] ${firstLine.slice(0, 50)}${firstLine.length > 50 ? "..." : ""}`;
|
|
40
|
+
|
|
41
|
+
// Stage and commit
|
|
42
|
+
await pi.exec("git", ["add", "-A"]);
|
|
43
|
+
const { code: commitCode } = await pi.exec("git", ["commit", "-m", commitMessage]);
|
|
44
|
+
|
|
45
|
+
if (commitCode === 0 && ctx.hasUI) {
|
|
46
|
+
ctx.ui.notify(`Auto-committed: ${commitMessage}`, "info");
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bash Spawn Hook Example
|
|
3
|
+
*
|
|
4
|
+
* Adjusts command, cwd, and env before execution.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* pi -e ./bash-spawn-hook.ts
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { ExtensionAPI } from "@dc99-tech/pi-agent-port";
|
|
11
|
+
import { createBashTool } from "@dc99-tech/pi-agent-port";
|
|
12
|
+
|
|
13
|
+
export default function (pi: ExtensionAPI) {
|
|
14
|
+
const cwd = process.cwd();
|
|
15
|
+
|
|
16
|
+
const bashTool = createBashTool(cwd, {
|
|
17
|
+
spawnHook: ({ command, cwd, env }) => ({
|
|
18
|
+
command: `source ~/.profile\n${command}`,
|
|
19
|
+
cwd,
|
|
20
|
+
env: { ...env, PI_SPAWN_HOOK: "1" },
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
pi.registerTool({
|
|
25
|
+
...bashTool,
|
|
26
|
+
execute: async (id, params, signal, onUpdate, _ctx) => {
|
|
27
|
+
return bashTool.execute(id, params, signal, onUpdate);
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entry bookmarking example.
|
|
3
|
+
*
|
|
4
|
+
* Shows setLabel to mark entries with labels for easy navigation in /tree.
|
|
5
|
+
* Labels appear in the tree view and help you find important points.
|
|
6
|
+
*
|
|
7
|
+
* Usage: /bookmark [label] - bookmark the last assistant message
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { ExtensionAPI } from "@dc99-tech/pi-agent-port";
|
|
11
|
+
|
|
12
|
+
export default function (pi: ExtensionAPI) {
|
|
13
|
+
pi.registerCommand("bookmark", {
|
|
14
|
+
description: "Bookmark last message (usage: /bookmark [label])",
|
|
15
|
+
handler: async (args, ctx) => {
|
|
16
|
+
const label = args.trim() || `bookmark-${Date.now()}`;
|
|
17
|
+
|
|
18
|
+
// Find the last assistant message entry
|
|
19
|
+
const entries = ctx.sessionManager.getEntries();
|
|
20
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
21
|
+
const entry = entries[i];
|
|
22
|
+
if (entry.type === "message" && entry.message.role === "assistant") {
|
|
23
|
+
pi.setLabel(entry.id, label);
|
|
24
|
+
ctx.ui.notify(`Bookmarked as: ${label}`, "info");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
ctx.ui.notify("No assistant message to bookmark", "warning");
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Remove bookmark
|
|
34
|
+
pi.registerCommand("unbookmark", {
|
|
35
|
+
description: "Remove bookmark from last labeled entry",
|
|
36
|
+
handler: async (_args, ctx) => {
|
|
37
|
+
const entries = ctx.sessionManager.getEntries();
|
|
38
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
39
|
+
const entry = entries[i];
|
|
40
|
+
const label = ctx.sessionManager.getLabel(entry.id);
|
|
41
|
+
if (label) {
|
|
42
|
+
pi.setLabel(entry.id, undefined);
|
|
43
|
+
ctx.ui.notify(`Removed bookmark: ${label}`, "info");
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
ctx.ui.notify("No bookmarked entry found", "warning");
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CustomEditor,
|
|
3
|
+
type ExtensionAPI,
|
|
4
|
+
type ExtensionContext,
|
|
5
|
+
type KeybindingsManager,
|
|
6
|
+
} from "@dc99-tech/pi-agent-port";
|
|
7
|
+
import type { Component, EditorTheme, TUI } from "@dc99-tech/pi-tui";
|
|
8
|
+
import { truncateToWidth, visibleWidth } from "@dc99-tech/pi-tui";
|
|
9
|
+
|
|
10
|
+
function fitBorder(
|
|
11
|
+
left: string,
|
|
12
|
+
right: string,
|
|
13
|
+
width: number,
|
|
14
|
+
border: (text: string) => string,
|
|
15
|
+
fill: (text: string) => string = border,
|
|
16
|
+
): string {
|
|
17
|
+
if (width <= 0) return "";
|
|
18
|
+
if (width === 1) return border("─");
|
|
19
|
+
|
|
20
|
+
let leftText = left;
|
|
21
|
+
let rightText = right;
|
|
22
|
+
const fixedWidth = 2;
|
|
23
|
+
const minimumGap = 3;
|
|
24
|
+
|
|
25
|
+
while (
|
|
26
|
+
fixedWidth + visibleWidth(leftText) + visibleWidth(rightText) + minimumGap > width &&
|
|
27
|
+
visibleWidth(rightText) > 0
|
|
28
|
+
) {
|
|
29
|
+
rightText = truncateToWidth(rightText, Math.max(0, visibleWidth(rightText) - 1), "");
|
|
30
|
+
}
|
|
31
|
+
while (
|
|
32
|
+
fixedWidth + visibleWidth(leftText) + visibleWidth(rightText) + minimumGap > width &&
|
|
33
|
+
visibleWidth(leftText) > 0
|
|
34
|
+
) {
|
|
35
|
+
leftText = truncateToWidth(leftText, Math.max(0, visibleWidth(leftText) - 1), "");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const gapWidth = Math.max(0, width - fixedWidth - visibleWidth(leftText) - visibleWidth(rightText));
|
|
39
|
+
return `${border("─")}${leftText}${fill("─".repeat(gapWidth))}${rightText}${border("─")}`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function formatCwd(cwd: string): string {
|
|
43
|
+
const home = process.env.HOME;
|
|
44
|
+
if (home && cwd.startsWith(home)) {
|
|
45
|
+
return `~${cwd.slice(home.length)}`;
|
|
46
|
+
}
|
|
47
|
+
return cwd;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function formatContext(ctx: ExtensionContext): string {
|
|
51
|
+
const usage = ctx.getContextUsage();
|
|
52
|
+
const contextWindow = usage?.contextWindow ?? ctx.model?.contextWindow;
|
|
53
|
+
if (!contextWindow || !usage || usage.percent === null) {
|
|
54
|
+
return "ctx ?";
|
|
55
|
+
}
|
|
56
|
+
return `ctx ${Math.round(usage.percent)}%/${(contextWindow / 1000).toFixed(0)}k`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function formatThinking(level: string): string {
|
|
60
|
+
return level === "off" ? "off" : level;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
class EmptyFooter implements Component {
|
|
64
|
+
render(): string[] {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
invalidate(): void {}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default function (pi: ExtensionAPI) {
|
|
72
|
+
let isWorking = false;
|
|
73
|
+
let spinnerIndex = 0;
|
|
74
|
+
let spinnerTimer: ReturnType<typeof setInterval> | undefined;
|
|
75
|
+
let activeTui: TUI | undefined;
|
|
76
|
+
const spinnerFrames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
77
|
+
|
|
78
|
+
const stopSpinner = () => {
|
|
79
|
+
if (spinnerTimer) {
|
|
80
|
+
clearInterval(spinnerTimer);
|
|
81
|
+
spinnerTimer = undefined;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
pi.on("agent_start", () => {
|
|
86
|
+
isWorking = true;
|
|
87
|
+
stopSpinner();
|
|
88
|
+
spinnerTimer = setInterval(() => {
|
|
89
|
+
spinnerIndex = (spinnerIndex + 1) % spinnerFrames.length;
|
|
90
|
+
activeTui?.requestRender();
|
|
91
|
+
}, 80);
|
|
92
|
+
activeTui?.requestRender();
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
pi.on("agent_settled", () => {
|
|
96
|
+
isWorking = false;
|
|
97
|
+
stopSpinner();
|
|
98
|
+
activeTui?.requestRender();
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
pi.on("session_shutdown", () => {
|
|
102
|
+
stopSpinner();
|
|
103
|
+
activeTui = undefined;
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
pi.on("session_start", (_event, ctx) => {
|
|
107
|
+
ctx.ui.setWorkingVisible(false);
|
|
108
|
+
ctx.ui.setFooter(() => new EmptyFooter());
|
|
109
|
+
|
|
110
|
+
let branch: string | undefined;
|
|
111
|
+
|
|
112
|
+
const refreshBranch = async () => {
|
|
113
|
+
const result = await pi.exec("git", ["branch", "--show-current"], { cwd: ctx.cwd }).catch(() => undefined);
|
|
114
|
+
const stdout = result?.stdout.trim();
|
|
115
|
+
branch = stdout && stdout.length > 0 ? stdout : undefined;
|
|
116
|
+
activeTui?.requestRender();
|
|
117
|
+
};
|
|
118
|
+
void refreshBranch();
|
|
119
|
+
|
|
120
|
+
class BorderStatusEditor extends CustomEditor {
|
|
121
|
+
constructor(tui: TUI, theme: EditorTheme, keybindings: KeybindingsManager) {
|
|
122
|
+
super(tui, theme, keybindings, { paddingX: 0 });
|
|
123
|
+
activeTui = tui;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
render(width: number): string[] {
|
|
127
|
+
const lines = super.render(width);
|
|
128
|
+
if (lines.length < 2) return lines;
|
|
129
|
+
|
|
130
|
+
const thm = ctx.ui.theme;
|
|
131
|
+
const model = ctx.model ? `${ctx.model.provider}/${ctx.model.id}` : "no model";
|
|
132
|
+
const thinking = pi.getThinkingLevel();
|
|
133
|
+
const topLeft = isWorking ? thm.fg("accent", ` ${spinnerFrames[spinnerIndex]} `) : "";
|
|
134
|
+
const topRight = "";
|
|
135
|
+
const bottomLeft = thm.fg("muted", ` ${model} · ${formatThinking(thinking)} `);
|
|
136
|
+
const bottomRight = thm.fg(
|
|
137
|
+
"muted",
|
|
138
|
+
` ${formatContext(ctx)} · ${formatCwd(ctx.cwd)}${branch ? ` (${branch})` : ""} `,
|
|
139
|
+
);
|
|
140
|
+
const borderColor = (text: string) => this.borderColor(text);
|
|
141
|
+
|
|
142
|
+
lines[0] = fitBorder(topLeft, topRight, width, borderColor);
|
|
143
|
+
lines[lines.length - 1] = fitBorder(bottomLeft, bottomRight, width, borderColor);
|
|
144
|
+
return lines;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
ctx.ui.setEditorComponent((tui, theme, keybindings) => new BorderStatusEditor(tui, theme, keybindings));
|
|
149
|
+
});
|
|
150
|
+
}
|