orient-cli 0.1.0 → 0.2.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/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.d.ts +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.js +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.js.map +1 -1
- package/dist/orient/change-packet.d.ts +2 -1
- package/dist/orient/change-packet.js +25 -8
- package/dist/orient/change-packet.js.map +1 -1
- package/dist/orient/clarify.d.ts +114 -0
- package/dist/orient/clarify.js +186 -0
- package/dist/orient/clarify.js.map +1 -0
- package/dist/orient/clear-command.d.ts +79 -0
- package/dist/orient/clear-command.js +117 -0
- package/dist/orient/clear-command.js.map +1 -0
- package/dist/orient/mode.d.ts +70 -0
- package/dist/orient/mode.js +124 -0
- package/dist/orient/mode.js.map +1 -0
- package/dist/orient/orient-extension.d.ts +1 -1
- package/dist/orient/orient-extension.js +306 -17
- package/dist/orient/orient-extension.js.map +1 -1
- package/dist/orient/plan-execute.d.ts +137 -0
- package/dist/orient/plan-execute.js +333 -0
- package/dist/orient/plan-execute.js.map +1 -0
- package/dist/orient/tiers.d.ts +109 -0
- package/dist/orient/tiers.js +162 -0
- package/dist/orient/tiers.js.map +1 -0
- package/dist/orient/wizard.d.ts +108 -0
- package/dist/orient/wizard.js +183 -0
- package/dist/orient/wizard.js.map +1 -0
- package/docs/open-source-resources.md +1 -1
- package/node_modules/@orient-cli/agent-core/README.md +456 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts +24 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.js +404 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.d.ts +115 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.js +395 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/index.d.ts +5 -0
- package/node_modules/@orient-cli/agent-core/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/index.js +9 -0
- package/node_modules/@orient-cli/agent-core/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts +85 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.js +268 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/types.d.ts +323 -0
- package/node_modules/@orient-cli/agent-core/dist/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/types.js +2 -0
- package/node_modules/@orient-cli/agent-core/dist/types.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/package.json +44 -0
- package/node_modules/@orient-cli/ai/README.md +1315 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.d.ts +20 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.js +44 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts +5 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.js +6 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/cli.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/cli.js +116 -0
- package/node_modules/@orient-cli/ai/dist/cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.js +107 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/index.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/index.js +14 -0
- package/node_modules/@orient-cli/ai/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.d.ts +24 -0
- package/node_modules/@orient-cli/ai/dist/models.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.d.ts +14473 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.js +14241 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.js +55 -0
- package/node_modules/@orient-cli/ai/dist/models.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/oauth.d.ts +2 -0
- package/node_modules/@orient-cli/ai/dist/oauth.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/oauth.js +2 -0
- package/node_modules/@orient-cli/ai/dist/oauth.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts +20 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js +651 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts +40 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.js +749 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js +176 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts +56 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.js +367 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js +29 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts +74 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js +776 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts +65 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.js +312 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js +419 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.js +399 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts +22 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.js +501 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js +741 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js +753 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts +17 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js +470 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js +190 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts +38 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js +261 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.js +35 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js +155 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/stream.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/stream.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/stream.js +27 -0
- package/node_modules/@orient-cli/ai/dist/stream.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/types.d.ts +353 -0
- package/node_modules/@orient-cli/ai/dist/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/types.js +2 -0
- package/node_modules/@orient-cli/ai/dist/types.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts +21 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.js +81 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.js +14 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.js +29 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts +25 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js +335 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts +30 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js +292 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js +376 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js +481 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts +61 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js +131 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js +105 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts +34 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js +373 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js +31 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts +47 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js +2 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts +53 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.js +132 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts +22 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts +17 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js +21 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts +18 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.js +80 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.js.map +1 -0
- package/node_modules/@orient-cli/ai/package.json +114 -0
- package/node_modules/@orient-cli/coding-agent/README.md +618 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js +4 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts +52 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.js +326 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js +31 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js +83 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts +18 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js +92 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js +35 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.js +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.d.ts +77 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.js +229 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts +83 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js +236 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts +86 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js +116 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts +585 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js +2497 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts +132 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js +422 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js +125 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts +88 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js +243 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts +121 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js +613 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts +38 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js +153 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js +25 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts +29 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.js +75 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js +249 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts +37 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js +224 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.css +1001 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.html +55 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.js +1690 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts +40 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js +95 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/marked.min.js +6 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts +25 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js +438 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts +148 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js +700 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts +1073 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js +45 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts +48 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js +314 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.js +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts +288 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js +240 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts +77 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.js +123 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts +132 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js +612 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts +110 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js +486 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts +6 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js +59 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts +192 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js +1829 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts +51 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js +249 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js +126 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts +185 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js +720 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts +93 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js +236 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js +38 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts +333 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js +1105 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts +237 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js +708 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts +60 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.js +409 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.js +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts +18 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js +116 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.js +31 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts +73 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js +352 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts +85 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js +337 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts +53 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js +196 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js +37 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js +258 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts +56 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js +293 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts +115 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js +86 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js +172 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js +81 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js +225 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js +49 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js +32 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts +70 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js +205 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts +35 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js +216 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.d.ts +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.js +43 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.js +593 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts +33 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.js +281 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.js +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts +18 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js +107 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts +34 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js +175 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js +51 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js +44 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js +45 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts +71 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js +479 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js +70 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js +79 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js +133 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js +111 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js +61 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts +24 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts +27 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js +201 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts +31 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js +34 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts +42 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js +145 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts +47 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js +275 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js +97 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts +53 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js +204 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts +49 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js +275 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js +155 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts +95 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js +848 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts +58 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js +301 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js +39 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js +47 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js +50 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js +51 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts +58 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js +274 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts +89 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js +1084 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js +113 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js +33 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts +321 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js +4000 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/dark.json +85 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/light.json +84 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts +81 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js +979 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js +112 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js +49 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts +217 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js +402 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js +550 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts +408 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts +4 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js +234 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js +87 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js +245 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts +5 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js +158 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.js +163 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js +39 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts +36 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js +137 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js +121 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js +186 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts +5 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js +252 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/package.json +104 -0
- package/node_modules/@orient-cli/tui/README.md +767 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts +52 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.js +623 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/box.d.ts +22 -0
- package/node_modules/@orient-cli/tui/dist/components/box.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/box.js +104 -0
- package/node_modules/@orient-cli/tui/dist/components/box.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts +22 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js +35 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.d.ts +244 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.js +1861 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/image.d.ts +28 -0
- package/node_modules/@orient-cli/tui/dist/components/image.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/image.js +69 -0
- package/node_modules/@orient-cli/tui/dist/components/image.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/input.d.ts +37 -0
- package/node_modules/@orient-cli/tui/dist/components/input.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/input.js +426 -0
- package/node_modules/@orient-cli/tui/dist/components/input.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.d.ts +21 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.js +49 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts +95 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.js +663 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts +50 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.js +159 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts +50 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.js +185 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts +12 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.js +23 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/text.d.ts +19 -0
- package/node_modules/@orient-cli/tui/dist/components/text.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/text.js +89 -0
- package/node_modules/@orient-cli/tui/dist/components/text.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts +13 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.js +51 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.d.ts +39 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.js +2 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts +16 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.js +107 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/index.d.ts +23 -0
- package/node_modules/@orient-cli/tui/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/index.js +32 -0
- package/node_modules/@orient-cli/tui/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.d.ts +193 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.js +174 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keys.d.ts +170 -0
- package/node_modules/@orient-cli/tui/dist/keys.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keys.js +1124 -0
- package/node_modules/@orient-cli/tui/dist/keys.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts +28 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.js +44 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts +48 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.js +317 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts +68 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.js +288 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal.d.ts +84 -0
- package/node_modules/@orient-cli/tui/dist/terminal.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal.js +285 -0
- package/node_modules/@orient-cli/tui/dist/terminal.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/tui.d.ts +222 -0
- package/node_modules/@orient-cli/tui/dist/tui.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/tui.js +1008 -0
- package/node_modules/@orient-cli/tui/dist/tui.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts +17 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.js +25 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/utils.d.ts +78 -0
- package/node_modules/@orient-cli/tui/dist/utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/utils.js +960 -0
- package/node_modules/@orient-cli/tui/dist/utils.js.map +1 -0
- package/node_modules/@orient-cli/tui/package.json +52 -0
- package/package.json +47 -8
- package/schemas/orient-standard/templates-tier-1/brief.md +22 -0
- package/schemas/orient-standard/templates-tier-1/plan.md +17 -0
- package/schemas/orient-standard/templates-tier-1/spec.md +23 -0
- package/schemas/orient-standard/templates-tier-1/tasks.md +14 -0
- package/schemas/orient-standard/templates-tier-2/brief.md +32 -0
- package/schemas/orient-standard/templates-tier-2/plan.md +44 -0
- package/schemas/orient-standard/templates-tier-2/spec.md +46 -0
- package/schemas/orient-standard/templates-tier-2/tasks.md +34 -0
- package/schemas/orient-standard/templates-tier-3/brief.md +54 -0
- package/schemas/orient-standard/templates-tier-3/plan.md +67 -0
- package/schemas/orient-standard/templates-tier-3/spec.md +65 -0
- package/schemas/orient-standard/templates-tier-3/tasks.md +79 -0
|
@@ -0,0 +1,1008 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal TUI implementation with differential rendering
|
|
3
|
+
*/
|
|
4
|
+
import * as fs from "node:fs";
|
|
5
|
+
import * as os from "node:os";
|
|
6
|
+
import * as path from "node:path";
|
|
7
|
+
import { performance } from "node:perf_hooks";
|
|
8
|
+
import { isKeyRelease, matchesKey } from "./keys.js";
|
|
9
|
+
import { getCapabilities, isImageLine, setCellDimensions } from "./terminal-image.js";
|
|
10
|
+
import { extractSegments, sliceByColumn, sliceWithWidth, visibleWidth } from "./utils.js";
|
|
11
|
+
/** Type guard to check if a component implements Focusable */
|
|
12
|
+
export function isFocusable(component) {
|
|
13
|
+
return component !== null && "focused" in component;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Cursor position marker - APC (Application Program Command) sequence.
|
|
17
|
+
* This is a zero-width escape sequence that terminals ignore.
|
|
18
|
+
* Components emit this at the cursor position when focused.
|
|
19
|
+
* TUI finds and strips this marker, then positions the hardware cursor there.
|
|
20
|
+
*/
|
|
21
|
+
export const CURSOR_MARKER = "\x1b_pi:c\x07";
|
|
22
|
+
export { visibleWidth };
|
|
23
|
+
/** Parse a SizeValue into absolute value given a reference size */
|
|
24
|
+
function parseSizeValue(value, referenceSize) {
|
|
25
|
+
if (value === undefined)
|
|
26
|
+
return undefined;
|
|
27
|
+
if (typeof value === "number")
|
|
28
|
+
return value;
|
|
29
|
+
// Parse percentage string like "50%"
|
|
30
|
+
const match = value.match(/^(\d+(?:\.\d+)?)%$/);
|
|
31
|
+
if (match) {
|
|
32
|
+
return Math.floor((referenceSize * parseFloat(match[1])) / 100);
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
function isTermuxSession() {
|
|
37
|
+
return Boolean(process.env.TERMUX_VERSION);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Container - a component that contains other components
|
|
41
|
+
*/
|
|
42
|
+
export class Container {
|
|
43
|
+
children = [];
|
|
44
|
+
addChild(component) {
|
|
45
|
+
this.children.push(component);
|
|
46
|
+
}
|
|
47
|
+
removeChild(component) {
|
|
48
|
+
const index = this.children.indexOf(component);
|
|
49
|
+
if (index !== -1) {
|
|
50
|
+
this.children.splice(index, 1);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
clear() {
|
|
54
|
+
this.children = [];
|
|
55
|
+
}
|
|
56
|
+
invalidate() {
|
|
57
|
+
for (const child of this.children) {
|
|
58
|
+
child.invalidate?.();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
render(width) {
|
|
62
|
+
const lines = [];
|
|
63
|
+
for (const child of this.children) {
|
|
64
|
+
const childLines = child.render(width);
|
|
65
|
+
for (const line of childLines) {
|
|
66
|
+
lines.push(line);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return lines;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* TUI - Main class for managing terminal UI with differential rendering
|
|
74
|
+
*/
|
|
75
|
+
export class TUI extends Container {
|
|
76
|
+
terminal;
|
|
77
|
+
previousLines = [];
|
|
78
|
+
previousWidth = 0;
|
|
79
|
+
previousHeight = 0;
|
|
80
|
+
focusedComponent = null;
|
|
81
|
+
inputListeners = new Set();
|
|
82
|
+
/** Global callback for debug key (Shift+Ctrl+D). Called before input is forwarded to focused component. */
|
|
83
|
+
onDebug;
|
|
84
|
+
renderRequested = false;
|
|
85
|
+
renderTimer;
|
|
86
|
+
lastRenderAt = 0;
|
|
87
|
+
static MIN_RENDER_INTERVAL_MS = 16;
|
|
88
|
+
cursorRow = 0; // Logical cursor row (end of rendered content)
|
|
89
|
+
hardwareCursorRow = 0; // Actual terminal cursor row (may differ due to IME positioning)
|
|
90
|
+
showHardwareCursor = process.env.PI_HARDWARE_CURSOR === "1";
|
|
91
|
+
clearOnShrink = process.env.PI_CLEAR_ON_SHRINK === "1"; // Clear empty rows when content shrinks (default: off)
|
|
92
|
+
maxLinesRendered = 0; // Track terminal's working area (max lines ever rendered)
|
|
93
|
+
previousViewportTop = 0; // Track previous viewport top for resize-aware cursor moves
|
|
94
|
+
fullRedrawCount = 0;
|
|
95
|
+
stopped = false;
|
|
96
|
+
// Overlay stack for modal components rendered on top of base content
|
|
97
|
+
focusOrderCounter = 0;
|
|
98
|
+
overlayStack = [];
|
|
99
|
+
constructor(terminal, showHardwareCursor) {
|
|
100
|
+
super();
|
|
101
|
+
this.terminal = terminal;
|
|
102
|
+
if (showHardwareCursor !== undefined) {
|
|
103
|
+
this.showHardwareCursor = showHardwareCursor;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
get fullRedraws() {
|
|
107
|
+
return this.fullRedrawCount;
|
|
108
|
+
}
|
|
109
|
+
getShowHardwareCursor() {
|
|
110
|
+
return this.showHardwareCursor;
|
|
111
|
+
}
|
|
112
|
+
setShowHardwareCursor(enabled) {
|
|
113
|
+
if (this.showHardwareCursor === enabled)
|
|
114
|
+
return;
|
|
115
|
+
this.showHardwareCursor = enabled;
|
|
116
|
+
if (!enabled) {
|
|
117
|
+
this.terminal.hideCursor();
|
|
118
|
+
}
|
|
119
|
+
this.requestRender();
|
|
120
|
+
}
|
|
121
|
+
getClearOnShrink() {
|
|
122
|
+
return this.clearOnShrink;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Set whether to trigger full re-render when content shrinks.
|
|
126
|
+
* When true (default), empty rows are cleared when content shrinks.
|
|
127
|
+
* When false, empty rows remain (reduces redraws on slower terminals).
|
|
128
|
+
*/
|
|
129
|
+
setClearOnShrink(enabled) {
|
|
130
|
+
this.clearOnShrink = enabled;
|
|
131
|
+
}
|
|
132
|
+
setFocus(component) {
|
|
133
|
+
// Clear focused flag on old component
|
|
134
|
+
if (isFocusable(this.focusedComponent)) {
|
|
135
|
+
this.focusedComponent.focused = false;
|
|
136
|
+
}
|
|
137
|
+
this.focusedComponent = component;
|
|
138
|
+
// Set focused flag on new component
|
|
139
|
+
if (isFocusable(component)) {
|
|
140
|
+
component.focused = true;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Show an overlay component with configurable positioning and sizing.
|
|
145
|
+
* Returns a handle to control the overlay's visibility.
|
|
146
|
+
*/
|
|
147
|
+
showOverlay(component, options) {
|
|
148
|
+
const entry = {
|
|
149
|
+
component,
|
|
150
|
+
options,
|
|
151
|
+
preFocus: this.focusedComponent,
|
|
152
|
+
hidden: false,
|
|
153
|
+
focusOrder: ++this.focusOrderCounter,
|
|
154
|
+
};
|
|
155
|
+
this.overlayStack.push(entry);
|
|
156
|
+
// Only focus if overlay is actually visible
|
|
157
|
+
if (!options?.nonCapturing && this.isOverlayVisible(entry)) {
|
|
158
|
+
this.setFocus(component);
|
|
159
|
+
}
|
|
160
|
+
this.terminal.hideCursor();
|
|
161
|
+
this.requestRender();
|
|
162
|
+
// Return handle for controlling this overlay
|
|
163
|
+
return {
|
|
164
|
+
hide: () => {
|
|
165
|
+
const index = this.overlayStack.indexOf(entry);
|
|
166
|
+
if (index !== -1) {
|
|
167
|
+
this.overlayStack.splice(index, 1);
|
|
168
|
+
// Restore focus if this overlay had focus
|
|
169
|
+
if (this.focusedComponent === component) {
|
|
170
|
+
const topVisible = this.getTopmostVisibleOverlay();
|
|
171
|
+
this.setFocus(topVisible?.component ?? entry.preFocus);
|
|
172
|
+
}
|
|
173
|
+
if (this.overlayStack.length === 0)
|
|
174
|
+
this.terminal.hideCursor();
|
|
175
|
+
this.requestRender();
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
setHidden: (hidden) => {
|
|
179
|
+
if (entry.hidden === hidden)
|
|
180
|
+
return;
|
|
181
|
+
entry.hidden = hidden;
|
|
182
|
+
// Update focus when hiding/showing
|
|
183
|
+
if (hidden) {
|
|
184
|
+
// If this overlay had focus, move focus to next visible or preFocus
|
|
185
|
+
if (this.focusedComponent === component) {
|
|
186
|
+
const topVisible = this.getTopmostVisibleOverlay();
|
|
187
|
+
this.setFocus(topVisible?.component ?? entry.preFocus);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
// Restore focus to this overlay when showing (if it's actually visible)
|
|
192
|
+
if (!options?.nonCapturing && this.isOverlayVisible(entry)) {
|
|
193
|
+
entry.focusOrder = ++this.focusOrderCounter;
|
|
194
|
+
this.setFocus(component);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
this.requestRender();
|
|
198
|
+
},
|
|
199
|
+
isHidden: () => entry.hidden,
|
|
200
|
+
focus: () => {
|
|
201
|
+
if (!this.overlayStack.includes(entry) || !this.isOverlayVisible(entry))
|
|
202
|
+
return;
|
|
203
|
+
if (this.focusedComponent !== component) {
|
|
204
|
+
this.setFocus(component);
|
|
205
|
+
}
|
|
206
|
+
entry.focusOrder = ++this.focusOrderCounter;
|
|
207
|
+
this.requestRender();
|
|
208
|
+
},
|
|
209
|
+
unfocus: () => {
|
|
210
|
+
if (this.focusedComponent !== component)
|
|
211
|
+
return;
|
|
212
|
+
const topVisible = this.getTopmostVisibleOverlay();
|
|
213
|
+
this.setFocus(topVisible && topVisible !== entry ? topVisible.component : entry.preFocus);
|
|
214
|
+
this.requestRender();
|
|
215
|
+
},
|
|
216
|
+
isFocused: () => this.focusedComponent === component,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
/** Hide the topmost overlay and restore previous focus. */
|
|
220
|
+
hideOverlay() {
|
|
221
|
+
const overlay = this.overlayStack.pop();
|
|
222
|
+
if (!overlay)
|
|
223
|
+
return;
|
|
224
|
+
if (this.focusedComponent === overlay.component) {
|
|
225
|
+
// Find topmost visible overlay, or fall back to preFocus
|
|
226
|
+
const topVisible = this.getTopmostVisibleOverlay();
|
|
227
|
+
this.setFocus(topVisible?.component ?? overlay.preFocus);
|
|
228
|
+
}
|
|
229
|
+
if (this.overlayStack.length === 0)
|
|
230
|
+
this.terminal.hideCursor();
|
|
231
|
+
this.requestRender();
|
|
232
|
+
}
|
|
233
|
+
/** Check if there are any visible overlays */
|
|
234
|
+
hasOverlay() {
|
|
235
|
+
return this.overlayStack.some((o) => this.isOverlayVisible(o));
|
|
236
|
+
}
|
|
237
|
+
/** Check if an overlay entry is currently visible */
|
|
238
|
+
isOverlayVisible(entry) {
|
|
239
|
+
if (entry.hidden)
|
|
240
|
+
return false;
|
|
241
|
+
if (entry.options?.visible) {
|
|
242
|
+
return entry.options.visible(this.terminal.columns, this.terminal.rows);
|
|
243
|
+
}
|
|
244
|
+
return true;
|
|
245
|
+
}
|
|
246
|
+
/** Find the topmost visible capturing overlay, if any */
|
|
247
|
+
getTopmostVisibleOverlay() {
|
|
248
|
+
for (let i = this.overlayStack.length - 1; i >= 0; i--) {
|
|
249
|
+
if (this.overlayStack[i].options?.nonCapturing)
|
|
250
|
+
continue;
|
|
251
|
+
if (this.isOverlayVisible(this.overlayStack[i])) {
|
|
252
|
+
return this.overlayStack[i];
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return undefined;
|
|
256
|
+
}
|
|
257
|
+
invalidate() {
|
|
258
|
+
super.invalidate();
|
|
259
|
+
for (const overlay of this.overlayStack)
|
|
260
|
+
overlay.component.invalidate?.();
|
|
261
|
+
}
|
|
262
|
+
start() {
|
|
263
|
+
this.stopped = false;
|
|
264
|
+
this.terminal.start((data) => this.handleInput(data), () => this.requestRender());
|
|
265
|
+
this.terminal.hideCursor();
|
|
266
|
+
this.queryCellSize();
|
|
267
|
+
this.requestRender();
|
|
268
|
+
}
|
|
269
|
+
addInputListener(listener) {
|
|
270
|
+
this.inputListeners.add(listener);
|
|
271
|
+
return () => {
|
|
272
|
+
this.inputListeners.delete(listener);
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
removeInputListener(listener) {
|
|
276
|
+
this.inputListeners.delete(listener);
|
|
277
|
+
}
|
|
278
|
+
queryCellSize() {
|
|
279
|
+
// Only query if terminal supports images (cell size is only used for image rendering)
|
|
280
|
+
if (!getCapabilities().images) {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
// Query terminal for cell size in pixels: CSI 16 t
|
|
284
|
+
// Response format: CSI 6 ; height ; width t
|
|
285
|
+
this.terminal.write("\x1b[16t");
|
|
286
|
+
}
|
|
287
|
+
stop() {
|
|
288
|
+
this.stopped = true;
|
|
289
|
+
if (this.renderTimer) {
|
|
290
|
+
clearTimeout(this.renderTimer);
|
|
291
|
+
this.renderTimer = undefined;
|
|
292
|
+
}
|
|
293
|
+
// Move cursor to the end of the content to prevent overwriting/artifacts on exit
|
|
294
|
+
if (this.previousLines.length > 0) {
|
|
295
|
+
const targetRow = this.previousLines.length; // Line after the last content
|
|
296
|
+
const lineDiff = targetRow - this.hardwareCursorRow;
|
|
297
|
+
if (lineDiff > 0) {
|
|
298
|
+
this.terminal.write(`\x1b[${lineDiff}B`);
|
|
299
|
+
}
|
|
300
|
+
else if (lineDiff < 0) {
|
|
301
|
+
this.terminal.write(`\x1b[${-lineDiff}A`);
|
|
302
|
+
}
|
|
303
|
+
this.terminal.write("\r\n");
|
|
304
|
+
}
|
|
305
|
+
this.terminal.showCursor();
|
|
306
|
+
this.terminal.stop();
|
|
307
|
+
}
|
|
308
|
+
requestRender(force = false) {
|
|
309
|
+
if (force) {
|
|
310
|
+
this.previousLines = [];
|
|
311
|
+
this.previousWidth = -1; // -1 triggers widthChanged, forcing a full clear
|
|
312
|
+
this.previousHeight = -1; // -1 triggers heightChanged, forcing a full clear
|
|
313
|
+
this.cursorRow = 0;
|
|
314
|
+
this.hardwareCursorRow = 0;
|
|
315
|
+
this.maxLinesRendered = 0;
|
|
316
|
+
this.previousViewportTop = 0;
|
|
317
|
+
if (this.renderTimer) {
|
|
318
|
+
clearTimeout(this.renderTimer);
|
|
319
|
+
this.renderTimer = undefined;
|
|
320
|
+
}
|
|
321
|
+
this.renderRequested = true;
|
|
322
|
+
process.nextTick(() => {
|
|
323
|
+
if (this.stopped || !this.renderRequested) {
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
this.renderRequested = false;
|
|
327
|
+
this.lastRenderAt = performance.now();
|
|
328
|
+
this.doRender();
|
|
329
|
+
});
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
if (this.renderRequested)
|
|
333
|
+
return;
|
|
334
|
+
this.renderRequested = true;
|
|
335
|
+
process.nextTick(() => this.scheduleRender());
|
|
336
|
+
}
|
|
337
|
+
scheduleRender() {
|
|
338
|
+
if (this.stopped || this.renderTimer || !this.renderRequested) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
const elapsed = performance.now() - this.lastRenderAt;
|
|
342
|
+
const delay = Math.max(0, TUI.MIN_RENDER_INTERVAL_MS - elapsed);
|
|
343
|
+
this.renderTimer = setTimeout(() => {
|
|
344
|
+
this.renderTimer = undefined;
|
|
345
|
+
if (this.stopped || !this.renderRequested) {
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
this.renderRequested = false;
|
|
349
|
+
this.lastRenderAt = performance.now();
|
|
350
|
+
this.doRender();
|
|
351
|
+
if (this.renderRequested) {
|
|
352
|
+
this.scheduleRender();
|
|
353
|
+
}
|
|
354
|
+
}, delay);
|
|
355
|
+
}
|
|
356
|
+
handleInput(data) {
|
|
357
|
+
if (this.inputListeners.size > 0) {
|
|
358
|
+
let current = data;
|
|
359
|
+
for (const listener of this.inputListeners) {
|
|
360
|
+
const result = listener(current);
|
|
361
|
+
if (result?.consume) {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (result?.data !== undefined) {
|
|
365
|
+
current = result.data;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
if (current.length === 0) {
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
data = current;
|
|
372
|
+
}
|
|
373
|
+
// Consume terminal cell size responses without blocking unrelated input.
|
|
374
|
+
if (this.consumeCellSizeResponse(data)) {
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
// Global debug key handler (Shift+Ctrl+D)
|
|
378
|
+
if (matchesKey(data, "shift+ctrl+d") && this.onDebug) {
|
|
379
|
+
this.onDebug();
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
// If focused component is an overlay, verify it's still visible
|
|
383
|
+
// (visibility can change due to terminal resize or visible() callback)
|
|
384
|
+
const focusedOverlay = this.overlayStack.find((o) => o.component === this.focusedComponent);
|
|
385
|
+
if (focusedOverlay && !this.isOverlayVisible(focusedOverlay)) {
|
|
386
|
+
// Focused overlay is no longer visible, redirect to topmost visible overlay
|
|
387
|
+
const topVisible = this.getTopmostVisibleOverlay();
|
|
388
|
+
if (topVisible) {
|
|
389
|
+
this.setFocus(topVisible.component);
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
// No visible overlays, restore to preFocus
|
|
393
|
+
this.setFocus(focusedOverlay.preFocus);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
// Pass input to focused component (including Ctrl+C)
|
|
397
|
+
// The focused component can decide how to handle Ctrl+C
|
|
398
|
+
if (this.focusedComponent?.handleInput) {
|
|
399
|
+
// Filter out key release events unless component opts in
|
|
400
|
+
if (isKeyRelease(data) && !this.focusedComponent.wantsKeyRelease) {
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
this.focusedComponent.handleInput(data);
|
|
404
|
+
this.requestRender();
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
consumeCellSizeResponse(data) {
|
|
408
|
+
// Response format: ESC [ 6 ; height ; width t
|
|
409
|
+
const match = data.match(/^\x1b\[6;(\d+);(\d+)t$/);
|
|
410
|
+
if (!match) {
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
413
|
+
const heightPx = parseInt(match[1], 10);
|
|
414
|
+
const widthPx = parseInt(match[2], 10);
|
|
415
|
+
if (heightPx <= 0 || widthPx <= 0) {
|
|
416
|
+
return true;
|
|
417
|
+
}
|
|
418
|
+
setCellDimensions({ widthPx, heightPx });
|
|
419
|
+
// Invalidate all components so images re-render with correct dimensions.
|
|
420
|
+
this.invalidate();
|
|
421
|
+
this.requestRender();
|
|
422
|
+
return true;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Resolve overlay layout from options.
|
|
426
|
+
* Returns { width, row, col, maxHeight } for rendering.
|
|
427
|
+
*/
|
|
428
|
+
resolveOverlayLayout(options, overlayHeight, termWidth, termHeight) {
|
|
429
|
+
const opt = options ?? {};
|
|
430
|
+
// Parse margin (clamp to non-negative)
|
|
431
|
+
const margin = typeof opt.margin === "number"
|
|
432
|
+
? { top: opt.margin, right: opt.margin, bottom: opt.margin, left: opt.margin }
|
|
433
|
+
: (opt.margin ?? {});
|
|
434
|
+
const marginTop = Math.max(0, margin.top ?? 0);
|
|
435
|
+
const marginRight = Math.max(0, margin.right ?? 0);
|
|
436
|
+
const marginBottom = Math.max(0, margin.bottom ?? 0);
|
|
437
|
+
const marginLeft = Math.max(0, margin.left ?? 0);
|
|
438
|
+
// Available space after margins
|
|
439
|
+
const availWidth = Math.max(1, termWidth - marginLeft - marginRight);
|
|
440
|
+
const availHeight = Math.max(1, termHeight - marginTop - marginBottom);
|
|
441
|
+
// === Resolve width ===
|
|
442
|
+
let width = parseSizeValue(opt.width, termWidth) ?? Math.min(80, availWidth);
|
|
443
|
+
// Apply minWidth
|
|
444
|
+
if (opt.minWidth !== undefined) {
|
|
445
|
+
width = Math.max(width, opt.minWidth);
|
|
446
|
+
}
|
|
447
|
+
// Clamp to available space
|
|
448
|
+
width = Math.max(1, Math.min(width, availWidth));
|
|
449
|
+
// === Resolve maxHeight ===
|
|
450
|
+
let maxHeight = parseSizeValue(opt.maxHeight, termHeight);
|
|
451
|
+
// Clamp to available space
|
|
452
|
+
if (maxHeight !== undefined) {
|
|
453
|
+
maxHeight = Math.max(1, Math.min(maxHeight, availHeight));
|
|
454
|
+
}
|
|
455
|
+
// Effective overlay height (may be clamped by maxHeight)
|
|
456
|
+
const effectiveHeight = maxHeight !== undefined ? Math.min(overlayHeight, maxHeight) : overlayHeight;
|
|
457
|
+
// === Resolve position ===
|
|
458
|
+
let row;
|
|
459
|
+
let col;
|
|
460
|
+
if (opt.row !== undefined) {
|
|
461
|
+
if (typeof opt.row === "string") {
|
|
462
|
+
// Percentage: 0% = top, 100% = bottom (overlay stays within bounds)
|
|
463
|
+
const match = opt.row.match(/^(\d+(?:\.\d+)?)%$/);
|
|
464
|
+
if (match) {
|
|
465
|
+
const maxRow = Math.max(0, availHeight - effectiveHeight);
|
|
466
|
+
const percent = parseFloat(match[1]) / 100;
|
|
467
|
+
row = marginTop + Math.floor(maxRow * percent);
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
// Invalid format, fall back to center
|
|
471
|
+
row = this.resolveAnchorRow("center", effectiveHeight, availHeight, marginTop);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
// Absolute row position
|
|
476
|
+
row = opt.row;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
// Anchor-based (default: center)
|
|
481
|
+
const anchor = opt.anchor ?? "center";
|
|
482
|
+
row = this.resolveAnchorRow(anchor, effectiveHeight, availHeight, marginTop);
|
|
483
|
+
}
|
|
484
|
+
if (opt.col !== undefined) {
|
|
485
|
+
if (typeof opt.col === "string") {
|
|
486
|
+
// Percentage: 0% = left, 100% = right (overlay stays within bounds)
|
|
487
|
+
const match = opt.col.match(/^(\d+(?:\.\d+)?)%$/);
|
|
488
|
+
if (match) {
|
|
489
|
+
const maxCol = Math.max(0, availWidth - width);
|
|
490
|
+
const percent = parseFloat(match[1]) / 100;
|
|
491
|
+
col = marginLeft + Math.floor(maxCol * percent);
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
// Invalid format, fall back to center
|
|
495
|
+
col = this.resolveAnchorCol("center", width, availWidth, marginLeft);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
else {
|
|
499
|
+
// Absolute column position
|
|
500
|
+
col = opt.col;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
else {
|
|
504
|
+
// Anchor-based (default: center)
|
|
505
|
+
const anchor = opt.anchor ?? "center";
|
|
506
|
+
col = this.resolveAnchorCol(anchor, width, availWidth, marginLeft);
|
|
507
|
+
}
|
|
508
|
+
// Apply offsets
|
|
509
|
+
if (opt.offsetY !== undefined)
|
|
510
|
+
row += opt.offsetY;
|
|
511
|
+
if (opt.offsetX !== undefined)
|
|
512
|
+
col += opt.offsetX;
|
|
513
|
+
// Clamp to terminal bounds (respecting margins)
|
|
514
|
+
row = Math.max(marginTop, Math.min(row, termHeight - marginBottom - effectiveHeight));
|
|
515
|
+
col = Math.max(marginLeft, Math.min(col, termWidth - marginRight - width));
|
|
516
|
+
return { width, row, col, maxHeight };
|
|
517
|
+
}
|
|
518
|
+
resolveAnchorRow(anchor, height, availHeight, marginTop) {
|
|
519
|
+
switch (anchor) {
|
|
520
|
+
case "top-left":
|
|
521
|
+
case "top-center":
|
|
522
|
+
case "top-right":
|
|
523
|
+
return marginTop;
|
|
524
|
+
case "bottom-left":
|
|
525
|
+
case "bottom-center":
|
|
526
|
+
case "bottom-right":
|
|
527
|
+
return marginTop + availHeight - height;
|
|
528
|
+
case "left-center":
|
|
529
|
+
case "center":
|
|
530
|
+
case "right-center":
|
|
531
|
+
return marginTop + Math.floor((availHeight - height) / 2);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
resolveAnchorCol(anchor, width, availWidth, marginLeft) {
|
|
535
|
+
switch (anchor) {
|
|
536
|
+
case "top-left":
|
|
537
|
+
case "left-center":
|
|
538
|
+
case "bottom-left":
|
|
539
|
+
return marginLeft;
|
|
540
|
+
case "top-right":
|
|
541
|
+
case "right-center":
|
|
542
|
+
case "bottom-right":
|
|
543
|
+
return marginLeft + availWidth - width;
|
|
544
|
+
case "top-center":
|
|
545
|
+
case "center":
|
|
546
|
+
case "bottom-center":
|
|
547
|
+
return marginLeft + Math.floor((availWidth - width) / 2);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
/** Composite all overlays into content lines (sorted by focusOrder, higher = on top). */
|
|
551
|
+
compositeOverlays(lines, termWidth, termHeight) {
|
|
552
|
+
if (this.overlayStack.length === 0)
|
|
553
|
+
return lines;
|
|
554
|
+
const result = [...lines];
|
|
555
|
+
// Pre-render all visible overlays and calculate positions
|
|
556
|
+
const rendered = [];
|
|
557
|
+
let minLinesNeeded = result.length;
|
|
558
|
+
const visibleEntries = this.overlayStack.filter((e) => this.isOverlayVisible(e));
|
|
559
|
+
visibleEntries.sort((a, b) => a.focusOrder - b.focusOrder);
|
|
560
|
+
for (const entry of visibleEntries) {
|
|
561
|
+
const { component, options } = entry;
|
|
562
|
+
// Get layout with height=0 first to determine width and maxHeight
|
|
563
|
+
// (width and maxHeight don't depend on overlay height)
|
|
564
|
+
const { width, maxHeight } = this.resolveOverlayLayout(options, 0, termWidth, termHeight);
|
|
565
|
+
// Render component at calculated width
|
|
566
|
+
let overlayLines = component.render(width);
|
|
567
|
+
// Apply maxHeight if specified
|
|
568
|
+
if (maxHeight !== undefined && overlayLines.length > maxHeight) {
|
|
569
|
+
overlayLines = overlayLines.slice(0, maxHeight);
|
|
570
|
+
}
|
|
571
|
+
// Get final row/col with actual overlay height
|
|
572
|
+
const { row, col } = this.resolveOverlayLayout(options, overlayLines.length, termWidth, termHeight);
|
|
573
|
+
rendered.push({ overlayLines, row, col, w: width });
|
|
574
|
+
minLinesNeeded = Math.max(minLinesNeeded, row + overlayLines.length);
|
|
575
|
+
}
|
|
576
|
+
// Pad to at least terminal height so overlays have screen-relative positions.
|
|
577
|
+
// Excludes maxLinesRendered: the historical high-water mark caused self-reinforcing
|
|
578
|
+
// inflation that pushed content into scrollback on terminal widen.
|
|
579
|
+
const workingHeight = Math.max(result.length, termHeight, minLinesNeeded);
|
|
580
|
+
// Extend result with empty lines if content is too short for overlay placement or working area
|
|
581
|
+
while (result.length < workingHeight) {
|
|
582
|
+
result.push("");
|
|
583
|
+
}
|
|
584
|
+
const viewportStart = Math.max(0, workingHeight - termHeight);
|
|
585
|
+
// Composite each overlay
|
|
586
|
+
for (const { overlayLines, row, col, w } of rendered) {
|
|
587
|
+
for (let i = 0; i < overlayLines.length; i++) {
|
|
588
|
+
const idx = viewportStart + row + i;
|
|
589
|
+
if (idx >= 0 && idx < result.length) {
|
|
590
|
+
// Defensive: truncate overlay line to declared width before compositing
|
|
591
|
+
// (components should already respect width, but this ensures it)
|
|
592
|
+
const truncatedOverlayLine = visibleWidth(overlayLines[i]) > w ? sliceByColumn(overlayLines[i], 0, w, true) : overlayLines[i];
|
|
593
|
+
result[idx] = this.compositeLineAt(result[idx], truncatedOverlayLine, col, w, termWidth);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return result;
|
|
598
|
+
}
|
|
599
|
+
static SEGMENT_RESET = "\x1b[0m\x1b]8;;\x07";
|
|
600
|
+
applyLineResets(lines) {
|
|
601
|
+
const reset = TUI.SEGMENT_RESET;
|
|
602
|
+
for (let i = 0; i < lines.length; i++) {
|
|
603
|
+
const line = lines[i];
|
|
604
|
+
if (!isImageLine(line)) {
|
|
605
|
+
lines[i] = line + reset;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
return lines;
|
|
609
|
+
}
|
|
610
|
+
/** Splice overlay content into a base line at a specific column. Single-pass optimized. */
|
|
611
|
+
compositeLineAt(baseLine, overlayLine, startCol, overlayWidth, totalWidth) {
|
|
612
|
+
if (isImageLine(baseLine))
|
|
613
|
+
return baseLine;
|
|
614
|
+
// Single pass through baseLine extracts both before and after segments
|
|
615
|
+
const afterStart = startCol + overlayWidth;
|
|
616
|
+
const base = extractSegments(baseLine, startCol, afterStart, totalWidth - afterStart, true);
|
|
617
|
+
// Extract overlay with width tracking (strict=true to exclude wide chars at boundary)
|
|
618
|
+
const overlay = sliceWithWidth(overlayLine, 0, overlayWidth, true);
|
|
619
|
+
// Pad segments to target widths
|
|
620
|
+
const beforePad = Math.max(0, startCol - base.beforeWidth);
|
|
621
|
+
const overlayPad = Math.max(0, overlayWidth - overlay.width);
|
|
622
|
+
const actualBeforeWidth = Math.max(startCol, base.beforeWidth);
|
|
623
|
+
const actualOverlayWidth = Math.max(overlayWidth, overlay.width);
|
|
624
|
+
const afterTarget = Math.max(0, totalWidth - actualBeforeWidth - actualOverlayWidth);
|
|
625
|
+
const afterPad = Math.max(0, afterTarget - base.afterWidth);
|
|
626
|
+
// Compose result
|
|
627
|
+
const r = TUI.SEGMENT_RESET;
|
|
628
|
+
const result = base.before +
|
|
629
|
+
" ".repeat(beforePad) +
|
|
630
|
+
r +
|
|
631
|
+
overlay.text +
|
|
632
|
+
" ".repeat(overlayPad) +
|
|
633
|
+
r +
|
|
634
|
+
base.after +
|
|
635
|
+
" ".repeat(afterPad);
|
|
636
|
+
// CRITICAL: Always verify and truncate to terminal width.
|
|
637
|
+
// This is the final safeguard against width overflow which would crash the TUI.
|
|
638
|
+
// Width tracking can drift from actual visible width due to:
|
|
639
|
+
// - Complex ANSI/OSC sequences (hyperlinks, colors)
|
|
640
|
+
// - Wide characters at segment boundaries
|
|
641
|
+
// - Edge cases in segment extraction
|
|
642
|
+
const resultWidth = visibleWidth(result);
|
|
643
|
+
if (resultWidth <= totalWidth) {
|
|
644
|
+
return result;
|
|
645
|
+
}
|
|
646
|
+
// Truncate with strict=true to ensure we don't exceed totalWidth
|
|
647
|
+
return sliceByColumn(result, 0, totalWidth, true);
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Find and extract cursor position from rendered lines.
|
|
651
|
+
* Searches for CURSOR_MARKER, calculates its position, and strips it from the output.
|
|
652
|
+
* Only scans the bottom terminal height lines (visible viewport).
|
|
653
|
+
* @param lines - Rendered lines to search
|
|
654
|
+
* @param height - Terminal height (visible viewport size)
|
|
655
|
+
* @returns Cursor position { row, col } or null if no marker found
|
|
656
|
+
*/
|
|
657
|
+
extractCursorPosition(lines, height) {
|
|
658
|
+
// Only scan the bottom `height` lines (visible viewport)
|
|
659
|
+
const viewportTop = Math.max(0, lines.length - height);
|
|
660
|
+
for (let row = lines.length - 1; row >= viewportTop; row--) {
|
|
661
|
+
const line = lines[row];
|
|
662
|
+
const markerIndex = line.indexOf(CURSOR_MARKER);
|
|
663
|
+
if (markerIndex !== -1) {
|
|
664
|
+
// Calculate visual column (width of text before marker)
|
|
665
|
+
const beforeMarker = line.slice(0, markerIndex);
|
|
666
|
+
const col = visibleWidth(beforeMarker);
|
|
667
|
+
// Strip marker from the line
|
|
668
|
+
lines[row] = line.slice(0, markerIndex) + line.slice(markerIndex + CURSOR_MARKER.length);
|
|
669
|
+
return { row, col };
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
return null;
|
|
673
|
+
}
|
|
674
|
+
doRender() {
|
|
675
|
+
if (this.stopped)
|
|
676
|
+
return;
|
|
677
|
+
const width = this.terminal.columns;
|
|
678
|
+
const height = this.terminal.rows;
|
|
679
|
+
const widthChanged = this.previousWidth !== 0 && this.previousWidth !== width;
|
|
680
|
+
const heightChanged = this.previousHeight !== 0 && this.previousHeight !== height;
|
|
681
|
+
const previousBufferLength = this.previousHeight > 0 ? this.previousViewportTop + this.previousHeight : height;
|
|
682
|
+
let prevViewportTop = heightChanged ? Math.max(0, previousBufferLength - height) : this.previousViewportTop;
|
|
683
|
+
let viewportTop = prevViewportTop;
|
|
684
|
+
let hardwareCursorRow = this.hardwareCursorRow;
|
|
685
|
+
const computeLineDiff = (targetRow) => {
|
|
686
|
+
const currentScreenRow = hardwareCursorRow - prevViewportTop;
|
|
687
|
+
const targetScreenRow = targetRow - viewportTop;
|
|
688
|
+
return targetScreenRow - currentScreenRow;
|
|
689
|
+
};
|
|
690
|
+
// Render all components to get new lines
|
|
691
|
+
let newLines = this.render(width);
|
|
692
|
+
// Composite overlays into the rendered lines (before differential compare)
|
|
693
|
+
if (this.overlayStack.length > 0) {
|
|
694
|
+
newLines = this.compositeOverlays(newLines, width, height);
|
|
695
|
+
}
|
|
696
|
+
// Extract cursor position before applying line resets (marker must be found first)
|
|
697
|
+
const cursorPos = this.extractCursorPosition(newLines, height);
|
|
698
|
+
newLines = this.applyLineResets(newLines);
|
|
699
|
+
// Helper to clear scrollback and viewport and render all new lines
|
|
700
|
+
const fullRender = (clear) => {
|
|
701
|
+
this.fullRedrawCount += 1;
|
|
702
|
+
let buffer = "\x1b[?2026h"; // Begin synchronized output
|
|
703
|
+
if (clear)
|
|
704
|
+
buffer += "\x1b[2J\x1b[H\x1b[3J"; // Clear screen, home, then clear scrollback
|
|
705
|
+
for (let i = 0; i < newLines.length; i++) {
|
|
706
|
+
if (i > 0)
|
|
707
|
+
buffer += "\r\n";
|
|
708
|
+
buffer += newLines[i];
|
|
709
|
+
}
|
|
710
|
+
buffer += "\x1b[?2026l"; // End synchronized output
|
|
711
|
+
this.terminal.write(buffer);
|
|
712
|
+
this.cursorRow = Math.max(0, newLines.length - 1);
|
|
713
|
+
this.hardwareCursorRow = this.cursorRow;
|
|
714
|
+
// Reset max lines when clearing, otherwise track growth
|
|
715
|
+
if (clear) {
|
|
716
|
+
this.maxLinesRendered = newLines.length;
|
|
717
|
+
}
|
|
718
|
+
else {
|
|
719
|
+
this.maxLinesRendered = Math.max(this.maxLinesRendered, newLines.length);
|
|
720
|
+
}
|
|
721
|
+
const bufferLength = Math.max(height, newLines.length);
|
|
722
|
+
this.previousViewportTop = Math.max(0, bufferLength - height);
|
|
723
|
+
this.positionHardwareCursor(cursorPos, newLines.length);
|
|
724
|
+
this.previousLines = newLines;
|
|
725
|
+
this.previousWidth = width;
|
|
726
|
+
this.previousHeight = height;
|
|
727
|
+
};
|
|
728
|
+
const debugRedraw = process.env.PI_DEBUG_REDRAW === "1";
|
|
729
|
+
const logRedraw = (reason) => {
|
|
730
|
+
if (!debugRedraw)
|
|
731
|
+
return;
|
|
732
|
+
const logPath = path.join(os.homedir(), ".pi", "agent", "pi-debug.log");
|
|
733
|
+
const msg = `[${new Date().toISOString()}] fullRender: ${reason} (prev=${this.previousLines.length}, new=${newLines.length}, height=${height})\n`;
|
|
734
|
+
fs.appendFileSync(logPath, msg);
|
|
735
|
+
};
|
|
736
|
+
// First render - just output everything without clearing (assumes clean screen)
|
|
737
|
+
if (this.previousLines.length === 0 && !widthChanged && !heightChanged) {
|
|
738
|
+
logRedraw("first render");
|
|
739
|
+
fullRender(false);
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
// Width changes always need a full re-render because wrapping changes.
|
|
743
|
+
if (widthChanged) {
|
|
744
|
+
logRedraw(`terminal width changed (${this.previousWidth} -> ${width})`);
|
|
745
|
+
fullRender(true);
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
// Height changes normally need a full re-render to keep the visible viewport aligned,
|
|
749
|
+
// but Termux changes height when the software keyboard shows or hides.
|
|
750
|
+
// In that environment, a full redraw causes the entire history to replay on every toggle.
|
|
751
|
+
if (heightChanged && !isTermuxSession()) {
|
|
752
|
+
logRedraw(`terminal height changed (${this.previousHeight} -> ${height})`);
|
|
753
|
+
fullRender(true);
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
// Content shrunk below the working area and no overlays - re-render to clear empty rows
|
|
757
|
+
// (overlays need the padding, so only do this when no overlays are active)
|
|
758
|
+
// Configurable via setClearOnShrink() or PI_CLEAR_ON_SHRINK=0 env var
|
|
759
|
+
if (this.clearOnShrink && newLines.length < this.maxLinesRendered && this.overlayStack.length === 0) {
|
|
760
|
+
logRedraw(`clearOnShrink (maxLinesRendered=${this.maxLinesRendered})`);
|
|
761
|
+
fullRender(true);
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
// Find first and last changed lines
|
|
765
|
+
let firstChanged = -1;
|
|
766
|
+
let lastChanged = -1;
|
|
767
|
+
const maxLines = Math.max(newLines.length, this.previousLines.length);
|
|
768
|
+
for (let i = 0; i < maxLines; i++) {
|
|
769
|
+
const oldLine = i < this.previousLines.length ? this.previousLines[i] : "";
|
|
770
|
+
const newLine = i < newLines.length ? newLines[i] : "";
|
|
771
|
+
if (oldLine !== newLine) {
|
|
772
|
+
if (firstChanged === -1) {
|
|
773
|
+
firstChanged = i;
|
|
774
|
+
}
|
|
775
|
+
lastChanged = i;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
const appendedLines = newLines.length > this.previousLines.length;
|
|
779
|
+
if (appendedLines) {
|
|
780
|
+
if (firstChanged === -1) {
|
|
781
|
+
firstChanged = this.previousLines.length;
|
|
782
|
+
}
|
|
783
|
+
lastChanged = newLines.length - 1;
|
|
784
|
+
}
|
|
785
|
+
const appendStart = appendedLines && firstChanged === this.previousLines.length && firstChanged > 0;
|
|
786
|
+
// No changes - but still need to update hardware cursor position if it moved
|
|
787
|
+
if (firstChanged === -1) {
|
|
788
|
+
this.positionHardwareCursor(cursorPos, newLines.length);
|
|
789
|
+
this.previousViewportTop = prevViewportTop;
|
|
790
|
+
this.previousHeight = height;
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
// All changes are in deleted lines (nothing to render, just clear)
|
|
794
|
+
if (firstChanged >= newLines.length) {
|
|
795
|
+
if (this.previousLines.length > newLines.length) {
|
|
796
|
+
let buffer = "\x1b[?2026h";
|
|
797
|
+
// Move to end of new content (clamp to 0 for empty content)
|
|
798
|
+
const targetRow = Math.max(0, newLines.length - 1);
|
|
799
|
+
if (targetRow < prevViewportTop) {
|
|
800
|
+
logRedraw(`deleted lines moved viewport up (${targetRow} < ${prevViewportTop})`);
|
|
801
|
+
fullRender(true);
|
|
802
|
+
return;
|
|
803
|
+
}
|
|
804
|
+
const lineDiff = computeLineDiff(targetRow);
|
|
805
|
+
if (lineDiff > 0)
|
|
806
|
+
buffer += `\x1b[${lineDiff}B`;
|
|
807
|
+
else if (lineDiff < 0)
|
|
808
|
+
buffer += `\x1b[${-lineDiff}A`;
|
|
809
|
+
buffer += "\r";
|
|
810
|
+
// Clear extra lines without scrolling
|
|
811
|
+
const extraLines = this.previousLines.length - newLines.length;
|
|
812
|
+
if (extraLines > height) {
|
|
813
|
+
logRedraw(`extraLines > height (${extraLines} > ${height})`);
|
|
814
|
+
fullRender(true);
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
if (extraLines > 0) {
|
|
818
|
+
buffer += "\x1b[1B";
|
|
819
|
+
}
|
|
820
|
+
for (let i = 0; i < extraLines; i++) {
|
|
821
|
+
buffer += "\r\x1b[2K";
|
|
822
|
+
if (i < extraLines - 1)
|
|
823
|
+
buffer += "\x1b[1B";
|
|
824
|
+
}
|
|
825
|
+
if (extraLines > 0) {
|
|
826
|
+
buffer += `\x1b[${extraLines}A`;
|
|
827
|
+
}
|
|
828
|
+
buffer += "\x1b[?2026l";
|
|
829
|
+
this.terminal.write(buffer);
|
|
830
|
+
this.cursorRow = targetRow;
|
|
831
|
+
this.hardwareCursorRow = targetRow;
|
|
832
|
+
}
|
|
833
|
+
this.positionHardwareCursor(cursorPos, newLines.length);
|
|
834
|
+
this.previousLines = newLines;
|
|
835
|
+
this.previousWidth = width;
|
|
836
|
+
this.previousHeight = height;
|
|
837
|
+
this.previousViewportTop = prevViewportTop;
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
// Differential rendering can only touch what was actually visible.
|
|
841
|
+
// If the first changed line is above the previous viewport, we need a full redraw.
|
|
842
|
+
if (firstChanged < prevViewportTop) {
|
|
843
|
+
logRedraw(`firstChanged < viewportTop (${firstChanged} < ${prevViewportTop})`);
|
|
844
|
+
fullRender(true);
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
// Render from first changed line to end
|
|
848
|
+
// Build buffer with all updates wrapped in synchronized output
|
|
849
|
+
let buffer = "\x1b[?2026h"; // Begin synchronized output
|
|
850
|
+
const prevViewportBottom = prevViewportTop + height - 1;
|
|
851
|
+
const moveTargetRow = appendStart ? firstChanged - 1 : firstChanged;
|
|
852
|
+
if (moveTargetRow > prevViewportBottom) {
|
|
853
|
+
const currentScreenRow = Math.max(0, Math.min(height - 1, hardwareCursorRow - prevViewportTop));
|
|
854
|
+
const moveToBottom = height - 1 - currentScreenRow;
|
|
855
|
+
if (moveToBottom > 0) {
|
|
856
|
+
buffer += `\x1b[${moveToBottom}B`;
|
|
857
|
+
}
|
|
858
|
+
const scroll = moveTargetRow - prevViewportBottom;
|
|
859
|
+
buffer += "\r\n".repeat(scroll);
|
|
860
|
+
prevViewportTop += scroll;
|
|
861
|
+
viewportTop += scroll;
|
|
862
|
+
hardwareCursorRow = moveTargetRow;
|
|
863
|
+
}
|
|
864
|
+
// Move cursor to first changed line (use hardwareCursorRow for actual position)
|
|
865
|
+
const lineDiff = computeLineDiff(moveTargetRow);
|
|
866
|
+
if (lineDiff > 0) {
|
|
867
|
+
buffer += `\x1b[${lineDiff}B`; // Move down
|
|
868
|
+
}
|
|
869
|
+
else if (lineDiff < 0) {
|
|
870
|
+
buffer += `\x1b[${-lineDiff}A`; // Move up
|
|
871
|
+
}
|
|
872
|
+
buffer += appendStart ? "\r\n" : "\r"; // Move to column 0
|
|
873
|
+
// Only render changed lines (firstChanged to lastChanged), not all lines to end
|
|
874
|
+
// This reduces flicker when only a single line changes (e.g., spinner animation)
|
|
875
|
+
const renderEnd = Math.min(lastChanged, newLines.length - 1);
|
|
876
|
+
for (let i = firstChanged; i <= renderEnd; i++) {
|
|
877
|
+
if (i > firstChanged)
|
|
878
|
+
buffer += "\r\n";
|
|
879
|
+
buffer += "\x1b[2K"; // Clear current line
|
|
880
|
+
const line = newLines[i];
|
|
881
|
+
const isImage = isImageLine(line);
|
|
882
|
+
if (!isImage && visibleWidth(line) > width) {
|
|
883
|
+
// Log all lines to crash file for debugging
|
|
884
|
+
const crashLogPath = path.join(os.homedir(), ".pi", "agent", "pi-crash.log");
|
|
885
|
+
const crashData = [
|
|
886
|
+
`Crash at ${new Date().toISOString()}`,
|
|
887
|
+
`Terminal width: ${width}`,
|
|
888
|
+
`Line ${i} visible width: ${visibleWidth(line)}`,
|
|
889
|
+
"",
|
|
890
|
+
"=== All rendered lines ===",
|
|
891
|
+
...newLines.map((l, idx) => `[${idx}] (w=${visibleWidth(l)}) ${l}`),
|
|
892
|
+
"",
|
|
893
|
+
].join("\n");
|
|
894
|
+
fs.mkdirSync(path.dirname(crashLogPath), { recursive: true });
|
|
895
|
+
fs.writeFileSync(crashLogPath, crashData);
|
|
896
|
+
// Clean up terminal state before throwing
|
|
897
|
+
this.stop();
|
|
898
|
+
const errorMsg = [
|
|
899
|
+
`Rendered line ${i} exceeds terminal width (${visibleWidth(line)} > ${width}).`,
|
|
900
|
+
"",
|
|
901
|
+
"This is likely caused by a custom TUI component not truncating its output.",
|
|
902
|
+
"Use visibleWidth() to measure and truncateToWidth() to truncate lines.",
|
|
903
|
+
"",
|
|
904
|
+
`Debug log written to: ${crashLogPath}`,
|
|
905
|
+
].join("\n");
|
|
906
|
+
throw new Error(errorMsg);
|
|
907
|
+
}
|
|
908
|
+
buffer += line;
|
|
909
|
+
}
|
|
910
|
+
// Track where cursor ended up after rendering
|
|
911
|
+
let finalCursorRow = renderEnd;
|
|
912
|
+
// If we had more lines before, clear them and move cursor back
|
|
913
|
+
if (this.previousLines.length > newLines.length) {
|
|
914
|
+
// Move to end of new content first if we stopped before it
|
|
915
|
+
if (renderEnd < newLines.length - 1) {
|
|
916
|
+
const moveDown = newLines.length - 1 - renderEnd;
|
|
917
|
+
buffer += `\x1b[${moveDown}B`;
|
|
918
|
+
finalCursorRow = newLines.length - 1;
|
|
919
|
+
}
|
|
920
|
+
const extraLines = this.previousLines.length - newLines.length;
|
|
921
|
+
for (let i = newLines.length; i < this.previousLines.length; i++) {
|
|
922
|
+
buffer += "\r\n\x1b[2K";
|
|
923
|
+
}
|
|
924
|
+
// Move cursor back to end of new content
|
|
925
|
+
buffer += `\x1b[${extraLines}A`;
|
|
926
|
+
}
|
|
927
|
+
buffer += "\x1b[?2026l"; // End synchronized output
|
|
928
|
+
if (process.env.PI_TUI_DEBUG === "1") {
|
|
929
|
+
const debugDir = "/tmp/tui";
|
|
930
|
+
fs.mkdirSync(debugDir, { recursive: true });
|
|
931
|
+
const debugPath = path.join(debugDir, `render-${Date.now()}-${Math.random().toString(36).slice(2)}.log`);
|
|
932
|
+
const debugData = [
|
|
933
|
+
`firstChanged: ${firstChanged}`,
|
|
934
|
+
`viewportTop: ${viewportTop}`,
|
|
935
|
+
`cursorRow: ${this.cursorRow}`,
|
|
936
|
+
`height: ${height}`,
|
|
937
|
+
`lineDiff: ${lineDiff}`,
|
|
938
|
+
`hardwareCursorRow: ${hardwareCursorRow}`,
|
|
939
|
+
`renderEnd: ${renderEnd}`,
|
|
940
|
+
`finalCursorRow: ${finalCursorRow}`,
|
|
941
|
+
`cursorPos: ${JSON.stringify(cursorPos)}`,
|
|
942
|
+
`newLines.length: ${newLines.length}`,
|
|
943
|
+
`previousLines.length: ${this.previousLines.length}`,
|
|
944
|
+
"",
|
|
945
|
+
"=== newLines ===",
|
|
946
|
+
JSON.stringify(newLines, null, 2),
|
|
947
|
+
"",
|
|
948
|
+
"=== previousLines ===",
|
|
949
|
+
JSON.stringify(this.previousLines, null, 2),
|
|
950
|
+
"",
|
|
951
|
+
"=== buffer ===",
|
|
952
|
+
JSON.stringify(buffer),
|
|
953
|
+
].join("\n");
|
|
954
|
+
fs.writeFileSync(debugPath, debugData);
|
|
955
|
+
}
|
|
956
|
+
// Write entire buffer at once
|
|
957
|
+
this.terminal.write(buffer);
|
|
958
|
+
// Track cursor position for next render
|
|
959
|
+
// cursorRow tracks end of content (for viewport calculation)
|
|
960
|
+
// hardwareCursorRow tracks actual terminal cursor position (for movement)
|
|
961
|
+
this.cursorRow = Math.max(0, newLines.length - 1);
|
|
962
|
+
this.hardwareCursorRow = finalCursorRow;
|
|
963
|
+
// Track terminal's working area (grows but doesn't shrink unless cleared)
|
|
964
|
+
this.maxLinesRendered = Math.max(this.maxLinesRendered, newLines.length);
|
|
965
|
+
this.previousViewportTop = Math.max(prevViewportTop, finalCursorRow - height + 1);
|
|
966
|
+
// Position hardware cursor for IME
|
|
967
|
+
this.positionHardwareCursor(cursorPos, newLines.length);
|
|
968
|
+
this.previousLines = newLines;
|
|
969
|
+
this.previousWidth = width;
|
|
970
|
+
this.previousHeight = height;
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* Position the hardware cursor for IME candidate window.
|
|
974
|
+
* @param cursorPos The cursor position extracted from rendered output, or null
|
|
975
|
+
* @param totalLines Total number of rendered lines
|
|
976
|
+
*/
|
|
977
|
+
positionHardwareCursor(cursorPos, totalLines) {
|
|
978
|
+
if (!cursorPos || totalLines <= 0) {
|
|
979
|
+
this.terminal.hideCursor();
|
|
980
|
+
return;
|
|
981
|
+
}
|
|
982
|
+
// Clamp cursor position to valid range
|
|
983
|
+
const targetRow = Math.max(0, Math.min(cursorPos.row, totalLines - 1));
|
|
984
|
+
const targetCol = Math.max(0, cursorPos.col);
|
|
985
|
+
// Move cursor from current position to target
|
|
986
|
+
const rowDelta = targetRow - this.hardwareCursorRow;
|
|
987
|
+
let buffer = "";
|
|
988
|
+
if (rowDelta > 0) {
|
|
989
|
+
buffer += `\x1b[${rowDelta}B`; // Move down
|
|
990
|
+
}
|
|
991
|
+
else if (rowDelta < 0) {
|
|
992
|
+
buffer += `\x1b[${-rowDelta}A`; // Move up
|
|
993
|
+
}
|
|
994
|
+
// Move to absolute column (1-indexed)
|
|
995
|
+
buffer += `\x1b[${targetCol + 1}G`;
|
|
996
|
+
if (buffer) {
|
|
997
|
+
this.terminal.write(buffer);
|
|
998
|
+
}
|
|
999
|
+
this.hardwareCursorRow = targetRow;
|
|
1000
|
+
if (this.showHardwareCursor) {
|
|
1001
|
+
this.terminal.showCursor();
|
|
1002
|
+
}
|
|
1003
|
+
else {
|
|
1004
|
+
this.terminal.hideCursor();
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
//# sourceMappingURL=tui.js.map
|