@psnext/slingcli 2.5.20260623-1 → 2.5.20260705-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@aws/lambda-invoke-store/README.md +25 -1
- package/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js +12 -0
- package/node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js +12 -0
- package/node_modules/@aws/lambda-invoke-store/dist-types/invoke-store.d.ts +6 -0
- package/node_modules/@aws/lambda-invoke-store/package.json +1 -1
- package/node_modules/@aws-sdk/core/account-id-endpoint.d.ts +1 -3
- package/node_modules/@aws-sdk/core/client.d.ts +1 -3
- package/node_modules/@aws-sdk/core/httpAuthSchemes.d.ts +1 -3
- package/node_modules/@aws-sdk/core/package.json +10 -17
- package/node_modules/@aws-sdk/core/protocols.d.ts +1 -3
- package/node_modules/@aws-sdk/core/util.d.ts +1 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +172 -1
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +3 -51
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-http/package.json +8 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +58 -3
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -8
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-websocket/package.json +7 -7
- package/node_modules/@aws-sdk/nested-clients/cognito-identity.d.ts +1 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +13 -25
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +13 -17
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +12 -15
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +12 -15
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +13 -25
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/commandBuilder.js +6 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.js +2 -14
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/commands/GetIdCommand.js +2 -14
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/index.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.browser.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.native.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commandBuilder.js +8 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +2 -17
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/index.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.browser.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.native.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commandBuilder.js +6 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js +2 -14
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/index.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.browser.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.native.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commandBuilder.js +6 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js +2 -14
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.browser.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.native.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commandBuilder.js +6 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js +2 -14
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js +2 -14
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.browser.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.native.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/commandBuilder.d.ts +18 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.d.ts +3 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/commands/GetIdCommand.d.ts +3 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.shared.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commandBuilder.d.ts +18 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +3 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.shared.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/commandBuilder.d.ts +18 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/commands/GetRoleCredentialsCommand.d.ts +3 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.shared.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/commandBuilder.d.ts +18 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/commands/CreateTokenCommand.d.ts +3 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.shared.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commandBuilder.d.ts +18 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleCommand.d.ts +3 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.shared.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/commandBuilder.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.d.ts +7 -16
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/commands/GetIdCommand.d.ts +7 -16
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.shared.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/commandBuilder.d.ts +42 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +3 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.browser.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.native.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.shared.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/commandBuilder.d.ts +42 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/commands/GetRoleCredentialsCommand.d.ts +3 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.shared.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/commandBuilder.d.ts +42 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/commands/CreateTokenCommand.d.ts +3 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.shared.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/commandBuilder.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/commands/AssumeRoleCommand.d.ts +7 -16
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +7 -16
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +8 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.shared.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +3 -51
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/package.json +8 -10
- package/node_modules/@aws-sdk/nested-clients/signin.d.ts +1 -3
- package/node_modules/@aws-sdk/nested-clients/sso-oidc.d.ts +1 -3
- package/node_modules/@aws-sdk/nested-clients/sso.d.ts +1 -3
- package/node_modules/@aws-sdk/nested-clients/sts.d.ts +1 -3
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +236 -3
- package/node_modules/@aws-sdk/xml-builder/package.json +3 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +10 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +9 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +20 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +2 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +51 -47
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +11 -17
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +25 -11
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare.js +0 -18
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +8 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +8 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +68 -43
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +38 -29
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +189 -204
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +26 -35
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +4 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +11 -2
- package/node_modules/@earendil-works/pi-ai/dist/auth/helpers.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +19 -4
- package/node_modules/@earendil-works/pi-ai/dist/compat.js +81 -7
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +60 -45
- package/node_modules/@earendil-works/pi-ai/dist/images-models.js +7 -3
- package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/legacy-api-aliases.js +49 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.js +7 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +149 -12
- package/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +18 -34
- package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +20 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +39 -9
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-auth.js +85 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js +13 -13
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +1 -20
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +20 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +57 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +72 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +23 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +16 -16
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +90 -17
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +390 -102
- package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +39 -20
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +389 -80
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +7 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +12 -12
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +12 -12
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +12 -12
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +15 -15
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +109 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js +95 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.js +10 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js +15 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +87 -0
- package/node_modules/@earendil-works/pi-ai/package.json +1 -33
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.js +13 -25
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +50 -34
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +13 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +11 -11
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +11 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +33 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js +28 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +2 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +15 -18
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +0 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +96 -73
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +19 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/timings.js +24 -14
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +20 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +12 -25
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +20 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +23 -15
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js +52 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +12 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/session-selector.js +14 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +13 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js +60 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.js +19 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +180 -155
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +14 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +16 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/rpc-entry.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-convert.js +21 -15
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-process.js +83 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/mime.js +41 -0
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -12
- package/node_modules/@earendil-works/pi-coding-agent/package.json +8 -5
- package/node_modules/@earendil-works/pi-orchestrator/dist/cli.js +136 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/config.js +55 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/handler.js +105 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/index.js +11 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/ipc/client.js +56 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/ipc/protocol.js +12 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/ipc/server.js +145 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/radius.js +365 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/rpc-process.js +168 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/serve.js +70 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/storage.js +58 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/supervisor.js +290 -0
- package/node_modules/@earendil-works/pi-orchestrator/dist/types.js +2 -0
- package/node_modules/@earendil-works/pi-orchestrator/package.json +45 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +3 -0
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +358 -145
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +462 -142
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +358 -145
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +18 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +108 -63
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +11 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +5 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +30 -36
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +85 -137
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +30 -36
- package/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js +30 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js +24 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.browser.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.native.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Js.js +92 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Node.js +29 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Js.js +179 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Node.js +59 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256WebCrypto.js +71 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client-command-builder.js +17 -0
- package/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/config.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getInstanceMetadataRegion.js +92 -0
- package/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js +3 -56
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js +5 -3
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js +7 -6
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js +15 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js +35 -27
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js +12 -38
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js +18 -33
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.browser.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/crc32/Crc32Js.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/crc32/Crc32Node.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/index.browser.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/checksum/index.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/checksum/index.native.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5/Md5Js.d.ts +19 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5/Md5Node.d.ts +17 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256Js.d.ts +28 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256Node.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256WebCrypto.d.ts +22 -0
- package/node_modules/@smithy/core/dist-types/submodules/client/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/client-command-builder.d.ts +22 -0
- package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/command.d.ts +5 -6
- package/node_modules/@smithy/core/dist-types/submodules/config/config-resolver/regionConfig/getInstanceMetadataRegion.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/submodules/config/defaults-mode/constants.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/index.browser.d.ts +4 -5
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/index.d.ts +4 -5
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromInstructions.d.ts +3 -4
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/middleware-endpoint/endpointMiddleware.d.ts +1 -2
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/middleware-endpoint/getEndpointPlugin.d.ts +1 -2
- package/node_modules/@smithy/core/dist-types/submodules/serde/concatBytes.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/checksum/ChecksumStream.d.ts +29 -12
- package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/stream-collector.browser.d.ts +8 -2
- package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/stream-collector.d.ts +4 -1
- package/node_modules/@smithy/core/package.json +5 -5
- package/node_modules/@smithy/credential-provider-imds/package.json +3 -3
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -55
- package/node_modules/@smithy/fetch-http-handler/dist-es/index.js +2 -2
- package/node_modules/@smithy/fetch-http-handler/dist-types/index.d.ts +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +4 -4
- package/node_modules/@smithy/signature-v4/package.json +3 -4
- package/node_modules/@smithy/types/dist-types/index.d.ts +1 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/buffer.d.ts +64 -25
- package/node_modules/@types/node/crypto.d.ts +18 -5
- package/node_modules/@types/node/diagnostics_channel.d.ts +254 -23
- package/node_modules/@types/node/dns.d.ts +1 -1
- package/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/@types/node/fs/promises.d.ts +3 -0
- package/node_modules/@types/node/fs.d.ts +21 -6
- package/node_modules/@types/node/http.d.ts +25 -0
- package/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/process.d.ts +14 -1
- package/node_modules/@types/node/quic.d.ts +92 -11
- package/node_modules/@types/node/sqlite.d.ts +55 -0
- package/node_modules/@types/node/stream/iter.d.ts +150 -0
- package/node_modules/@types/node/stream.d.ts +32 -0
- package/node_modules/@types/node/test.d.ts +112 -2
- package/node_modules/@types/node/ts5.6/index.d.ts +1 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -0
- package/node_modules/@types/node/util.d.ts +19 -2
- package/node_modules/@types/node/v8.d.ts +84 -2
- package/node_modules/@types/node/worker_threads.d.ts +8 -7
- package/node_modules/brace-expansion/dist/commonjs/index.js +24 -14
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +24 -14
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +2 -2
- package/node_modules/google-auth-library/build/src/auth/googleauth.js +1 -1
- package/node_modules/google-auth-library/package.json +4 -4
- package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +5 -2
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/protobufjs/src/parse.js +3 -0
- package/package.json +7 -6
- package/slingshot/index.js +293 -295
- package/node_modules/@aws-crypto/crc32/CHANGELOG.md +0 -100
- package/node_modules/@aws-crypto/crc32/LICENSE +0 -201
- package/node_modules/@aws-crypto/crc32/README.md +0 -16
- package/node_modules/@aws-crypto/crc32/build/main/aws_crc32.d.ts +0 -7
- package/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js +0 -31
- package/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js.map +0 -1
- package/node_modules/@aws-crypto/crc32/build/main/index.d.ts +0 -7
- package/node_modules/@aws-crypto/crc32/build/main/index.js +0 -108
- package/node_modules/@aws-crypto/crc32/build/main/index.js.map +0 -1
- package/node_modules/@aws-crypto/crc32/build/module/aws_crc32.d.ts +0 -7
- package/node_modules/@aws-crypto/crc32/build/module/aws_crc32.js +0 -28
- package/node_modules/@aws-crypto/crc32/build/module/aws_crc32.js.map +0 -1
- package/node_modules/@aws-crypto/crc32/build/module/index.d.ts +0 -7
- package/node_modules/@aws-crypto/crc32/build/module/index.js +0 -103
- package/node_modules/@aws-crypto/crc32/build/module/index.js.map +0 -1
- package/node_modules/@aws-crypto/crc32/package.json +0 -32
- package/node_modules/@aws-crypto/crc32/src/aws_crc32.ts +0 -24
- package/node_modules/@aws-crypto/crc32/src/index.ts +0 -92
- package/node_modules/@aws-crypto/crc32/tsconfig.json +0 -9
- package/node_modules/@aws-crypto/crc32/tsconfig.module.json +0 -7
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +0 -869
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +0 -862
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +0 -42
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +0 -27
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +0 -71
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +0 -49
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +0 -13
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -5
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +0 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +0 -29
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +0 -25
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -5
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +0 -7
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +0 -57
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +0 -234
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js +0 -44
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5-js/constants.js +0 -3
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5-js/md5.js +0 -168
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5-js/constants.d.ts +0 -12
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5-js/md5.d.ts +0 -16
- package/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +0 -53
- package/node_modules/@smithy/fetch-http-handler/dist-types/stream-collector.d.ts +0 -2
- /package/node_modules/@smithy/{core/dist-es/submodules/endpoints/middleware-endpoint/types.js → types/dist-es/endpoints/EndpointParameterInstructions.js} +0 -0
- /package/node_modules/@smithy/{core/dist-types/submodules/endpoints/middleware-endpoint/types.d.ts → types/dist-types/endpoints/EndpointParameterInstructions.d.ts} +0 -0
|
@@ -6,7 +6,7 @@ import { Type } from "typebox";
|
|
|
6
6
|
import { getReadmePath } from "../../config.js";
|
|
7
7
|
import { keyHint, keyText } from "../../modes/interactive/components/keybinding-hints.js";
|
|
8
8
|
import { getLanguageFromPath, highlightCode } from "../../modes/interactive/theme/theme.js";
|
|
9
|
-
import {
|
|
9
|
+
import { processImage } from "../../utils/image-process.js";
|
|
10
10
|
import { detectSupportedImageMimeTypeFromFile } from "../../utils/mime.js";
|
|
11
11
|
import { formatPathRelativeToCwdOrAbsolute } from "../../utils/paths.js";
|
|
12
12
|
import { resolveReadPathAsync, resolveToCwd } from "./path-utils.js";
|
|
@@ -133,7 +133,7 @@ export function createReadToolDefinition(cwd, options) {
|
|
|
133
133
|
return {
|
|
134
134
|
name: "read",
|
|
135
135
|
label: "read",
|
|
136
|
-
description: `Read the contents of a file. Supports text files and images (jpg, png, gif, webp). Images are sent as attachments. For text files, output is truncated to ${DEFAULT_MAX_LINES} lines or ${DEFAULT_MAX_BYTES / 1024}KB (whichever is hit first). Use offset/limit for large files. When you need the full file, continue with offset until complete.`,
|
|
136
|
+
description: `Read the contents of a file. Supports text files and images (jpg, png, gif, webp, bmp). Images are sent as attachments. For text files, output is truncated to ${DEFAULT_MAX_LINES} lines or ${DEFAULT_MAX_BYTES / 1024}KB (whichever is hit first). Use offset/limit for large files. When you need the full file, continue with offset until complete.`,
|
|
137
137
|
promptSnippet: "Read file contents",
|
|
138
138
|
promptGuidelines: ["Use read to examine files instead of cat or sed."],
|
|
139
139
|
parameters: readSchema,
|
|
@@ -165,35 +165,22 @@ export function createReadToolDefinition(cwd, options) {
|
|
|
165
165
|
if (mimeType) {
|
|
166
166
|
// Read image as binary.
|
|
167
167
|
const buffer = await ops.readFile(absolutePath);
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
textNote += `\n${nonVisionImageNote}`;
|
|
175
|
-
content = [{ type: "text", text: textNote }];
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
const dimensionNote = formatDimensionNote(resized);
|
|
179
|
-
let textNote = `Read image file [${resized.mimeType}]`;
|
|
180
|
-
if (dimensionNote)
|
|
181
|
-
textNote += `\n${dimensionNote}`;
|
|
182
|
-
if (nonVisionImageNote)
|
|
183
|
-
textNote += `\n${nonVisionImageNote}`;
|
|
184
|
-
content = [
|
|
185
|
-
{ type: "text", text: textNote },
|
|
186
|
-
{ type: "image", data: resized.data, mimeType: resized.mimeType },
|
|
187
|
-
];
|
|
188
|
-
}
|
|
168
|
+
const processed = await processImage(buffer, mimeType, { autoResizeImages });
|
|
169
|
+
if (!processed.ok) {
|
|
170
|
+
let textNote = `Read image file [${mimeType}]\n${processed.message}`;
|
|
171
|
+
if (nonVisionImageNote)
|
|
172
|
+
textNote += `\n${nonVisionImageNote}`;
|
|
173
|
+
content = [{ type: "text", text: textNote }];
|
|
189
174
|
}
|
|
190
175
|
else {
|
|
191
|
-
let textNote = `Read image file [${mimeType}]`;
|
|
176
|
+
let textNote = `Read image file [${processed.mimeType}]`;
|
|
177
|
+
if (processed.hints.length > 0)
|
|
178
|
+
textNote += `\n${processed.hints.join("\n")}`;
|
|
192
179
|
if (nonVisionImageNote)
|
|
193
180
|
textNote += `\n${nonVisionImageNote}`;
|
|
194
181
|
content = [
|
|
195
182
|
{ type: "text", text: textNote },
|
|
196
|
-
{ type: "image", data:
|
|
183
|
+
{ type: "image", data: processed.data, mimeType: processed.mimeType },
|
|
197
184
|
];
|
|
198
185
|
}
|
|
199
186
|
}
|
|
@@ -11,6 +11,7 @@ export { createEventBus } from "./core/event-bus.js";
|
|
|
11
11
|
export { createExtensionRuntime, defineTool, discoverAndLoadExtensions, ExtensionRunner, isBashToolResult, isEditToolResult, isFindToolResult, isGrepToolResult, isLsToolResult, isReadToolResult, isToolCallEventType, isWriteToolResult, wrapRegisteredTool, wrapRegisteredTools, } from "./core/extensions/index.js";
|
|
12
12
|
export { convertToLlm } from "./core/messages.js";
|
|
13
13
|
export { ModelRegistry } from "./core/model-registry.js";
|
|
14
|
+
export { resolveCliModel, resolveModelScopeWithDiagnostics, } from "./core/model-resolver.js";
|
|
14
15
|
export { DefaultPackageManager } from "./core/package-manager.js";
|
|
15
16
|
export { DefaultResourceLoader, loadProjectContextFiles } from "./core/resource-loader.js";
|
|
16
17
|
// SDK for programmatic usage
|
|
@@ -19,7 +20,7 @@ export { AgentSessionRuntime,
|
|
|
19
20
|
createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createBashTool,
|
|
20
21
|
// Tool factories (for custom cwd)
|
|
21
22
|
createCodingTools, createEditTool, createFindTool, createGrepTool, createLsTool, createReadOnlyTools, createReadTool, createWriteTool, } from "./core/sdk.js";
|
|
22
|
-
export { buildSessionContext, CURRENT_SESSION_VERSION, getLatestCompactionEntry, migrateSessionEntries, parseSessionEntries, SessionManager, } from "./core/session-manager.js";
|
|
23
|
+
export { buildContextEntries, buildSessionContext, CURRENT_SESSION_VERSION, getLatestCompactionEntry, migrateSessionEntries, parseSessionEntries, SessionManager, sessionEntryToContextMessages, } from "./core/session-manager.js";
|
|
23
24
|
export { SettingsManager, } from "./core/settings-manager.js";
|
|
24
25
|
// Skills
|
|
25
26
|
export { formatSkillsForPrompt, loadSkills, loadSkillsFromDir, } from "./core/skills.js";
|
|
@@ -35,6 +35,7 @@ import { initTheme, stopThemeWatcher } from "./modes/interactive/theme/theme.js"
|
|
|
35
35
|
import { handleConfigCommand, handlePackageCommand } from "./package-manager-cli.js";
|
|
36
36
|
import { isLocalPath, normalizePath, resolvePath } from "./utils/paths.js";
|
|
37
37
|
import { cleanupWindowsSelfUpdateQuarantine } from "./utils/windows-self-update.js";
|
|
38
|
+
const EXTENSION_LOAD_FAILURE_HINT = 'Hint: Start without extensions using "pi -ne".';
|
|
38
39
|
/**
|
|
39
40
|
* Read all content from piped stdin.
|
|
40
41
|
* Returns undefined if stdin is a TTY (interactive terminal).
|
|
@@ -167,7 +168,6 @@ function validateSessionIdFlags(parsed) {
|
|
|
167
168
|
parsed.session ? "--session" : undefined,
|
|
168
169
|
parsed.continue ? "--continue" : undefined,
|
|
169
170
|
parsed.resume ? "--resume" : undefined,
|
|
170
|
-
parsed.noSession ? "--no-session" : undefined,
|
|
171
171
|
].filter((flag) => flag !== undefined);
|
|
172
172
|
if (conflictingFlags.length > 0) {
|
|
173
173
|
console.error(chalk.red(`Error: --session-id cannot be combined with ${conflictingFlags.join(", ")}`));
|
|
@@ -182,6 +182,16 @@ function validateSessionIdFlags(parsed) {
|
|
|
182
182
|
process.exit(1);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
+
function openSessionOrExit(path, sessionDir) {
|
|
186
|
+
try {
|
|
187
|
+
return SessionManager.open(path, sessionDir);
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
191
|
+
console.error(chalk.red(`Error: ${message}`));
|
|
192
|
+
process.exit(1);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
185
195
|
function forkSessionOrExit(sourcePath, cwd, sessionDir, sessionId) {
|
|
186
196
|
try {
|
|
187
197
|
return SessionManager.forkFrom(sourcePath, cwd, sessionDir, { id: sessionId });
|
|
@@ -194,7 +204,7 @@ function forkSessionOrExit(sourcePath, cwd, sessionDir, sessionId) {
|
|
|
194
204
|
}
|
|
195
205
|
async function createSessionManager(parsed, cwd, sessionDir, settingsManager) {
|
|
196
206
|
if (parsed.noSession || parsed.help || parsed.listModels !== undefined) {
|
|
197
|
-
return SessionManager.inMemory(cwd);
|
|
207
|
+
return SessionManager.inMemory(cwd, parsed.sessionId !== undefined ? { id: parsed.sessionId } : undefined);
|
|
198
208
|
}
|
|
199
209
|
if (parsed.fork) {
|
|
200
210
|
if (parsed.sessionId) {
|
|
@@ -220,7 +230,7 @@ async function createSessionManager(parsed, cwd, sessionDir, settingsManager) {
|
|
|
220
230
|
switch (resolved.type) {
|
|
221
231
|
case "path":
|
|
222
232
|
case "local":
|
|
223
|
-
return
|
|
233
|
+
return openSessionOrExit(resolved.path, sessionDir);
|
|
224
234
|
case "global": {
|
|
225
235
|
console.log(chalk.yellow(`Session found in different project: ${resolved.cwd}`));
|
|
226
236
|
const shouldFork = await promptConfirm("Fork this session into current directory?");
|
|
@@ -621,6 +631,9 @@ export async function main(args, options) {
|
|
|
621
631
|
time("resolveModelScope");
|
|
622
632
|
reportDiagnostics(runtime.diagnostics);
|
|
623
633
|
if (runtime.diagnostics.some((diagnostic) => diagnostic.type === "error")) {
|
|
634
|
+
if (runtime.diagnostics.some((diagnostic) => diagnostic.message.includes("Failed to load extension"))) {
|
|
635
|
+
console.error(chalk.yellow(EXTENSION_LOAD_FAILURE_HINT));
|
|
636
|
+
}
|
|
624
637
|
process.exit(1);
|
|
625
638
|
}
|
|
626
639
|
time("createAgentSession");
|
|
@@ -650,9 +663,12 @@ export async function main(args, options) {
|
|
|
650
663
|
if (startupBenchmark) {
|
|
651
664
|
await interactiveMode.init();
|
|
652
665
|
time("interactiveMode.init");
|
|
653
|
-
|
|
666
|
+
// Give the TUI's stdin handler a brief chance to consume terminal query replies
|
|
667
|
+
// (Kitty keyboard protocol, device attributes, cell size) before restoring the terminal.
|
|
668
|
+
await new Promise((resolve) => setTimeout(resolve, 150));
|
|
654
669
|
interactiveMode.stop();
|
|
655
670
|
stopThemeWatcher();
|
|
671
|
+
printTimings();
|
|
656
672
|
if (process.stdout.writableLength > 0) {
|
|
657
673
|
await new Promise((resolve) => process.stdout.once("drain", resolve));
|
|
658
674
|
}
|
|
@@ -11,13 +11,15 @@ export class AssistantMessageComponent extends Container {
|
|
|
11
11
|
hideThinkingBlock;
|
|
12
12
|
markdownTheme;
|
|
13
13
|
hiddenThinkingLabel;
|
|
14
|
+
outputPad;
|
|
14
15
|
lastMessage;
|
|
15
16
|
hasToolCalls = false;
|
|
16
|
-
constructor(message, hideThinkingBlock = false, markdownTheme = getMarkdownTheme(), hiddenThinkingLabel = "Thinking...") {
|
|
17
|
+
constructor(message, hideThinkingBlock = false, markdownTheme = getMarkdownTheme(), hiddenThinkingLabel = "Thinking...", outputPad = 1) {
|
|
17
18
|
super();
|
|
18
19
|
this.hideThinkingBlock = hideThinkingBlock;
|
|
19
20
|
this.markdownTheme = markdownTheme;
|
|
20
21
|
this.hiddenThinkingLabel = hiddenThinkingLabel;
|
|
22
|
+
this.outputPad = outputPad;
|
|
21
23
|
// Container for text/thinking content
|
|
22
24
|
this.contentContainer = new Container();
|
|
23
25
|
this.addChild(this.contentContainer);
|
|
@@ -43,6 +45,12 @@ export class AssistantMessageComponent extends Container {
|
|
|
43
45
|
this.updateContent(this.lastMessage);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
48
|
+
setOutputPad(padding) {
|
|
49
|
+
this.outputPad = padding;
|
|
50
|
+
if (this.lastMessage) {
|
|
51
|
+
this.updateContent(this.lastMessage);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
46
54
|
render(width) {
|
|
47
55
|
const lines = super.render(width);
|
|
48
56
|
if (this.hasToolCalls || lines.length === 0) {
|
|
@@ -66,7 +74,7 @@ export class AssistantMessageComponent extends Container {
|
|
|
66
74
|
if (content.type === "text" && content.text.trim()) {
|
|
67
75
|
// Assistant text messages with no background - trim the text
|
|
68
76
|
// Set paddingY=0 to avoid extra spacing before tool executions
|
|
69
|
-
this.contentContainer.addChild(new Markdown(content.text.trim(),
|
|
77
|
+
this.contentContainer.addChild(new Markdown(content.text.trim(), this.outputPad, 0, this.markdownTheme));
|
|
70
78
|
}
|
|
71
79
|
else if (content.type === "thinking" && content.thinking.trim()) {
|
|
72
80
|
// Add spacing only when another visible assistant content block follows.
|
|
@@ -76,14 +84,14 @@ export class AssistantMessageComponent extends Container {
|
|
|
76
84
|
.some((c) => (c.type === "text" && c.text.trim()) || (c.type === "thinking" && c.thinking.trim()));
|
|
77
85
|
if (this.hideThinkingBlock) {
|
|
78
86
|
// Show static thinking label when hidden
|
|
79
|
-
this.contentContainer.addChild(new Text(theme.italic(theme.fg("thinkingText", this.hiddenThinkingLabel)),
|
|
87
|
+
this.contentContainer.addChild(new Text(theme.italic(theme.fg("thinkingText", this.hiddenThinkingLabel)), this.outputPad, 0));
|
|
80
88
|
if (hasVisibleContentAfter) {
|
|
81
89
|
this.contentContainer.addChild(new Spacer(1));
|
|
82
90
|
}
|
|
83
91
|
}
|
|
84
92
|
else {
|
|
85
93
|
// Thinking traces in thinkingText color, italic
|
|
86
|
-
this.contentContainer.addChild(new Markdown(content.thinking.trim(),
|
|
94
|
+
this.contentContainer.addChild(new Markdown(content.thinking.trim(), this.outputPad, 0, this.markdownTheme, {
|
|
87
95
|
color: (text) => theme.fg("thinkingText", text),
|
|
88
96
|
italic: true,
|
|
89
97
|
}));
|
|
@@ -93,27 +101,27 @@ export class AssistantMessageComponent extends Container {
|
|
|
93
101
|
}
|
|
94
102
|
}
|
|
95
103
|
}
|
|
96
|
-
// Check if
|
|
97
|
-
//
|
|
104
|
+
// Check if incomplete/failed - show after partial content.
|
|
105
|
+
// For aborted/error tool calls, tool execution components show the error.
|
|
106
|
+
// Length stops can happen before a tool call is complete, so surface them here too.
|
|
98
107
|
const hasToolCalls = message.content.some((c) => c.type === "toolCall");
|
|
99
108
|
this.hasToolCalls = hasToolCalls;
|
|
100
|
-
if (
|
|
109
|
+
if (message.stopReason === "length") {
|
|
110
|
+
this.contentContainer.addChild(new Spacer(1));
|
|
111
|
+
this.contentContainer.addChild(new Text(theme.fg("error", "Error: Model stopped because it reached the maximum output token limit. The response may be incomplete."), this.outputPad, 0));
|
|
112
|
+
}
|
|
113
|
+
else if (!hasToolCalls) {
|
|
101
114
|
if (message.stopReason === "aborted") {
|
|
102
115
|
const abortMessage = message.errorMessage && message.errorMessage !== "Request was aborted"
|
|
103
116
|
? message.errorMessage
|
|
104
117
|
: "Operation aborted";
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
this.contentContainer.addChild(new Spacer(1));
|
|
110
|
-
}
|
|
111
|
-
this.contentContainer.addChild(new Text(theme.fg("error", abortMessage), 1, 0));
|
|
118
|
+
this.contentContainer.addChild(new Spacer(1));
|
|
119
|
+
this.contentContainer.addChild(new Text(theme.fg("error", abortMessage), this.outputPad, 0));
|
|
112
120
|
}
|
|
113
121
|
else if (message.stopReason === "error") {
|
|
114
122
|
const errorMsg = message.errorMessage || "Unknown error";
|
|
115
123
|
this.contentContainer.addChild(new Spacer(1));
|
|
116
|
-
this.contentContainer.addChild(new Text(theme.fg("error", `Error: ${errorMsg}`),
|
|
124
|
+
this.contentContainer.addChild(new Text(theme.fg("error", `Error: ${errorMsg}`), this.outputPad, 0));
|
|
117
125
|
}
|
|
118
126
|
}
|
|
119
127
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Box, Container, Spacer, Text } from "@earendil-works/pi-tui";
|
|
2
|
+
import { theme } from "../theme/theme.js";
|
|
3
|
+
/**
|
|
4
|
+
* Component that renders a custom session entry from extensions.
|
|
5
|
+
* The host owns transcript spacing; renderer output should provide only its content.
|
|
6
|
+
*/
|
|
7
|
+
export class CustomEntryComponent extends Container {
|
|
8
|
+
entry;
|
|
9
|
+
renderer;
|
|
10
|
+
customComponent;
|
|
11
|
+
_expanded = false;
|
|
12
|
+
constructor(entry, renderer) {
|
|
13
|
+
super();
|
|
14
|
+
this.entry = entry;
|
|
15
|
+
this.renderer = renderer;
|
|
16
|
+
this.rebuild();
|
|
17
|
+
}
|
|
18
|
+
hasContent() {
|
|
19
|
+
return this.customComponent !== undefined;
|
|
20
|
+
}
|
|
21
|
+
setExpanded(expanded) {
|
|
22
|
+
if (this._expanded !== expanded) {
|
|
23
|
+
this._expanded = expanded;
|
|
24
|
+
this.rebuild();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
invalidate() {
|
|
28
|
+
super.invalidate();
|
|
29
|
+
this.rebuild();
|
|
30
|
+
}
|
|
31
|
+
rebuild() {
|
|
32
|
+
this.clear();
|
|
33
|
+
this.customComponent = undefined;
|
|
34
|
+
let component;
|
|
35
|
+
try {
|
|
36
|
+
component = this.renderer(this.entry, { expanded: this._expanded }, theme);
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
40
|
+
const box = new Box(1, 1, (text) => theme.bg("customMessageBg", text));
|
|
41
|
+
box.addChild(new Text(theme.fg("error", `[${this.entry.customType}] renderer failed: ${message}`), 0, 0));
|
|
42
|
+
component = box;
|
|
43
|
+
}
|
|
44
|
+
if (!component) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.customComponent = component;
|
|
48
|
+
this.addChild(new Spacer(1));
|
|
49
|
+
this.addChild(component);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=custom-entry.js.map
|
|
@@ -16,6 +16,7 @@ export class ExtensionEditorComponent extends Container {
|
|
|
16
16
|
onCancelCallback;
|
|
17
17
|
tui;
|
|
18
18
|
keybindings;
|
|
19
|
+
externalEditorCommand;
|
|
19
20
|
_focused = false;
|
|
20
21
|
get focused() {
|
|
21
22
|
return this._focused;
|
|
@@ -24,10 +25,11 @@ export class ExtensionEditorComponent extends Container {
|
|
|
24
25
|
this._focused = value;
|
|
25
26
|
this.editor.focused = value;
|
|
26
27
|
}
|
|
27
|
-
constructor(tui, keybindings, title, prefill, onSubmit, onCancel, options) {
|
|
28
|
+
constructor(tui, keybindings, title, prefill, onSubmit, onCancel, options, externalEditorCommand) {
|
|
28
29
|
super();
|
|
29
30
|
this.tui = tui;
|
|
30
31
|
this.keybindings = keybindings;
|
|
32
|
+
this.externalEditorCommand = externalEditorCommand;
|
|
31
33
|
this.onSubmitCallback = onSubmit;
|
|
32
34
|
this.onCancelCallback = onCancel;
|
|
33
35
|
// Add top border
|
|
@@ -48,7 +50,7 @@ export class ExtensionEditorComponent extends Container {
|
|
|
48
50
|
this.addChild(this.editor);
|
|
49
51
|
this.addChild(new Spacer(1));
|
|
50
52
|
// Add hint
|
|
51
|
-
const hasExternalEditor = !!(
|
|
53
|
+
const hasExternalEditor = !!this.getExternalEditorCommand();
|
|
52
54
|
const hint = keyHint("tui.select.confirm", "submit") +
|
|
53
55
|
" " +
|
|
54
56
|
keyHint("tui.input.newLine", "newline") +
|
|
@@ -75,8 +77,15 @@ export class ExtensionEditorComponent extends Container {
|
|
|
75
77
|
// Forward to editor
|
|
76
78
|
this.editor.handleInput(keyData);
|
|
77
79
|
}
|
|
80
|
+
getExternalEditorCommand() {
|
|
81
|
+
const editorCmd = this.externalEditorCommand || process.env.VISUAL || process.env.EDITOR;
|
|
82
|
+
if (editorCmd) {
|
|
83
|
+
return editorCmd;
|
|
84
|
+
}
|
|
85
|
+
return process.platform === "win32" ? "notepad" : "nano";
|
|
86
|
+
}
|
|
78
87
|
async openExternalEditor() {
|
|
79
|
-
const editorCmd =
|
|
88
|
+
const editorCmd = this.getExternalEditorCommand();
|
|
80
89
|
if (!editorCmd) {
|
|
81
90
|
return;
|
|
82
91
|
}
|
|
@@ -168,7 +168,7 @@ function buildSessionTree(sessions) {
|
|
|
168
168
|
const byPath = new Map();
|
|
169
169
|
for (const session of sessions) {
|
|
170
170
|
const sessionPath = canonicalizePath(session.path) ?? session.path;
|
|
171
|
-
byPath.set(sessionPath, { session, children: [] });
|
|
171
|
+
byPath.set(sessionPath, { session, children: [], latestActivity: session.modified.getTime() });
|
|
172
172
|
}
|
|
173
173
|
const roots = [];
|
|
174
174
|
for (const session of sessions) {
|
|
@@ -182,9 +182,20 @@ function buildSessionTree(sessions) {
|
|
|
182
182
|
roots.push(node);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
|
|
185
|
+
const updateLatestActivity = (node) => {
|
|
186
|
+
let latestActivity = node.session.modified.getTime();
|
|
187
|
+
for (const child of node.children) {
|
|
188
|
+
latestActivity = Math.max(latestActivity, updateLatestActivity(child));
|
|
189
|
+
}
|
|
190
|
+
node.latestActivity = latestActivity;
|
|
191
|
+
return latestActivity;
|
|
192
|
+
};
|
|
193
|
+
for (const root of roots) {
|
|
194
|
+
updateLatestActivity(root);
|
|
195
|
+
}
|
|
196
|
+
// Sort children and roots by latest activity in each subtree (descending)
|
|
186
197
|
const sortNodes = (nodes) => {
|
|
187
|
-
nodes.sort((a, b) => b.
|
|
198
|
+
nodes.sort((a, b) => b.latestActivity - a.latestActivity);
|
|
188
199
|
for (const node of nodes) {
|
|
189
200
|
sortNodes(node.children);
|
|
190
201
|
}
|
|
@@ -450,9 +450,18 @@ export class SettingsSelectorComponent extends Container {
|
|
|
450
450
|
currentValue: String(config.editorPaddingX),
|
|
451
451
|
values: ["0", "1", "2", "3"],
|
|
452
452
|
});
|
|
453
|
-
//
|
|
453
|
+
// Output padding toggle (insert after editor-padding)
|
|
454
454
|
const editorPaddingIndex = items.findIndex((item) => item.id === "editor-padding");
|
|
455
455
|
items.splice(editorPaddingIndex + 1, 0, {
|
|
456
|
+
id: "output-padding",
|
|
457
|
+
label: "Output padding",
|
|
458
|
+
description: "Horizontal padding for user messages, assistant messages, and thinking",
|
|
459
|
+
currentValue: String(config.outputPad),
|
|
460
|
+
values: ["0", "1"],
|
|
461
|
+
});
|
|
462
|
+
// Autocomplete max visible toggle (insert after output-padding)
|
|
463
|
+
const outputPaddingIndex = items.findIndex((item) => item.id === "output-padding");
|
|
464
|
+
items.splice(outputPaddingIndex + 1, 0, {
|
|
456
465
|
id: "autocomplete-max-visible",
|
|
457
466
|
label: "Autocomplete max items",
|
|
458
467
|
description: "Max visible items in autocomplete dropdown (3-20)",
|
|
@@ -546,6 +555,9 @@ export class SettingsSelectorComponent extends Container {
|
|
|
546
555
|
case "editor-padding":
|
|
547
556
|
callbacks.onEditorPaddingXChange(parseInt(newValue, 10));
|
|
548
557
|
break;
|
|
558
|
+
case "output-padding":
|
|
559
|
+
callbacks.onOutputPadChange(newValue === "0" ? 0 : 1);
|
|
560
|
+
break;
|
|
549
561
|
case "autocomplete-max-visible":
|
|
550
562
|
callbacks.onAutocompleteMaxVisibleChange(parseInt(newValue, 10));
|
|
551
563
|
break;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Loader } from "@earendil-works/pi-tui";
|
|
2
|
+
import { theme } from "../theme/theme.js";
|
|
3
|
+
import { CountdownTimer } from "./countdown-timer.js";
|
|
4
|
+
import { keyText } from "./keybinding-hints.js";
|
|
5
|
+
export class StatusIndicator extends Loader {
|
|
6
|
+
kind;
|
|
7
|
+
constructor(kind, ui, spinnerColorFn, messageColorFn, message, indicator) {
|
|
8
|
+
super(ui, spinnerColorFn, messageColorFn, message, indicator);
|
|
9
|
+
this.kind = kind;
|
|
10
|
+
}
|
|
11
|
+
dispose() {
|
|
12
|
+
this.stop();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export class WorkingStatusIndicator extends StatusIndicator {
|
|
16
|
+
constructor(ui, message, indicator) {
|
|
17
|
+
super("working", ui, (spinner) => theme.fg("accent", spinner), (text) => theme.fg("muted", text), message, indicator);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export class RetryStatusIndicator extends StatusIndicator {
|
|
21
|
+
countdown;
|
|
22
|
+
constructor(ui, attempt, maxAttempts, delayMs) {
|
|
23
|
+
const retryMessage = (seconds) => `Retrying (${attempt}/${maxAttempts}) in ${seconds}s... (${keyText("app.interrupt")} to cancel)`;
|
|
24
|
+
super("retry", ui, (spinner) => theme.fg("warning", spinner), (text) => theme.fg("muted", text), retryMessage(Math.ceil(delayMs / 1000)));
|
|
25
|
+
this.countdown = new CountdownTimer(delayMs, ui, (seconds) => {
|
|
26
|
+
this.setMessage(retryMessage(seconds));
|
|
27
|
+
}, () => {
|
|
28
|
+
this.countdown = undefined;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
dispose() {
|
|
32
|
+
this.countdown?.dispose();
|
|
33
|
+
this.countdown = undefined;
|
|
34
|
+
super.dispose();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export class CompactionStatusIndicator extends StatusIndicator {
|
|
38
|
+
constructor(ui, reason) {
|
|
39
|
+
const cancelHint = `(${keyText("app.interrupt")} to cancel)`;
|
|
40
|
+
const label = reason === "manual"
|
|
41
|
+
? `Compacting context... ${cancelHint}`
|
|
42
|
+
: `${reason === "overflow" ? "Context overflow detected, " : ""}Auto-compacting... ${cancelHint}`;
|
|
43
|
+
super("compaction", ui, (spinner) => theme.fg("accent", spinner), (text) => theme.fg("muted", text), label);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export class BranchSummaryStatusIndicator extends StatusIndicator {
|
|
47
|
+
constructor(ui) {
|
|
48
|
+
super("branchSummary", ui, (spinner) => theme.fg("accent", spinner), (text) => theme.fg("muted", text), `Summarizing branch... (${keyText("app.interrupt")} to cancel)`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export class IdleStatus {
|
|
52
|
+
invalidate() {
|
|
53
|
+
// No cached state to invalidate.
|
|
54
|
+
}
|
|
55
|
+
render(width) {
|
|
56
|
+
const emptyLine = " ".repeat(width);
|
|
57
|
+
return [emptyLine, emptyLine];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=status-indicator.js.map
|
|
@@ -7,14 +7,27 @@ const OSC133_ZONE_FINAL = "\x1b]133;C\x07";
|
|
|
7
7
|
* Component that renders a user message
|
|
8
8
|
*/
|
|
9
9
|
export class UserMessageComponent extends Container {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
text;
|
|
11
|
+
markdownTheme;
|
|
12
|
+
outputPad;
|
|
13
|
+
constructor(text, markdownTheme = getMarkdownTheme(), outputPad = 1) {
|
|
12
14
|
super();
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
+
this.text = text;
|
|
16
|
+
this.markdownTheme = markdownTheme;
|
|
17
|
+
this.outputPad = outputPad;
|
|
18
|
+
this.rebuild();
|
|
19
|
+
}
|
|
20
|
+
setOutputPad(padding) {
|
|
21
|
+
this.outputPad = padding;
|
|
22
|
+
this.rebuild();
|
|
23
|
+
}
|
|
24
|
+
rebuild() {
|
|
25
|
+
this.clear();
|
|
26
|
+
const contentBox = new Box(this.outputPad, 1, (content) => theme.bg("userMessageBg", content));
|
|
27
|
+
contentBox.addChild(new Markdown(this.text, 0, 0, this.markdownTheme, {
|
|
15
28
|
color: (content) => theme.fg("userMessageText", content),
|
|
16
|
-
}, { preserveOrderedListMarkers: true }));
|
|
17
|
-
this.addChild(
|
|
29
|
+
}, { preserveOrderedListMarkers: true, preserveBackslashEscapes: true }));
|
|
30
|
+
this.addChild(contentBox);
|
|
18
31
|
}
|
|
19
32
|
render(width) {
|
|
20
33
|
const lines = super.render(width);
|