@tulex-cli/tulex-code 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/dist/.last_build +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +98 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +121 -0
- package/dist/src/acp-integration/acpAgent.d.ts +59 -0
- package/dist/src/acp-integration/acpAgent.js +3646 -0
- package/dist/src/acp-integration/acpAgent.js.map +1 -0
- package/dist/src/acp-integration/acpAgent.test.d.ts +6 -0
- package/dist/src/acp-integration/acpAgent.test.js +3690 -0
- package/dist/src/acp-integration/acpAgent.test.js.map +1 -0
- package/dist/src/acp-integration/acpAgent.worktree.test.d.ts +16 -0
- package/dist/src/acp-integration/acpAgent.worktree.test.js +354 -0
- package/dist/src/acp-integration/acpAgent.worktree.test.js.map +1 -0
- package/dist/src/acp-integration/authMethods.d.ts +9 -0
- package/dist/src/acp-integration/authMethods.js +28 -0
- package/dist/src/acp-integration/authMethods.js.map +1 -0
- package/dist/src/acp-integration/authMethods.test.d.ts +6 -0
- package/dist/src/acp-integration/authMethods.test.js +23 -0
- package/dist/src/acp-integration/authMethods.test.js.map +1 -0
- package/dist/src/acp-integration/authPreflight.test.d.ts +6 -0
- package/dist/src/acp-integration/authPreflight.test.js +54 -0
- package/dist/src/acp-integration/authPreflight.test.js.map +1 -0
- package/dist/src/acp-integration/errorCodes.d.ts +15 -0
- package/dist/src/acp-integration/errorCodes.js +22 -0
- package/dist/src/acp-integration/errorCodes.js.map +1 -0
- package/dist/src/acp-integration/runtimeOutputDirContext.d.ts +2 -0
- package/dist/src/acp-integration/runtimeOutputDirContext.js +5 -0
- package/dist/src/acp-integration/runtimeOutputDirContext.js.map +1 -0
- package/dist/src/acp-integration/runtimeOutputDirContext.test.d.ts +1 -0
- package/dist/src/acp-integration/runtimeOutputDirContext.test.js +29 -0
- package/dist/src/acp-integration/runtimeOutputDirContext.test.js.map +1 -0
- package/dist/src/acp-integration/service/filesystem.d.ts +17 -0
- package/dist/src/acp-integration/service/filesystem.js +73 -0
- package/dist/src/acp-integration/service/filesystem.js.map +1 -0
- package/dist/src/acp-integration/service/filesystem.test.d.ts +6 -0
- package/dist/src/acp-integration/service/filesystem.test.js +85 -0
- package/dist/src/acp-integration/service/filesystem.test.js.map +1 -0
- package/dist/src/acp-integration/session/HistoryReplayer.d.ts +63 -0
- package/dist/src/acp-integration/session/HistoryReplayer.js +222 -0
- package/dist/src/acp-integration/session/HistoryReplayer.js.map +1 -0
- package/dist/src/acp-integration/session/HistoryReplayer.test.d.ts +6 -0
- package/dist/src/acp-integration/session/HistoryReplayer.test.js +405 -0
- package/dist/src/acp-integration/session/HistoryReplayer.test.js.map +1 -0
- package/dist/src/acp-integration/session/Session.d.ts +150 -0
- package/dist/src/acp-integration/session/Session.js +2381 -0
- package/dist/src/acp-integration/session/Session.js.map +1 -0
- package/dist/src/acp-integration/session/Session.test.d.ts +6 -0
- package/dist/src/acp-integration/session/Session.test.js +3845 -0
- package/dist/src/acp-integration/session/Session.test.js.map +1 -0
- package/dist/src/acp-integration/session/Session.worktree.test.d.ts +18 -0
- package/dist/src/acp-integration/session/Session.worktree.test.js +195 -0
- package/dist/src/acp-integration/session/Session.worktree.test.js.map +1 -0
- package/dist/src/acp-integration/session/SubAgentTracker.d.ts +58 -0
- package/dist/src/acp-integration/session/SubAgentTracker.js +208 -0
- package/dist/src/acp-integration/session/SubAgentTracker.js.map +1 -0
- package/dist/src/acp-integration/session/SubAgentTracker.test.d.ts +6 -0
- package/dist/src/acp-integration/session/SubAgentTracker.test.js +612 -0
- package/dist/src/acp-integration/session/SubAgentTracker.test.js.map +1 -0
- package/dist/src/acp-integration/session/emitters/BaseEmitter.d.ts +34 -0
- package/dist/src/acp-integration/session/emitters/BaseEmitter.js +53 -0
- package/dist/src/acp-integration/session/emitters/BaseEmitter.js.map +1 -0
- package/dist/src/acp-integration/session/emitters/MessageEmitter.d.ts +61 -0
- package/dist/src/acp-integration/session/emitters/MessageEmitter.js +124 -0
- package/dist/src/acp-integration/session/emitters/MessageEmitter.js.map +1 -0
- package/dist/src/acp-integration/session/emitters/MessageEmitter.test.d.ts +6 -0
- package/dist/src/acp-integration/session/emitters/MessageEmitter.test.js +202 -0
- package/dist/src/acp-integration/session/emitters/MessageEmitter.test.js.map +1 -0
- package/dist/src/acp-integration/session/emitters/PlanEmitter.d.ts +39 -0
- package/dist/src/acp-integration/session/emitters/PlanEmitter.js +83 -0
- package/dist/src/acp-integration/session/emitters/PlanEmitter.js.map +1 -0
- package/dist/src/acp-integration/session/emitters/PlanEmitter.test.d.ts +6 -0
- package/dist/src/acp-integration/session/emitters/PlanEmitter.test.js +176 -0
- package/dist/src/acp-integration/session/emitters/PlanEmitter.test.js.map +1 -0
- package/dist/src/acp-integration/session/emitters/ToolCallEmitter.d.ts +82 -0
- package/dist/src/acp-integration/session/emitters/ToolCallEmitter.js +284 -0
- package/dist/src/acp-integration/session/emitters/ToolCallEmitter.js.map +1 -0
- package/dist/src/acp-integration/session/emitters/ToolCallEmitter.test.d.ts +6 -0
- package/dist/src/acp-integration/session/emitters/ToolCallEmitter.test.js +607 -0
- package/dist/src/acp-integration/session/emitters/ToolCallEmitter.test.js.map +1 -0
- package/dist/src/acp-integration/session/emitters/index.d.ts +9 -0
- package/dist/src/acp-integration/session/emitters/index.js +10 -0
- package/dist/src/acp-integration/session/emitters/index.js.map +1 -0
- package/dist/src/acp-integration/session/index.d.ts +24 -0
- package/dist/src/acp-integration/session/index.js +16 -0
- package/dist/src/acp-integration/session/index.js.map +1 -0
- package/dist/src/acp-integration/session/permissionUtils.d.ts +9 -0
- package/dist/src/acp-integration/session/permissionUtils.js +165 -0
- package/dist/src/acp-integration/session/permissionUtils.js.map +1 -0
- package/dist/src/acp-integration/session/permissionUtils.test.d.ts +6 -0
- package/dist/src/acp-integration/session/permissionUtils.test.js +83 -0
- package/dist/src/acp-integration/session/permissionUtils.test.js.map +1 -0
- package/dist/src/acp-integration/session/rewrite/LlmRewriter.d.ts +26 -0
- package/dist/src/acp-integration/session/rewrite/LlmRewriter.js +131 -0
- package/dist/src/acp-integration/session/rewrite/LlmRewriter.js.map +1 -0
- package/dist/src/acp-integration/session/rewrite/LlmRewriter.test.d.ts +6 -0
- package/dist/src/acp-integration/session/rewrite/LlmRewriter.test.js +188 -0
- package/dist/src/acp-integration/session/rewrite/LlmRewriter.test.js.map +1 -0
- package/dist/src/acp-integration/session/rewrite/MessageRewriteMiddleware.d.ts +42 -0
- package/dist/src/acp-integration/session/rewrite/MessageRewriteMiddleware.js +159 -0
- package/dist/src/acp-integration/session/rewrite/MessageRewriteMiddleware.js.map +1 -0
- package/dist/src/acp-integration/session/rewrite/MessageRewriteMiddleware.test.d.ts +6 -0
- package/dist/src/acp-integration/session/rewrite/MessageRewriteMiddleware.test.js +255 -0
- package/dist/src/acp-integration/session/rewrite/MessageRewriteMiddleware.test.js.map +1 -0
- package/dist/src/acp-integration/session/rewrite/README.md +35 -0
- package/dist/src/acp-integration/session/rewrite/TurnBuffer.d.ts +25 -0
- package/dist/src/acp-integration/session/rewrite/TurnBuffer.js +53 -0
- package/dist/src/acp-integration/session/rewrite/TurnBuffer.js.map +1 -0
- package/dist/src/acp-integration/session/rewrite/TurnBuffer.test.d.ts +6 -0
- package/dist/src/acp-integration/session/rewrite/TurnBuffer.test.js +95 -0
- package/dist/src/acp-integration/session/rewrite/TurnBuffer.test.js.map +1 -0
- package/dist/src/acp-integration/session/rewrite/config.d.ts +13 -0
- package/dist/src/acp-integration/session/rewrite/config.js +19 -0
- package/dist/src/acp-integration/session/rewrite/config.js.map +1 -0
- package/dist/src/acp-integration/session/rewrite/config.test.d.ts +6 -0
- package/dist/src/acp-integration/session/rewrite/config.test.js +72 -0
- package/dist/src/acp-integration/session/rewrite/config.test.js.map +1 -0
- package/dist/src/acp-integration/session/rewrite/index.d.ts +8 -0
- package/dist/src/acp-integration/session/rewrite/index.js +8 -0
- package/dist/src/acp-integration/session/rewrite/index.js.map +1 -0
- package/dist/src/acp-integration/session/rewrite/types.d.ts +36 -0
- package/dist/src/acp-integration/session/rewrite/types.js +7 -0
- package/dist/src/acp-integration/session/rewrite/types.js.map +1 -0
- package/dist/src/acp-integration/session/types.d.ts +93 -0
- package/dist/src/acp-integration/session/types.js +7 -0
- package/dist/src/acp-integration/session/types.js.map +1 -0
- package/dist/src/commands/auth.d.ts +9 -0
- package/dist/src/commands/auth.js +55 -0
- package/dist/src/commands/auth.js.map +1 -0
- package/dist/src/commands/auth.test.d.ts +6 -0
- package/dist/src/commands/auth.test.js +84 -0
- package/dist/src/commands/auth.test.js.map +1 -0
- package/dist/src/commands/channel/channel-registry.d.ts +4 -0
- package/dist/src/commands/channel/channel-registry.js +33 -0
- package/dist/src/commands/channel/channel-registry.js.map +1 -0
- package/dist/src/commands/channel/config-utils.d.ts +4 -0
- package/dist/src/commands/channel/config-utils.js +66 -0
- package/dist/src/commands/channel/config-utils.js.map +1 -0
- package/dist/src/commands/channel/config-utils.test.d.ts +1 -0
- package/dist/src/commands/channel/config-utils.test.js +142 -0
- package/dist/src/commands/channel/config-utils.test.js.map +1 -0
- package/dist/src/commands/channel/configure.d.ts +4 -0
- package/dist/src/commands/channel/configure.js +65 -0
- package/dist/src/commands/channel/configure.js.map +1 -0
- package/dist/src/commands/channel/pairing.d.ts +8 -0
- package/dist/src/commands/channel/pairing.js +49 -0
- package/dist/src/commands/channel/pairing.js.map +1 -0
- package/dist/src/commands/channel/pidfile.d.ts +25 -0
- package/dist/src/commands/channel/pidfile.js +104 -0
- package/dist/src/commands/channel/pidfile.js.map +1 -0
- package/dist/src/commands/channel/pidfile.test.d.ts +1 -0
- package/dist/src/commands/channel/pidfile.test.js +143 -0
- package/dist/src/commands/channel/pidfile.test.js.map +1 -0
- package/dist/src/commands/channel/start.d.ts +16 -0
- package/dist/src/commands/channel/start.js +352 -0
- package/dist/src/commands/channel/start.js.map +1 -0
- package/dist/src/commands/channel/start.test.d.ts +1 -0
- package/dist/src/commands/channel/start.test.js +156 -0
- package/dist/src/commands/channel/start.test.js.map +1 -0
- package/dist/src/commands/channel/status.d.ts +2 -0
- package/dist/src/commands/channel/status.js +58 -0
- package/dist/src/commands/channel/status.js.map +1 -0
- package/dist/src/commands/channel/stop.d.ts +2 -0
- package/dist/src/commands/channel/stop.js +34 -0
- package/dist/src/commands/channel/stop.js.map +1 -0
- package/dist/src/commands/channel.d.ts +2 -0
- package/dist/src/commands/channel.js +29 -0
- package/dist/src/commands/channel.js.map +1 -0
- package/dist/src/commands/extensions/consent.d.ts +47 -0
- package/dist/src/commands/extensions/consent.js +182 -0
- package/dist/src/commands/extensions/consent.js.map +1 -0
- package/dist/src/commands/extensions/consent.test.d.ts +6 -0
- package/dist/src/commands/extensions/consent.test.js +277 -0
- package/dist/src/commands/extensions/consent.test.js.map +1 -0
- package/dist/src/commands/extensions/disable.d.ts +13 -0
- package/dist/src/commands/extensions/disable.js +65 -0
- package/dist/src/commands/extensions/disable.js.map +1 -0
- package/dist/src/commands/extensions/disable.test.d.ts +6 -0
- package/dist/src/commands/extensions/disable.test.js +101 -0
- package/dist/src/commands/extensions/disable.test.js.map +1 -0
- package/dist/src/commands/extensions/enable.d.ts +13 -0
- package/dist/src/commands/extensions/enable.js +70 -0
- package/dist/src/commands/extensions/enable.js.map +1 -0
- package/dist/src/commands/extensions/enable.test.d.ts +6 -0
- package/dist/src/commands/extensions/enable.test.js +93 -0
- package/dist/src/commands/extensions/enable.test.js.map +1 -0
- package/dist/src/commands/extensions/examples/agent/agents/diary.md +86 -0
- package/dist/src/commands/extensions/examples/agent/qwen-extension.json +5 -0
- package/dist/src/commands/extensions/examples/commands/commands/fs/grep-code.md +3 -0
- package/dist/src/commands/extensions/examples/commands/qwen-extension.json +5 -0
- package/dist/src/commands/extensions/examples/context/QWEN.md +8 -0
- package/dist/src/commands/extensions/examples/context/qwen-extension.json +5 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.ts +60 -0
- package/dist/src/commands/extensions/examples/mcp-server/package.json +18 -0
- package/dist/src/commands/extensions/examples/mcp-server/qwen-extension.json +12 -0
- package/dist/src/commands/extensions/examples/mcp-server/tsconfig.json +13 -0
- package/dist/src/commands/extensions/examples/skills/qwen-extension.json +5 -0
- package/dist/src/commands/extensions/examples/skills/skills/synonyms/SKILL.md +48 -0
- package/dist/src/commands/extensions/install.d.ts +17 -0
- package/dist/src/commands/extensions/install.js +105 -0
- package/dist/src/commands/extensions/install.js.map +1 -0
- package/dist/src/commands/extensions/install.test.d.ts +6 -0
- package/dist/src/commands/extensions/install.test.js +164 -0
- package/dist/src/commands/extensions/install.test.js.map +1 -0
- package/dist/src/commands/extensions/link.d.ts +12 -0
- package/dist/src/commands/extensions/link.js +48 -0
- package/dist/src/commands/extensions/link.js.map +1 -0
- package/dist/src/commands/extensions/link.test.d.ts +6 -0
- package/dist/src/commands/extensions/link.test.js +74 -0
- package/dist/src/commands/extensions/link.test.js.map +1 -0
- package/dist/src/commands/extensions/list.d.ts +8 -0
- package/dist/src/commands/extensions/list.js +35 -0
- package/dist/src/commands/extensions/list.js.map +1 -0
- package/dist/src/commands/extensions/list.test.d.ts +6 -0
- package/dist/src/commands/extensions/list.test.js +76 -0
- package/dist/src/commands/extensions/list.test.js.map +1 -0
- package/dist/src/commands/extensions/new.d.ts +7 -0
- package/dist/src/commands/extensions/new.js +95 -0
- package/dist/src/commands/extensions/new.js.map +1 -0
- package/dist/src/commands/extensions/new.test.d.ts +6 -0
- package/dist/src/commands/extensions/new.test.js +59 -0
- package/dist/src/commands/extensions/new.test.js.map +1 -0
- package/dist/src/commands/extensions/settings.d.ts +7 -0
- package/dist/src/commands/extensions/settings.js +115 -0
- package/dist/src/commands/extensions/settings.js.map +1 -0
- package/dist/src/commands/extensions/settings.test.d.ts +6 -0
- package/dist/src/commands/extensions/settings.test.js +251 -0
- package/dist/src/commands/extensions/settings.test.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.d.ts +12 -0
- package/dist/src/commands/extensions/uninstall.js +50 -0
- package/dist/src/commands/extensions/uninstall.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.test.d.ts +6 -0
- package/dist/src/commands/extensions/uninstall.test.js +18 -0
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -0
- package/dist/src/commands/extensions/update.d.ts +13 -0
- package/dist/src/commands/extensions/update.js +102 -0
- package/dist/src/commands/extensions/update.js.map +1 -0
- package/dist/src/commands/extensions/update.test.d.ts +6 -0
- package/dist/src/commands/extensions/update.test.js +185 -0
- package/dist/src/commands/extensions/update.test.js.map +1 -0
- package/dist/src/commands/extensions/utils.d.ts +8 -0
- package/dist/src/commands/extensions/utils.js +79 -0
- package/dist/src/commands/extensions/utils.js.map +1 -0
- package/dist/src/commands/extensions/utils.test.d.ts +6 -0
- package/dist/src/commands/extensions/utils.test.js +147 -0
- package/dist/src/commands/extensions/utils.test.js.map +1 -0
- package/dist/src/commands/extensions.d.ts +7 -0
- package/dist/src/commands/extensions.js +35 -0
- package/dist/src/commands/extensions.js.map +1 -0
- package/dist/src/commands/extensions.test.d.ts +6 -0
- package/dist/src/commands/extensions.test.js +72 -0
- package/dist/src/commands/extensions.test.js.map +1 -0
- package/dist/src/commands/hooks.d.ts +7 -0
- package/dist/src/commands/hooks.js +20 -0
- package/dist/src/commands/hooks.js.map +1 -0
- package/dist/src/commands/mcp/add.d.ts +7 -0
- package/dist/src/commands/mcp/add.js +247 -0
- package/dist/src/commands/mcp/add.js.map +1 -0
- package/dist/src/commands/mcp/list.d.ts +8 -0
- package/dist/src/commands/mcp/list.js +118 -0
- package/dist/src/commands/mcp/list.js.map +1 -0
- package/dist/src/commands/mcp/reconnect.d.ts +7 -0
- package/dist/src/commands/mcp/reconnect.js +154 -0
- package/dist/src/commands/mcp/reconnect.js.map +1 -0
- package/dist/src/commands/mcp/remove.d.ts +7 -0
- package/dist/src/commands/mcp/remove.js +54 -0
- package/dist/src/commands/mcp/remove.js.map +1 -0
- package/dist/src/commands/mcp.d.ts +7 -0
- package/dist/src/commands/mcp.js +25 -0
- package/dist/src/commands/mcp.js.map +1 -0
- package/dist/src/commands/review/cleanup.d.ts +7 -0
- package/dist/src/commands/review/cleanup.js +81 -0
- package/dist/src/commands/review/cleanup.js.map +1 -0
- package/dist/src/commands/review/deterministic.d.ts +7 -0
- package/dist/src/commands/review/deterministic.js +474 -0
- package/dist/src/commands/review/deterministic.js.map +1 -0
- package/dist/src/commands/review/fetch-pr.d.ts +7 -0
- package/dist/src/commands/review/fetch-pr.js +124 -0
- package/dist/src/commands/review/fetch-pr.js.map +1 -0
- package/dist/src/commands/review/lib/gh.d.ts +34 -0
- package/dist/src/commands/review/lib/gh.js +64 -0
- package/dist/src/commands/review/lib/gh.js.map +1 -0
- package/dist/src/commands/review/lib/git.d.ts +18 -0
- package/dist/src/commands/review/lib/git.js +41 -0
- package/dist/src/commands/review/lib/git.js.map +1 -0
- package/dist/src/commands/review/lib/paths.d.ts +23 -0
- package/dist/src/commands/review/lib/paths.js +37 -0
- package/dist/src/commands/review/lib/paths.js.map +1 -0
- package/dist/src/commands/review/load-rules.d.ts +7 -0
- package/dist/src/commands/review/load-rules.js +112 -0
- package/dist/src/commands/review/load-rules.js.map +1 -0
- package/dist/src/commands/review/pr-context.d.ts +7 -0
- package/dist/src/commands/review/pr-context.js +214 -0
- package/dist/src/commands/review/pr-context.js.map +1 -0
- package/dist/src/commands/review/presubmit.d.ts +7 -0
- package/dist/src/commands/review/presubmit.js +190 -0
- package/dist/src/commands/review/presubmit.js.map +1 -0
- package/dist/src/commands/review.d.ts +7 -0
- package/dist/src/commands/review.js +28 -0
- package/dist/src/commands/review.js.map +1 -0
- package/dist/src/commands/serve.d.ts +21 -0
- package/dist/src/commands/serve.js +214 -0
- package/dist/src/commands/serve.js.map +1 -0
- package/dist/src/commands/sp.d.ts +7 -0
- package/dist/src/commands/sp.js +62 -0
- package/dist/src/commands/sp.js.map +1 -0
- package/dist/src/config/auth.d.ts +10 -0
- package/dist/src/config/auth.js +183 -0
- package/dist/src/config/auth.js.map +1 -0
- package/dist/src/config/auth.test.d.ts +6 -0
- package/dist/src/config/auth.test.js +292 -0
- package/dist/src/config/auth.test.js.map +1 -0
- package/dist/src/config/config.d.ts +144 -0
- package/dist/src/config/config.js +1618 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/jsonSchemaArg.test.d.ts +6 -0
- package/dist/src/config/jsonSchemaArg.test.js +305 -0
- package/dist/src/config/jsonSchemaArg.test.js.map +1 -0
- package/dist/src/config/keyBindings.d.ts +89 -0
- package/dist/src/config/keyBindings.js +188 -0
- package/dist/src/config/keyBindings.js.map +1 -0
- package/dist/src/config/keyBindings.test.d.ts +6 -0
- package/dist/src/config/keyBindings.test.js +51 -0
- package/dist/src/config/keyBindings.test.js.map +1 -0
- package/dist/src/config/loadedSettingsAdapter.d.ts +15 -0
- package/dist/src/config/loadedSettingsAdapter.js +80 -0
- package/dist/src/config/loadedSettingsAdapter.js.map +1 -0
- package/dist/src/config/loadedSettingsAdapter.test.d.ts +6 -0
- package/dist/src/config/loadedSettingsAdapter.test.js +127 -0
- package/dist/src/config/loadedSettingsAdapter.test.js.map +1 -0
- package/dist/src/config/migration/index.d.ts +59 -0
- package/dist/src/config/migration/index.js +94 -0
- package/dist/src/config/migration/index.js.map +1 -0
- package/dist/src/config/migration/index.test.d.ts +6 -0
- package/dist/src/config/migration/index.test.js +295 -0
- package/dist/src/config/migration/index.test.js.map +1 -0
- package/dist/src/config/migration/scheduler.d.ts +51 -0
- package/dist/src/config/migration/scheduler.js +95 -0
- package/dist/src/config/migration/scheduler.js.map +1 -0
- package/dist/src/config/migration/scheduler.test.d.ts +6 -0
- package/dist/src/config/migration/scheduler.test.js +129 -0
- package/dist/src/config/migration/scheduler.test.js.map +1 -0
- package/dist/src/config/migration/types.d.ts +53 -0
- package/dist/src/config/migration/types.js +7 -0
- package/dist/src/config/migration/types.js.map +1 -0
- package/dist/src/config/migration/versions/v1-to-v2-shared.d.ts +27 -0
- package/dist/src/config/migration/versions/v1-to-v2-shared.js +174 -0
- package/dist/src/config/migration/versions/v1-to-v2-shared.js.map +1 -0
- package/dist/src/config/migration/versions/v1-to-v2.d.ts +81 -0
- package/dist/src/config/migration/versions/v1-to-v2.js +222 -0
- package/dist/src/config/migration/versions/v1-to-v2.js.map +1 -0
- package/dist/src/config/migration/versions/v1-to-v2.test.d.ts +6 -0
- package/dist/src/config/migration/versions/v1-to-v2.test.js +189 -0
- package/dist/src/config/migration/versions/v1-to-v2.test.js.map +1 -0
- package/dist/src/config/migration/versions/v2-to-v3.d.ts +61 -0
- package/dist/src/config/migration/versions/v2-to-v3.js +185 -0
- package/dist/src/config/migration/versions/v2-to-v3.js.map +1 -0
- package/dist/src/config/migration/versions/v2-to-v3.test.d.ts +6 -0
- package/dist/src/config/migration/versions/v2-to-v3.test.js +337 -0
- package/dist/src/config/migration/versions/v2-to-v3.test.js.map +1 -0
- package/dist/src/config/migration/versions/v3-to-v4.d.ts +34 -0
- package/dist/src/config/migration/versions/v3-to-v4.js +126 -0
- package/dist/src/config/migration/versions/v3-to-v4.js.map +1 -0
- package/dist/src/config/migration/versions/v3-to-v4.test.d.ts +6 -0
- package/dist/src/config/migration/versions/v3-to-v4.test.js +164 -0
- package/dist/src/config/migration/versions/v3-to-v4.test.js.map +1 -0
- package/dist/src/config/modelProvidersScope.d.ts +20 -0
- package/dist/src/config/modelProvidersScope.js +39 -0
- package/dist/src/config/modelProvidersScope.js.map +1 -0
- package/dist/src/config/modelProvidersScope.test.d.ts +6 -0
- package/dist/src/config/modelProvidersScope.test.js +66 -0
- package/dist/src/config/modelProvidersScope.test.js.map +1 -0
- package/dist/src/config/path-freshness.test.d.ts +6 -0
- package/dist/src/config/path-freshness.test.js +52 -0
- package/dist/src/config/path-freshness.test.js.map +1 -0
- package/dist/src/config/sandboxConfig.d.ts +13 -0
- package/dist/src/config/sandboxConfig.js +74 -0
- package/dist/src/config/sandboxConfig.js.map +1 -0
- package/dist/src/config/settings.d.ts +119 -0
- package/dist/src/config/settings.js +1015 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/config/settingsSchema.d.ts +2207 -0
- package/dist/src/config/settingsSchema.js +2246 -0
- package/dist/src/config/settingsSchema.js.map +1 -0
- package/dist/src/config/settingsSchema.test.d.ts +6 -0
- package/dist/src/config/settingsSchema.test.js +232 -0
- package/dist/src/config/settingsSchema.test.js.map +1 -0
- package/dist/src/config/trustedFolders.d.ts +54 -0
- package/dist/src/config/trustedFolders.js +176 -0
- package/dist/src/config/trustedFolders.js.map +1 -0
- package/dist/src/config/trustedFolders.test.d.ts +6 -0
- package/dist/src/config/trustedFolders.test.js +354 -0
- package/dist/src/config/trustedFolders.test.js.map +1 -0
- package/dist/src/core/auth.d.ts +13 -0
- package/dist/src/core/auth.js +34 -0
- package/dist/src/core/auth.js.map +1 -0
- package/dist/src/core/auth.test.d.ts +6 -0
- package/dist/src/core/auth.test.js +47 -0
- package/dist/src/core/auth.test.js.map +1 -0
- package/dist/src/core/initializer.d.ts +21 -0
- package/dist/src/core/initializer.js +42 -0
- package/dist/src/core/initializer.js.map +1 -0
- package/dist/src/core/initializer.test.d.ts +6 -0
- package/dist/src/core/initializer.test.js +123 -0
- package/dist/src/core/initializer.test.js.map +1 -0
- package/dist/src/core/theme.d.ts +12 -0
- package/dist/src/core/theme.js +25 -0
- package/dist/src/core/theme.js.map +1 -0
- package/dist/src/core/theme.test.d.ts +6 -0
- package/dist/src/core/theme.test.js +57 -0
- package/dist/src/core/theme.test.js.map +1 -0
- package/dist/src/dualOutput/DualOutputBridge.d.ts +84 -0
- package/dist/src/dualOutput/DualOutputBridge.js +293 -0
- package/dist/src/dualOutput/DualOutputBridge.js.map +1 -0
- package/dist/src/dualOutput/DualOutputBridge.test.d.ts +6 -0
- package/dist/src/dualOutput/DualOutputBridge.test.js +157 -0
- package/dist/src/dualOutput/DualOutputBridge.test.js.map +1 -0
- package/dist/src/dualOutput/DualOutputContext.d.ts +19 -0
- package/dist/src/dualOutput/DualOutputContext.js +22 -0
- package/dist/src/dualOutput/DualOutputContext.js.map +1 -0
- package/dist/src/dualOutput/index.d.ts +7 -0
- package/dist/src/dualOutput/index.js +8 -0
- package/dist/src/dualOutput/index.js.map +1 -0
- package/dist/src/export/index.d.ts +6 -0
- package/dist/src/export/index.js +7 -0
- package/dist/src/export/index.js.map +1 -0
- package/dist/src/gemini.d.ts +13 -0
- package/dist/src/gemini.js +908 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/gemini.test.d.ts +6 -0
- package/dist/src/gemini.test.js +975 -0
- package/dist/src/gemini.test.js.map +1 -0
- package/dist/src/generated/git-commit.d.ts +7 -0
- package/dist/src/generated/git-commit.js +10 -0
- package/dist/src/generated/git-commit.js.map +1 -0
- package/dist/src/i18n/index.d.ts +27 -0
- package/dist/src/i18n/index.js +213 -0
- package/dist/src/i18n/index.js.map +1 -0
- package/dist/src/i18n/index.test.d.ts +6 -0
- package/dist/src/i18n/index.test.js +103 -0
- package/dist/src/i18n/index.test.js.map +1 -0
- package/dist/src/i18n/languages.d.ts +43 -0
- package/dist/src/i18n/languages.js +138 -0
- package/dist/src/i18n/languages.js.map +1 -0
- package/dist/src/i18n/locales/ca.js +3951 -0
- package/dist/src/i18n/locales/de.js +2018 -0
- package/dist/src/i18n/locales/en.js +2161 -0
- package/dist/src/i18n/locales/fr.js +2013 -0
- package/dist/src/i18n/locales/ja.js +1780 -0
- package/dist/src/i18n/locales/pt.js +2005 -0
- package/dist/src/i18n/locales/ru.js +1993 -0
- package/dist/src/i18n/locales/zh-TW.js +1729 -0
- package/dist/src/i18n/locales/zh.js +1929 -0
- package/dist/src/i18n/mustTranslateKeys.d.ts +12 -0
- package/dist/src/i18n/mustTranslateKeys.js +111 -0
- package/dist/src/i18n/mustTranslateKeys.js.map +1 -0
- package/dist/src/i18n/mustTranslateKeys.test.d.ts +6 -0
- package/dist/src/i18n/mustTranslateKeys.test.js +103 -0
- package/dist/src/i18n/mustTranslateKeys.test.js.map +1 -0
- package/dist/src/i18n/translationDict.d.ts +9 -0
- package/dist/src/i18n/translationDict.js +17 -0
- package/dist/src/i18n/translationDict.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlContext.d.ts +71 -0
- package/dist/src/nonInteractive/control/ControlContext.js +36 -0
- package/dist/src/nonInteractive/control/ControlContext.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.d.ts +116 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js +290 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.d.ts +6 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js +614 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlService.d.ts +79 -0
- package/dist/src/nonInteractive/control/ControlService.js +139 -0
- package/dist/src/nonInteractive/control/ControlService.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/baseController.d.ts +53 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js +136 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/hookController.d.ts +25 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js +40 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.d.ts +57 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js +361 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.test.d.ts +6 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.test.js +140 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.test.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/sdkMcpController.d.ts +54 -0
- package/dist/src/nonInteractive/control/controllers/sdkMcpController.js +80 -0
- package/dist/src/nonInteractive/control/controllers/sdkMcpController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/systemController.d.ts +67 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js +326 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/systemController.test.d.ts +6 -0
- package/dist/src/nonInteractive/control/controllers/systemController.test.js +121 -0
- package/dist/src/nonInteractive/control/controllers/systemController.test.js.map +1 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.d.ts +105 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.js +7 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.js.map +1 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.d.ts +505 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js +1041 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js +1304 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.d.ts +29 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.js +64 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js +684 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.d.ts +16 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.js +54 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js +178 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.d.ts +84 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.dualOutput.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.dualOutput.test.js +118 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.dualOutput.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js +227 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js +1046 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/index.d.ts +6 -0
- package/dist/src/nonInteractive/io/index.js +7 -0
- package/dist/src/nonInteractive/io/index.js.map +1 -0
- package/dist/src/nonInteractive/session.d.ts +8 -0
- package/dist/src/nonInteractive/session.js +664 -0
- package/dist/src/nonInteractive/session.js.map +1 -0
- package/dist/src/nonInteractive/session.test.d.ts +6 -0
- package/dist/src/nonInteractive/session.test.js +680 -0
- package/dist/src/nonInteractive/session.test.js.map +1 -0
- package/dist/src/nonInteractive/types.d.ts +415 -0
- package/dist/src/nonInteractive/types.js +77 -0
- package/dist/src/nonInteractive/types.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +33 -0
- package/dist/src/nonInteractiveCli.js +1058 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/nonInteractiveCliCommands.d.ts +59 -0
- package/dist/src/nonInteractiveCliCommands.js +326 -0
- package/dist/src/nonInteractiveCliCommands.js.map +1 -0
- package/dist/src/nonInteractiveCliCommands.test.d.ts +6 -0
- package/dist/src/nonInteractiveCliCommands.test.js +484 -0
- package/dist/src/nonInteractiveCliCommands.test.js.map +1 -0
- package/dist/src/patches/is-in-ci.d.ts +7 -0
- package/dist/src/patches/is-in-ci.js +15 -0
- package/dist/src/patches/is-in-ci.js.map +1 -0
- package/dist/src/remoteInput/RemoteInputContext.d.ts +8 -0
- package/dist/src/remoteInput/RemoteInputContext.js +9 -0
- package/dist/src/remoteInput/RemoteInputContext.js.map +1 -0
- package/dist/src/remoteInput/RemoteInputWatcher.d.ts +83 -0
- package/dist/src/remoteInput/RemoteInputWatcher.js +201 -0
- package/dist/src/remoteInput/RemoteInputWatcher.js.map +1 -0
- package/dist/src/remoteInput/RemoteInputWatcher.test.d.ts +6 -0
- package/dist/src/remoteInput/RemoteInputWatcher.test.js +100 -0
- package/dist/src/remoteInput/RemoteInputWatcher.test.js.map +1 -0
- package/dist/src/remoteInput/index.d.ts +7 -0
- package/dist/src/remoteInput/index.js +8 -0
- package/dist/src/remoteInput/index.js.map +1 -0
- package/dist/src/serve/auth/deviceFlow.d.ts +595 -0
- package/dist/src/serve/auth/deviceFlow.js +1243 -0
- package/dist/src/serve/auth/deviceFlow.js.map +1 -0
- package/dist/src/serve/auth/deviceFlow.test.d.ts +6 -0
- package/dist/src/serve/auth/deviceFlow.test.js +1314 -0
- package/dist/src/serve/auth/deviceFlow.test.js.map +1 -0
- package/dist/src/serve/auth/qwenDeviceFlowProvider.d.ts +30 -0
- package/dist/src/serve/auth/qwenDeviceFlowProvider.js +331 -0
- package/dist/src/serve/auth/qwenDeviceFlowProvider.js.map +1 -0
- package/dist/src/serve/auth/qwenDeviceFlowProvider.test.d.ts +6 -0
- package/dist/src/serve/auth/qwenDeviceFlowProvider.test.js +301 -0
- package/dist/src/serve/auth/qwenDeviceFlowProvider.test.js.map +1 -0
- package/dist/src/serve/auth.d.ts +101 -0
- package/dist/src/serve/auth.js +216 -0
- package/dist/src/serve/auth.js.map +1 -0
- package/dist/src/serve/capabilities.d.ts +196 -0
- package/dist/src/serve/capabilities.js +227 -0
- package/dist/src/serve/capabilities.js.map +1 -0
- package/dist/src/serve/daemonStatusProvider.d.ts +14 -0
- package/dist/src/serve/daemonStatusProvider.js +252 -0
- package/dist/src/serve/daemonStatusProvider.js.map +1 -0
- package/dist/src/serve/debugMode.d.ts +27 -0
- package/dist/src/serve/debugMode.js +33 -0
- package/dist/src/serve/debugMode.js.map +1 -0
- package/dist/src/serve/demo.d.ts +11 -0
- package/dist/src/serve/demo.js +640 -0
- package/dist/src/serve/demo.js.map +1 -0
- package/dist/src/serve/envSnapshot.d.ts +28 -0
- package/dist/src/serve/envSnapshot.js +199 -0
- package/dist/src/serve/envSnapshot.js.map +1 -0
- package/dist/src/serve/envSnapshot.test.d.ts +6 -0
- package/dist/src/serve/envSnapshot.test.js +181 -0
- package/dist/src/serve/envSnapshot.test.js.map +1 -0
- package/dist/src/serve/eventBus.d.ts +6 -0
- package/dist/src/serve/eventBus.js +15 -0
- package/dist/src/serve/eventBus.js.map +1 -0
- package/dist/src/serve/fs/audit.d.ts +144 -0
- package/dist/src/serve/fs/audit.js +193 -0
- package/dist/src/serve/fs/audit.js.map +1 -0
- package/dist/src/serve/fs/audit.test.d.ts +6 -0
- package/dist/src/serve/fs/audit.test.js +246 -0
- package/dist/src/serve/fs/audit.test.js.map +1 -0
- package/dist/src/serve/fs/contract.test.d.ts +6 -0
- package/dist/src/serve/fs/contract.test.js +211 -0
- package/dist/src/serve/fs/contract.test.js.map +1 -0
- package/dist/src/serve/fs/errors.d.ts +87 -0
- package/dist/src/serve/fs/errors.js +128 -0
- package/dist/src/serve/fs/errors.js.map +1 -0
- package/dist/src/serve/fs/errors.test.d.ts +6 -0
- package/dist/src/serve/fs/errors.test.js +152 -0
- package/dist/src/serve/fs/errors.test.js.map +1 -0
- package/dist/src/serve/fs/index.d.ts +10 -0
- package/dist/src/serve/fs/index.js +11 -0
- package/dist/src/serve/fs/index.js.map +1 -0
- package/dist/src/serve/fs/paths.d.ts +103 -0
- package/dist/src/serve/fs/paths.js +433 -0
- package/dist/src/serve/fs/paths.js.map +1 -0
- package/dist/src/serve/fs/paths.test.d.ts +6 -0
- package/dist/src/serve/fs/paths.test.js +309 -0
- package/dist/src/serve/fs/paths.test.js.map +1 -0
- package/dist/src/serve/fs/policy.d.ts +142 -0
- package/dist/src/serve/fs/policy.js +189 -0
- package/dist/src/serve/fs/policy.js.map +1 -0
- package/dist/src/serve/fs/policy.test.d.ts +6 -0
- package/dist/src/serve/fs/policy.test.js +193 -0
- package/dist/src/serve/fs/policy.test.js.map +1 -0
- package/dist/src/serve/fs/workspaceFileSystem.d.ts +157 -0
- package/dist/src/serve/fs/workspaceFileSystem.js +1377 -0
- package/dist/src/serve/fs/workspaceFileSystem.js.map +1 -0
- package/dist/src/serve/fs/workspaceFileSystem.test.d.ts +6 -0
- package/dist/src/serve/fs/workspaceFileSystem.test.js +880 -0
- package/dist/src/serve/fs/workspaceFileSystem.test.js.map +1 -0
- package/dist/src/serve/httpAcpBridge.d.ts +80 -0
- package/dist/src/serve/httpAcpBridge.js +3559 -0
- package/dist/src/serve/httpAcpBridge.js.map +1 -0
- package/dist/src/serve/httpAcpBridge.test.d.ts +6 -0
- package/dist/src/serve/httpAcpBridge.test.js +4987 -0
- package/dist/src/serve/httpAcpBridge.test.js.map +1 -0
- package/dist/src/serve/inMemoryChannel.d.ts +6 -0
- package/dist/src/serve/inMemoryChannel.js +14 -0
- package/dist/src/serve/inMemoryChannel.js.map +1 -0
- package/dist/src/serve/index.d.ts +15 -0
- package/dist/src/serve/index.js +16 -0
- package/dist/src/serve/index.js.map +1 -0
- package/dist/src/serve/loopbackBinds.d.ts +18 -0
- package/dist/src/serve/loopbackBinds.js +33 -0
- package/dist/src/serve/loopbackBinds.js.map +1 -0
- package/dist/src/serve/routes/workspaceFileRead.d.ts +90 -0
- package/dist/src/serve/routes/workspaceFileRead.js +458 -0
- package/dist/src/serve/routes/workspaceFileRead.js.map +1 -0
- package/dist/src/serve/routes/workspaceFileRead.test.d.ts +6 -0
- package/dist/src/serve/routes/workspaceFileRead.test.js +453 -0
- package/dist/src/serve/routes/workspaceFileRead.test.js.map +1 -0
- package/dist/src/serve/routes/workspaceFileWrite.d.ts +17 -0
- package/dist/src/serve/routes/workspaceFileWrite.js +224 -0
- package/dist/src/serve/routes/workspaceFileWrite.js.map +1 -0
- package/dist/src/serve/routes/workspaceFileWrite.test.d.ts +6 -0
- package/dist/src/serve/routes/workspaceFileWrite.test.js +223 -0
- package/dist/src/serve/routes/workspaceFileWrite.test.js.map +1 -0
- package/dist/src/serve/runQwenServe.d.ts +67 -0
- package/dist/src/serve/runQwenServe.js +616 -0
- package/dist/src/serve/runQwenServe.js.map +1 -0
- package/dist/src/serve/server.d.ts +125 -0
- package/dist/src/serve/server.js +2297 -0
- package/dist/src/serve/server.js.map +1 -0
- package/dist/src/serve/status.d.ts +6 -0
- package/dist/src/serve/status.js +13 -0
- package/dist/src/serve/status.js.map +1 -0
- package/dist/src/serve/types.d.ts +175 -0
- package/dist/src/serve/types.js +10 -0
- package/dist/src/serve/types.js.map +1 -0
- package/dist/src/serve/workspaceAgents.d.ts +47 -0
- package/dist/src/serve/workspaceAgents.js +1171 -0
- package/dist/src/serve/workspaceAgents.js.map +1 -0
- package/dist/src/serve/workspaceAgents.test.d.ts +6 -0
- package/dist/src/serve/workspaceAgents.test.js +823 -0
- package/dist/src/serve/workspaceAgents.test.js.map +1 -0
- package/dist/src/serve/workspaceMemory.d.ts +60 -0
- package/dist/src/serve/workspaceMemory.js +323 -0
- package/dist/src/serve/workspaceMemory.js.map +1 -0
- package/dist/src/serve/workspaceMemory.test.d.ts +6 -0
- package/dist/src/serve/workspaceMemory.test.js +418 -0
- package/dist/src/serve/workspaceMemory.test.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.d.ts +24 -0
- package/dist/src/services/BuiltinCommandLoader.js +159 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.test.d.ts +6 -0
- package/dist/src/services/BuiltinCommandLoader.test.js +234 -0
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -0
- package/dist/src/services/BundledSkillLoader.d.ts +17 -0
- package/dist/src/services/BundledSkillLoader.js +97 -0
- package/dist/src/services/BundledSkillLoader.js.map +1 -0
- package/dist/src/services/BundledSkillLoader.test.d.ts +6 -0
- package/dist/src/services/BundledSkillLoader.test.js +301 -0
- package/dist/src/services/BundledSkillLoader.test.js.map +1 -0
- package/dist/src/services/CommandService.d.ts +69 -0
- package/dist/src/services/CommandService.js +128 -0
- package/dist/src/services/CommandService.js.map +1 -0
- package/dist/src/services/CommandService.test.d.ts +6 -0
- package/dist/src/services/CommandService.test.js +263 -0
- package/dist/src/services/CommandService.test.js.map +1 -0
- package/dist/src/services/FileCommandLoader-extension.test.d.ts +6 -0
- package/dist/src/services/FileCommandLoader-extension.test.js +279 -0
- package/dist/src/services/FileCommandLoader-extension.test.js.map +1 -0
- package/dist/src/services/FileCommandLoader-markdown.test.d.ts +6 -0
- package/dist/src/services/FileCommandLoader-markdown.test.js +111 -0
- package/dist/src/services/FileCommandLoader-markdown.test.js.map +1 -0
- package/dist/src/services/FileCommandLoader.d.ts +64 -0
- package/dist/src/services/FileCommandLoader.js +259 -0
- package/dist/src/services/FileCommandLoader.js.map +1 -0
- package/dist/src/services/McpPromptLoader.d.ts +35 -0
- package/dist/src/services/McpPromptLoader.js +261 -0
- package/dist/src/services/McpPromptLoader.js.map +1 -0
- package/dist/src/services/McpPromptLoader.test.d.ts +6 -0
- package/dist/src/services/McpPromptLoader.test.js +341 -0
- package/dist/src/services/McpPromptLoader.test.js.map +1 -0
- package/dist/src/services/SkillCommandLoader.d.ts +23 -0
- package/dist/src/services/SkillCommandLoader.js +110 -0
- package/dist/src/services/SkillCommandLoader.js.map +1 -0
- package/dist/src/services/SkillCommandLoader.test.d.ts +6 -0
- package/dist/src/services/SkillCommandLoader.test.js +307 -0
- package/dist/src/services/SkillCommandLoader.test.js.map +1 -0
- package/dist/src/services/command-factory.d.ts +25 -0
- package/dist/src/services/command-factory.js +122 -0
- package/dist/src/services/command-factory.js.map +1 -0
- package/dist/src/services/command-factory.test.d.ts +6 -0
- package/dist/src/services/command-factory.test.js +31 -0
- package/dist/src/services/command-factory.test.js.map +1 -0
- package/dist/src/services/command-migration-tool.d.ts +39 -0
- package/dist/src/services/command-migration-tool.js +135 -0
- package/dist/src/services/command-migration-tool.js.map +1 -0
- package/dist/src/services/command-migration-tool.test.d.ts +6 -0
- package/dist/src/services/command-migration-tool.test.js +175 -0
- package/dist/src/services/command-migration-tool.test.js.map +1 -0
- package/dist/src/services/commandMetadata.d.ts +21 -0
- package/dist/src/services/commandMetadata.js +106 -0
- package/dist/src/services/commandMetadata.js.map +1 -0
- package/dist/src/services/commandMetadata.test.d.ts +6 -0
- package/dist/src/services/commandMetadata.test.js +216 -0
- package/dist/src/services/commandMetadata.test.js.map +1 -0
- package/dist/src/services/commandUtils.d.ts +36 -0
- package/dist/src/services/commandUtils.js +57 -0
- package/dist/src/services/commandUtils.js.map +1 -0
- package/dist/src/services/commandUtils.test.d.ts +6 -0
- package/dist/src/services/commandUtils.test.js +159 -0
- package/dist/src/services/commandUtils.test.js.map +1 -0
- package/dist/src/services/insight/generators/DataProcessor.d.ts +23 -0
- package/dist/src/services/insight/generators/DataProcessor.js +1001 -0
- package/dist/src/services/insight/generators/DataProcessor.js.map +1 -0
- package/dist/src/services/insight/generators/DataProcessor.test.d.ts +6 -0
- package/dist/src/services/insight/generators/DataProcessor.test.js +1210 -0
- package/dist/src/services/insight/generators/DataProcessor.test.js.map +1 -0
- package/dist/src/services/insight/generators/StaticInsightGenerator.d.ts +16 -0
- package/dist/src/services/insight/generators/StaticInsightGenerator.js +63 -0
- package/dist/src/services/insight/generators/StaticInsightGenerator.js.map +1 -0
- package/dist/src/services/insight/generators/StaticInsightGenerator.test.d.ts +6 -0
- package/dist/src/services/insight/generators/StaticInsightGenerator.test.js +60 -0
- package/dist/src/services/insight/generators/StaticInsightGenerator.test.js.map +1 -0
- package/dist/src/services/insight/generators/TemplateRenderer.d.ts +9 -0
- package/dist/src/services/insight/generators/TemplateRenderer.js +49 -0
- package/dist/src/services/insight/generators/TemplateRenderer.js.map +1 -0
- package/dist/src/services/insight/types/QualitativeInsightTypes.d.ts +74 -0
- package/dist/src/services/insight/types/QualitativeInsightTypes.js +2 -0
- package/dist/src/services/insight/types/QualitativeInsightTypes.js.map +1 -0
- package/dist/src/services/insight/types/StaticInsightTypes.d.ts +59 -0
- package/dist/src/services/insight/types/StaticInsightTypes.js +7 -0
- package/dist/src/services/insight/types/StaticInsightTypes.js.map +1 -0
- package/dist/src/services/markdown-command-parser.d.ts +52 -0
- package/dist/src/services/markdown-command-parser.js +60 -0
- package/dist/src/services/markdown-command-parser.js.map +1 -0
- package/dist/src/services/markdown-command-parser.test.d.ts +6 -0
- package/dist/src/services/markdown-command-parser.test.js +146 -0
- package/dist/src/services/markdown-command-parser.test.js.map +1 -0
- package/dist/src/services/notificationService.d.ts +19 -0
- package/dist/src/services/notificationService.js +64 -0
- package/dist/src/services/notificationService.js.map +1 -0
- package/dist/src/services/notificationService.test.d.ts +6 -0
- package/dist/src/services/notificationService.test.js +114 -0
- package/dist/src/services/notificationService.test.js.map +1 -0
- package/dist/src/services/prompt-processors/argumentProcessor.d.ts +16 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js +21 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/atFileProcessor.d.ts +12 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js +63 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.js +174 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +1 -0
- package/dist/src/services/prompt-processors/injectionParser.d.ts +29 -0
- package/dist/src/services/prompt-processors/injectionParser.js +60 -0
- package/dist/src/services/prompt-processors/injectionParser.js.map +1 -0
- package/dist/src/services/prompt-processors/injectionParser.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/injectionParser.test.js +189 -0
- package/dist/src/services/prompt-processors/injectionParser.test.js.map +1 -0
- package/dist/src/services/prompt-processors/shellProcessor.d.ts +27 -0
- package/dist/src/services/prompt-processors/shellProcessor.js +146 -0
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/types.d.ts +45 -0
- package/dist/src/services/prompt-processors/types.js +20 -0
- package/dist/src/services/prompt-processors/types.js.map +1 -0
- package/dist/src/services/test-commands/example.md +5 -0
- package/dist/src/services/tips/index.d.ts +10 -0
- package/dist/src/services/tips/index.js +21 -0
- package/dist/src/services/tips/index.js.map +1 -0
- package/dist/src/services/tips/tipHistory.d.ts +49 -0
- package/dist/src/services/tips/tipHistory.js +138 -0
- package/dist/src/services/tips/tipHistory.js.map +1 -0
- package/dist/src/services/tips/tipHistory.test.d.ts +6 -0
- package/dist/src/services/tips/tipHistory.test.js +102 -0
- package/dist/src/services/tips/tipHistory.test.js.map +1 -0
- package/dist/src/services/tips/tipRegistry.d.ts +32 -0
- package/dist/src/services/tips/tipRegistry.js +148 -0
- package/dist/src/services/tips/tipRegistry.js.map +1 -0
- package/dist/src/services/tips/tipRegistry.test.d.ts +6 -0
- package/dist/src/services/tips/tipRegistry.test.js +65 -0
- package/dist/src/services/tips/tipRegistry.test.js.map +1 -0
- package/dist/src/services/tips/tipScheduler.d.ts +21 -0
- package/dist/src/services/tips/tipScheduler.js +38 -0
- package/dist/src/services/tips/tipScheduler.js.map +1 -0
- package/dist/src/services/tips/tipScheduler.test.d.ts +6 -0
- package/dist/src/services/tips/tipScheduler.test.js +126 -0
- package/dist/src/services/tips/tipScheduler.test.js.map +1 -0
- package/dist/src/services/types.d.ts +22 -0
- package/dist/src/services/types.js +7 -0
- package/dist/src/services/types.js.map +1 -0
- package/dist/src/startup/worktreeStartup.d.ts +112 -0
- package/dist/src/startup/worktreeStartup.js +350 -0
- package/dist/src/startup/worktreeStartup.js.map +1 -0
- package/dist/src/startup/worktreeStartup.test.d.ts +6 -0
- package/dist/src/startup/worktreeStartup.test.js +332 -0
- package/dist/src/startup/worktreeStartup.test.js.map +1 -0
- package/dist/src/test-utils/customMatchers.d.ts +14 -0
- package/dist/src/test-utils/customMatchers.js +40 -0
- package/dist/src/test-utils/customMatchers.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.d.ts +18 -0
- package/dist/src/test-utils/mockCommandContext.js +107 -0
- package/dist/src/test-utils/mockCommandContext.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.test.d.ts +6 -0
- package/dist/src/test-utils/mockCommandContext.test.js +51 -0
- package/dist/src/test-utils/mockCommandContext.test.js.map +1 -0
- package/dist/src/test-utils/render.d.ts +14 -0
- package/dist/src/test-utils/render.js +15 -0
- package/dist/src/test-utils/render.js.map +1 -0
- package/dist/src/ui/App.d.ts +6 -0
- package/dist/src/ui/App.js +65 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/AppContainer.d.ts +24 -0
- package/dist/src/ui/AppContainer.js +2853 -0
- package/dist/src/ui/AppContainer.js.map +1 -0
- package/dist/src/ui/AppContainer.test.d.ts +6 -0
- package/dist/src/ui/AppContainer.test.js +2368 -0
- package/dist/src/ui/AppContainer.test.js.map +1 -0
- package/dist/src/ui/CommandFormatMigrationNudge.d.ts +14 -0
- package/dist/src/ui/CommandFormatMigrationNudge.js +44 -0
- package/dist/src/ui/CommandFormatMigrationNudge.js.map +1 -0
- package/dist/src/ui/FeedbackDialog.d.ts +9 -0
- package/dist/src/ui/FeedbackDialog.js +44 -0
- package/dist/src/ui/FeedbackDialog.js.map +1 -0
- package/dist/src/ui/IdeIntegrationNudge.d.ts +16 -0
- package/dist/src/ui/IdeIntegrationNudge.js +53 -0
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.d.ts +7 -0
- package/dist/src/ui/auth/AuthDialog.js +214 -0
- package/dist/src/ui/auth/AuthDialog.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.test.d.ts +6 -0
- package/dist/src/ui/auth/AuthDialog.test.js +1029 -0
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -0
- package/dist/src/ui/auth/AuthInProgress.d.ts +11 -0
- package/dist/src/ui/auth/AuthInProgress.js +24 -0
- package/dist/src/ui/auth/AuthInProgress.js.map +1 -0
- package/dist/src/ui/auth/ProviderSetupSteps.d.ts +11 -0
- package/dist/src/ui/auth/ProviderSetupSteps.js +320 -0
- package/dist/src/ui/auth/ProviderSetupSteps.js.map +1 -0
- package/dist/src/ui/auth/ProviderSetupSteps.test.d.ts +6 -0
- package/dist/src/ui/auth/ProviderSetupSteps.test.js +322 -0
- package/dist/src/ui/auth/ProviderSetupSteps.test.js.map +1 -0
- package/dist/src/ui/auth/useAuth.d.ts +76 -0
- package/dist/src/ui/auth/useAuth.js +192 -0
- package/dist/src/ui/auth/useAuth.js.map +1 -0
- package/dist/src/ui/auth/useAuth.test.d.ts +6 -0
- package/dist/src/ui/auth/useAuth.test.js +267 -0
- package/dist/src/ui/auth/useAuth.test.js.map +1 -0
- package/dist/src/ui/auth/useProviderSetupFlow.d.ts +54 -0
- package/dist/src/ui/auth/useProviderSetupFlow.js +380 -0
- package/dist/src/ui/auth/useProviderSetupFlow.js.map +1 -0
- package/dist/src/ui/colors.d.ts +7 -0
- package/dist/src/ui/colors.js +60 -0
- package/dist/src/ui/colors.js.map +1 -0
- package/dist/src/ui/commands/aboutCommand.d.ts +7 -0
- package/dist/src/ui/commands/aboutCommand.js +69 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -0
- package/dist/src/ui/commands/agentsCommand.d.ts +7 -0
- package/dist/src/ui/commands/agentsCommand.js +42 -0
- package/dist/src/ui/commands/agentsCommand.js.map +1 -0
- package/dist/src/ui/commands/approvalModeCommand.d.ts +7 -0
- package/dist/src/ui/commands/approvalModeCommand.js +89 -0
- package/dist/src/ui/commands/approvalModeCommand.js.map +1 -0
- package/dist/src/ui/commands/approvalModeCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/approvalModeCommand.test.js +112 -0
- package/dist/src/ui/commands/approvalModeCommand.test.js.map +1 -0
- package/dist/src/ui/commands/arenaCommand.agentComplete.test.d.ts +6 -0
- package/dist/src/ui/commands/arenaCommand.agentComplete.test.js +118 -0
- package/dist/src/ui/commands/arenaCommand.agentComplete.test.js.map +1 -0
- package/dist/src/ui/commands/arenaCommand.d.ts +7 -0
- package/dist/src/ui/commands/arenaCommand.js +519 -0
- package/dist/src/ui/commands/arenaCommand.js.map +1 -0
- package/dist/src/ui/commands/arenaCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/arenaCommand.test.js +352 -0
- package/dist/src/ui/commands/arenaCommand.test.js.map +1 -0
- package/dist/src/ui/commands/authCommand.d.ts +7 -0
- package/dist/src/ui/commands/authCommand.js +31 -0
- package/dist/src/ui/commands/authCommand.js.map +1 -0
- package/dist/src/ui/commands/branchCommand.d.ts +7 -0
- package/dist/src/ui/commands/branchCommand.js +49 -0
- package/dist/src/ui/commands/branchCommand.js.map +1 -0
- package/dist/src/ui/commands/branchCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/branchCommand.test.js +57 -0
- package/dist/src/ui/commands/branchCommand.test.js.map +1 -0
- package/dist/src/ui/commands/btwCommand.d.ts +7 -0
- package/dist/src/ui/commands/btwCommand.js +164 -0
- package/dist/src/ui/commands/btwCommand.js.map +1 -0
- package/dist/src/ui/commands/btwCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/btwCommand.test.js +338 -0
- package/dist/src/ui/commands/btwCommand.test.js.map +1 -0
- package/dist/src/ui/commands/bugCommand.d.ts +7 -0
- package/dist/src/ui/commands/bugCommand.js +54 -0
- package/dist/src/ui/commands/bugCommand.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.d.ts +7 -0
- package/dist/src/ui/commands/clearCommand.js +122 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -0
- package/dist/src/ui/commands/compressCommand.d.ts +7 -0
- package/dist/src/ui/commands/compressCommand.js +178 -0
- package/dist/src/ui/commands/compressCommand.js.map +1 -0
- package/dist/src/ui/commands/contextCommand.d.ts +14 -0
- package/dist/src/ui/commands/contextCommand.js +443 -0
- package/dist/src/ui/commands/contextCommand.js.map +1 -0
- package/dist/src/ui/commands/contextCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/contextCommand.test.js +184 -0
- package/dist/src/ui/commands/contextCommand.test.js.map +1 -0
- package/dist/src/ui/commands/copyCommand.d.ts +7 -0
- package/dist/src/ui/commands/copyCommand.js +374 -0
- package/dist/src/ui/commands/copyCommand.js.map +1 -0
- package/dist/src/ui/commands/deleteCommand.d.ts +7 -0
- package/dist/src/ui/commands/deleteCommand.js +19 -0
- package/dist/src/ui/commands/deleteCommand.js.map +1 -0
- package/dist/src/ui/commands/deleteCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/deleteCommand.test.js +27 -0
- package/dist/src/ui/commands/deleteCommand.test.js.map +1 -0
- package/dist/src/ui/commands/diffCommand.d.ts +42 -0
- package/dist/src/ui/commands/diffCommand.js +206 -0
- package/dist/src/ui/commands/diffCommand.js.map +1 -0
- package/dist/src/ui/commands/diffCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/diffCommand.test.js +482 -0
- package/dist/src/ui/commands/diffCommand.test.js.map +1 -0
- package/dist/src/ui/commands/directoryCommand.d.ts +13 -0
- package/dist/src/ui/commands/directoryCommand.js +252 -0
- package/dist/src/ui/commands/directoryCommand.js.map +1 -0
- package/dist/src/ui/commands/docsCommand.d.ts +7 -0
- package/dist/src/ui/commands/docsCommand.js +49 -0
- package/dist/src/ui/commands/docsCommand.js.map +1 -0
- package/dist/src/ui/commands/doctorCommand.d.ts +7 -0
- package/dist/src/ui/commands/doctorCommand.js +530 -0
- package/dist/src/ui/commands/doctorCommand.js.map +1 -0
- package/dist/src/ui/commands/doctorCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/doctorCommand.test.js +804 -0
- package/dist/src/ui/commands/doctorCommand.test.js.map +1 -0
- package/dist/src/ui/commands/dreamCommand.d.ts +7 -0
- package/dist/src/ui/commands/dreamCommand.js +42 -0
- package/dist/src/ui/commands/dreamCommand.js.map +1 -0
- package/dist/src/ui/commands/dreamCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/dreamCommand.test.js +39 -0
- package/dist/src/ui/commands/dreamCommand.test.js.map +1 -0
- package/dist/src/ui/commands/editorCommand.d.ts +7 -0
- package/dist/src/ui/commands/editorCommand.js +20 -0
- package/dist/src/ui/commands/editorCommand.js.map +1 -0
- package/dist/src/ui/commands/exportCommand.d.ts +10 -0
- package/dist/src/ui/commands/exportCommand.js +373 -0
- package/dist/src/ui/commands/exportCommand.js.map +1 -0
- package/dist/src/ui/commands/exportCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/exportCommand.test.js +905 -0
- package/dist/src/ui/commands/exportCommand.test.js.map +1 -0
- package/dist/src/ui/commands/extensionsCommand.d.ts +10 -0
- package/dist/src/ui/commands/extensionsCommand.js +185 -0
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -0
- package/dist/src/ui/commands/forgetCommand.d.ts +7 -0
- package/dist/src/ui/commands/forgetCommand.js +45 -0
- package/dist/src/ui/commands/forgetCommand.js.map +1 -0
- package/dist/src/ui/commands/forkCommand.d.ts +7 -0
- package/dist/src/ui/commands/forkCommand.js +163 -0
- package/dist/src/ui/commands/forkCommand.js.map +1 -0
- package/dist/src/ui/commands/forkCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/forkCommand.test.js +229 -0
- package/dist/src/ui/commands/forkCommand.test.js.map +1 -0
- package/dist/src/ui/commands/goalCommand.d.ts +7 -0
- package/dist/src/ui/commands/goalCommand.js +181 -0
- package/dist/src/ui/commands/goalCommand.js.map +1 -0
- package/dist/src/ui/commands/goalCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/goalCommand.test.js +328 -0
- package/dist/src/ui/commands/goalCommand.test.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.d.ts +7 -0
- package/dist/src/ui/commands/helpCommand.js +21 -0
- package/dist/src/ui/commands/helpCommand.js.map +1 -0
- package/dist/src/ui/commands/hooksCommand.d.ts +7 -0
- package/dist/src/ui/commands/hooksCommand.js +153 -0
- package/dist/src/ui/commands/hooksCommand.js.map +1 -0
- package/dist/src/ui/commands/hooksCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/hooksCommand.test.js +189 -0
- package/dist/src/ui/commands/hooksCommand.test.js.map +1 -0
- package/dist/src/ui/commands/ideCommand.d.ts +7 -0
- package/dist/src/ui/commands/ideCommand.js +256 -0
- package/dist/src/ui/commands/ideCommand.js.map +1 -0
- package/dist/src/ui/commands/initCommand.d.ts +7 -0
- package/dist/src/ui/commands/initCommand.js +119 -0
- package/dist/src/ui/commands/initCommand.js.map +1 -0
- package/dist/src/ui/commands/insightCommand.d.ts +7 -0
- package/dist/src/ui/commands/insightCommand.js +195 -0
- package/dist/src/ui/commands/insightCommand.js.map +1 -0
- package/dist/src/ui/commands/insightCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/insightCommand.test.js +173 -0
- package/dist/src/ui/commands/insightCommand.test.js.map +1 -0
- package/dist/src/ui/commands/languageCommand.d.ts +7 -0
- package/dist/src/ui/commands/languageCommand.js +291 -0
- package/dist/src/ui/commands/languageCommand.js.map +1 -0
- package/dist/src/ui/commands/languageCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/languageCommand.test.js +664 -0
- package/dist/src/ui/commands/languageCommand.test.js.map +1 -0
- package/dist/src/ui/commands/lspCommand.d.ts +7 -0
- package/dist/src/ui/commands/lspCommand.js +62 -0
- package/dist/src/ui/commands/lspCommand.js.map +1 -0
- package/dist/src/ui/commands/lspCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/lspCommand.test.js +175 -0
- package/dist/src/ui/commands/lspCommand.test.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.d.ts +7 -0
- package/dist/src/ui/commands/mcpCommand.js +21 -0
- package/dist/src/ui/commands/mcpCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/memoryCommand.js +21 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -0
- package/dist/src/ui/commands/modelCommand.d.ts +7 -0
- package/dist/src/ui/commands/modelCommand.js +226 -0
- package/dist/src/ui/commands/modelCommand.js.map +1 -0
- package/dist/src/ui/commands/modelCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/modelCommand.test.js +503 -0
- package/dist/src/ui/commands/modelCommand.test.js.map +1 -0
- package/dist/src/ui/commands/permissionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/permissionsCommand.js +20 -0
- package/dist/src/ui/commands/permissionsCommand.js.map +1 -0
- package/dist/src/ui/commands/permissionsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/permissionsCommand.test.js +30 -0
- package/dist/src/ui/commands/permissionsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/planCommand.d.ts +7 -0
- package/dist/src/ui/commands/planCommand.js +88 -0
- package/dist/src/ui/commands/planCommand.js.map +1 -0
- package/dist/src/ui/commands/planCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/planCommand.test.js +113 -0
- package/dist/src/ui/commands/planCommand.test.js.map +1 -0
- package/dist/src/ui/commands/quitCommand.d.ts +7 -0
- package/dist/src/ui/commands/quitCommand.js +38 -0
- package/dist/src/ui/commands/quitCommand.js.map +1 -0
- package/dist/src/ui/commands/recapCommand.d.ts +7 -0
- package/dist/src/ui/commands/recapCommand.js +56 -0
- package/dist/src/ui/commands/recapCommand.js.map +1 -0
- package/dist/src/ui/commands/rememberCommand.d.ts +7 -0
- package/dist/src/ui/commands/rememberCommand.js +54 -0
- package/dist/src/ui/commands/rememberCommand.js.map +1 -0
- package/dist/src/ui/commands/renameCommand.d.ts +7 -0
- package/dist/src/ui/commands/renameCommand.js +208 -0
- package/dist/src/ui/commands/renameCommand.js.map +1 -0
- package/dist/src/ui/commands/renameCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/renameCommand.test.js +414 -0
- package/dist/src/ui/commands/renameCommand.test.js.map +1 -0
- package/dist/src/ui/commands/restoreCommand.d.ts +8 -0
- package/dist/src/ui/commands/restoreCommand.js +159 -0
- package/dist/src/ui/commands/restoreCommand.js.map +1 -0
- package/dist/src/ui/commands/resumeCommand.d.ts +7 -0
- package/dist/src/ui/commands/resumeCommand.js +65 -0
- package/dist/src/ui/commands/resumeCommand.js.map +1 -0
- package/dist/src/ui/commands/resumeCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/resumeCommand.test.js +135 -0
- package/dist/src/ui/commands/resumeCommand.test.js.map +1 -0
- package/dist/src/ui/commands/rewindCommand.d.ts +7 -0
- package/dist/src/ui/commands/rewindCommand.js +20 -0
- package/dist/src/ui/commands/rewindCommand.js.map +1 -0
- package/dist/src/ui/commands/settingsCommand.d.ts +7 -0
- package/dist/src/ui/commands/settingsCommand.js +20 -0
- package/dist/src/ui/commands/settingsCommand.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.d.ts +9 -0
- package/dist/src/ui/commands/setupGithubCommand.js +165 -0
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/setupGithubCommand.test.js +164 -0
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -0
- package/dist/src/ui/commands/skillsCommand.d.ts +7 -0
- package/dist/src/ui/commands/skillsCommand.js +63 -0
- package/dist/src/ui/commands/skillsCommand.js.map +1 -0
- package/dist/src/ui/commands/skillsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/skillsCommand.test.js +136 -0
- package/dist/src/ui/commands/skillsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.d.ts +7 -0
- package/dist/src/ui/commands/statsCommand.js +130 -0
- package/dist/src/ui/commands/statsCommand.js.map +1 -0
- package/dist/src/ui/commands/statuslineCommand.d.ts +7 -0
- package/dist/src/ui/commands/statuslineCommand.js +33 -0
- package/dist/src/ui/commands/statuslineCommand.js.map +1 -0
- package/dist/src/ui/commands/statuslineCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/statuslineCommand.test.js +54 -0
- package/dist/src/ui/commands/statuslineCommand.test.js.map +1 -0
- package/dist/src/ui/commands/summaryCommand.d.ts +7 -0
- package/dist/src/ui/commands/summaryCommand.js +261 -0
- package/dist/src/ui/commands/summaryCommand.js.map +1 -0
- package/dist/src/ui/commands/tasksCommand.d.ts +7 -0
- package/dist/src/ui/commands/tasksCommand.js +222 -0
- package/dist/src/ui/commands/tasksCommand.js.map +1 -0
- package/dist/src/ui/commands/tasksCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/tasksCommand.test.js +365 -0
- package/dist/src/ui/commands/tasksCommand.test.js.map +1 -0
- package/dist/src/ui/commands/terminalSetupCommand.d.ts +13 -0
- package/dist/src/ui/commands/terminalSetupCommand.js +48 -0
- package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -0
- package/dist/src/ui/commands/themeCommand.d.ts +7 -0
- package/dist/src/ui/commands/themeCommand.js +20 -0
- package/dist/src/ui/commands/themeCommand.js.map +1 -0
- package/dist/src/ui/commands/toolsCommand.d.ts +7 -0
- package/dist/src/ui/commands/toolsCommand.js +45 -0
- package/dist/src/ui/commands/toolsCommand.js.map +1 -0
- package/dist/src/ui/commands/trustCommand.d.ts +7 -0
- package/dist/src/ui/commands/trustCommand.js +20 -0
- package/dist/src/ui/commands/trustCommand.js.map +1 -0
- package/dist/src/ui/commands/trustCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/trustCommand.test.js +30 -0
- package/dist/src/ui/commands/trustCommand.test.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +298 -0
- package/dist/src/ui/commands/types.js +13 -0
- package/dist/src/ui/commands/types.js.map +1 -0
- package/dist/src/ui/commands/vimCommand.d.ts +7 -0
- package/dist/src/ui/commands/vimCommand.js +27 -0
- package/dist/src/ui/commands/vimCommand.js.map +1 -0
- package/dist/src/ui/components/AboutBox.d.ts +12 -0
- package/dist/src/ui/components/AboutBox.js +10 -0
- package/dist/src/ui/components/AboutBox.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.d.ts +20 -0
- package/dist/src/ui/components/AnsiOutput.js +27 -0
- package/dist/src/ui/components/AnsiOutput.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.test.d.ts +6 -0
- package/dist/src/ui/components/AnsiOutput.test.js +134 -0
- package/dist/src/ui/components/AnsiOutput.test.js.map +1 -0
- package/dist/src/ui/components/ApiKeyInput.d.ts +22 -0
- package/dist/src/ui/components/ApiKeyInput.js +35 -0
- package/dist/src/ui/components/ApiKeyInput.js.map +1 -0
- package/dist/src/ui/components/AppHeader.d.ts +10 -0
- package/dist/src/ui/components/AppHeader.js +49 -0
- package/dist/src/ui/components/AppHeader.js.map +1 -0
- package/dist/src/ui/components/AppHeader.test.d.ts +6 -0
- package/dist/src/ui/components/AppHeader.test.js +109 -0
- package/dist/src/ui/components/AppHeader.test.js.map +1 -0
- package/dist/src/ui/components/ApprovalModeDialog.d.ts +21 -0
- package/dist/src/ui/components/ApprovalModeDialog.js +109 -0
- package/dist/src/ui/components/ApprovalModeDialog.js.map +1 -0
- package/dist/src/ui/components/ApprovalModeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ApprovalModeDialog.test.js +63 -0
- package/dist/src/ui/components/ApprovalModeDialog.test.js.map +1 -0
- package/dist/src/ui/components/AsciiArt.d.ts +1 -0
- package/dist/src/ui/components/AsciiArt.js +54 -0
- package/dist/src/ui/components/AsciiArt.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +12 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +37 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/components/BaseTextInput.d.ts +74 -0
- package/dist/src/ui/components/BaseTextInput.js +144 -0
- package/dist/src/ui/components/BaseTextInput.js.map +1 -0
- package/dist/src/ui/components/BaseTextInput.test.d.ts +6 -0
- package/dist/src/ui/components/BaseTextInput.test.js +78 -0
- package/dist/src/ui/components/BaseTextInput.test.js.map +1 -0
- package/dist/src/ui/components/Composer.d.ts +6 -0
- package/dist/src/ui/components/Composer.js +92 -0
- package/dist/src/ui/components/Composer.js.map +1 -0
- package/dist/src/ui/components/Composer.test.d.ts +6 -0
- package/dist/src/ui/components/Composer.test.js +344 -0
- package/dist/src/ui/components/Composer.test.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.d.ts +14 -0
- package/dist/src/ui/components/ConsentPrompt.js +35 -0
- package/dist/src/ui/components/ConsentPrompt.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/ConsentPrompt.test.js +110 -0
- package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +20 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +90 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +10 -0
- package/dist/src/ui/components/ContextUsageDisplay.js +33 -0
- package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/DebugModeNotification.d.ts +9 -0
- package/dist/src/ui/components/DebugModeNotification.js +23 -0
- package/dist/src/ui/components/DebugModeNotification.js.map +1 -0
- package/dist/src/ui/components/DebugProfiler.d.ts +6 -0
- package/dist/src/ui/components/DebugProfiler.js +27 -0
- package/dist/src/ui/components/DebugProfiler.js.map +1 -0
- package/dist/src/ui/components/DialogManager.d.ts +12 -0
- package/dist/src/ui/components/DialogManager.js +247 -0
- package/dist/src/ui/components/DialogManager.js.map +1 -0
- package/dist/src/ui/components/DiffDialog.d.ts +15 -0
- package/dist/src/ui/components/DiffDialog.js +412 -0
- package/dist/src/ui/components/DiffDialog.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +16 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +76 -0
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
- package/dist/src/ui/components/ExitWarning.d.ts +7 -0
- package/dist/src/ui/components/ExitWarning.js +9 -0
- package/dist/src/ui/components/ExitWarning.js.map +1 -0
- package/dist/src/ui/components/ExternalAuthProgress.d.ts +14 -0
- package/dist/src/ui/components/ExternalAuthProgress.js +14 -0
- package/dist/src/ui/components/ExternalAuthProgress.js.map +1 -0
- package/dist/src/ui/components/ExternalAuthProgress.test.d.ts +6 -0
- package/dist/src/ui/components/ExternalAuthProgress.test.js +20 -0
- package/dist/src/ui/components/ExternalAuthProgress.test.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.d.ts +17 -0
- package/dist/src/ui/components/FolderTrustDialog.js +58 -0
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/FolderTrustDialog.test.js +88 -0
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/Footer.d.ts +7 -0
- package/dist/src/ui/components/Footer.js +104 -0
- package/dist/src/ui/components/Footer.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +22 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js +47 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.test.d.ts +6 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js +29 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +1 -0
- package/dist/src/ui/components/GoalPill.d.ts +25 -0
- package/dist/src/ui/components/GoalPill.js +77 -0
- package/dist/src/ui/components/GoalPill.js.map +1 -0
- package/dist/src/ui/components/GoalPill.test.d.ts +6 -0
- package/dist/src/ui/components/GoalPill.test.js +56 -0
- package/dist/src/ui/components/GoalPill.test.js.map +1 -0
- package/dist/src/ui/components/Header.d.ts +62 -0
- package/dist/src/ui/components/Header.js +155 -0
- package/dist/src/ui/components/Header.js.map +1 -0
- package/dist/src/ui/components/Header.test.d.ts +6 -0
- package/dist/src/ui/components/Header.test.js +142 -0
- package/dist/src/ui/components/Header.test.js.map +1 -0
- package/dist/src/ui/components/Help.d.ts +18 -0
- package/dist/src/ui/components/Help.js +236 -0
- package/dist/src/ui/components/Help.js.map +1 -0
- package/dist/src/ui/components/Help.test.d.ts +6 -0
- package/dist/src/ui/components/Help.test.js +243 -0
- package/dist/src/ui/components/Help.test.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +39 -0
- package/dist/src/ui/components/HistoryItemDisplay.js +51 -0
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js +197 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +11 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js +34 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +53 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +63 -0
- package/dist/src/ui/components/InputPrompt.js +1220 -0
- package/dist/src/ui/components/InputPrompt.js.map +1 -0
- package/dist/src/ui/components/KeyboardShortcuts.d.ts +7 -0
- package/dist/src/ui/components/KeyboardShortcuts.js +78 -0
- package/dist/src/ui/components/KeyboardShortcuts.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.d.ts +31 -0
- package/dist/src/ui/components/LoadingIndicator.js +46 -0
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.test.d.ts +6 -0
- package/dist/src/ui/components/LoadingIndicator.test.js +246 -0
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +13 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js +37 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +6 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js +28 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -0
- package/dist/src/ui/components/MainContent.d.ts +6 -0
- package/dist/src/ui/components/MainContent.js +437 -0
- package/dist/src/ui/components/MainContent.js.map +1 -0
- package/dist/src/ui/components/MainContent.test.d.ts +6 -0
- package/dist/src/ui/components/MainContent.test.js +621 -0
- package/dist/src/ui/components/MainContent.test.js.map +1 -0
- package/dist/src/ui/components/MemoryDialog.d.ts +10 -0
- package/dist/src/ui/components/MemoryDialog.js +288 -0
- package/dist/src/ui/components/MemoryDialog.js.map +1 -0
- package/dist/src/ui/components/MemoryDialog.test.d.ts +6 -0
- package/dist/src/ui/components/MemoryDialog.test.js +165 -0
- package/dist/src/ui/components/MemoryDialog.test.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +24 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelDialog.d.ts +12 -0
- package/dist/src/ui/components/ModelDialog.js +390 -0
- package/dist/src/ui/components/ModelDialog.js.map +1 -0
- package/dist/src/ui/components/ModelDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ModelDialog.test.js +489 -0
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +11 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +61 -0
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/Notifications.d.ts +6 -0
- package/dist/src/ui/components/Notifications.js +20 -0
- package/dist/src/ui/components/Notifications.js.map +1 -0
- package/dist/src/ui/components/PermissionsDialog.d.ts +11 -0
- package/dist/src/ui/components/PermissionsDialog.js +547 -0
- package/dist/src/ui/components/PermissionsDialog.js.map +1 -0
- package/dist/src/ui/components/PlanSummaryDisplay.d.ts +14 -0
- package/dist/src/ui/components/PlanSummaryDisplay.js +10 -0
- package/dist/src/ui/components/PlanSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/PluginChoicePrompt.d.ts +18 -0
- package/dist/src/ui/components/PluginChoicePrompt.js +96 -0
- package/dist/src/ui/components/PluginChoicePrompt.js.map +1 -0
- package/dist/src/ui/components/PluginChoicePrompt.test.d.ts +6 -0
- package/dist/src/ui/components/PluginChoicePrompt.test.js +136 -0
- package/dist/src/ui/components/PluginChoicePrompt.test.js.map +1 -0
- package/dist/src/ui/components/PrepareLabel.d.ts +15 -0
- package/dist/src/ui/components/PrepareLabel.js +72 -0
- package/dist/src/ui/components/PrepareLabel.js.map +1 -0
- package/dist/src/ui/components/PrepareLabel.test.d.ts +6 -0
- package/dist/src/ui/components/PrepareLabel.test.js +71 -0
- package/dist/src/ui/components/PrepareLabel.test.js.map +1 -0
- package/dist/src/ui/components/ProviderUpdatePrompt.d.ts +12 -0
- package/dist/src/ui/components/ProviderUpdatePrompt.js +49 -0
- package/dist/src/ui/components/ProviderUpdatePrompt.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.d.ts +9 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js +35 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js +76 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -0
- package/dist/src/ui/components/QuittingDisplay.d.ts +6 -0
- package/dist/src/ui/components/QuittingDisplay.js +21 -0
- package/dist/src/ui/components/QuittingDisplay.js.map +1 -0
- package/dist/src/ui/components/QwenOAuthProgress.d.ts +16 -0
- package/dist/src/ui/components/QwenOAuthProgress.js +65 -0
- package/dist/src/ui/components/QwenOAuthProgress.js.map +1 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.d.ts +6 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.js +287 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.js.map +1 -0
- package/dist/src/ui/components/RewindSelector.d.ts +22 -0
- package/dist/src/ui/components/RewindSelector.js +264 -0
- package/dist/src/ui/components/RewindSelector.js.map +1 -0
- package/dist/src/ui/components/RewindSelector.test.d.ts +6 -0
- package/dist/src/ui/components/RewindSelector.test.js +146 -0
- package/dist/src/ui/components/RewindSelector.test.js.map +1 -0
- package/dist/src/ui/components/SessionPicker.d.ts +55 -0
- package/dist/src/ui/components/SessionPicker.js +142 -0
- package/dist/src/ui/components/SessionPicker.js.map +1 -0
- package/dist/src/ui/components/SessionPreview.d.ts +20 -0
- package/dist/src/ui/components/SessionPreview.js +97 -0
- package/dist/src/ui/components/SessionPreview.js.map +1 -0
- package/dist/src/ui/components/SessionPreview.test.d.ts +1 -0
- package/dist/src/ui/components/SessionPreview.test.js +124 -0
- package/dist/src/ui/components/SessionPreview.test.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +12 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js +17 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/SettingInputPrompt.d.ts +15 -0
- package/dist/src/ui/components/SettingInputPrompt.js +63 -0
- package/dist/src/ui/components/SettingInputPrompt.js.map +1 -0
- package/dist/src/ui/components/SettingInputPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/SettingInputPrompt.test.js +60 -0
- package/dist/src/ui/components/SettingInputPrompt.test.js.map +1 -0
- package/dist/src/ui/components/SettingsCorruptedDialog.d.ts +14 -0
- package/dist/src/ui/components/SettingsCorruptedDialog.js +44 -0
- package/dist/src/ui/components/SettingsCorruptedDialog.js.map +1 -0
- package/dist/src/ui/components/SettingsCorruptedDialog.test.d.ts +6 -0
- package/dist/src/ui/components/SettingsCorruptedDialog.test.js +162 -0
- package/dist/src/ui/components/SettingsCorruptedDialog.test.js.map +1 -0
- package/dist/src/ui/components/SettingsDialog.d.ts +18 -0
- package/dist/src/ui/components/SettingsDialog.js +658 -0
- package/dist/src/ui/components/SettingsDialog.js.map +1 -0
- package/dist/src/ui/components/SettingsDialog.test.d.ts +6 -0
- package/dist/src/ui/components/SettingsDialog.test.js +1127 -0
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -0
- package/dist/src/ui/components/ShellConfirmationDialog.d.ts +17 -0
- package/dist/src/ui/components/ShellConfirmationDialog.js +75 -0
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.js +167 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +1 -0
- package/dist/src/ui/components/ShellInputPrompt.d.ts +11 -0
- package/dist/src/ui/components/ShellInputPrompt.js +42 -0
- package/dist/src/ui/components/ShellInputPrompt.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
- package/dist/src/ui/components/ShellModeIndicator.js +5 -0
- package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
- package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
- package/dist/src/ui/components/ShowMoreLines.js +24 -0
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
- package/dist/src/ui/components/StandaloneSessionPicker.d.ts +11 -0
- package/dist/src/ui/components/StandaloneSessionPicker.js +105 -0
- package/dist/src/ui/components/StandaloneSessionPicker.js.map +1 -0
- package/dist/src/ui/components/StandaloneSessionPicker.test.d.ts +6 -0
- package/dist/src/ui/components/StandaloneSessionPicker.test.js +667 -0
- package/dist/src/ui/components/StandaloneSessionPicker.test.js.map +1 -0
- package/dist/src/ui/components/StatsActivityTab.d.ts +14 -0
- package/dist/src/ui/components/StatsActivityTab.js +85 -0
- package/dist/src/ui/components/StatsActivityTab.js.map +1 -0
- package/dist/src/ui/components/StatsDialog.d.ts +12 -0
- package/dist/src/ui/components/StatsDialog.js +104 -0
- package/dist/src/ui/components/StatsDialog.js.map +1 -0
- package/dist/src/ui/components/StatsDisplay.d.ts +13 -0
- package/dist/src/ui/components/StatsDisplay.js +52 -0
- package/dist/src/ui/components/StatsDisplay.js.map +1 -0
- package/dist/src/ui/components/StatsEfficiencyTab.d.ts +11 -0
- package/dist/src/ui/components/StatsEfficiencyTab.js +99 -0
- package/dist/src/ui/components/StatsEfficiencyTab.js.map +1 -0
- package/dist/src/ui/components/StatsHeatmapView.d.ts +12 -0
- package/dist/src/ui/components/StatsHeatmapView.js +40 -0
- package/dist/src/ui/components/StatsHeatmapView.js.map +1 -0
- package/dist/src/ui/components/StatsSessionTab.d.ts +7 -0
- package/dist/src/ui/components/StatsSessionTab.js +40 -0
- package/dist/src/ui/components/StatsSessionTab.js.map +1 -0
- package/dist/src/ui/components/StatusLineDialog.d.ts +22 -0
- package/dist/src/ui/components/StatusLineDialog.js +140 -0
- package/dist/src/ui/components/StatusLineDialog.js.map +1 -0
- package/dist/src/ui/components/StatusLineDialog.test.d.ts +6 -0
- package/dist/src/ui/components/StatusLineDialog.test.js +180 -0
- package/dist/src/ui/components/StatusLineDialog.test.js.map +1 -0
- package/dist/src/ui/components/StickyTodoList.d.ts +14 -0
- package/dist/src/ui/components/StickyTodoList.js +45 -0
- package/dist/src/ui/components/StickyTodoList.js.map +1 -0
- package/dist/src/ui/components/StickyTodoList.test.d.ts +6 -0
- package/dist/src/ui/components/StickyTodoList.test.js +128 -0
- package/dist/src/ui/components/StickyTodoList.test.js.map +1 -0
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +47 -0
- package/dist/src/ui/components/SuggestionsDisplay.js +43 -0
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
- package/dist/src/ui/components/SuggestionsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/SuggestionsDisplay.test.js +39 -0
- package/dist/src/ui/components/SuggestionsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.d.ts +20 -0
- package/dist/src/ui/components/ThemeDialog.js +137 -0
- package/dist/src/ui/components/ThemeDialog.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ThemeDialog.test.js +75 -0
- package/dist/src/ui/components/ThemeDialog.test.js.map +1 -0
- package/dist/src/ui/components/ThinkingDots.d.ts +11 -0
- package/dist/src/ui/components/ThinkingDots.js +47 -0
- package/dist/src/ui/components/ThinkingDots.js.map +1 -0
- package/dist/src/ui/components/ThinkingIndicator.d.ts +7 -0
- package/dist/src/ui/components/ThinkingIndicator.js +13 -0
- package/dist/src/ui/components/ThinkingIndicator.js.map +1 -0
- package/dist/src/ui/components/Tips.d.ts +6 -0
- package/dist/src/ui/components/Tips.js +37 -0
- package/dist/src/ui/components/Tips.js.map +1 -0
- package/dist/src/ui/components/Tips.test.d.ts +6 -0
- package/dist/src/ui/components/Tips.test.js +145 -0
- package/dist/src/ui/components/Tips.test.js.map +1 -0
- package/dist/src/ui/components/TodoDisplay.d.ts +16 -0
- package/dist/src/ui/components/TodoDisplay.js +27 -0
- package/dist/src/ui/components/TodoDisplay.js.map +1 -0
- package/dist/src/ui/components/TodoDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/TodoDisplay.test.js +77 -0
- package/dist/src/ui/components/TodoDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +11 -0
- package/dist/src/ui/components/ToolStatsDisplay.js +42 -0
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/TrustDialog.d.ts +13 -0
- package/dist/src/ui/components/TrustDialog.js +48 -0
- package/dist/src/ui/components/TrustDialog.js.map +1 -0
- package/dist/src/ui/components/TrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/TrustDialog.test.js +154 -0
- package/dist/src/ui/components/TrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
- package/dist/src/ui/components/UpdateNotification.js +10 -0
- package/dist/src/ui/components/UpdateNotification.js.map +1 -0
- package/dist/src/ui/components/WelcomeBackDialog.d.ts +13 -0
- package/dist/src/ui/components/WelcomeBackDialog.js +43 -0
- package/dist/src/ui/components/WelcomeBackDialog.js.map +1 -0
- package/dist/src/ui/components/WorktreeExitDialog.d.ts +26 -0
- package/dist/src/ui/components/WorktreeExitDialog.js +134 -0
- package/dist/src/ui/components/WorktreeExitDialog.js.map +1 -0
- package/dist/src/ui/components/WorktreeExitDialog.test.d.ts +6 -0
- package/dist/src/ui/components/WorktreeExitDialog.test.js +41 -0
- package/dist/src/ui/components/WorktreeExitDialog.test.js.map +1 -0
- package/dist/src/ui/components/agent-view/AgentChatContent.d.ts +27 -0
- package/dist/src/ui/components/agent-view/AgentChatContent.js +150 -0
- package/dist/src/ui/components/agent-view/AgentChatContent.js.map +1 -0
- package/dist/src/ui/components/agent-view/AgentChatView.d.ts +10 -0
- package/dist/src/ui/components/agent-view/AgentChatView.js +24 -0
- package/dist/src/ui/components/agent-view/AgentChatView.js.map +1 -0
- package/dist/src/ui/components/agent-view/AgentComposer.d.ts +10 -0
- package/dist/src/ui/components/agent-view/AgentComposer.js +183 -0
- package/dist/src/ui/components/agent-view/AgentComposer.js.map +1 -0
- package/dist/src/ui/components/agent-view/AgentFooter.d.ts +20 -0
- package/dist/src/ui/components/agent-view/AgentFooter.js +15 -0
- package/dist/src/ui/components/agent-view/AgentFooter.js.map +1 -0
- package/dist/src/ui/components/agent-view/AgentHeader.d.ts +19 -0
- package/dist/src/ui/components/agent-view/AgentHeader.js +13 -0
- package/dist/src/ui/components/agent-view/AgentHeader.js.map +1 -0
- package/dist/src/ui/components/agent-view/AgentTabBar.d.ts +6 -0
- package/dist/src/ui/components/agent-view/AgentTabBar.js +110 -0
- package/dist/src/ui/components/agent-view/AgentTabBar.js.map +1 -0
- package/dist/src/ui/components/agent-view/AgentTabBar.test.d.ts +6 -0
- package/dist/src/ui/components/agent-view/AgentTabBar.test.js +90 -0
- package/dist/src/ui/components/agent-view/AgentTabBar.test.js.map +1 -0
- package/dist/src/ui/components/agent-view/agentHistoryAdapter.d.ts +31 -0
- package/dist/src/ui/components/agent-view/agentHistoryAdapter.js +148 -0
- package/dist/src/ui/components/agent-view/agentHistoryAdapter.js.map +1 -0
- package/dist/src/ui/components/agent-view/agentHistoryAdapter.test.d.ts +6 -0
- package/dist/src/ui/components/agent-view/agentHistoryAdapter.test.js +318 -0
- package/dist/src/ui/components/agent-view/agentHistoryAdapter.test.js.map +1 -0
- package/dist/src/ui/components/agent-view/index.d.ts +11 -0
- package/dist/src/ui/components/agent-view/index.js +12 -0
- package/dist/src/ui/components/agent-view/index.js.map +1 -0
- package/dist/src/ui/components/approvalModeVisuals.d.ts +11 -0
- package/dist/src/ui/components/approvalModeVisuals.js +37 -0
- package/dist/src/ui/components/approvalModeVisuals.js.map +1 -0
- package/dist/src/ui/components/approvalModeVisuals.test.d.ts +6 -0
- package/dist/src/ui/components/approvalModeVisuals.test.js +32 -0
- package/dist/src/ui/components/approvalModeVisuals.test.js.map +1 -0
- package/dist/src/ui/components/arena/ArenaCards.d.ts +21 -0
- package/dist/src/ui/components/arena/ArenaCards.js +99 -0
- package/dist/src/ui/components/arena/ArenaCards.js.map +1 -0
- package/dist/src/ui/components/arena/ArenaCards.test.d.ts +6 -0
- package/dist/src/ui/components/arena/ArenaCards.test.js +128 -0
- package/dist/src/ui/components/arena/ArenaCards.test.js.map +1 -0
- package/dist/src/ui/components/arena/ArenaSelectDialog.d.ts +16 -0
- package/dist/src/ui/components/arena/ArenaSelectDialog.js +213 -0
- package/dist/src/ui/components/arena/ArenaSelectDialog.js.map +1 -0
- package/dist/src/ui/components/arena/ArenaSelectDialog.test.d.ts +6 -0
- package/dist/src/ui/components/arena/ArenaSelectDialog.test.js +149 -0
- package/dist/src/ui/components/arena/ArenaSelectDialog.test.js.map +1 -0
- package/dist/src/ui/components/arena/ArenaStartDialog.d.ts +12 -0
- package/dist/src/ui/components/arena/ArenaStartDialog.js +49 -0
- package/dist/src/ui/components/arena/ArenaStartDialog.js.map +1 -0
- package/dist/src/ui/components/arena/ArenaStatusDialog.d.ts +14 -0
- package/dist/src/ui/components/arena/ArenaStatusDialog.js +111 -0
- package/dist/src/ui/components/arena/ArenaStatusDialog.js.map +1 -0
- package/dist/src/ui/components/arena/ArenaStopDialog.d.ts +15 -0
- package/dist/src/ui/components/arena/ArenaStopDialog.js +113 -0
- package/dist/src/ui/components/arena/ArenaStopDialog.js.map +1 -0
- package/dist/src/ui/components/background-view/BackgroundTasksDialog.d.ts +17 -0
- package/dist/src/ui/components/background-view/BackgroundTasksDialog.js +614 -0
- package/dist/src/ui/components/background-view/BackgroundTasksDialog.js.map +1 -0
- package/dist/src/ui/components/background-view/BackgroundTasksDialog.test.d.ts +6 -0
- package/dist/src/ui/components/background-view/BackgroundTasksDialog.test.js +606 -0
- package/dist/src/ui/components/background-view/BackgroundTasksDialog.test.js.map +1 -0
- package/dist/src/ui/components/background-view/BackgroundTasksPill.d.ts +14 -0
- package/dist/src/ui/components/background-view/BackgroundTasksPill.js +94 -0
- package/dist/src/ui/components/background-view/BackgroundTasksPill.js.map +1 -0
- package/dist/src/ui/components/background-view/BackgroundTasksPill.test.d.ts +6 -0
- package/dist/src/ui/components/background-view/BackgroundTasksPill.test.js +158 -0
- package/dist/src/ui/components/background-view/BackgroundTasksPill.test.js.map +1 -0
- package/dist/src/ui/components/background-view/LiveAgentPanel.d.ts +43 -0
- package/dist/src/ui/components/background-view/LiveAgentPanel.js +361 -0
- package/dist/src/ui/components/background-view/LiveAgentPanel.js.map +1 -0
- package/dist/src/ui/components/background-view/LiveAgentPanel.test.d.ts +6 -0
- package/dist/src/ui/components/background-view/LiveAgentPanel.test.js +595 -0
- package/dist/src/ui/components/background-view/LiveAgentPanel.test.js.map +1 -0
- package/dist/src/ui/components/extensions/ExtensionsManagerDialog.d.ts +12 -0
- package/dist/src/ui/components/extensions/ExtensionsManagerDialog.js +337 -0
- package/dist/src/ui/components/extensions/ExtensionsManagerDialog.js.map +1 -0
- package/dist/src/ui/components/extensions/ExtensionsManagerDialog.test.d.ts +6 -0
- package/dist/src/ui/components/extensions/ExtensionsManagerDialog.test.js +90 -0
- package/dist/src/ui/components/extensions/ExtensionsManagerDialog.test.js.map +1 -0
- package/dist/src/ui/components/extensions/index.d.ts +8 -0
- package/dist/src/ui/components/extensions/index.js +8 -0
- package/dist/src/ui/components/extensions/index.js.map +1 -0
- package/dist/src/ui/components/extensions/steps/ActionSelectionStep.d.ts +15 -0
- package/dist/src/ui/components/extensions/steps/ActionSelectionStep.js +75 -0
- package/dist/src/ui/components/extensions/steps/ActionSelectionStep.js.map +1 -0
- package/dist/src/ui/components/extensions/steps/ActionSelectionStep.test.d.ts +6 -0
- package/dist/src/ui/components/extensions/steps/ActionSelectionStep.test.js +56 -0
- package/dist/src/ui/components/extensions/steps/ActionSelectionStep.test.js.map +1 -0
- package/dist/src/ui/components/extensions/steps/ExtensionDetailStep.d.ts +11 -0
- package/dist/src/ui/components/extensions/steps/ExtensionDetailStep.js +23 -0
- package/dist/src/ui/components/extensions/steps/ExtensionDetailStep.js.map +1 -0
- package/dist/src/ui/components/extensions/steps/ExtensionListStep.d.ts +13 -0
- package/dist/src/ui/components/extensions/steps/ExtensionListStep.js +105 -0
- package/dist/src/ui/components/extensions/steps/ExtensionListStep.js.map +1 -0
- package/dist/src/ui/components/extensions/steps/ExtensionListStep.test.d.ts +6 -0
- package/dist/src/ui/components/extensions/steps/ExtensionListStep.test.js +74 -0
- package/dist/src/ui/components/extensions/steps/ExtensionListStep.test.js.map +1 -0
- package/dist/src/ui/components/extensions/steps/ScopeSelectStep.d.ts +13 -0
- package/dist/src/ui/components/extensions/steps/ScopeSelectStep.js +40 -0
- package/dist/src/ui/components/extensions/steps/ScopeSelectStep.js.map +1 -0
- package/dist/src/ui/components/extensions/steps/UninstallConfirmStep.d.ts +13 -0
- package/dist/src/ui/components/extensions/steps/UninstallConfirmStep.js +38 -0
- package/dist/src/ui/components/extensions/steps/UninstallConfirmStep.js.map +1 -0
- package/dist/src/ui/components/extensions/steps/index.d.ts +10 -0
- package/dist/src/ui/components/extensions/steps/index.js +11 -0
- package/dist/src/ui/components/extensions/steps/index.js.map +1 -0
- package/dist/src/ui/components/extensions/types.d.ts +73 -0
- package/dist/src/ui/components/extensions/types.js +18 -0
- package/dist/src/ui/components/extensions/types.js.map +1 -0
- package/dist/src/ui/components/hooks/HandlerListBody.d.ts +12 -0
- package/dist/src/ui/components/hooks/HandlerListBody.js +54 -0
- package/dist/src/ui/components/hooks/HandlerListBody.js.map +1 -0
- package/dist/src/ui/components/hooks/HandlerListBody.test.d.ts +6 -0
- package/dist/src/ui/components/hooks/HandlerListBody.test.js +175 -0
- package/dist/src/ui/components/hooks/HandlerListBody.test.js.map +1 -0
- package/dist/src/ui/components/hooks/HookConfigDetailStep.d.ts +12 -0
- package/dist/src/ui/components/hooks/HookConfigDetailStep.js +48 -0
- package/dist/src/ui/components/hooks/HookConfigDetailStep.js.map +1 -0
- package/dist/src/ui/components/hooks/HookConfigDetailStep.test.d.ts +6 -0
- package/dist/src/ui/components/hooks/HookConfigDetailStep.test.js +236 -0
- package/dist/src/ui/components/hooks/HookConfigDetailStep.test.js.map +1 -0
- package/dist/src/ui/components/hooks/HookDetailStep.d.ts +12 -0
- package/dist/src/ui/components/hooks/HookDetailStep.js +11 -0
- package/dist/src/ui/components/hooks/HookDetailStep.js.map +1 -0
- package/dist/src/ui/components/hooks/HookDetailStep.test.d.ts +6 -0
- package/dist/src/ui/components/hooks/HookDetailStep.test.js +241 -0
- package/dist/src/ui/components/hooks/HookDetailStep.test.js.map +1 -0
- package/dist/src/ui/components/hooks/HookEventHandlerListStep.d.ts +12 -0
- package/dist/src/ui/components/hooks/HookEventHandlerListStep.js +18 -0
- package/dist/src/ui/components/hooks/HookEventHandlerListStep.js.map +1 -0
- package/dist/src/ui/components/hooks/HookEventHeader.d.ts +13 -0
- package/dist/src/ui/components/hooks/HookEventHeader.js +23 -0
- package/dist/src/ui/components/hooks/HookEventHeader.js.map +1 -0
- package/dist/src/ui/components/hooks/HookEventMatcherListStep.d.ts +12 -0
- package/dist/src/ui/components/hooks/HookEventMatcherListStep.js +28 -0
- package/dist/src/ui/components/hooks/HookEventMatcherListStep.js.map +1 -0
- package/dist/src/ui/components/hooks/HookMatcherDetailStep.d.ts +13 -0
- package/dist/src/ui/components/hooks/HookMatcherDetailStep.js +16 -0
- package/dist/src/ui/components/hooks/HookMatcherDetailStep.js.map +1 -0
- package/dist/src/ui/components/hooks/HookMatcherDetailStep.test.d.ts +6 -0
- package/dist/src/ui/components/hooks/HookMatcherDetailStep.test.js +154 -0
- package/dist/src/ui/components/hooks/HookMatcherDetailStep.test.js.map +1 -0
- package/dist/src/ui/components/hooks/HooksDisabledStep.d.ts +10 -0
- package/dist/src/ui/components/hooks/HooksDisabledStep.js +23 -0
- package/dist/src/ui/components/hooks/HooksDisabledStep.js.map +1 -0
- package/dist/src/ui/components/hooks/HooksDisabledStep.test.d.ts +6 -0
- package/dist/src/ui/components/hooks/HooksDisabledStep.test.js +86 -0
- package/dist/src/ui/components/hooks/HooksDisabledStep.test.js.map +1 -0
- package/dist/src/ui/components/hooks/HooksListStep.d.ts +12 -0
- package/dist/src/ui/components/hooks/HooksListStep.js +32 -0
- package/dist/src/ui/components/hooks/HooksListStep.js.map +1 -0
- package/dist/src/ui/components/hooks/HooksListStep.test.d.ts +6 -0
- package/dist/src/ui/components/hooks/HooksListStep.test.js +144 -0
- package/dist/src/ui/components/hooks/HooksListStep.test.js.map +1 -0
- package/dist/src/ui/components/hooks/HooksManagementDialog.d.ts +7 -0
- package/dist/src/ui/components/hooks/HooksManagementDialog.js +418 -0
- package/dist/src/ui/components/hooks/HooksManagementDialog.js.map +1 -0
- package/dist/src/ui/components/hooks/HooksManagementDialog.test.d.ts +6 -0
- package/dist/src/ui/components/hooks/HooksManagementDialog.test.js +305 -0
- package/dist/src/ui/components/hooks/HooksManagementDialog.test.js.map +1 -0
- package/dist/src/ui/components/hooks/constants.d.ts +26 -0
- package/dist/src/ui/components/hooks/constants.js +227 -0
- package/dist/src/ui/components/hooks/constants.js.map +1 -0
- package/dist/src/ui/components/hooks/constants.test.d.ts +6 -0
- package/dist/src/ui/components/hooks/constants.test.js +317 -0
- package/dist/src/ui/components/hooks/constants.test.js.map +1 -0
- package/dist/src/ui/components/hooks/index.d.ts +12 -0
- package/dist/src/ui/components/hooks/index.js +13 -0
- package/dist/src/ui/components/hooks/index.js.map +1 -0
- package/dist/src/ui/components/hooks/matcherGrouping.d.ts +9 -0
- package/dist/src/ui/components/hooks/matcherGrouping.js +35 -0
- package/dist/src/ui/components/hooks/matcherGrouping.js.map +1 -0
- package/dist/src/ui/components/hooks/matcherGrouping.test.d.ts +6 -0
- package/dist/src/ui/components/hooks/matcherGrouping.test.js +183 -0
- package/dist/src/ui/components/hooks/matcherGrouping.test.js.map +1 -0
- package/dist/src/ui/components/hooks/sourceLabels.d.ts +13 -0
- package/dist/src/ui/components/hooks/sourceLabels.js +35 -0
- package/dist/src/ui/components/hooks/sourceLabels.js.map +1 -0
- package/dist/src/ui/components/hooks/sourceLabels.test.d.ts +6 -0
- package/dist/src/ui/components/hooks/sourceLabels.test.js +81 -0
- package/dist/src/ui/components/hooks/sourceLabels.test.js.map +1 -0
- package/dist/src/ui/components/hooks/types.d.ts +42 -0
- package/dist/src/ui/components/hooks/types.js +13 -0
- package/dist/src/ui/components/hooks/types.js.map +1 -0
- package/dist/src/ui/components/mcp/MCPHealthPill.d.ts +24 -0
- package/dist/src/ui/components/mcp/MCPHealthPill.js +33 -0
- package/dist/src/ui/components/mcp/MCPHealthPill.js.map +1 -0
- package/dist/src/ui/components/mcp/MCPHealthPill.test.d.ts +6 -0
- package/dist/src/ui/components/mcp/MCPHealthPill.test.js +42 -0
- package/dist/src/ui/components/mcp/MCPHealthPill.test.js.map +1 -0
- package/dist/src/ui/components/mcp/MCPManagementDialog.d.ts +7 -0
- package/dist/src/ui/components/mcp/MCPManagementDialog.js +472 -0
- package/dist/src/ui/components/mcp/MCPManagementDialog.js.map +1 -0
- package/dist/src/ui/components/mcp/constants.d.ts +29 -0
- package/dist/src/ui/components/mcp/constants.js +34 -0
- package/dist/src/ui/components/mcp/constants.js.map +1 -0
- package/dist/src/ui/components/mcp/index.d.ts +12 -0
- package/dist/src/ui/components/mcp/index.js +15 -0
- package/dist/src/ui/components/mcp/index.js.map +1 -0
- package/dist/src/ui/components/mcp/steps/AuthenticateStep.d.ts +7 -0
- package/dist/src/ui/components/mcp/steps/AuthenticateStep.js +187 -0
- package/dist/src/ui/components/mcp/steps/AuthenticateStep.js.map +1 -0
- package/dist/src/ui/components/mcp/steps/DisableScopeSelectStep.d.ts +7 -0
- package/dist/src/ui/components/mcp/steps/DisableScopeSelectStep.js +44 -0
- package/dist/src/ui/components/mcp/steps/DisableScopeSelectStep.js.map +1 -0
- package/dist/src/ui/components/mcp/steps/ServerDetailStep.d.ts +7 -0
- package/dist/src/ui/components/mcp/steps/ServerDetailStep.js +108 -0
- package/dist/src/ui/components/mcp/steps/ServerDetailStep.js.map +1 -0
- package/dist/src/ui/components/mcp/steps/ServerListStep.d.ts +7 -0
- package/dist/src/ui/components/mcp/steps/ServerListStep.js +74 -0
- package/dist/src/ui/components/mcp/steps/ServerListStep.js.map +1 -0
- package/dist/src/ui/components/mcp/steps/ServerListStep.test.d.ts +6 -0
- package/dist/src/ui/components/mcp/steps/ServerListStep.test.js +60 -0
- package/dist/src/ui/components/mcp/steps/ServerListStep.test.js.map +1 -0
- package/dist/src/ui/components/mcp/steps/ToolDetailStep.d.ts +7 -0
- package/dist/src/ui/components/mcp/steps/ToolDetailStep.js +49 -0
- package/dist/src/ui/components/mcp/steps/ToolDetailStep.js.map +1 -0
- package/dist/src/ui/components/mcp/steps/ToolListStep.d.ts +7 -0
- package/dist/src/ui/components/mcp/steps/ToolListStep.js +80 -0
- package/dist/src/ui/components/mcp/steps/ToolListStep.js.map +1 -0
- package/dist/src/ui/components/mcp/steps/ToolListStep.test.d.ts +6 -0
- package/dist/src/ui/components/mcp/steps/ToolListStep.test.js +55 -0
- package/dist/src/ui/components/mcp/steps/ToolListStep.test.js.map +1 -0
- package/dist/src/ui/components/mcp/types.d.ts +177 -0
- package/dist/src/ui/components/mcp/types.js +17 -0
- package/dist/src/ui/components/mcp/types.js.map +1 -0
- package/dist/src/ui/components/mcp/utils.d.ts +40 -0
- package/dist/src/ui/components/mcp/utils.js +126 -0
- package/dist/src/ui/components/mcp/utils.js.map +1 -0
- package/dist/src/ui/components/mcp/utils.test.d.ts +6 -0
- package/dist/src/ui/components/mcp/utils.test.js +130 -0
- package/dist/src/ui/components/mcp/utils.test.js.map +1 -0
- package/dist/src/ui/components/messages/AskUserQuestionDialog.d.ts +14 -0
- package/dist/src/ui/components/messages/AskUserQuestionDialog.js +291 -0
- package/dist/src/ui/components/messages/AskUserQuestionDialog.js.map +1 -0
- package/dist/src/ui/components/messages/AskUserQuestionDialog.test.d.ts +6 -0
- package/dist/src/ui/components/messages/AskUserQuestionDialog.test.js +281 -0
- package/dist/src/ui/components/messages/AskUserQuestionDialog.test.js.map +1 -0
- package/dist/src/ui/components/messages/BtwMessage.d.ts +14 -0
- package/dist/src/ui/components/messages/BtwMessage.js +30 -0
- package/dist/src/ui/components/messages/BtwMessage.js.map +1 -0
- package/dist/src/ui/components/messages/BtwMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/BtwMessage.test.js +60 -0
- package/dist/src/ui/components/messages/BtwMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/CompactToolGroupDisplay.d.ts +20 -0
- package/dist/src/ui/components/messages/CompactToolGroupDisplay.js +80 -0
- package/dist/src/ui/components/messages/CompactToolGroupDisplay.js.map +1 -0
- package/dist/src/ui/components/messages/CompactToolGroupDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/messages/CompactToolGroupDisplay.test.js +139 -0
- package/dist/src/ui/components/messages/CompactToolGroupDisplay.test.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +10 -0
- package/dist/src/ui/components/messages/CompressionMessage.js +50 -0
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js +160 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ConversationMessages.d.ts +46 -0
- package/dist/src/ui/components/messages/ConversationMessages.js +32 -0
- package/dist/src/ui/components/messages/ConversationMessages.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +19 -0
- package/dist/src/ui/components/messages/DiffRenderer.js +219 -0
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +6 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js +296 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -0
- package/dist/src/ui/components/messages/DiffStatsDisplay.d.ts +18 -0
- package/dist/src/ui/components/messages/DiffStatsDisplay.js +50 -0
- package/dist/src/ui/components/messages/DiffStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/messages/DiffStatsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/messages/DiffStatsDisplay.test.js +165 -0
- package/dist/src/ui/components/messages/DiffStatsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/messages/GoalStatusMessage.d.ts +16 -0
- package/dist/src/ui/components/messages/GoalStatusMessage.js +76 -0
- package/dist/src/ui/components/messages/GoalStatusMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GoalStatusMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/GoalStatusMessage.test.js +32 -0
- package/dist/src/ui/components/messages/GoalStatusMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/InlineParallelAgentsDisplay.d.ts +33 -0
- package/dist/src/ui/components/messages/InlineParallelAgentsDisplay.js +196 -0
- package/dist/src/ui/components/messages/InlineParallelAgentsDisplay.js.map +1 -0
- package/dist/src/ui/components/messages/InlineParallelAgentsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/messages/InlineParallelAgentsDisplay.test.js +219 -0
- package/dist/src/ui/components/messages/InlineParallelAgentsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/messages/InsightProgressMessage.d.ts +12 -0
- package/dist/src/ui/components/messages/InsightProgressMessage.js +20 -0
- package/dist/src/ui/components/messages/InsightProgressMessage.js.map +1 -0
- package/dist/src/ui/components/messages/MemorySavedMessage.d.ts +18 -0
- package/dist/src/ui/components/messages/MemorySavedMessage.js +15 -0
- package/dist/src/ui/components/messages/MemorySavedMessage.js.map +1 -0
- package/dist/src/ui/components/messages/StatusMessages.d.ts +33 -0
- package/dist/src/ui/components/messages/StatusMessages.js +28 -0
- package/dist/src/ui/components/messages/StatusMessages.js.map +1 -0
- package/dist/src/ui/components/messages/StatusMessages.test.d.ts +6 -0
- package/dist/src/ui/components/messages/StatusMessages.test.js +21 -0
- package/dist/src/ui/components/messages/StatusMessages.test.js.map +1 -0
- package/dist/src/ui/components/messages/SummaryMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/SummaryMessage.js +38 -0
- package/dist/src/ui/components/messages/SummaryMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +16 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +352 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +312 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +58 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +278 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +619 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +39 -0
- package/dist/src/ui/components/messages/ToolMessage.js +400 -0
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js +575 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.d.ts +40 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js +75 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +6 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +376 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +37 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +13 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +6 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +79 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.d.ts +18 -0
- package/dist/src/ui/components/shared/EnumSelector.js +44 -0
- package/dist/src/ui/components/shared/EnumSelector.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.test.d.ts +6 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js +70 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +61 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js +453 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +6 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +154 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -0
- package/dist/src/ui/components/shared/MultiSelect.d.ts +30 -0
- package/dist/src/ui/components/shared/MultiSelect.js +94 -0
- package/dist/src/ui/components/shared/MultiSelect.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +45 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js +21 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +6 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +134 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -0
- package/dist/src/ui/components/shared/ScopeSelector.d.ts +19 -0
- package/dist/src/ui/components/shared/ScopeSelector.js +16 -0
- package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -0
- package/dist/src/ui/components/shared/ScrollableList.d.ts +19 -0
- package/dist/src/ui/components/shared/ScrollableList.js +97 -0
- package/dist/src/ui/components/shared/ScrollableList.js.map +1 -0
- package/dist/src/ui/components/shared/ScrollableList.test.d.ts +6 -0
- package/dist/src/ui/components/shared/ScrollableList.test.js +158 -0
- package/dist/src/ui/components/shared/ScrollableList.test.js.map +1 -0
- package/dist/src/ui/components/shared/StaticRender.d.ts +25 -0
- package/dist/src/ui/components/shared/StaticRender.js +25 -0
- package/dist/src/ui/components/shared/StaticRender.js.map +1 -0
- package/dist/src/ui/components/shared/TextInput.d.ts +25 -0
- package/dist/src/ui/components/shared/TextInput.js +163 -0
- package/dist/src/ui/components/shared/TextInput.js.map +1 -0
- package/dist/src/ui/components/shared/TextInput.test.d.ts +6 -0
- package/dist/src/ui/components/shared/TextInput.test.js +91 -0
- package/dist/src/ui/components/shared/TextInput.test.js.map +1 -0
- package/dist/src/ui/components/shared/ToolElapsedTime.d.ts +30 -0
- package/dist/src/ui/components/shared/ToolElapsedTime.js +43 -0
- package/dist/src/ui/components/shared/ToolElapsedTime.js.map +1 -0
- package/dist/src/ui/components/shared/ToolElapsedTime.test.d.ts +6 -0
- package/dist/src/ui/components/shared/ToolElapsedTime.test.js +63 -0
- package/dist/src/ui/components/shared/ToolElapsedTime.test.js.map +1 -0
- package/dist/src/ui/components/shared/ToolStatusIndicator.d.ts +14 -0
- package/dist/src/ui/components/shared/ToolStatusIndicator.js +13 -0
- package/dist/src/ui/components/shared/ToolStatusIndicator.js.map +1 -0
- package/dist/src/ui/components/shared/VirtualizedList.d.ts +49 -0
- package/dist/src/ui/components/shared/VirtualizedList.js +529 -0
- package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -0
- package/dist/src/ui/components/shared/VirtualizedList.test.d.ts +6 -0
- package/dist/src/ui/components/shared/VirtualizedList.test.js +371 -0
- package/dist/src/ui/components/shared/VirtualizedList.test.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer-external-editor.test.d.ts +6 -0
- package/dist/src/ui/components/shared/text-buffer-external-editor.test.js +657 -0
- package/dist/src/ui/components/shared/text-buffer-external-editor.test.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +503 -0
- package/dist/src/ui/components/shared/text-buffer.js +2181 -0
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +74 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js +612 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -0
- package/dist/src/ui/components/skills/SkillsManagerDialog.d.ts +44 -0
- package/dist/src/ui/components/skills/SkillsManagerDialog.js +423 -0
- package/dist/src/ui/components/skills/SkillsManagerDialog.js.map +1 -0
- package/dist/src/ui/components/stats-helpers.d.ts +30 -0
- package/dist/src/ui/components/stats-helpers.js +79 -0
- package/dist/src/ui/components/stats-helpers.js.map +1 -0
- package/dist/src/ui/components/subagents/constants.d.ts +23 -0
- package/dist/src/ui/components/subagents/constants.js +67 -0
- package/dist/src/ui/components/subagents/constants.js.map +1 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.d.ts +15 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +173 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +1 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.d.ts +15 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.js +43 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.js +176 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.js.map +1 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.js +107 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +1 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +39 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.js +39 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.d.ts +26 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.js +28 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.js.map +1 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.d.ts +16 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.js +145 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/index.d.ts +7 -0
- package/dist/src/ui/components/subagents/index.js +13 -0
- package/dist/src/ui/components/subagents/index.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.d.ts +13 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +73 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.d.ts +13 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +38 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.d.ts +15 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js +76 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.d.ts +12 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +342 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.test.d.ts +6 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.test.js +56 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.test.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.d.ts +11 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js +20 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.d.ts +15 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +214 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +1 -0
- package/dist/src/ui/components/subagents/reducers.d.ts +14 -0
- package/dist/src/ui/components/subagents/reducers.js +162 -0
- package/dist/src/ui/components/subagents/reducers.js.map +1 -0
- package/dist/src/ui/components/subagents/types.d.ts +137 -0
- package/dist/src/ui/components/subagents/types.js +15 -0
- package/dist/src/ui/components/subagents/types.js.map +1 -0
- package/dist/src/ui/components/subagents/utils.d.ts +15 -0
- package/dist/src/ui/components/subagents/utils.js +79 -0
- package/dist/src/ui/components/subagents/utils.js.map +1 -0
- package/dist/src/ui/components/views/ContextUsage.d.ts +23 -0
- package/dist/src/ui/components/views/ContextUsage.js +130 -0
- package/dist/src/ui/components/views/ContextUsage.js.map +1 -0
- package/dist/src/ui/components/views/ContextUsage.test.d.ts +6 -0
- package/dist/src/ui/components/views/ContextUsage.test.js +76 -0
- package/dist/src/ui/components/views/ContextUsage.test.js.map +1 -0
- package/dist/src/ui/components/views/DoctorReport.d.ts +18 -0
- package/dist/src/ui/components/views/DoctorReport.js +45 -0
- package/dist/src/ui/components/views/DoctorReport.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.js +49 -0
- package/dist/src/ui/components/views/ExtensionsList.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js +88 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.d.ts +27 -0
- package/dist/src/ui/components/views/McpStatus.js +90 -0
- package/dist/src/ui/components/views/McpStatus.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.test.d.ts +6 -0
- package/dist/src/ui/components/views/McpStatus.test.js +117 -0
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -0
- package/dist/src/ui/components/views/SkillsList.d.ts +12 -0
- package/dist/src/ui/components/views/SkillsList.js +7 -0
- package/dist/src/ui/components/views/SkillsList.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.d.ts +14 -0
- package/dist/src/ui/components/views/ToolsList.js +8 -0
- package/dist/src/ui/components/views/ToolsList.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ToolsList.test.js +45 -0
- package/dist/src/ui/components/views/ToolsList.test.js.map +1 -0
- package/dist/src/ui/constants.d.ts +18 -0
- package/dist/src/ui/constants.js +23 -0
- package/dist/src/ui/constants.js.map +1 -0
- package/dist/src/ui/contexts/AgentViewContext.d.ts +49 -0
- package/dist/src/ui/contexts/AgentViewContext.js +187 -0
- package/dist/src/ui/contexts/AgentViewContext.js.map +1 -0
- package/dist/src/ui/contexts/AppContext.d.ts +11 -0
- package/dist/src/ui/contexts/AppContext.js +15 -0
- package/dist/src/ui/contexts/AppContext.js.map +1 -0
- package/dist/src/ui/contexts/BackgroundTaskViewContext.d.ts +60 -0
- package/dist/src/ui/contexts/BackgroundTaskViewContext.js +238 -0
- package/dist/src/ui/contexts/BackgroundTaskViewContext.js.map +1 -0
- package/dist/src/ui/contexts/CompactModeContext.d.ts +13 -0
- package/dist/src/ui/contexts/CompactModeContext.js +13 -0
- package/dist/src/ui/contexts/CompactModeContext.js.map +1 -0
- package/dist/src/ui/contexts/ConfigContext.d.ts +9 -0
- package/dist/src/ui/contexts/ConfigContext.js +16 -0
- package/dist/src/ui/contexts/ConfigContext.js.map +1 -0
- package/dist/src/ui/contexts/KeypressContext.d.ts +40 -0
- package/dist/src/ui/contexts/KeypressContext.js +959 -0
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -0
- package/dist/src/ui/contexts/KeypressContext.test.d.ts +6 -0
- package/dist/src/ui/contexts/KeypressContext.test.js +1360 -0
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -0
- package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
- package/dist/src/ui/contexts/OverflowContext.js +38 -0
- package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
- package/dist/src/ui/contexts/RenderModeContext.d.ts +14 -0
- package/dist/src/ui/contexts/RenderModeContext.js +15 -0
- package/dist/src/ui/contexts/RenderModeContext.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.d.ts +47 -0
- package/dist/src/ui/contexts/SessionContext.js +180 -0
- package/dist/src/ui/contexts/SessionContext.js.map +1 -0
- package/dist/src/ui/contexts/SettingsContext.d.ts +9 -0
- package/dist/src/ui/contexts/SettingsContext.js +15 -0
- package/dist/src/ui/contexts/SettingsContext.js.map +1 -0
- package/dist/src/ui/contexts/ShellFocusContext.d.ts +7 -0
- package/dist/src/ui/contexts/ShellFocusContext.js +9 -0
- package/dist/src/ui/contexts/ShellFocusContext.js.map +1 -0
- package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
- package/dist/src/ui/contexts/StreamingContext.js +15 -0
- package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
- package/dist/src/ui/contexts/TerminalOutputContext.d.ts +12 -0
- package/dist/src/ui/contexts/TerminalOutputContext.js +11 -0
- package/dist/src/ui/contexts/TerminalOutputContext.js.map +1 -0
- package/dist/src/ui/contexts/UIActionsContext.d.ts +91 -0
- package/dist/src/ui/contexts/UIActionsContext.js +22 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -0
- package/dist/src/ui/contexts/UIStateContext.d.ts +158 -0
- package/dist/src/ui/contexts/UIStateContext.js +20 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -0
- package/dist/src/ui/contexts/VimModeContext.d.ts +31 -0
- package/dist/src/ui/contexts/VimModeContext.js +60 -0
- package/dist/src/ui/contexts/VimModeContext.js.map +1 -0
- package/dist/src/ui/contexts/VimModeContext.test.d.ts +11 -0
- package/dist/src/ui/contexts/VimModeContext.test.js +99 -0
- package/dist/src/ui/contexts/VimModeContext.test.js.map +1 -0
- package/dist/src/ui/daemon/DaemonTuiAdapter.d.ts +101 -0
- package/dist/src/ui/daemon/DaemonTuiAdapter.js +695 -0
- package/dist/src/ui/daemon/DaemonTuiAdapter.js.map +1 -0
- package/dist/src/ui/daemon/DaemonTuiAdapter.test.d.ts +6 -0
- package/dist/src/ui/daemon/DaemonTuiAdapter.test.js +784 -0
- package/dist/src/ui/daemon/DaemonTuiAdapter.test.js.map +1 -0
- package/dist/src/ui/editors/editorSettingsManager.d.ts +19 -0
- package/dist/src/ui/editors/editorSettingsManager.js +48 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +33 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +344 -0
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +6 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.js +871 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/keyToAnsi.d.ts +15 -0
- package/dist/src/ui/hooks/keyToAnsi.js +67 -0
- package/dist/src/ui/hooks/keyToAnsi.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +18 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +287 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +6 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +509 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +71 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +837 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/useAgentStreamingState.d.ts +29 -0
- package/dist/src/ui/hooks/useAgentStreamingState.js +109 -0
- package/dist/src/ui/hooks/useAgentStreamingState.js.map +1 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.d.ts +11 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.js +21 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.js.map +1 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.d.ts +37 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.js +44 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +1 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.js +74 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.js.map +1 -0
- package/dist/src/ui/hooks/useAnimationFrame.d.ts +25 -0
- package/dist/src/ui/hooks/useAnimationFrame.js +86 -0
- package/dist/src/ui/hooks/useAnimationFrame.js.map +1 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.d.ts +14 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.js +33 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useArenaCommand.d.ts +13 -0
- package/dist/src/ui/hooks/useArenaCommand.js +21 -0
- package/dist/src/ui/hooks/useArenaCommand.js.map +1 -0
- package/dist/src/ui/hooks/useArenaInProcess.d.ts +14 -0
- package/dist/src/ui/hooks/useArenaInProcess.js +136 -0
- package/dist/src/ui/hooks/useArenaInProcess.js.map +1 -0
- package/dist/src/ui/hooks/useAtCompletion.d.ts +23 -0
- package/dist/src/ui/hooks/useAtCompletion.js +184 -0
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useAttentionNotifications.d.ts +22 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js +89 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js.map +1 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js +222 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +32 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +124 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +379 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -0
- package/dist/src/ui/hooks/useAwaySummary.d.ts +35 -0
- package/dist/src/ui/hooks/useAwaySummary.js +141 -0
- package/dist/src/ui/hooks/useAwaySummary.js.map +1 -0
- package/dist/src/ui/hooks/useAwaySummary.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAwaySummary.test.js +103 -0
- package/dist/src/ui/hooks/useAwaySummary.test.js.map +1 -0
- package/dist/src/ui/hooks/useBackgroundTaskView.d.ts +69 -0
- package/dist/src/ui/hooks/useBackgroundTaskView.js +217 -0
- package/dist/src/ui/hooks/useBackgroundTaskView.js.map +1 -0
- package/dist/src/ui/hooks/useBackgroundTaskView.test.d.ts +6 -0
- package/dist/src/ui/hooks/useBackgroundTaskView.test.js +455 -0
- package/dist/src/ui/hooks/useBackgroundTaskView.test.js.map +1 -0
- package/dist/src/ui/hooks/useBatchedScroll.d.ts +14 -0
- package/dist/src/ui/hooks/useBatchedScroll.js +25 -0
- package/dist/src/ui/hooks/useBatchedScroll.js.map +1 -0
- package/dist/src/ui/hooks/useBatchedScroll.test.d.ts +6 -0
- package/dist/src/ui/hooks/useBatchedScroll.test.js +42 -0
- package/dist/src/ui/hooks/useBatchedScroll.test.js.map +1 -0
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +12 -0
- package/dist/src/ui/hooks/useBracketedPaste.js +32 -0
- package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
- package/dist/src/ui/hooks/useBranchCommand.d.ts +33 -0
- package/dist/src/ui/hooks/useBranchCommand.js +230 -0
- package/dist/src/ui/hooks/useBranchCommand.js.map +1 -0
- package/dist/src/ui/hooks/useBranchCommand.test.d.ts +6 -0
- package/dist/src/ui/hooks/useBranchCommand.test.js +386 -0
- package/dist/src/ui/hooks/useBranchCommand.test.js.map +1 -0
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +37 -0
- package/dist/src/ui/hooks/useCommandCompletion.js +227 -0
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useCommandMigration.d.ts +16 -0
- package/dist/src/ui/hooks/useCommandMigration.js +40 -0
- package/dist/src/ui/hooks/useCommandMigration.js.map +1 -0
- package/dist/src/ui/hooks/useCompletion.d.ts +24 -0
- package/dist/src/ui/hooks/useCompletion.js +88 -0
- package/dist/src/ui/hooks/useCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useConfigInitMessage.d.ts +6 -0
- package/dist/src/ui/hooks/useConfigInitMessage.js +45 -0
- package/dist/src/ui/hooks/useConfigInitMessage.js.map +1 -0
- package/dist/src/ui/hooks/useConfigInitMessage.test.d.ts +6 -0
- package/dist/src/ui/hooks/useConfigInitMessage.test.js +80 -0
- package/dist/src/ui/hooks/useConfigInitMessage.test.js.map +1 -0
- package/dist/src/ui/hooks/useContextualTips.d.ts +19 -0
- package/dist/src/ui/hooks/useContextualTips.js +65 -0
- package/dist/src/ui/hooks/useContextualTips.js.map +1 -0
- package/dist/src/ui/hooks/useDeleteCommand.d.ts +19 -0
- package/dist/src/ui/hooks/useDeleteCommand.js +167 -0
- package/dist/src/ui/hooks/useDeleteCommand.js.map +1 -0
- package/dist/src/ui/hooks/useDeleteCommand.test.d.ts +6 -0
- package/dist/src/ui/hooks/useDeleteCommand.test.js +391 -0
- package/dist/src/ui/hooks/useDeleteCommand.test.js.map +1 -0
- package/dist/src/ui/hooks/useDialogClose.d.ts +48 -0
- package/dist/src/ui/hooks/useDialogClose.js +102 -0
- package/dist/src/ui/hooks/useDialogClose.js.map +1 -0
- package/dist/src/ui/hooks/useDiffData.d.ts +32 -0
- package/dist/src/ui/hooks/useDiffData.js +72 -0
- package/dist/src/ui/hooks/useDiffData.js.map +1 -0
- package/dist/src/ui/hooks/useDoublePress.d.ts +18 -0
- package/dist/src/ui/hooks/useDoublePress.js +47 -0
- package/dist/src/ui/hooks/useDoublePress.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
- package/dist/src/ui/hooks/useEditorSettings.js +43 -0
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.test.d.ts +6 -0
- package/dist/src/ui/hooks/useEditorSettings.test.js +164 -0
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -0
- package/dist/src/ui/hooks/useExportCompletion.d.ts +70 -0
- package/dist/src/ui/hooks/useExportCompletion.js +208 -0
- package/dist/src/ui/hooks/useExportCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useExportCompletion.test.d.ts +6 -0
- package/dist/src/ui/hooks/useExportCompletion.test.js +190 -0
- package/dist/src/ui/hooks/useExportCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.d.ts +71 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js +229 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +6 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +455 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionsManagerDialog.d.ts +12 -0
- package/dist/src/ui/hooks/useExtensionsManagerDialog.js +21 -0
- package/dist/src/ui/hooks/useExtensionsManagerDialog.js.map +1 -0
- package/dist/src/ui/hooks/useFeedbackDialog.d.ts +18 -0
- package/dist/src/ui/hooks/useFeedbackDialog.js +130 -0
- package/dist/src/ui/hooks/useFeedbackDialog.js.map +1 -0
- package/dist/src/ui/hooks/useFocus.d.ts +10 -0
- package/dist/src/ui/hooks/useFocus.js +51 -0
- package/dist/src/ui/hooks/useFocus.js.map +1 -0
- package/dist/src/ui/hooks/useFolderTrust.d.ts +13 -0
- package/dist/src/ui/hooks/useFolderTrust.js +60 -0
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -0
- package/dist/src/ui/hooks/useFollowupSuggestions.d.ts +53 -0
- package/dist/src/ui/hooks/useFollowupSuggestions.js +89 -0
- package/dist/src/ui/hooks/useFollowupSuggestions.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +76 -0
- package/dist/src/ui/hooks/useGeminiStream.js +1899 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.js +61 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.test.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.test.js +192 -0
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.d.ts +24 -0
- package/dist/src/ui/hooks/useHistoryManager.js +183 -0
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.test.d.ts +6 -0
- package/dist/src/ui/hooks/useHistoryManager.test.js +495 -0
- package/dist/src/ui/hooks/useHistoryManager.test.js.map +1 -0
- package/dist/src/ui/hooks/useHooksDialog.d.ts +11 -0
- package/dist/src/ui/hooks/useHooksDialog.js +21 -0
- package/dist/src/ui/hooks/useHooksDialog.js.map +1 -0
- package/dist/src/ui/hooks/useIdeTrustListener.d.ts +16 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js +65 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +6 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +183 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -0
- package/dist/src/ui/hooks/useInitializationAuthError.d.ts +22 -0
- package/dist/src/ui/hooks/useInitializationAuthError.js +40 -0
- package/dist/src/ui/hooks/useInitializationAuthError.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.d.ts +20 -0
- package/dist/src/ui/hooks/useInputHistory.js +85 -0
- package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.test.d.ts +6 -0
- package/dist/src/ui/hooks/useInputHistory.test.js +207 -0
- package/dist/src/ui/hooks/useInputHistory.test.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistoryStore.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistoryStore.js +83 -0
- package/dist/src/ui/hooks/useInputHistoryStore.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +6 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.js +231 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -0
- package/dist/src/ui/hooks/useKeypress.d.ts +17 -0
- package/dist/src/ui/hooks/useKeypress.js +27 -0
- package/dist/src/ui/hooks/useKeypress.js.map +1 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +15 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +20 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -0
- package/dist/src/ui/hooks/useLaunchEditor.d.ts +5 -0
- package/dist/src/ui/hooks/useLaunchEditor.js +75 -0
- package/dist/src/ui/hooks/useLaunchEditor.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +11 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js +50 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +6 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +172 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -0
- package/dist/src/ui/hooks/useLogger.d.ts +11 -0
- package/dist/src/ui/hooks/useLogger.js +32 -0
- package/dist/src/ui/hooks/useLogger.js.map +1 -0
- package/dist/src/ui/hooks/useMCPHealth.d.ts +16 -0
- package/dist/src/ui/hooks/useMCPHealth.js +56 -0
- package/dist/src/ui/hooks/useMCPHealth.js.map +1 -0
- package/dist/src/ui/hooks/useMcpDialog.d.ts +11 -0
- package/dist/src/ui/hooks/useMcpDialog.js +21 -0
- package/dist/src/ui/hooks/useMcpDialog.js.map +1 -0
- package/dist/src/ui/hooks/useMemoryDialog.d.ts +11 -0
- package/dist/src/ui/hooks/useMemoryDialog.js +21 -0
- package/dist/src/ui/hooks/useMemoryDialog.js.map +1 -0
- package/dist/src/ui/hooks/useMemoryMonitor.d.ts +17 -0
- package/dist/src/ui/hooks/useMemoryMonitor.js +83 -0
- package/dist/src/ui/hooks/useMemoryMonitor.js.map +1 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.js +153 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +1 -0
- package/dist/src/ui/hooks/useMessageQueue.d.ts +18 -0
- package/dist/src/ui/hooks/useMessageQueue.js +67 -0
- package/dist/src/ui/hooks/useMessageQueue.js.map +1 -0
- package/dist/src/ui/hooks/useMessageQueue.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js +219 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -0
- package/dist/src/ui/hooks/useModelCommand.d.ts +15 -0
- package/dist/src/ui/hooks/useModelCommand.js +25 -0
- package/dist/src/ui/hooks/useModelCommand.js.map +1 -0
- package/dist/src/ui/hooks/useModelCommand.test.d.ts +6 -0
- package/dist/src/ui/hooks/useModelCommand.test.js +35 -0
- package/dist/src/ui/hooks/useModelCommand.test.js.map +1 -0
- package/dist/src/ui/hooks/useMouseEvents.d.ts +44 -0
- package/dist/src/ui/hooks/useMouseEvents.js +85 -0
- package/dist/src/ui/hooks/useMouseEvents.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +70 -0
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
- package/dist/src/ui/hooks/usePreferredEditor.d.ts +7 -0
- package/dist/src/ui/hooks/usePreferredEditor.js +25 -0
- package/dist/src/ui/hooks/usePreferredEditor.js.map +1 -0
- package/dist/src/ui/hooks/useProviderUpdates.d.ts +33 -0
- package/dist/src/ui/hooks/useProviderUpdates.js +215 -0
- package/dist/src/ui/hooks/useProviderUpdates.js.map +1 -0
- package/dist/src/ui/hooks/useProviderUpdates.test.d.ts +6 -0
- package/dist/src/ui/hooks/useProviderUpdates.test.js +293 -0
- package/dist/src/ui/hooks/useProviderUpdates.test.js.map +1 -0
- package/dist/src/ui/hooks/useQwenAuth.d.ts +20 -0
- package/dist/src/ui/hooks/useQwenAuth.js +74 -0
- package/dist/src/ui/hooks/useQwenAuth.js.map +1 -0
- package/dist/src/ui/hooks/useQwenAuth.test.d.ts +6 -0
- package/dist/src/ui/hooks/useQwenAuth.test.js +266 -0
- package/dist/src/ui/hooks/useQwenAuth.test.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +33 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js +236 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useResumeCommand.d.ts +31 -0
- package/dist/src/ui/hooks/useResumeCommand.js +114 -0
- package/dist/src/ui/hooks/useResumeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useResumeCommand.test.d.ts +6 -0
- package/dist/src/ui/hooks/useResumeCommand.test.js +349 -0
- package/dist/src/ui/hooks/useResumeCommand.test.js.map +1 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +19 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.js +103 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +6 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +163 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.d.ts +41 -0
- package/dist/src/ui/hooks/useSelectionList.js +276 -0
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSelectionList.test.js +782 -0
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -0
- package/dist/src/ui/hooks/useSessionPicker.d.ts +95 -0
- package/dist/src/ui/hooks/useSessionPicker.js +383 -0
- package/dist/src/ui/hooks/useSessionPicker.js.map +1 -0
- package/dist/src/ui/hooks/useSessionPicker.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSessionPicker.test.js +94 -0
- package/dist/src/ui/hooks/useSessionPicker.test.js.map +1 -0
- package/dist/src/ui/hooks/useSessionSearchInput.d.ts +69 -0
- package/dist/src/ui/hooks/useSessionSearchInput.js +124 -0
- package/dist/src/ui/hooks/useSessionSearchInput.js.map +1 -0
- package/dist/src/ui/hooks/useSessionSearchInput.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSessionSearchInput.test.js +342 -0
- package/dist/src/ui/hooks/useSessionSearchInput.test.js.map +1 -0
- package/dist/src/ui/hooks/useSettingsCommand.d.ts +10 -0
- package/dist/src/ui/hooks/useSettingsCommand.js +21 -0
- package/dist/src/ui/hooks/useSettingsCommand.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.d.ts +14 -0
- package/dist/src/ui/hooks/useShellHistory.js +112 -0
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.test.d.ts +6 -0
- package/dist/src/ui/hooks/useShellHistory.test.js +193 -0
- package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js +55 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useSkillsManagerDialog.d.ts +11 -0
- package/dist/src/ui/hooks/useSkillsManagerDialog.js +21 -0
- package/dist/src/ui/hooks/useSkillsManagerDialog.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +27 -0
- package/dist/src/ui/hooks/useSlashCompletion.integration.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSlashCompletion.integration.test.js +84 -0
- package/dist/src/ui/hooks/useSlashCompletion.integration.test.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.js +490 -0
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +9 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.js +805 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
- package/dist/src/ui/hooks/useStateAndRef.js +26 -0
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
- package/dist/src/ui/hooks/useStatsDialog.d.ts +11 -0
- package/dist/src/ui/hooks/useStatsDialog.js +13 -0
- package/dist/src/ui/hooks/useStatsDialog.js.map +1 -0
- package/dist/src/ui/hooks/useStatusLine.d.ts +84 -0
- package/dist/src/ui/hooks/useStatusLine.js +528 -0
- package/dist/src/ui/hooks/useStatusLine.js.map +1 -0
- package/dist/src/ui/hooks/useStatusLine.test.d.ts +6 -0
- package/dist/src/ui/hooks/useStatusLine.test.js +1039 -0
- package/dist/src/ui/hooks/useStatusLine.test.js.map +1 -0
- package/dist/src/ui/hooks/useSubagentCreateDialog.d.ts +10 -0
- package/dist/src/ui/hooks/useSubagentCreateDialog.js +21 -0
- package/dist/src/ui/hooks/useSubagentCreateDialog.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalNotification.d.ts +32 -0
- package/dist/src/ui/hooks/useTerminalNotification.js +45 -0
- package/dist/src/ui/hooks/useTerminalNotification.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalNotification.test.d.ts +6 -0
- package/dist/src/ui/hooks/useTerminalNotification.test.js +69 -0
- package/dist/src/ui/hooks/useTerminalNotification.test.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalProgress.d.ts +12 -0
- package/dist/src/ui/hooks/useTerminalProgress.js +76 -0
- package/dist/src/ui/hooks/useTerminalProgress.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalSize.d.ts +13 -0
- package/dist/src/ui/hooks/useTerminalSize.js +30 -0
- package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.d.ts +15 -0
- package/dist/src/ui/hooks/useThemeCommand.js +85 -0
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.test.d.ts +6 -0
- package/dist/src/ui/hooks/useThemeCommand.test.js +42 -0
- package/dist/src/ui/hooks/useThemeCommand.test.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.d.ts +12 -0
- package/dist/src/ui/hooks/useTimer.js +58 -0
- package/dist/src/ui/hooks/useTimer.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.test.d.ts +6 -0
- package/dist/src/ui/hooks/useTimer.test.js +90 -0
- package/dist/src/ui/hooks/useTimer.test.js.map +1 -0
- package/dist/src/ui/hooks/useTomlMigration.d.ts +1 -0
- package/dist/src/ui/hooks/useTomlMigration.js +2 -0
- package/dist/src/ui/hooks/useTomlMigration.js.map +1 -0
- package/dist/src/ui/hooks/useToolScheduler.test.d.ts +6 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js +624 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -0
- package/dist/src/ui/hooks/useTrustModify.d.ts +17 -0
- package/dist/src/ui/hooks/useTrustModify.js +78 -0
- package/dist/src/ui/hooks/useTrustModify.js.map +1 -0
- package/dist/src/ui/hooks/useTrustModify.test.d.ts +6 -0
- package/dist/src/ui/hooks/useTrustModify.test.js +182 -0
- package/dist/src/ui/hooks/useTrustModify.test.js.map +1 -0
- package/dist/src/ui/hooks/useTurnDiffs.d.ts +34 -0
- package/dist/src/ui/hooks/useTurnDiffs.js +130 -0
- package/dist/src/ui/hooks/useTurnDiffs.js.map +1 -0
- package/dist/src/ui/hooks/useTurnDiffs.test.d.ts +6 -0
- package/dist/src/ui/hooks/useTurnDiffs.test.js +164 -0
- package/dist/src/ui/hooks/useTurnDiffs.test.js.map +1 -0
- package/dist/src/ui/hooks/useWelcomeBack.d.ts +23 -0
- package/dist/src/ui/hooks/useWelcomeBack.js +99 -0
- package/dist/src/ui/hooks/useWelcomeBack.js.map +1 -0
- package/dist/src/ui/hooks/useWelcomeBack.test.d.ts +6 -0
- package/dist/src/ui/hooks/useWelcomeBack.test.js +94 -0
- package/dist/src/ui/hooks/useWelcomeBack.test.js.map +1 -0
- package/dist/src/ui/hooks/useWorktreeSession.d.ts +26 -0
- package/dist/src/ui/hooks/useWorktreeSession.js +92 -0
- package/dist/src/ui/hooks/useWorktreeSession.js.map +1 -0
- package/dist/src/ui/hooks/useWorktreeSession.test.d.ts +6 -0
- package/dist/src/ui/hooks/useWorktreeSession.test.js +84 -0
- package/dist/src/ui/hooks/useWorktreeSession.test.js.map +1 -0
- package/dist/src/ui/hooks/vim.d.ts +13 -0
- package/dist/src/ui/hooks/vim.js +1637 -0
- package/dist/src/ui/hooks/vim.js.map +1 -0
- package/dist/src/ui/hooks/vim.test.d.ts +6 -0
- package/dist/src/ui/hooks/vim.test.js +1975 -0
- package/dist/src/ui/hooks/vim.test.js.map +1 -0
- package/dist/src/ui/keyMatchers.d.ts +27 -0
- package/dist/src/ui/keyMatchers.js +71 -0
- package/dist/src/ui/keyMatchers.js.map +1 -0
- package/dist/src/ui/keyMatchers.test.d.ts +6 -0
- package/dist/src/ui/keyMatchers.test.js +421 -0
- package/dist/src/ui/keyMatchers.test.js.map +1 -0
- package/dist/src/ui/layouts/DefaultAppLayout.d.ts +7 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js +49 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -0
- package/dist/src/ui/layouts/DefaultAppLayout.test.d.ts +6 -0
- package/dist/src/ui/layouts/DefaultAppLayout.test.js +185 -0
- package/dist/src/ui/layouts/DefaultAppLayout.test.js.map +1 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +7 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js +27 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +1 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.test.d.ts +6 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.test.js +135 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.test.js.map +1 -0
- package/dist/src/ui/models/availableModels.d.ts +30 -0
- package/dist/src/ui/models/availableModels.js +103 -0
- package/dist/src/ui/models/availableModels.js.map +1 -0
- package/dist/src/ui/models/availableModels.test.d.ts +6 -0
- package/dist/src/ui/models/availableModels.test.js +142 -0
- package/dist/src/ui/models/availableModels.test.js.map +1 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +12 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js +33 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -0
- package/dist/src/ui/semantic-colors.d.ts +7 -0
- package/dist/src/ui/semantic-colors.js +24 -0
- package/dist/src/ui/semantic-colors.js.map +1 -0
- package/dist/src/ui/state/extensions.d.ts +43 -0
- package/dist/src/ui/state/extensions.js +63 -0
- package/dist/src/ui/state/extensions.js.map +1 -0
- package/dist/src/ui/statusLinePresets.d.ts +79 -0
- package/dist/src/ui/statusLinePresets.js +310 -0
- package/dist/src/ui/statusLinePresets.js.map +1 -0
- package/dist/src/ui/statusLinePresets.test.d.ts +6 -0
- package/dist/src/ui/statusLinePresets.test.js +221 -0
- package/dist/src/ui/statusLinePresets.test.js.map +1 -0
- package/dist/src/ui/textConstants.d.ts +9 -0
- package/dist/src/ui/textConstants.js +10 -0
- package/dist/src/ui/textConstants.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.d.ts +7 -0
- package/dist/src/ui/themes/ansi-light.js +144 -0
- package/dist/src/ui/themes/ansi-light.js.map +1 -0
- package/dist/src/ui/themes/ansi.d.ts +7 -0
- package/dist/src/ui/themes/ansi.js +154 -0
- package/dist/src/ui/themes/ansi.js.map +1 -0
- package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
- package/dist/src/ui/themes/atom-one-dark.js +140 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
- package/dist/src/ui/themes/ayu-light.d.ts +7 -0
- package/dist/src/ui/themes/ayu-light.js +132 -0
- package/dist/src/ui/themes/ayu-light.js.map +1 -0
- package/dist/src/ui/themes/ayu.d.ts +7 -0
- package/dist/src/ui/themes/ayu.js +106 -0
- package/dist/src/ui/themes/ayu.js.map +1 -0
- package/dist/src/ui/themes/color-utils.d.ts +21 -0
- package/dist/src/ui/themes/color-utils.js +223 -0
- package/dist/src/ui/themes/color-utils.js.map +1 -0
- package/dist/src/ui/themes/color-utils.test.d.ts +6 -0
- package/dist/src/ui/themes/color-utils.test.js +197 -0
- package/dist/src/ui/themes/color-utils.test.js.map +1 -0
- package/dist/src/ui/themes/default-light.d.ts +7 -0
- package/dist/src/ui/themes/default-light.js +100 -0
- package/dist/src/ui/themes/default-light.js.map +1 -0
- package/dist/src/ui/themes/default.d.ts +7 -0
- package/dist/src/ui/themes/default.js +143 -0
- package/dist/src/ui/themes/default.js.map +1 -0
- package/dist/src/ui/themes/detect-terminal-theme.d.ts +75 -0
- package/dist/src/ui/themes/detect-terminal-theme.js +228 -0
- package/dist/src/ui/themes/detect-terminal-theme.js.map +1 -0
- package/dist/src/ui/themes/detect-terminal-theme.test.d.ts +6 -0
- package/dist/src/ui/themes/detect-terminal-theme.test.js +269 -0
- package/dist/src/ui/themes/detect-terminal-theme.test.js.map +1 -0
- package/dist/src/ui/themes/dracula.d.ts +7 -0
- package/dist/src/ui/themes/dracula.js +117 -0
- package/dist/src/ui/themes/dracula.js.map +1 -0
- package/dist/src/ui/themes/github-dark.d.ts +7 -0
- package/dist/src/ui/themes/github-dark.js +140 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -0
- package/dist/src/ui/themes/github-light.d.ts +7 -0
- package/dist/src/ui/themes/github-light.js +142 -0
- package/dist/src/ui/themes/github-light.js.map +1 -0
- package/dist/src/ui/themes/googlecode.d.ts +7 -0
- package/dist/src/ui/themes/googlecode.js +139 -0
- package/dist/src/ui/themes/googlecode.js.map +1 -0
- package/dist/src/ui/themes/no-color.d.ts +7 -0
- package/dist/src/ui/themes/no-color.js +120 -0
- package/dist/src/ui/themes/no-color.js.map +1 -0
- package/dist/src/ui/themes/qwen-dark.d.ts +7 -0
- package/dist/src/ui/themes/qwen-dark.js +107 -0
- package/dist/src/ui/themes/qwen-dark.js.map +1 -0
- package/dist/src/ui/themes/qwen-light.d.ts +7 -0
- package/dist/src/ui/themes/qwen-light.js +133 -0
- package/dist/src/ui/themes/qwen-light.js.map +1 -0
- package/dist/src/ui/themes/semantic-tokens.d.ts +40 -0
- package/dist/src/ui/themes/semantic-tokens.js +103 -0
- package/dist/src/ui/themes/semantic-tokens.js.map +1 -0
- package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
- package/dist/src/ui/themes/shades-of-purple.js +306 -0
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.d.ts +91 -0
- package/dist/src/ui/themes/theme-manager.js +311 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.test.d.ts +6 -0
- package/dist/src/ui/themes/theme-manager.test.js +188 -0
- package/dist/src/ui/themes/theme-manager.test.js.map +1 -0
- package/dist/src/ui/themes/theme.d.ts +137 -0
- package/dist/src/ui/themes/theme.js +393 -0
- package/dist/src/ui/themes/theme.js.map +1 -0
- package/dist/src/ui/themes/xcode.d.ts +7 -0
- package/dist/src/ui/themes/xcode.js +147 -0
- package/dist/src/ui/themes/xcode.js.map +1 -0
- package/dist/src/ui/types.d.ts +620 -0
- package/dist/src/ui/types.js +77 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/utils/CodeColorizer.d.ts +18 -0
- package/dist/src/ui/utils/CodeColorizer.js +155 -0
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +18 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +173 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.d.ts +6 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.js +303 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +25 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +420 -0
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +6 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js +702 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -0
- package/dist/src/ui/utils/MermaidDiagram.d.ts +15 -0
- package/dist/src/ui/utils/MermaidDiagram.js +88 -0
- package/dist/src/ui/utils/MermaidDiagram.js.map +1 -0
- package/dist/src/ui/utils/MermaidDiagram.test.d.ts +6 -0
- package/dist/src/ui/utils/MermaidDiagram.test.js +90 -0
- package/dist/src/ui/utils/MermaidDiagram.test.js.map +1 -0
- package/dist/src/ui/utils/TableRenderer.d.ts +30 -0
- package/dist/src/ui/utils/TableRenderer.js +563 -0
- package/dist/src/ui/utils/TableRenderer.js.map +1 -0
- package/dist/src/ui/utils/TableRenderer.test.d.ts +6 -0
- package/dist/src/ui/utils/TableRenderer.test.js +568 -0
- package/dist/src/ui/utils/TableRenderer.test.js.map +1 -0
- package/dist/src/ui/utils/approvalModeDisplay.d.ts +8 -0
- package/dist/src/ui/utils/approvalModeDisplay.js +34 -0
- package/dist/src/ui/utils/approvalModeDisplay.js.map +1 -0
- package/dist/src/ui/utils/approvalModeDisplay.test.d.ts +6 -0
- package/dist/src/ui/utils/approvalModeDisplay.test.js +35 -0
- package/dist/src/ui/utils/approvalModeDisplay.test.js.map +1 -0
- package/dist/src/ui/utils/asciiCharts.d.ts +44 -0
- package/dist/src/ui/utils/asciiCharts.js +307 -0
- package/dist/src/ui/utils/asciiCharts.js.map +1 -0
- package/dist/src/ui/utils/asciiCharts.test.d.ts +6 -0
- package/dist/src/ui/utils/asciiCharts.test.js +208 -0
- package/dist/src/ui/utils/asciiCharts.test.js.map +1 -0
- package/dist/src/ui/utils/backgroundWorkUtils.d.ts +8 -0
- package/dist/src/ui/utils/backgroundWorkUtils.js +16 -0
- package/dist/src/ui/utils/backgroundWorkUtils.js.map +1 -0
- package/dist/src/ui/utils/backgroundWorkUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/backgroundWorkUtils.test.js +85 -0
- package/dist/src/ui/utils/backgroundWorkUtils.test.js.map +1 -0
- package/dist/src/ui/utils/clipboardUtils.d.ts +28 -0
- package/dist/src/ui/utils/clipboardUtils.js +522 -0
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -0
- package/dist/src/ui/utils/clipboardUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/clipboardUtils.test.js +465 -0
- package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +112 -0
- package/dist/src/ui/utils/commandUtils.js +285 -0
- package/dist/src/ui/utils/commandUtils.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/commandUtils.test.js +560 -0
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -0
- package/dist/src/ui/utils/computeStats.d.ts +10 -0
- package/dist/src/ui/utils/computeStats.js +57 -0
- package/dist/src/ui/utils/computeStats.js.map +1 -0
- package/dist/src/ui/utils/customBanner.d.ts +35 -0
- package/dist/src/ui/utils/customBanner.js +361 -0
- package/dist/src/ui/utils/customBanner.js.map +1 -0
- package/dist/src/ui/utils/customBanner.test.d.ts +6 -0
- package/dist/src/ui/utils/customBanner.test.js +439 -0
- package/dist/src/ui/utils/customBanner.test.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.d.ts +25 -0
- package/dist/src/ui/utils/displayUtils.js +46 -0
- package/dist/src/ui/utils/displayUtils.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/displayUtils.test.js +61 -0
- package/dist/src/ui/utils/displayUtils.test.js.map +1 -0
- package/dist/src/ui/utils/export/collect.d.ts +16 -0
- package/dist/src/ui/utils/export/collect.js +509 -0
- package/dist/src/ui/utils/export/collect.js.map +1 -0
- package/dist/src/ui/utils/export/collect.test.d.ts +6 -0
- package/dist/src/ui/utils/export/collect.test.js +80 -0
- package/dist/src/ui/utils/export/collect.test.js.map +1 -0
- package/dist/src/ui/utils/export/formatters/html.d.ts +23 -0
- package/dist/src/ui/utils/export/formatters/html.js +65 -0
- package/dist/src/ui/utils/export/formatters/html.js.map +1 -0
- package/dist/src/ui/utils/export/formatters/json.d.ts +11 -0
- package/dist/src/ui/utils/export/formatters/json.js +13 -0
- package/dist/src/ui/utils/export/formatters/json.js.map +1 -0
- package/dist/src/ui/utils/export/formatters/jsonl.d.ts +11 -0
- package/dist/src/ui/utils/export/formatters/jsonl.js +69 -0
- package/dist/src/ui/utils/export/formatters/jsonl.js.map +1 -0
- package/dist/src/ui/utils/export/formatters/markdown.d.ts +10 -0
- package/dist/src/ui/utils/export/formatters/markdown.js +254 -0
- package/dist/src/ui/utils/export/formatters/markdown.js.map +1 -0
- package/dist/src/ui/utils/export/index.d.ts +13 -0
- package/dist/src/ui/utils/export/index.js +13 -0
- package/dist/src/ui/utils/export/index.js.map +1 -0
- package/dist/src/ui/utils/export/normalize.d.ts +12 -0
- package/dist/src/ui/utils/export/normalize.js +279 -0
- package/dist/src/ui/utils/export/normalize.js.map +1 -0
- package/dist/src/ui/utils/export/normalize.test.d.ts +6 -0
- package/dist/src/ui/utils/export/normalize.test.js +62 -0
- package/dist/src/ui/utils/export/normalize.test.js.map +1 -0
- package/dist/src/ui/utils/export/types.d.ts +93 -0
- package/dist/src/ui/utils/export/types.js +7 -0
- package/dist/src/ui/utils/export/types.js.map +1 -0
- package/dist/src/ui/utils/export/utils.d.ts +9 -0
- package/dist/src/ui/utils/export/utils.js +13 -0
- package/dist/src/ui/utils/export/utils.js.map +1 -0
- package/dist/src/ui/utils/formatters.d.ts +28 -0
- package/dist/src/ui/utils/formatters.js +100 -0
- package/dist/src/ui/utils/formatters.js.map +1 -0
- package/dist/src/ui/utils/formatters.test.d.ts +6 -0
- package/dist/src/ui/utils/formatters.test.js +141 -0
- package/dist/src/ui/utils/formatters.test.js.map +1 -0
- package/dist/src/ui/utils/gradientUtils.d.ts +6 -0
- package/dist/src/ui/utils/gradientUtils.js +11 -0
- package/dist/src/ui/utils/gradientUtils.js.map +1 -0
- package/dist/src/ui/utils/highlight.d.ts +12 -0
- package/dist/src/ui/utils/highlight.js +90 -0
- package/dist/src/ui/utils/highlight.js.map +1 -0
- package/dist/src/ui/utils/highlight.test.d.ts +6 -0
- package/dist/src/ui/utils/highlight.test.js +173 -0
- package/dist/src/ui/utils/highlight.test.js.map +1 -0
- package/dist/src/ui/utils/historyMapping.d.ts +44 -0
- package/dist/src/ui/utils/historyMapping.js +110 -0
- package/dist/src/ui/utils/historyMapping.js.map +1 -0
- package/dist/src/ui/utils/historyMapping.test.d.ts +6 -0
- package/dist/src/ui/utils/historyMapping.test.js +376 -0
- package/dist/src/ui/utils/historyMapping.test.js.map +1 -0
- package/dist/src/ui/utils/historyUtils.d.ts +34 -0
- package/dist/src/ui/utils/historyUtils.js +117 -0
- package/dist/src/ui/utils/historyUtils.js.map +1 -0
- package/dist/src/ui/utils/historyUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/historyUtils.test.js +107 -0
- package/dist/src/ui/utils/historyUtils.test.js.map +1 -0
- package/dist/src/ui/utils/isNarrowWidth.d.ts +6 -0
- package/dist/src/ui/utils/isNarrowWidth.js +9 -0
- package/dist/src/ui/utils/isNarrowWidth.js.map +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +19 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js +115 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -0
- package/dist/src/ui/utils/latexRenderer.d.ts +6 -0
- package/dist/src/ui/utils/latexRenderer.js +187 -0
- package/dist/src/ui/utils/latexRenderer.js.map +1 -0
- package/dist/src/ui/utils/latexRenderer.test.d.ts +6 -0
- package/dist/src/ui/utils/latexRenderer.test.js +27 -0
- package/dist/src/ui/utils/latexRenderer.test.js.map +1 -0
- package/dist/src/ui/utils/layoutUtils.d.ts +32 -0
- package/dist/src/ui/utils/layoutUtils.js +46 -0
- package/dist/src/ui/utils/layoutUtils.js.map +1 -0
- package/dist/src/ui/utils/layoutUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/layoutUtils.test.js +30 -0
- package/dist/src/ui/utils/layoutUtils.test.js.map +1 -0
- package/dist/src/ui/utils/lowlightLoader.d.ts +43 -0
- package/dist/src/ui/utils/lowlightLoader.js +88 -0
- package/dist/src/ui/utils/lowlightLoader.js.map +1 -0
- package/dist/src/ui/utils/lowlightLoader.test.d.ts +6 -0
- package/dist/src/ui/utils/lowlightLoader.test.js +120 -0
- package/dist/src/ui/utils/lowlightLoader.test.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.js +110 -0
- package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.test.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.test.js +42 -0
- package/dist/src/ui/utils/markdownUtilities.test.js.map +1 -0
- package/dist/src/ui/utils/mergeCompactToolGroups.d.ts +62 -0
- package/dist/src/ui/utils/mergeCompactToolGroups.js +212 -0
- package/dist/src/ui/utils/mergeCompactToolGroups.js.map +1 -0
- package/dist/src/ui/utils/mergeCompactToolGroups.test.d.ts +6 -0
- package/dist/src/ui/utils/mergeCompactToolGroups.test.js +473 -0
- package/dist/src/ui/utils/mergeCompactToolGroups.test.js.map +1 -0
- package/dist/src/ui/utils/mermaidImageRenderer.d.ts +54 -0
- package/dist/src/ui/utils/mermaidImageRenderer.js +955 -0
- package/dist/src/ui/utils/mermaidImageRenderer.js.map +1 -0
- package/dist/src/ui/utils/mermaidImageRenderer.test.d.ts +6 -0
- package/dist/src/ui/utils/mermaidImageRenderer.test.js +528 -0
- package/dist/src/ui/utils/mermaidImageRenderer.test.js.map +1 -0
- package/dist/src/ui/utils/mermaidVisualRenderer.d.ts +12 -0
- package/dist/src/ui/utils/mermaidVisualRenderer.js +1097 -0
- package/dist/src/ui/utils/mermaidVisualRenderer.js.map +1 -0
- package/dist/src/ui/utils/mermaidVisualRenderer.test.d.ts +6 -0
- package/dist/src/ui/utils/mermaidVisualRenderer.test.js +69 -0
- package/dist/src/ui/utils/mermaidVisualRenderer.test.js.map +1 -0
- package/dist/src/ui/utils/modelsBySource.d.ts +47 -0
- package/dist/src/ui/utils/modelsBySource.js +89 -0
- package/dist/src/ui/utils/modelsBySource.js.map +1 -0
- package/dist/src/ui/utils/modelsBySource.test.d.ts +6 -0
- package/dist/src/ui/utils/modelsBySource.test.js +111 -0
- package/dist/src/ui/utils/modelsBySource.test.js.map +1 -0
- package/dist/src/ui/utils/mouse.d.ts +39 -0
- package/dist/src/ui/utils/mouse.js +169 -0
- package/dist/src/ui/utils/mouse.js.map +1 -0
- package/dist/src/ui/utils/mouse.test.d.ts +6 -0
- package/dist/src/ui/utils/mouse.test.js +117 -0
- package/dist/src/ui/utils/mouse.test.js.map +1 -0
- package/dist/src/ui/utils/osc8.d.ts +124 -0
- package/dist/src/ui/utils/osc8.js +463 -0
- package/dist/src/ui/utils/osc8.js.map +1 -0
- package/dist/src/ui/utils/osc8.test.d.ts +6 -0
- package/dist/src/ui/utils/osc8.test.js +494 -0
- package/dist/src/ui/utils/osc8.test.js.map +1 -0
- package/dist/src/ui/utils/platformConstants.d.ts +75 -0
- package/dist/src/ui/utils/platformConstants.js +78 -0
- package/dist/src/ui/utils/platformConstants.js.map +1 -0
- package/dist/src/ui/utils/restoreGoal.d.ts +47 -0
- package/dist/src/ui/utils/restoreGoal.js +124 -0
- package/dist/src/ui/utils/restoreGoal.js.map +1 -0
- package/dist/src/ui/utils/restoreGoal.test.d.ts +6 -0
- package/dist/src/ui/utils/restoreGoal.test.js +220 -0
- package/dist/src/ui/utils/restoreGoal.test.js.map +1 -0
- package/dist/src/ui/utils/resumeHistoryUtils.d.ts +22 -0
- package/dist/src/ui/utils/resumeHistoryUtils.js +410 -0
- package/dist/src/ui/utils/resumeHistoryUtils.js.map +1 -0
- package/dist/src/ui/utils/resumeHistoryUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/resumeHistoryUtils.test.js +378 -0
- package/dist/src/ui/utils/resumeHistoryUtils.test.js.map +1 -0
- package/dist/src/ui/utils/sessionPickerUtils.d.ts +35 -0
- package/dist/src/ui/utils/sessionPickerUtils.js +69 -0
- package/dist/src/ui/utils/sessionPickerUtils.js.map +1 -0
- package/dist/src/ui/utils/sessionPickerUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/sessionPickerUtils.test.js +79 -0
- package/dist/src/ui/utils/sessionPickerUtils.test.js.map +1 -0
- package/dist/src/ui/utils/statsDataService.d.ts +49 -0
- package/dist/src/ui/utils/statsDataService.js +221 -0
- package/dist/src/ui/utils/statsDataService.js.map +1 -0
- package/dist/src/ui/utils/statsDataService.test.d.ts +6 -0
- package/dist/src/ui/utils/statsDataService.test.js +406 -0
- package/dist/src/ui/utils/statsDataService.test.js.map +1 -0
- package/dist/src/ui/utils/synchronizedOutput.d.ts +16 -0
- package/dist/src/ui/utils/synchronizedOutput.js +88 -0
- package/dist/src/ui/utils/synchronizedOutput.js.map +1 -0
- package/dist/src/ui/utils/synchronizedOutput.test.d.ts +6 -0
- package/dist/src/ui/utils/synchronizedOutput.test.js +154 -0
- package/dist/src/ui/utils/synchronizedOutput.test.js.map +1 -0
- package/dist/src/ui/utils/terminalRedrawOptimizer.d.ts +21 -0
- package/dist/src/ui/utils/terminalRedrawOptimizer.js +108 -0
- package/dist/src/ui/utils/terminalRedrawOptimizer.js.map +1 -0
- package/dist/src/ui/utils/terminalRedrawOptimizer.test.d.ts +6 -0
- package/dist/src/ui/utils/terminalRedrawOptimizer.test.js +85 -0
- package/dist/src/ui/utils/terminalRedrawOptimizer.test.js.map +1 -0
- package/dist/src/ui/utils/terminalSetup.d.ts +30 -0
- package/dist/src/ui/utils/terminalSetup.js +310 -0
- package/dist/src/ui/utils/terminalSetup.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +86 -0
- package/dist/src/ui/utils/textUtils.js +360 -0
- package/dist/src/ui/utils/textUtils.js.map +1 -0
- package/dist/src/ui/utils/textUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/textUtils.test.js +269 -0
- package/dist/src/ui/utils/textUtils.test.js.map +1 -0
- package/dist/src/ui/utils/todoSnapshot.d.ts +13 -0
- package/dist/src/ui/utils/todoSnapshot.js +133 -0
- package/dist/src/ui/utils/todoSnapshot.js.map +1 -0
- package/dist/src/ui/utils/todoSnapshot.test.d.ts +6 -0
- package/dist/src/ui/utils/todoSnapshot.test.js +281 -0
- package/dist/src/ui/utils/todoSnapshot.test.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +12 -0
- package/dist/src/ui/utils/updateCheck.js +80 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.test.d.ts +6 -0
- package/dist/src/ui/utils/updateCheck.test.js +145 -0
- package/dist/src/ui/utils/updateCheck.test.js.map +1 -0
- package/dist/src/utils/acpModelUtils.d.ts +39 -0
- package/dist/src/utils/acpModelUtils.js +61 -0
- package/dist/src/utils/acpModelUtils.js.map +1 -0
- package/dist/src/utils/acpModelUtils.test.d.ts +6 -0
- package/dist/src/utils/acpModelUtils.test.js +31 -0
- package/dist/src/utils/acpModelUtils.test.js.map +1 -0
- package/dist/src/utils/apiPreconnect.d.ts +22 -0
- package/dist/src/utils/apiPreconnect.js +188 -0
- package/dist/src/utils/apiPreconnect.js.map +1 -0
- package/dist/src/utils/apiPreconnect.test.d.ts +6 -0
- package/dist/src/utils/apiPreconnect.test.js +252 -0
- package/dist/src/utils/apiPreconnect.test.js.map +1 -0
- package/dist/src/utils/checks.d.ts +19 -0
- package/dist/src/utils/checks.js +24 -0
- package/dist/src/utils/checks.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +23 -0
- package/dist/src/utils/cleanup.js +96 -0
- package/dist/src/utils/cleanup.js.map +1 -0
- package/dist/src/utils/commands.d.ts +20 -0
- package/dist/src/utils/commands.js +53 -0
- package/dist/src/utils/commands.js.map +1 -0
- package/dist/src/utils/commands.test.d.ts +6 -0
- package/dist/src/utils/commands.test.js +115 -0
- package/dist/src/utils/commands.test.js.map +1 -0
- package/dist/src/utils/commentJson.d.ts +25 -0
- package/dist/src/utils/commentJson.js +113 -0
- package/dist/src/utils/commentJson.js.map +1 -0
- package/dist/src/utils/commentJson.test.d.ts +6 -0
- package/dist/src/utils/commentJson.test.js +385 -0
- package/dist/src/utils/commentJson.test.js.map +1 -0
- package/dist/src/utils/costCalculator.d.ts +14 -0
- package/dist/src/utils/costCalculator.js +19 -0
- package/dist/src/utils/costCalculator.js.map +1 -0
- package/dist/src/utils/costCalculator.test.d.ts +6 -0
- package/dist/src/utils/costCalculator.test.js +177 -0
- package/dist/src/utils/costCalculator.test.js.map +1 -0
- package/dist/src/utils/cpuProfiler.d.ts +63 -0
- package/dist/src/utils/cpuProfiler.js +341 -0
- package/dist/src/utils/cpuProfiler.js.map +1 -0
- package/dist/src/utils/cpuProfiler.test.d.ts +6 -0
- package/dist/src/utils/cpuProfiler.test.js +293 -0
- package/dist/src/utils/cpuProfiler.test.js.map +1 -0
- package/dist/src/utils/deepMerge.d.ts +9 -0
- package/dist/src/utils/deepMerge.js +58 -0
- package/dist/src/utils/deepMerge.js.map +1 -0
- package/dist/src/utils/deepMerge.test.d.ts +6 -0
- package/dist/src/utils/deepMerge.test.js +143 -0
- package/dist/src/utils/deepMerge.test.js.map +1 -0
- package/dist/src/utils/dialogScopeUtils.d.ts +28 -0
- package/dist/src/utils/dialogScopeUtils.js +51 -0
- package/dist/src/utils/dialogScopeUtils.js.map +1 -0
- package/dist/src/utils/doctorChecks.d.ts +11 -0
- package/dist/src/utils/doctorChecks.js +351 -0
- package/dist/src/utils/doctorChecks.js.map +1 -0
- package/dist/src/utils/doctorChecks.test.d.ts +6 -0
- package/dist/src/utils/doctorChecks.test.js +280 -0
- package/dist/src/utils/doctorChecks.test.js.map +1 -0
- package/dist/src/utils/earlyInputCapture.d.ts +33 -0
- package/dist/src/utils/earlyInputCapture.js +311 -0
- package/dist/src/utils/earlyInputCapture.js.map +1 -0
- package/dist/src/utils/earlyInputCapture.test.d.ts +6 -0
- package/dist/src/utils/earlyInputCapture.test.js +274 -0
- package/dist/src/utils/earlyInputCapture.test.js.map +1 -0
- package/dist/src/utils/envVarResolver.d.ts +39 -0
- package/dist/src/utils/envVarResolver.js +100 -0
- package/dist/src/utils/envVarResolver.js.map +1 -0
- package/dist/src/utils/envVarResolver.test.d.ts +6 -0
- package/dist/src/utils/envVarResolver.test.js +221 -0
- package/dist/src/utils/envVarResolver.test.js.map +1 -0
- package/dist/src/utils/errors.d.ts +76 -0
- package/dist/src/utils/errors.js +237 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/errors.test.d.ts +6 -0
- package/dist/src/utils/errors.test.js +536 -0
- package/dist/src/utils/errors.test.js.map +1 -0
- package/dist/src/utils/events.d.ts +13 -0
- package/dist/src/utils/events.js +15 -0
- package/dist/src/utils/events.js.map +1 -0
- package/dist/src/utils/gitUtils.d.ts +30 -0
- package/dist/src/utils/gitUtils.js +108 -0
- package/dist/src/utils/gitUtils.js.map +1 -0
- package/dist/src/utils/gitUtils.test.d.ts +6 -0
- package/dist/src/utils/gitUtils.test.js +172 -0
- package/dist/src/utils/gitUtils.test.js.map +1 -0
- package/dist/src/utils/handleAutoUpdate.d.ts +16 -0
- package/dist/src/utils/handleAutoUpdate.js +144 -0
- package/dist/src/utils/handleAutoUpdate.js.map +1 -0
- package/dist/src/utils/headlessSafetyWarnings.d.ts +21 -0
- package/dist/src/utils/headlessSafetyWarnings.js +45 -0
- package/dist/src/utils/headlessSafetyWarnings.js.map +1 -0
- package/dist/src/utils/headlessSafetyWarnings.test.d.ts +6 -0
- package/dist/src/utils/headlessSafetyWarnings.test.js +66 -0
- package/dist/src/utils/headlessSafetyWarnings.test.js.map +1 -0
- package/dist/src/utils/housekeeping/cleanup.d.ts +15 -0
- package/dist/src/utils/housekeeping/cleanup.js +69 -0
- package/dist/src/utils/housekeeping/cleanup.js.map +1 -0
- package/dist/src/utils/housekeeping/cleanup.test.d.ts +6 -0
- package/dist/src/utils/housekeeping/cleanup.test.js +166 -0
- package/dist/src/utils/housekeeping/cleanup.test.js.map +1 -0
- package/dist/src/utils/housekeeping/lastInteractionAt.d.ts +9 -0
- package/dist/src/utils/housekeeping/lastInteractionAt.js +22 -0
- package/dist/src/utils/housekeeping/lastInteractionAt.js.map +1 -0
- package/dist/src/utils/housekeeping/scheduler.d.ts +17 -0
- package/dist/src/utils/housekeeping/scheduler.js +130 -0
- package/dist/src/utils/housekeeping/scheduler.js.map +1 -0
- package/dist/src/utils/housekeeping/scheduler.test.d.ts +6 -0
- package/dist/src/utils/housekeeping/scheduler.test.js +190 -0
- package/dist/src/utils/housekeeping/scheduler.test.js.map +1 -0
- package/dist/src/utils/housekeeping/throttledOnce.d.ts +13 -0
- package/dist/src/utils/housekeeping/throttledOnce.js +110 -0
- package/dist/src/utils/housekeeping/throttledOnce.js.map +1 -0
- package/dist/src/utils/housekeeping/throttledOnce.test.d.ts +6 -0
- package/dist/src/utils/housekeeping/throttledOnce.test.js +94 -0
- package/dist/src/utils/housekeeping/throttledOnce.test.js.map +1 -0
- package/dist/src/utils/installationInfo.d.ts +26 -0
- package/dist/src/utils/installationInfo.js +266 -0
- package/dist/src/utils/installationInfo.js.map +1 -0
- package/dist/src/utils/installationInfo.test.d.ts +6 -0
- package/dist/src/utils/installationInfo.test.js +466 -0
- package/dist/src/utils/installationInfo.test.js.map +1 -0
- package/dist/src/utils/languageUtils.d.ts +40 -0
- package/dist/src/utils/languageUtils.js +163 -0
- package/dist/src/utils/languageUtils.js.map +1 -0
- package/dist/src/utils/languageUtils.test.d.ts +6 -0
- package/dist/src/utils/languageUtils.test.js +341 -0
- package/dist/src/utils/languageUtils.test.js.map +1 -0
- package/dist/src/utils/math.d.ts +13 -0
- package/dist/src/utils/math.js +14 -0
- package/dist/src/utils/math.js.map +1 -0
- package/dist/src/utils/memoryDiagnostics.d.ts +65 -0
- package/dist/src/utils/memoryDiagnostics.js +365 -0
- package/dist/src/utils/memoryDiagnostics.js.map +1 -0
- package/dist/src/utils/memoryDiagnostics.test.d.ts +6 -0
- package/dist/src/utils/memoryDiagnostics.test.js +641 -0
- package/dist/src/utils/memoryDiagnostics.test.js.map +1 -0
- package/dist/src/utils/modelConfigUtils.d.ts +55 -0
- package/dist/src/utils/modelConfigUtils.js +186 -0
- package/dist/src/utils/modelConfigUtils.js.map +1 -0
- package/dist/src/utils/modelConfigUtils.test.d.ts +6 -0
- package/dist/src/utils/modelConfigUtils.test.js +1247 -0
- package/dist/src/utils/modelConfigUtils.test.js.map +1 -0
- package/dist/src/utils/nonInteractiveHelpers.d.ts +101 -0
- package/dist/src/utils/nonInteractiveHelpers.js +479 -0
- package/dist/src/utils/nonInteractiveHelpers.js.map +1 -0
- package/dist/src/utils/nonInteractiveHelpers.test.d.ts +6 -0
- package/dist/src/utils/nonInteractiveHelpers.test.js +1038 -0
- package/dist/src/utils/nonInteractiveHelpers.test.js.map +1 -0
- package/dist/src/utils/osc.d.ts +91 -0
- package/dist/src/utils/osc.js +162 -0
- package/dist/src/utils/osc.js.map +1 -0
- package/dist/src/utils/osc.test.d.ts +6 -0
- package/dist/src/utils/osc.test.js +217 -0
- package/dist/src/utils/osc.test.js.map +1 -0
- package/dist/src/utils/package.d.ts +12 -0
- package/dist/src/utils/package.js +24 -0
- package/dist/src/utils/package.js.map +1 -0
- package/dist/src/utils/processUtils.d.ts +13 -0
- package/dist/src/utils/processUtils.js +18 -0
- package/dist/src/utils/processUtils.js.map +1 -0
- package/dist/src/utils/processUtils.test.d.ts +6 -0
- package/dist/src/utils/processUtils.test.js +20 -0
- package/dist/src/utils/processUtils.test.js.map +1 -0
- package/dist/src/utils/readStdin.d.ts +6 -0
- package/dist/src/utils/readStdin.js +60 -0
- package/dist/src/utils/readStdin.js.map +1 -0
- package/dist/src/utils/readStdin.test.d.ts +6 -0
- package/dist/src/utils/readStdin.test.js +88 -0
- package/dist/src/utils/readStdin.test.js.map +1 -0
- package/dist/src/utils/relaunch.d.ts +9 -0
- package/dist/src/utils/relaunch.js +68 -0
- package/dist/src/utils/relaunch.js.map +1 -0
- package/dist/src/utils/relaunch.test.d.ts +6 -0
- package/dist/src/utils/relaunch.test.js +291 -0
- package/dist/src/utils/relaunch.test.js.map +1 -0
- package/dist/src/utils/resolvePath.d.ts +6 -0
- package/dist/src/utils/resolvePath.js +21 -0
- package/dist/src/utils/resolvePath.js.map +1 -0
- package/dist/src/utils/runBudget.d.ts +116 -0
- package/dist/src/utils/runBudget.js +235 -0
- package/dist/src/utils/runBudget.js.map +1 -0
- package/dist/src/utils/runBudget.test.d.ts +6 -0
- package/dist/src/utils/runBudget.test.js +187 -0
- package/dist/src/utils/runBudget.test.js.map +1 -0
- package/dist/src/utils/sandbox-macos-permissive-closed.sb +33 -0
- package/dist/src/utils/sandbox-macos-permissive-open.sb +28 -0
- package/dist/src/utils/sandbox-macos-permissive-proxied.sb +38 -0
- package/dist/src/utils/sandbox-macos-restrictive-closed.sb +94 -0
- package/dist/src/utils/sandbox-macos-restrictive-open.sb +97 -0
- package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +99 -0
- package/dist/src/utils/sandbox.d.ts +7 -0
- package/dist/src/utils/sandbox.js +788 -0
- package/dist/src/utils/sandbox.js.map +1 -0
- package/dist/src/utils/sessionPaths.d.ts +19 -0
- package/dist/src/utils/sessionPaths.js +141 -0
- package/dist/src/utils/sessionPaths.js.map +1 -0
- package/dist/src/utils/sessionPaths.test.d.ts +6 -0
- package/dist/src/utils/sessionPaths.test.js +249 -0
- package/dist/src/utils/sessionPaths.test.js.map +1 -0
- package/dist/src/utils/settingsUtils.d.ts +167 -0
- package/dist/src/utils/settingsUtils.js +532 -0
- package/dist/src/utils/settingsUtils.js.map +1 -0
- package/dist/src/utils/settingsUtils.test.d.ts +6 -0
- package/dist/src/utils/settingsUtils.test.js +849 -0
- package/dist/src/utils/settingsUtils.test.js.map +1 -0
- package/dist/src/utils/spawnWrapper.d.ts +7 -0
- package/dist/src/utils/spawnWrapper.js +8 -0
- package/dist/src/utils/spawnWrapper.js.map +1 -0
- package/dist/src/utils/standalone-update-verify.d.ts +12 -0
- package/dist/src/utils/standalone-update-verify.js +43 -0
- package/dist/src/utils/standalone-update-verify.js.map +1 -0
- package/dist/src/utils/standalone-update-verify.test.d.ts +6 -0
- package/dist/src/utils/standalone-update-verify.test.js +27 -0
- package/dist/src/utils/standalone-update-verify.test.js.map +1 -0
- package/dist/src/utils/standalone-update.d.ts +27 -0
- package/dist/src/utils/standalone-update.js +714 -0
- package/dist/src/utils/standalone-update.js.map +1 -0
- package/dist/src/utils/standalone-update.test.d.ts +6 -0
- package/dist/src/utils/standalone-update.test.js +301 -0
- package/dist/src/utils/standalone-update.test.js.map +1 -0
- package/dist/src/utils/startupProfiler.d.ts +90 -0
- package/dist/src/utils/startupProfiler.js +267 -0
- package/dist/src/utils/startupProfiler.js.map +1 -0
- package/dist/src/utils/startupProfiler.test.d.ts +1 -0
- package/dist/src/utils/startupProfiler.test.js +293 -0
- package/dist/src/utils/startupProfiler.test.js.map +1 -0
- package/dist/src/utils/startupWarnings.d.ts +6 -0
- package/dist/src/utils/startupWarnings.js +40 -0
- package/dist/src/utils/startupWarnings.js.map +1 -0
- package/dist/src/utils/stdioHelpers.d.ts +31 -0
- package/dist/src/utils/stdioHelpers.js +38 -0
- package/dist/src/utils/stdioHelpers.js.map +1 -0
- package/dist/src/utils/systemInfo.d.ts +78 -0
- package/dist/src/utils/systemInfo.js +208 -0
- package/dist/src/utils/systemInfo.js.map +1 -0
- package/dist/src/utils/systemInfo.test.d.ts +6 -0
- package/dist/src/utils/systemInfo.test.js +380 -0
- package/dist/src/utils/systemInfo.test.js.map +1 -0
- package/dist/src/utils/systemInfoFields.d.ts +18 -0
- package/dist/src/utils/systemInfoFields.js +102 -0
- package/dist/src/utils/systemInfoFields.js.map +1 -0
- package/dist/src/utils/systemInfoFields.test.d.ts +6 -0
- package/dist/src/utils/systemInfoFields.test.js +74 -0
- package/dist/src/utils/systemInfoFields.test.js.map +1 -0
- package/dist/src/utils/terminalSequence.d.ts +21 -0
- package/dist/src/utils/terminalSequence.js +124 -0
- package/dist/src/utils/terminalSequence.js.map +1 -0
- package/dist/src/utils/terminalSequence.test.d.ts +6 -0
- package/dist/src/utils/terminalSequence.test.js +132 -0
- package/dist/src/utils/terminalSequence.test.js.map +1 -0
- package/dist/src/utils/truncatedDiffPreview.d.ts +6 -0
- package/dist/src/utils/truncatedDiffPreview.js +18 -0
- package/dist/src/utils/truncatedDiffPreview.js.map +1 -0
- package/dist/src/utils/updateEventEmitter.d.ts +11 -0
- package/dist/src/utils/updateEventEmitter.js +12 -0
- package/dist/src/utils/updateEventEmitter.js.map +1 -0
- package/dist/src/utils/userPromptExpansionHook.d.ts +9 -0
- package/dist/src/utils/userPromptExpansionHook.js +30 -0
- package/dist/src/utils/userPromptExpansionHook.js.map +1 -0
- package/dist/src/utils/userPromptExpansionHook.test.d.ts +6 -0
- package/dist/src/utils/userPromptExpansionHook.test.js +69 -0
- package/dist/src/utils/userPromptExpansionHook.test.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +12 -0
- package/dist/src/utils/userStartupWarnings.js +74 -0
- package/dist/src/utils/userStartupWarnings.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.test.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.test.js +88 -0
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -0
- package/dist/src/utils/version.d.ts +6 -0
- package/dist/src/utils/version.js +11 -0
- package/dist/src/utils/version.js.map +1 -0
- package/dist/src/utils/warningHandler.d.ts +29 -0
- package/dist/src/utils/warningHandler.js +100 -0
- package/dist/src/utils/warningHandler.js.map +1 -0
- package/dist/src/utils/warningHandler.test.d.ts +6 -0
- package/dist/src/utils/warningHandler.test.js +185 -0
- package/dist/src/utils/warningHandler.test.js.map +1 -0
- package/dist/src/utils/windowTitle.d.ts +12 -0
- package/dist/src/utils/windowTitle.js +19 -0
- package/dist/src/utils/windowTitle.js.map +1 -0
- package/dist/src/utils/windowTitle.test.d.ts +6 -0
- package/dist/src/utils/windowTitle.test.js +49 -0
- package/dist/src/utils/windowTitle.test.js.map +1 -0
- package/dist/src/utils/writeWithBackup.d.ts +49 -0
- package/dist/src/utils/writeWithBackup.js +136 -0
- package/dist/src/utils/writeWithBackup.js.map +1 -0
- package/dist/src/utils/writeWithBackup.test.d.ts +6 -0
- package/dist/src/utils/writeWithBackup.test.js +177 -0
- package/dist/src/utils/writeWithBackup.test.js.map +1 -0
- package/dist/src/validateNonInterActiveAuth.d.ts +8 -0
- package/dist/src/validateNonInterActiveAuth.js +66 -0
- package/dist/src/validateNonInterActiveAuth.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +121 -0
|
@@ -0,0 +1,2181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { spawnSync } from 'node:child_process';
|
|
7
|
+
import fs from 'node:fs';
|
|
8
|
+
import os from 'node:os';
|
|
9
|
+
import pathMod from 'node:path';
|
|
10
|
+
import { useState, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
11
|
+
import { createDebugLogger, unescapePath, escapePath, getExternalEditorCommand, } from '@tulex-cli/tulex-cli-core';
|
|
12
|
+
import { toCodePoints, cpLen, cpSlice, stripUnsafeCharacters, getCachedStringWidth, } from '../../utils/textUtils.js';
|
|
13
|
+
import { handleVimAction } from './vim-buffer-actions.js';
|
|
14
|
+
const debugLogger = createDebugLogger('TEXT_BUFFER');
|
|
15
|
+
// Helper functions for line-based word navigation
|
|
16
|
+
export const isWordCharStrict = (char) => /[\w\p{L}\p{N}]/u.test(char); // Matches a single character that is any Unicode letter, any Unicode number, or an underscore
|
|
17
|
+
export const isWhitespace = (char) => /\s/.test(char);
|
|
18
|
+
// Check if a character is a combining mark (only diacritics for now)
|
|
19
|
+
export const isCombiningMark = (char) => /\p{M}/u.test(char);
|
|
20
|
+
// Check if a character should be considered part of a word (including combining marks)
|
|
21
|
+
export const isWordCharWithCombining = (char) => isWordCharStrict(char) || isCombiningMark(char);
|
|
22
|
+
// Get the script of a character (simplified for common scripts)
|
|
23
|
+
export const getCharScript = (char) => {
|
|
24
|
+
if (/[\p{Script=Latin}]/u.test(char))
|
|
25
|
+
return 'latin'; // All Latin script chars including diacritics
|
|
26
|
+
if (/[\p{Script=Han}]/u.test(char))
|
|
27
|
+
return 'han'; // Chinese
|
|
28
|
+
if (/[\p{Script=Arabic}]/u.test(char))
|
|
29
|
+
return 'arabic';
|
|
30
|
+
if (/[\p{Script=Hiragana}]/u.test(char))
|
|
31
|
+
return 'hiragana';
|
|
32
|
+
if (/[\p{Script=Katakana}]/u.test(char))
|
|
33
|
+
return 'katakana';
|
|
34
|
+
if (/[\p{Script=Cyrillic}]/u.test(char))
|
|
35
|
+
return 'cyrillic';
|
|
36
|
+
return 'other';
|
|
37
|
+
};
|
|
38
|
+
// Check if two characters are from different scripts (indicating word boundary)
|
|
39
|
+
export const isDifferentScript = (char1, char2) => {
|
|
40
|
+
if (!isWordCharStrict(char1) || !isWordCharStrict(char2))
|
|
41
|
+
return false;
|
|
42
|
+
return getCharScript(char1) !== getCharScript(char2);
|
|
43
|
+
};
|
|
44
|
+
/** Shared regex for CJK (Chinese/Japanese/Korean) characters */
|
|
45
|
+
const CJK_CHAR_REGEX = /[\u4e00-\u9fff\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/;
|
|
46
|
+
/** Check if a character is a CJK character */
|
|
47
|
+
const isCjkChar = (char) => CJK_CHAR_REGEX.test(char);
|
|
48
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
49
|
+
// Word segmentation (Intl.Segmenter)
|
|
50
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
51
|
+
/** Max entries in the word boundaries cache before eviction */
|
|
52
|
+
const WORD_BOUNDARIES_CACHE_MAX = 500;
|
|
53
|
+
/** Skip segmentation for lines longer than this (in code points) to prevent UI lag on huge pastes */
|
|
54
|
+
const SEGMENTER_LENGTH_LIMIT = 1500;
|
|
55
|
+
/** Cache: line content → array of { start: codePointIndex, end: codePointIndex } */
|
|
56
|
+
let wordBoundariesCache = null;
|
|
57
|
+
/** Lazily initialized Intl.Segmenter instance */
|
|
58
|
+
let segmenter = null;
|
|
59
|
+
/**
|
|
60
|
+
* Lazily initialize Intl.Segmenter for word segmentation.
|
|
61
|
+
* Uses `false` as a sentinel to distinguish "not yet tried" from "failed".
|
|
62
|
+
*/
|
|
63
|
+
function ensureSegmenterLoaded() {
|
|
64
|
+
if (segmenter !== null)
|
|
65
|
+
return; // already loaded or previously marked as failed
|
|
66
|
+
try {
|
|
67
|
+
segmenter = new Intl.Segmenter('zh', { granularity: 'word' });
|
|
68
|
+
debugLogger.info('Intl.Segmenter: initialized successfully');
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
debugLogger.warn('Intl.Segmenter: failed to initialize', err);
|
|
72
|
+
segmenter = false; // sentinel: don't retry on every call
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Fallback: build word boundaries character-by-character.
|
|
77
|
+
* Each CJK character becomes its own word boundary; non-CJK characters are
|
|
78
|
+
* not emitted here — callers should use outer fallback loops (e.g.,
|
|
79
|
+
* `findPrevWordStartInLine`, `findNextWordStartInLine`) for pure ASCII text.
|
|
80
|
+
* Returns an empty array for lines with no CJK characters.
|
|
81
|
+
*/
|
|
82
|
+
function charByCharFallback(line) {
|
|
83
|
+
const codePoints = toCodePoints(line);
|
|
84
|
+
const fallback = [];
|
|
85
|
+
for (let i = 0; i < codePoints.length; i++) {
|
|
86
|
+
if (isCjkChar(codePoints[i])) {
|
|
87
|
+
fallback.push({ start: i, end: i + 1 });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return fallback;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Evict oldest entry if cache exceeds the soft cap.
|
|
94
|
+
* Uses single-entry eviction to preserve hot data.
|
|
95
|
+
*/
|
|
96
|
+
function evictCacheIfNeeded() {
|
|
97
|
+
if (wordBoundariesCache &&
|
|
98
|
+
wordBoundariesCache.size >= WORD_BOUNDARIES_CACHE_MAX) {
|
|
99
|
+
const firstKey = wordBoundariesCache.keys().next().value;
|
|
100
|
+
if (firstKey !== undefined) {
|
|
101
|
+
wordBoundariesCache.delete(firstKey);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Reset word segmentation state for testing.
|
|
107
|
+
* Clears the cache and forces re-initialization of Intl.Segmenter.
|
|
108
|
+
* @internal — only used in tests to ensure test isolation.
|
|
109
|
+
*/
|
|
110
|
+
export function __resetWordSegmenter() {
|
|
111
|
+
wordBoundariesCache = null;
|
|
112
|
+
segmenter = null;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Get word boundaries (in code-point indices) for a given line.
|
|
116
|
+
* Uses Intl.Segmenter for all text, not just CJK.
|
|
117
|
+
* Returns an array of { start, end } where end is exclusive.
|
|
118
|
+
* @param codePoints - Optional pre-computed code points array to avoid redundant toCodePoints calls.
|
|
119
|
+
*/
|
|
120
|
+
function getWordBoundaries(line, codePoints) {
|
|
121
|
+
const cps = codePoints ?? toCodePoints(line);
|
|
122
|
+
// Optimization: Fallback to char-by-char for huge lines to prevent UI freeze
|
|
123
|
+
if (cps.length > SEGMENTER_LENGTH_LIMIT) {
|
|
124
|
+
if (!wordBoundariesCache)
|
|
125
|
+
wordBoundariesCache = new Map();
|
|
126
|
+
if (wordBoundariesCache.has(line))
|
|
127
|
+
return wordBoundariesCache.get(line);
|
|
128
|
+
const fallback = charByCharFallback(line);
|
|
129
|
+
evictCacheIfNeeded();
|
|
130
|
+
wordBoundariesCache.set(line, fallback);
|
|
131
|
+
return fallback;
|
|
132
|
+
}
|
|
133
|
+
// Check cache
|
|
134
|
+
if (!wordBoundariesCache)
|
|
135
|
+
wordBoundariesCache = new Map();
|
|
136
|
+
const cached = wordBoundariesCache.get(line);
|
|
137
|
+
if (cached) {
|
|
138
|
+
return cached;
|
|
139
|
+
}
|
|
140
|
+
// Ensure segmenter is loaded
|
|
141
|
+
ensureSegmenterLoaded();
|
|
142
|
+
if (!segmenter) {
|
|
143
|
+
// segmenter unavailable; fall back to char-by-char boundaries
|
|
144
|
+
const fallback = charByCharFallback(line);
|
|
145
|
+
evictCacheIfNeeded();
|
|
146
|
+
wordBoundariesCache.set(line, fallback);
|
|
147
|
+
return fallback;
|
|
148
|
+
}
|
|
149
|
+
try {
|
|
150
|
+
const segments = segmenter.segment(line);
|
|
151
|
+
// Build code-point index mapping
|
|
152
|
+
const cpToStrIdx = [];
|
|
153
|
+
let strIdx = 0;
|
|
154
|
+
for (let i = 0; i < cps.length; i++) {
|
|
155
|
+
cpToStrIdx[i] = strIdx;
|
|
156
|
+
strIdx += cps[i].length;
|
|
157
|
+
}
|
|
158
|
+
// Map segments to code-point boundaries
|
|
159
|
+
const boundaries = [];
|
|
160
|
+
for (const { index, segment, isWordLike } of segments) {
|
|
161
|
+
// Skip whitespace-only segments
|
|
162
|
+
const trimmedSegment = segment.trim();
|
|
163
|
+
if (!isWordLike && trimmedSegment.length === 0) {
|
|
164
|
+
continue; // Skip whitespace
|
|
165
|
+
}
|
|
166
|
+
// For word-like segments that contain '.', split into sub-segments
|
|
167
|
+
// e.g., "Intl.Segmenter" → ["Intl", ".", "Segmenter"]
|
|
168
|
+
if (isWordLike && segment.includes('.')) {
|
|
169
|
+
let currentOffset = index;
|
|
170
|
+
const parts = segment.split(/(\.)/); // Keep the '.' as separate parts
|
|
171
|
+
for (const part of parts) {
|
|
172
|
+
if (part.length === 0)
|
|
173
|
+
continue;
|
|
174
|
+
const partStartCpIdx = binarySearchCpIndex(cpToStrIdx, currentOffset);
|
|
175
|
+
const partEndStrPos = currentOffset + part.length;
|
|
176
|
+
const partEndCpIdxRaw = binarySearchCpIndex(cpToStrIdx, partEndStrPos);
|
|
177
|
+
const partEndCpIdx = partEndCpIdxRaw === -1 ? cps.length : partEndCpIdxRaw;
|
|
178
|
+
if (partStartCpIdx >= 0 && partStartCpIdx < partEndCpIdx) {
|
|
179
|
+
boundaries.push({ start: partStartCpIdx, end: partEndCpIdx });
|
|
180
|
+
}
|
|
181
|
+
currentOffset += part.length;
|
|
182
|
+
}
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
// For standalone punctuation, include it as a boundary marker
|
|
186
|
+
if (!isWordLike && /^[.,;!?,。;!?、]+$/.test(trimmedSegment)) {
|
|
187
|
+
const startCpIdx = binarySearchCpIndex(cpToStrIdx, index);
|
|
188
|
+
const endStrPos = index + segment.length;
|
|
189
|
+
const endCpIdxRaw = binarySearchCpIndex(cpToStrIdx, endStrPos);
|
|
190
|
+
const endCpIdx = endCpIdxRaw === -1 ? cps.length : endCpIdxRaw;
|
|
191
|
+
if (startCpIdx >= 0 && startCpIdx < endCpIdx) {
|
|
192
|
+
boundaries.push({ start: startCpIdx, end: endCpIdx });
|
|
193
|
+
}
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
// Regular word-like segment
|
|
197
|
+
const startCpIdx = binarySearchCpIndex(cpToStrIdx, index);
|
|
198
|
+
const endStrPos = index + segment.length;
|
|
199
|
+
const endCpIdxRaw = binarySearchCpIndex(cpToStrIdx, endStrPos);
|
|
200
|
+
const endCpIdx = endCpIdxRaw === -1 ? cps.length : endCpIdxRaw;
|
|
201
|
+
if (startCpIdx >= 0 && startCpIdx < endCpIdx) {
|
|
202
|
+
boundaries.push({ start: startCpIdx, end: endCpIdx });
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
evictCacheIfNeeded();
|
|
206
|
+
wordBoundariesCache.set(line, boundaries);
|
|
207
|
+
return boundaries;
|
|
208
|
+
}
|
|
209
|
+
catch (err) {
|
|
210
|
+
debugLogger.warn('getWordBoundaries: error, using char fallback', err);
|
|
211
|
+
const fallback = charByCharFallback(line);
|
|
212
|
+
evictCacheIfNeeded();
|
|
213
|
+
wordBoundariesCache.set(line, fallback);
|
|
214
|
+
return fallback;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Binary search for the first code-point index with string offset >= target.
|
|
219
|
+
* cpToStrIdx is monotonically increasing.
|
|
220
|
+
*/
|
|
221
|
+
function binarySearchCpIndex(cpToStrIdx, target) {
|
|
222
|
+
let lo = 0;
|
|
223
|
+
let hi = cpToStrIdx.length - 1;
|
|
224
|
+
while (lo <= hi) {
|
|
225
|
+
const mid = (lo + hi) >>> 1;
|
|
226
|
+
if (cpToStrIdx[mid] >= target)
|
|
227
|
+
hi = mid - 1;
|
|
228
|
+
else
|
|
229
|
+
lo = mid + 1;
|
|
230
|
+
}
|
|
231
|
+
return lo < cpToStrIdx.length ? lo : -1;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Given word boundaries and a cursor position, find the previous word start.
|
|
235
|
+
* Returns null if no boundary applies.
|
|
236
|
+
*
|
|
237
|
+
* Semantics match browser/editor behavior:
|
|
238
|
+
* - Cursor inside a word → jump to that word's start
|
|
239
|
+
* - Cursor exactly at a word's start → jump to previous word's start
|
|
240
|
+
*/
|
|
241
|
+
function findPrevWordStart(boundaries, col) {
|
|
242
|
+
for (let i = boundaries.length - 1; i >= 0; i--) {
|
|
243
|
+
const b = boundaries[i];
|
|
244
|
+
if (col > b.start && col <= b.end) {
|
|
245
|
+
// Cursor is inside this word → jump to its start
|
|
246
|
+
return b.start;
|
|
247
|
+
}
|
|
248
|
+
if (col === b.start && i > 0) {
|
|
249
|
+
// Cursor is exactly at this word's start → jump to previous word's start
|
|
250
|
+
return boundaries[i - 1].start;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Given word boundaries and a cursor position, find the next word end.
|
|
257
|
+
* Returns null if no boundary applies.
|
|
258
|
+
*/
|
|
259
|
+
function findNextWordEnd(boundaries, col) {
|
|
260
|
+
for (const b of boundaries) {
|
|
261
|
+
if (col >= b.start && col < b.end) {
|
|
262
|
+
return b.end;
|
|
263
|
+
}
|
|
264
|
+
if (col < b.start) {
|
|
265
|
+
// Cursor is before this word — no applicable boundary
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Fallback: find word end by scanning forward from startPos.
|
|
273
|
+
* Respects script boundaries and treats each CJK character as its own word.
|
|
274
|
+
*/
|
|
275
|
+
function findWordEndFallback(arr, startPos) {
|
|
276
|
+
let end = startPos;
|
|
277
|
+
while (end < arr.length) {
|
|
278
|
+
const currChar = arr[end];
|
|
279
|
+
const nextChar = end + 1 < arr.length ? arr[end + 1] : undefined;
|
|
280
|
+
if (!isWordCharStrict(currChar ?? '') ||
|
|
281
|
+
(nextChar !== undefined &&
|
|
282
|
+
isWordCharStrict(currChar ?? '') &&
|
|
283
|
+
isWordCharStrict(nextChar) &&
|
|
284
|
+
isDifferentScript(currChar ?? '', nextChar))) {
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
// If current and next are both CJK (same script), stop here
|
|
288
|
+
// so each CJK character becomes its own word
|
|
289
|
+
if (nextChar !== undefined &&
|
|
290
|
+
isCjkChar(currChar ?? '') &&
|
|
291
|
+
isCjkChar(nextChar)) {
|
|
292
|
+
end++;
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
end++;
|
|
296
|
+
}
|
|
297
|
+
return end;
|
|
298
|
+
}
|
|
299
|
+
// Find next word start within a line, starting from col
|
|
300
|
+
export const findNextWordStartInLine = (line, col) => {
|
|
301
|
+
const chars = toCodePoints(line);
|
|
302
|
+
let i = col;
|
|
303
|
+
if (i >= chars.length)
|
|
304
|
+
return null;
|
|
305
|
+
const currentChar = chars[i];
|
|
306
|
+
// Skip current word/sequence based on character type
|
|
307
|
+
if (isWordCharStrict(currentChar)) {
|
|
308
|
+
while (i < chars.length && isWordCharWithCombining(chars[i])) {
|
|
309
|
+
// Check for script boundary - if next character is from different script, stop here
|
|
310
|
+
if (i + 1 < chars.length &&
|
|
311
|
+
isWordCharStrict(chars[i + 1]) &&
|
|
312
|
+
isDifferentScript(chars[i], chars[i + 1])) {
|
|
313
|
+
i++; // Include current character
|
|
314
|
+
break; // Stop at script boundary
|
|
315
|
+
}
|
|
316
|
+
i++;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
else if (!isWhitespace(currentChar)) {
|
|
320
|
+
while (i < chars.length &&
|
|
321
|
+
!isWordCharStrict(chars[i]) &&
|
|
322
|
+
!isWhitespace(chars[i])) {
|
|
323
|
+
i++;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
// Skip whitespace
|
|
327
|
+
while (i < chars.length && isWhitespace(chars[i])) {
|
|
328
|
+
i++;
|
|
329
|
+
}
|
|
330
|
+
return i < chars.length ? i : null;
|
|
331
|
+
};
|
|
332
|
+
// Find previous word start within a line
|
|
333
|
+
export const findPrevWordStartInLine = (line, col) => {
|
|
334
|
+
const chars = toCodePoints(line);
|
|
335
|
+
let i = col;
|
|
336
|
+
if (i <= 0)
|
|
337
|
+
return null;
|
|
338
|
+
i--;
|
|
339
|
+
// Skip whitespace moving backwards
|
|
340
|
+
while (i >= 0 && isWhitespace(chars[i])) {
|
|
341
|
+
i--;
|
|
342
|
+
}
|
|
343
|
+
if (i < 0)
|
|
344
|
+
return null;
|
|
345
|
+
if (isWordCharStrict(chars[i])) {
|
|
346
|
+
// We're in a word, move to its beginning
|
|
347
|
+
while (i >= 0 && isWordCharStrict(chars[i])) {
|
|
348
|
+
// Check for script boundary - if previous character is from different script, stop here
|
|
349
|
+
if (i - 1 >= 0 &&
|
|
350
|
+
isWordCharStrict(chars[i - 1]) &&
|
|
351
|
+
isDifferentScript(chars[i], chars[i - 1])) {
|
|
352
|
+
return i; // Return current position at script boundary
|
|
353
|
+
}
|
|
354
|
+
i--;
|
|
355
|
+
}
|
|
356
|
+
return i + 1;
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
// We're in punctuation, move to its beginning
|
|
360
|
+
while (i >= 0 && !isWordCharStrict(chars[i]) && !isWhitespace(chars[i])) {
|
|
361
|
+
i--;
|
|
362
|
+
}
|
|
363
|
+
return i + 1;
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
// Find word end within a line
|
|
367
|
+
export const findWordEndInLine = (line, col) => {
|
|
368
|
+
const chars = toCodePoints(line);
|
|
369
|
+
let i = col;
|
|
370
|
+
// If we're already at the end of a word (including punctuation sequences), advance to next word
|
|
371
|
+
// This includes both regular word endings and script boundaries
|
|
372
|
+
const atEndOfWordChar = i < chars.length &&
|
|
373
|
+
isWordCharWithCombining(chars[i]) &&
|
|
374
|
+
(i + 1 >= chars.length ||
|
|
375
|
+
!isWordCharWithCombining(chars[i + 1]) ||
|
|
376
|
+
(isWordCharStrict(chars[i]) &&
|
|
377
|
+
i + 1 < chars.length &&
|
|
378
|
+
isWordCharStrict(chars[i + 1]) &&
|
|
379
|
+
isDifferentScript(chars[i], chars[i + 1])));
|
|
380
|
+
const atEndOfPunctuation = i < chars.length &&
|
|
381
|
+
!isWordCharWithCombining(chars[i]) &&
|
|
382
|
+
!isWhitespace(chars[i]) &&
|
|
383
|
+
(i + 1 >= chars.length ||
|
|
384
|
+
isWhitespace(chars[i + 1]) ||
|
|
385
|
+
isWordCharWithCombining(chars[i + 1]));
|
|
386
|
+
if (atEndOfWordChar || atEndOfPunctuation) {
|
|
387
|
+
// We're at the end of a word or punctuation sequence, move forward to find next word
|
|
388
|
+
i++;
|
|
389
|
+
// Skip whitespace to find next word or punctuation
|
|
390
|
+
while (i < chars.length && isWhitespace(chars[i])) {
|
|
391
|
+
i++;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
// If we're not on a word character, find the next word or punctuation sequence
|
|
395
|
+
if (i < chars.length && !isWordCharWithCombining(chars[i])) {
|
|
396
|
+
// Skip whitespace to find next word or punctuation
|
|
397
|
+
while (i < chars.length && isWhitespace(chars[i])) {
|
|
398
|
+
i++;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
// Move to end of current word (including combining marks, but stop at script boundaries)
|
|
402
|
+
let foundWord = false;
|
|
403
|
+
let lastBaseCharPos = -1;
|
|
404
|
+
if (i < chars.length && isWordCharWithCombining(chars[i])) {
|
|
405
|
+
// Handle word characters
|
|
406
|
+
while (i < chars.length && isWordCharWithCombining(chars[i])) {
|
|
407
|
+
foundWord = true;
|
|
408
|
+
// Track the position of the last base character (not combining mark)
|
|
409
|
+
if (isWordCharStrict(chars[i])) {
|
|
410
|
+
lastBaseCharPos = i;
|
|
411
|
+
}
|
|
412
|
+
// Check if next character is from a different script (word boundary)
|
|
413
|
+
if (i + 1 < chars.length &&
|
|
414
|
+
isWordCharStrict(chars[i + 1]) &&
|
|
415
|
+
isDifferentScript(chars[i], chars[i + 1])) {
|
|
416
|
+
i++; // Include current character
|
|
417
|
+
if (isWordCharStrict(chars[i - 1])) {
|
|
418
|
+
lastBaseCharPos = i - 1;
|
|
419
|
+
}
|
|
420
|
+
break; // Stop at script boundary
|
|
421
|
+
}
|
|
422
|
+
i++;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
else if (i < chars.length && !isWhitespace(chars[i])) {
|
|
426
|
+
// Handle punctuation sequences (like ████)
|
|
427
|
+
while (i < chars.length &&
|
|
428
|
+
!isWordCharStrict(chars[i]) &&
|
|
429
|
+
!isWhitespace(chars[i])) {
|
|
430
|
+
foundWord = true;
|
|
431
|
+
lastBaseCharPos = i;
|
|
432
|
+
i++;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
// Only return a position if we actually found a word
|
|
436
|
+
// Return the position of the last base character, not combining marks
|
|
437
|
+
if (foundWord && lastBaseCharPos >= col) {
|
|
438
|
+
return lastBaseCharPos;
|
|
439
|
+
}
|
|
440
|
+
return null;
|
|
441
|
+
};
|
|
442
|
+
// Find next word across lines
|
|
443
|
+
export const findNextWordAcrossLines = (lines, cursorRow, cursorCol, searchForWordStart) => {
|
|
444
|
+
// First try current line
|
|
445
|
+
const currentLine = lines[cursorRow] || '';
|
|
446
|
+
const colInCurrentLine = searchForWordStart
|
|
447
|
+
? findNextWordStartInLine(currentLine, cursorCol)
|
|
448
|
+
: findWordEndInLine(currentLine, cursorCol);
|
|
449
|
+
if (colInCurrentLine !== null) {
|
|
450
|
+
return { row: cursorRow, col: colInCurrentLine };
|
|
451
|
+
}
|
|
452
|
+
// Search subsequent lines
|
|
453
|
+
for (let row = cursorRow + 1; row < lines.length; row++) {
|
|
454
|
+
const line = lines[row] || '';
|
|
455
|
+
const chars = toCodePoints(line);
|
|
456
|
+
// For empty lines, if we haven't found any words yet, return the empty line
|
|
457
|
+
if (chars.length === 0) {
|
|
458
|
+
// Check if there are any words in remaining lines
|
|
459
|
+
let hasWordsInLaterLines = false;
|
|
460
|
+
for (let laterRow = row + 1; laterRow < lines.length; laterRow++) {
|
|
461
|
+
const laterLine = lines[laterRow] || '';
|
|
462
|
+
const laterChars = toCodePoints(laterLine);
|
|
463
|
+
let firstNonWhitespace = 0;
|
|
464
|
+
while (firstNonWhitespace < laterChars.length &&
|
|
465
|
+
isWhitespace(laterChars[firstNonWhitespace])) {
|
|
466
|
+
firstNonWhitespace++;
|
|
467
|
+
}
|
|
468
|
+
if (firstNonWhitespace < laterChars.length) {
|
|
469
|
+
hasWordsInLaterLines = true;
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
// If no words in later lines, return the empty line
|
|
474
|
+
if (!hasWordsInLaterLines) {
|
|
475
|
+
return { row, col: 0 };
|
|
476
|
+
}
|
|
477
|
+
continue;
|
|
478
|
+
}
|
|
479
|
+
// Find first non-whitespace
|
|
480
|
+
let firstNonWhitespace = 0;
|
|
481
|
+
while (firstNonWhitespace < chars.length &&
|
|
482
|
+
isWhitespace(chars[firstNonWhitespace])) {
|
|
483
|
+
firstNonWhitespace++;
|
|
484
|
+
}
|
|
485
|
+
if (firstNonWhitespace < chars.length) {
|
|
486
|
+
if (searchForWordStart) {
|
|
487
|
+
return { row, col: firstNonWhitespace };
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
// For word end, find the end of the first word
|
|
491
|
+
const endCol = findWordEndInLine(line, firstNonWhitespace);
|
|
492
|
+
if (endCol !== null) {
|
|
493
|
+
return { row, col: endCol };
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
return null;
|
|
499
|
+
};
|
|
500
|
+
// Find previous word across lines
|
|
501
|
+
export const findPrevWordAcrossLines = (lines, cursorRow, cursorCol) => {
|
|
502
|
+
// First try current line
|
|
503
|
+
const currentLine = lines[cursorRow] || '';
|
|
504
|
+
const colInCurrentLine = findPrevWordStartInLine(currentLine, cursorCol);
|
|
505
|
+
if (colInCurrentLine !== null) {
|
|
506
|
+
return { row: cursorRow, col: colInCurrentLine };
|
|
507
|
+
}
|
|
508
|
+
// Search previous lines
|
|
509
|
+
for (let row = cursorRow - 1; row >= 0; row--) {
|
|
510
|
+
const line = lines[row] || '';
|
|
511
|
+
const chars = toCodePoints(line);
|
|
512
|
+
if (chars.length === 0)
|
|
513
|
+
continue;
|
|
514
|
+
// Find last word start
|
|
515
|
+
let lastWordStart = chars.length;
|
|
516
|
+
while (lastWordStart > 0 && isWhitespace(chars[lastWordStart - 1])) {
|
|
517
|
+
lastWordStart--;
|
|
518
|
+
}
|
|
519
|
+
if (lastWordStart > 0) {
|
|
520
|
+
// Find start of this word
|
|
521
|
+
const wordStart = findPrevWordStartInLine(line, lastWordStart);
|
|
522
|
+
if (wordStart !== null) {
|
|
523
|
+
return { row, col: wordStart };
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
return null;
|
|
528
|
+
};
|
|
529
|
+
// Helper functions for vim line operations
|
|
530
|
+
const offsetToRowCol = (offset, lines) => {
|
|
531
|
+
let running = 0;
|
|
532
|
+
for (let i = 0; i < lines.length; i++) {
|
|
533
|
+
const lineLength = lines[i].length + 1; // include implicit newline
|
|
534
|
+
if (running + lineLength > offset) {
|
|
535
|
+
return { row: i, col: offset - running };
|
|
536
|
+
}
|
|
537
|
+
running += lineLength;
|
|
538
|
+
}
|
|
539
|
+
// Offset is at or past end of text — clamp to end of last line
|
|
540
|
+
const last = Math.max(0, lines.length - 1);
|
|
541
|
+
return { row: last, col: lines[last]?.length ?? 0 };
|
|
542
|
+
};
|
|
543
|
+
export const getPositionFromOffsets = (startOffset, endOffset, lines) => {
|
|
544
|
+
const { row: startRow, col: startCol } = offsetToRowCol(startOffset, lines);
|
|
545
|
+
const { row: endRow, col: endCol } = offsetToRowCol(endOffset, lines);
|
|
546
|
+
return { startRow, startCol, endRow, endCol };
|
|
547
|
+
};
|
|
548
|
+
export const getLineRangeOffsets = (startRow, lineCount, lines) => {
|
|
549
|
+
let startOffset = 0;
|
|
550
|
+
// Calculate start offset
|
|
551
|
+
for (let i = 0; i < startRow; i++) {
|
|
552
|
+
startOffset += lines[i].length + 1; // +1 for newline
|
|
553
|
+
}
|
|
554
|
+
// Calculate end offset
|
|
555
|
+
let endOffset = startOffset;
|
|
556
|
+
for (let i = 0; i < lineCount; i++) {
|
|
557
|
+
const lineIndex = startRow + i;
|
|
558
|
+
if (lineIndex < lines.length) {
|
|
559
|
+
endOffset += lines[lineIndex].length;
|
|
560
|
+
if (lineIndex < lines.length - 1) {
|
|
561
|
+
endOffset += 1; // +1 for newline
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
return { startOffset, endOffset };
|
|
566
|
+
};
|
|
567
|
+
export const replaceRangeInternal = (state, startRow, startCol, endRow, endCol, text) => {
|
|
568
|
+
const currentLine = (row) => state.lines[row] || '';
|
|
569
|
+
const currentLineLen = (row) => cpLen(currentLine(row));
|
|
570
|
+
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
571
|
+
if (startRow > endRow ||
|
|
572
|
+
(startRow === endRow && startCol > endCol) ||
|
|
573
|
+
startRow < 0 ||
|
|
574
|
+
startCol < 0 ||
|
|
575
|
+
endRow >= state.lines.length ||
|
|
576
|
+
(endRow < state.lines.length && endCol > currentLineLen(endRow))) {
|
|
577
|
+
return state; // Invalid range
|
|
578
|
+
}
|
|
579
|
+
const newLines = [...state.lines];
|
|
580
|
+
const sCol = clamp(startCol, 0, currentLineLen(startRow));
|
|
581
|
+
const eCol = clamp(endCol, 0, currentLineLen(endRow));
|
|
582
|
+
const prefix = cpSlice(currentLine(startRow), 0, sCol);
|
|
583
|
+
const suffix = cpSlice(currentLine(endRow), eCol);
|
|
584
|
+
const normalisedReplacement = text
|
|
585
|
+
.replace(/\r\n/g, '\n')
|
|
586
|
+
.replace(/\r/g, '\n');
|
|
587
|
+
const replacementParts = normalisedReplacement.split('\n');
|
|
588
|
+
// The combined first line of the new text
|
|
589
|
+
const firstLine = prefix + replacementParts[0];
|
|
590
|
+
if (replacementParts.length === 1) {
|
|
591
|
+
// No newlines in replacement: combine prefix, replacement, and suffix on one line.
|
|
592
|
+
newLines.splice(startRow, endRow - startRow + 1, firstLine + suffix);
|
|
593
|
+
}
|
|
594
|
+
else {
|
|
595
|
+
// Newlines in replacement: create new lines.
|
|
596
|
+
const lastLine = replacementParts[replacementParts.length - 1] + suffix;
|
|
597
|
+
const middleLines = replacementParts.slice(1, -1);
|
|
598
|
+
newLines.splice(startRow, endRow - startRow + 1, firstLine, ...middleLines, lastLine);
|
|
599
|
+
}
|
|
600
|
+
const finalCursorRow = startRow + replacementParts.length - 1;
|
|
601
|
+
const finalCursorCol = (replacementParts.length > 1 ? 0 : sCol) +
|
|
602
|
+
cpLen(replacementParts[replacementParts.length - 1]);
|
|
603
|
+
return {
|
|
604
|
+
...state,
|
|
605
|
+
lines: newLines,
|
|
606
|
+
cursorRow: Math.min(Math.max(finalCursorRow, 0), newLines.length - 1),
|
|
607
|
+
cursorCol: Math.max(0, Math.min(finalCursorCol, cpLen(newLines[finalCursorRow] || ''))),
|
|
608
|
+
preferredCol: null,
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
function clamp(v, min, max) {
|
|
612
|
+
return v < min ? min : v > max ? max : v;
|
|
613
|
+
}
|
|
614
|
+
function calculateInitialCursorPosition(initialLines, offset) {
|
|
615
|
+
let remainingChars = offset;
|
|
616
|
+
let row = 0;
|
|
617
|
+
while (row < initialLines.length) {
|
|
618
|
+
const lineLength = cpLen(initialLines[row]);
|
|
619
|
+
// Add 1 for the newline character (except for the last line)
|
|
620
|
+
const totalCharsInLineAndNewline = lineLength + (row < initialLines.length - 1 ? 1 : 0);
|
|
621
|
+
if (remainingChars <= lineLength) {
|
|
622
|
+
// Cursor is on this line
|
|
623
|
+
return [row, remainingChars];
|
|
624
|
+
}
|
|
625
|
+
remainingChars -= totalCharsInLineAndNewline;
|
|
626
|
+
row++;
|
|
627
|
+
}
|
|
628
|
+
// Offset is beyond the text, place cursor at the end of the last line
|
|
629
|
+
if (initialLines.length > 0) {
|
|
630
|
+
const lastRow = initialLines.length - 1;
|
|
631
|
+
return [lastRow, cpLen(initialLines[lastRow])];
|
|
632
|
+
}
|
|
633
|
+
return [0, 0]; // Default for empty text
|
|
634
|
+
}
|
|
635
|
+
export function offsetToLogicalPos(text, offset) {
|
|
636
|
+
let row = 0;
|
|
637
|
+
let col = 0;
|
|
638
|
+
let currentOffset = 0;
|
|
639
|
+
if (offset === 0)
|
|
640
|
+
return [0, 0];
|
|
641
|
+
const lines = text.split('\n');
|
|
642
|
+
for (let i = 0; i < lines.length; i++) {
|
|
643
|
+
const line = lines[i];
|
|
644
|
+
const lineLength = cpLen(line);
|
|
645
|
+
const lineLengthWithNewline = lineLength + (i < lines.length - 1 ? 1 : 0);
|
|
646
|
+
if (offset <= currentOffset + lineLength) {
|
|
647
|
+
// Check against lineLength first
|
|
648
|
+
row = i;
|
|
649
|
+
col = offset - currentOffset;
|
|
650
|
+
return [row, col];
|
|
651
|
+
}
|
|
652
|
+
else if (offset <= currentOffset + lineLengthWithNewline) {
|
|
653
|
+
// Check if offset is the newline itself
|
|
654
|
+
row = i;
|
|
655
|
+
col = lineLength; // Position cursor at the end of the current line content
|
|
656
|
+
// If the offset IS the newline, and it's not the last line, advance to next line, col 0
|
|
657
|
+
if (offset === currentOffset + lineLengthWithNewline &&
|
|
658
|
+
i < lines.length - 1) {
|
|
659
|
+
return [i + 1, 0];
|
|
660
|
+
}
|
|
661
|
+
return [row, col]; // Otherwise, it's at the end of the current line content
|
|
662
|
+
}
|
|
663
|
+
currentOffset += lineLengthWithNewline;
|
|
664
|
+
}
|
|
665
|
+
// If offset is beyond the text length, place cursor at the end of the last line
|
|
666
|
+
// or [0,0] if text is empty
|
|
667
|
+
if (lines.length > 0) {
|
|
668
|
+
row = lines.length - 1;
|
|
669
|
+
col = cpLen(lines[row]);
|
|
670
|
+
}
|
|
671
|
+
else {
|
|
672
|
+
row = 0;
|
|
673
|
+
col = 0;
|
|
674
|
+
}
|
|
675
|
+
return [row, col];
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Converts logical row/col position to absolute text offset
|
|
679
|
+
* Inverse operation of offsetToLogicalPos
|
|
680
|
+
*/
|
|
681
|
+
export function logicalPosToOffset(lines, row, col) {
|
|
682
|
+
let offset = 0;
|
|
683
|
+
// Clamp row to valid range
|
|
684
|
+
const actualRow = Math.min(row, lines.length - 1);
|
|
685
|
+
// Add lengths of all lines before the target row
|
|
686
|
+
for (let i = 0; i < actualRow; i++) {
|
|
687
|
+
offset += cpLen(lines[i]) + 1; // +1 for newline
|
|
688
|
+
}
|
|
689
|
+
// Add column offset within the target row
|
|
690
|
+
if (actualRow >= 0 && actualRow < lines.length) {
|
|
691
|
+
offset += Math.min(col, cpLen(lines[actualRow]));
|
|
692
|
+
}
|
|
693
|
+
return offset;
|
|
694
|
+
}
|
|
695
|
+
// Calculates the visual wrapping of lines and the mapping between logical and visual coordinates.
|
|
696
|
+
// This is an expensive operation and should be memoized.
|
|
697
|
+
function calculateLayout(logicalLines, viewportWidth) {
|
|
698
|
+
const visualLines = [];
|
|
699
|
+
const logicalToVisualMap = [];
|
|
700
|
+
const visualToLogicalMap = [];
|
|
701
|
+
logicalLines.forEach((logLine, logIndex) => {
|
|
702
|
+
logicalToVisualMap[logIndex] = [];
|
|
703
|
+
if (logLine.length === 0) {
|
|
704
|
+
// Handle empty logical line
|
|
705
|
+
logicalToVisualMap[logIndex].push([visualLines.length, 0]);
|
|
706
|
+
visualToLogicalMap.push([logIndex, 0]);
|
|
707
|
+
visualLines.push('');
|
|
708
|
+
}
|
|
709
|
+
else {
|
|
710
|
+
// Non-empty logical line
|
|
711
|
+
let currentPosInLogLine = 0; // Tracks position within the current logical line (code point index)
|
|
712
|
+
const codePointsInLogLine = toCodePoints(logLine);
|
|
713
|
+
while (currentPosInLogLine < codePointsInLogLine.length) {
|
|
714
|
+
let currentChunk = '';
|
|
715
|
+
let currentChunkVisualWidth = 0;
|
|
716
|
+
let numCodePointsInChunk = 0;
|
|
717
|
+
let lastWordBreakPoint = -1; // Index in codePointsInLogLine for word break
|
|
718
|
+
let numCodePointsAtLastWordBreak = 0;
|
|
719
|
+
// Iterate through code points to build the current visual line (chunk)
|
|
720
|
+
for (let i = currentPosInLogLine; i < codePointsInLogLine.length; i++) {
|
|
721
|
+
const char = codePointsInLogLine[i];
|
|
722
|
+
const charVisualWidth = getCachedStringWidth(char);
|
|
723
|
+
if (currentChunkVisualWidth + charVisualWidth > viewportWidth) {
|
|
724
|
+
// Character would exceed viewport width
|
|
725
|
+
if (lastWordBreakPoint !== -1 &&
|
|
726
|
+
numCodePointsAtLastWordBreak > 0 &&
|
|
727
|
+
currentPosInLogLine + numCodePointsAtLastWordBreak < i) {
|
|
728
|
+
// We have a valid word break point to use, and it's not the start of the current segment
|
|
729
|
+
currentChunk = codePointsInLogLine
|
|
730
|
+
.slice(currentPosInLogLine, currentPosInLogLine + numCodePointsAtLastWordBreak)
|
|
731
|
+
.join('');
|
|
732
|
+
numCodePointsInChunk = numCodePointsAtLastWordBreak;
|
|
733
|
+
}
|
|
734
|
+
else {
|
|
735
|
+
// No word break, or word break is at the start of this potential chunk, or word break leads to empty chunk.
|
|
736
|
+
// Hard break: take characters up to viewportWidth, or just the current char if it alone is too wide.
|
|
737
|
+
if (numCodePointsInChunk === 0 &&
|
|
738
|
+
charVisualWidth > viewportWidth) {
|
|
739
|
+
// Single character is wider than viewport, take it anyway
|
|
740
|
+
currentChunk = char;
|
|
741
|
+
numCodePointsInChunk = 1;
|
|
742
|
+
}
|
|
743
|
+
else if (numCodePointsInChunk === 0 &&
|
|
744
|
+
charVisualWidth <= viewportWidth) {
|
|
745
|
+
// This case should ideally be caught by the next iteration if the char fits.
|
|
746
|
+
// If it doesn't fit (because currentChunkVisualWidth was already > 0 from a previous char that filled the line),
|
|
747
|
+
// then numCodePointsInChunk would not be 0.
|
|
748
|
+
// This branch means the current char *itself* doesn't fit an empty line, which is handled by the above.
|
|
749
|
+
// If we are here, it means the loop should break and the current chunk (which is empty) is finalized.
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
break; // Break from inner loop to finalize this chunk
|
|
753
|
+
}
|
|
754
|
+
currentChunk += char;
|
|
755
|
+
currentChunkVisualWidth += charVisualWidth;
|
|
756
|
+
numCodePointsInChunk++;
|
|
757
|
+
// Check for word break opportunity (space)
|
|
758
|
+
if (char === ' ') {
|
|
759
|
+
lastWordBreakPoint = i; // Store code point index of the space
|
|
760
|
+
// Store the state *before* adding the space, if we decide to break here.
|
|
761
|
+
numCodePointsAtLastWordBreak = numCodePointsInChunk - 1; // Chars *before* the space
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
// If the inner loop completed without breaking (i.e., remaining text fits)
|
|
765
|
+
// or if the loop broke but numCodePointsInChunk is still 0 (e.g. first char too wide for empty line)
|
|
766
|
+
if (numCodePointsInChunk === 0 &&
|
|
767
|
+
currentPosInLogLine < codePointsInLogLine.length) {
|
|
768
|
+
// This can happen if the very first character considered for a new visual line is wider than the viewport.
|
|
769
|
+
// In this case, we take that single character.
|
|
770
|
+
const firstChar = codePointsInLogLine[currentPosInLogLine];
|
|
771
|
+
currentChunk = firstChar;
|
|
772
|
+
numCodePointsInChunk = 1; // Ensure we advance
|
|
773
|
+
}
|
|
774
|
+
// If after everything, numCodePointsInChunk is still 0 but we haven't processed the whole logical line,
|
|
775
|
+
// it implies an issue, like viewportWidth being 0 or less. Avoid infinite loop.
|
|
776
|
+
if (numCodePointsInChunk === 0 &&
|
|
777
|
+
currentPosInLogLine < codePointsInLogLine.length) {
|
|
778
|
+
// Force advance by one character to prevent infinite loop if something went wrong
|
|
779
|
+
currentChunk = codePointsInLogLine[currentPosInLogLine];
|
|
780
|
+
numCodePointsInChunk = 1;
|
|
781
|
+
}
|
|
782
|
+
logicalToVisualMap[logIndex].push([
|
|
783
|
+
visualLines.length,
|
|
784
|
+
currentPosInLogLine,
|
|
785
|
+
]);
|
|
786
|
+
visualToLogicalMap.push([logIndex, currentPosInLogLine]);
|
|
787
|
+
visualLines.push(currentChunk);
|
|
788
|
+
const logicalStartOfThisChunk = currentPosInLogLine;
|
|
789
|
+
currentPosInLogLine += numCodePointsInChunk;
|
|
790
|
+
// If the chunk processed did not consume the entire logical line,
|
|
791
|
+
// and the character immediately following the chunk is a space,
|
|
792
|
+
// advance past this space as it acted as a delimiter for word wrapping.
|
|
793
|
+
if (logicalStartOfThisChunk + numCodePointsInChunk <
|
|
794
|
+
codePointsInLogLine.length &&
|
|
795
|
+
currentPosInLogLine < codePointsInLogLine.length && // Redundant if previous is true, but safe
|
|
796
|
+
codePointsInLogLine[currentPosInLogLine] === ' ') {
|
|
797
|
+
currentPosInLogLine++;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
// If the entire logical text was empty, ensure there's one empty visual line.
|
|
803
|
+
if (logicalLines.length === 0 ||
|
|
804
|
+
(logicalLines.length === 1 && logicalLines[0] === '')) {
|
|
805
|
+
if (visualLines.length === 0) {
|
|
806
|
+
visualLines.push('');
|
|
807
|
+
if (!logicalToVisualMap[0])
|
|
808
|
+
logicalToVisualMap[0] = [];
|
|
809
|
+
logicalToVisualMap[0].push([0, 0]);
|
|
810
|
+
visualToLogicalMap.push([0, 0]);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
return {
|
|
814
|
+
visualLines,
|
|
815
|
+
logicalToVisualMap,
|
|
816
|
+
visualToLogicalMap,
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
// Calculates the visual cursor position based on a pre-calculated layout.
|
|
820
|
+
// This is a lightweight operation.
|
|
821
|
+
function calculateVisualCursorFromLayout(layout, logicalCursor) {
|
|
822
|
+
const { logicalToVisualMap, visualLines } = layout;
|
|
823
|
+
const [logicalRow, logicalCol] = logicalCursor;
|
|
824
|
+
const segmentsForLogicalLine = logicalToVisualMap[logicalRow];
|
|
825
|
+
if (!segmentsForLogicalLine || segmentsForLogicalLine.length === 0) {
|
|
826
|
+
// This can happen for an empty document.
|
|
827
|
+
return [0, 0];
|
|
828
|
+
}
|
|
829
|
+
// Find the segment where the logical column fits.
|
|
830
|
+
// The segments are sorted by startColInLogical.
|
|
831
|
+
let targetSegmentIndex = segmentsForLogicalLine.findIndex(([, startColInLogical], index) => {
|
|
832
|
+
const nextStartColInLogical = index + 1 < segmentsForLogicalLine.length
|
|
833
|
+
? segmentsForLogicalLine[index + 1][1]
|
|
834
|
+
: Infinity;
|
|
835
|
+
return (logicalCol >= startColInLogical && logicalCol < nextStartColInLogical);
|
|
836
|
+
});
|
|
837
|
+
// If not found, it means the cursor is at the end of the logical line.
|
|
838
|
+
if (targetSegmentIndex === -1) {
|
|
839
|
+
if (logicalCol === 0) {
|
|
840
|
+
targetSegmentIndex = 0;
|
|
841
|
+
}
|
|
842
|
+
else {
|
|
843
|
+
targetSegmentIndex = segmentsForLogicalLine.length - 1;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
const [visualRow, startColInLogical] = segmentsForLogicalLine[targetSegmentIndex];
|
|
847
|
+
const visualCol = logicalCol - startColInLogical;
|
|
848
|
+
// The visual column should not exceed the length of the visual line.
|
|
849
|
+
const clampedVisualCol = Math.min(visualCol, cpLen(visualLines[visualRow] ?? ''));
|
|
850
|
+
return [visualRow, clampedVisualCol];
|
|
851
|
+
}
|
|
852
|
+
const historyLimit = 100;
|
|
853
|
+
export const pushUndo = (currentState) => {
|
|
854
|
+
const snapshot = {
|
|
855
|
+
lines: [...currentState.lines],
|
|
856
|
+
cursorRow: currentState.cursorRow,
|
|
857
|
+
cursorCol: currentState.cursorCol,
|
|
858
|
+
};
|
|
859
|
+
const newStack = [...currentState.undoStack, snapshot];
|
|
860
|
+
if (newStack.length > historyLimit) {
|
|
861
|
+
newStack.shift();
|
|
862
|
+
}
|
|
863
|
+
return { ...currentState, undoStack: newStack, redoStack: [] };
|
|
864
|
+
};
|
|
865
|
+
function textBufferReducerLogic(state, action) {
|
|
866
|
+
const pushUndoLocal = pushUndo;
|
|
867
|
+
const currentLine = (r) => state.lines[r] ?? '';
|
|
868
|
+
const currentLineLen = (r) => cpLen(currentLine(r));
|
|
869
|
+
switch (action.type) {
|
|
870
|
+
case 'set_text': {
|
|
871
|
+
let nextState = state;
|
|
872
|
+
if (action.pushToUndo !== false) {
|
|
873
|
+
nextState = pushUndoLocal(state);
|
|
874
|
+
}
|
|
875
|
+
const newContentLines = action.payload
|
|
876
|
+
.replace(/\r\n?/g, '\n')
|
|
877
|
+
.split('\n');
|
|
878
|
+
const lines = newContentLines.length === 0 ? [''] : newContentLines;
|
|
879
|
+
const lastNewLineIndex = lines.length - 1;
|
|
880
|
+
return {
|
|
881
|
+
...nextState,
|
|
882
|
+
lines,
|
|
883
|
+
cursorRow: lastNewLineIndex,
|
|
884
|
+
cursorCol: cpLen(lines[lastNewLineIndex] ?? ''),
|
|
885
|
+
preferredCol: null,
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
case 'insert': {
|
|
889
|
+
const nextState = pushUndoLocal(state);
|
|
890
|
+
const newLines = [...nextState.lines];
|
|
891
|
+
let newCursorRow = nextState.cursorRow;
|
|
892
|
+
let newCursorCol = nextState.cursorCol;
|
|
893
|
+
const currentLine = (r) => newLines[r] ?? '';
|
|
894
|
+
const str = stripUnsafeCharacters(action.payload.replace(/\r\n/g, '\n').replace(/\r/g, '\n'));
|
|
895
|
+
const parts = str.split('\n');
|
|
896
|
+
const lineContent = currentLine(newCursorRow);
|
|
897
|
+
const before = cpSlice(lineContent, 0, newCursorCol);
|
|
898
|
+
const after = cpSlice(lineContent, newCursorCol);
|
|
899
|
+
if (parts.length > 1) {
|
|
900
|
+
newLines[newCursorRow] = before + parts[0];
|
|
901
|
+
const remainingParts = parts.slice(1);
|
|
902
|
+
const lastPartOriginal = remainingParts.pop() ?? '';
|
|
903
|
+
newLines.splice(newCursorRow + 1, 0, ...remainingParts);
|
|
904
|
+
newLines.splice(newCursorRow + parts.length - 1, 0, lastPartOriginal + after);
|
|
905
|
+
newCursorRow = newCursorRow + parts.length - 1;
|
|
906
|
+
newCursorCol = cpLen(lastPartOriginal);
|
|
907
|
+
}
|
|
908
|
+
else {
|
|
909
|
+
newLines[newCursorRow] = before + parts[0] + after;
|
|
910
|
+
newCursorCol = cpLen(before) + cpLen(parts[0]);
|
|
911
|
+
}
|
|
912
|
+
return {
|
|
913
|
+
...nextState,
|
|
914
|
+
lines: newLines,
|
|
915
|
+
cursorRow: newCursorRow,
|
|
916
|
+
cursorCol: newCursorCol,
|
|
917
|
+
preferredCol: null,
|
|
918
|
+
};
|
|
919
|
+
}
|
|
920
|
+
case 'backspace': {
|
|
921
|
+
const nextState = pushUndoLocal(state);
|
|
922
|
+
const newLines = [...nextState.lines];
|
|
923
|
+
let newCursorRow = nextState.cursorRow;
|
|
924
|
+
let newCursorCol = nextState.cursorCol;
|
|
925
|
+
const currentLine = (r) => newLines[r] ?? '';
|
|
926
|
+
if (newCursorCol === 0 && newCursorRow === 0)
|
|
927
|
+
return state;
|
|
928
|
+
if (newCursorCol > 0) {
|
|
929
|
+
const lineContent = currentLine(newCursorRow);
|
|
930
|
+
newLines[newCursorRow] =
|
|
931
|
+
cpSlice(lineContent, 0, newCursorCol - 1) +
|
|
932
|
+
cpSlice(lineContent, newCursorCol);
|
|
933
|
+
newCursorCol--;
|
|
934
|
+
}
|
|
935
|
+
else if (newCursorRow > 0) {
|
|
936
|
+
const prevLineContent = currentLine(newCursorRow - 1);
|
|
937
|
+
const currentLineContentVal = currentLine(newCursorRow);
|
|
938
|
+
const newCol = cpLen(prevLineContent);
|
|
939
|
+
newLines[newCursorRow - 1] = prevLineContent + currentLineContentVal;
|
|
940
|
+
newLines.splice(newCursorRow, 1);
|
|
941
|
+
newCursorRow--;
|
|
942
|
+
newCursorCol = newCol;
|
|
943
|
+
}
|
|
944
|
+
return {
|
|
945
|
+
...nextState,
|
|
946
|
+
lines: newLines,
|
|
947
|
+
cursorRow: newCursorRow,
|
|
948
|
+
cursorCol: newCursorCol,
|
|
949
|
+
preferredCol: null,
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
case 'set_viewport': {
|
|
953
|
+
const { width, height } = action.payload;
|
|
954
|
+
if (width === state.viewportWidth && height === state.viewportHeight) {
|
|
955
|
+
return state;
|
|
956
|
+
}
|
|
957
|
+
return {
|
|
958
|
+
...state,
|
|
959
|
+
viewportWidth: width,
|
|
960
|
+
viewportHeight: height,
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
case 'move': {
|
|
964
|
+
const { dir } = action.payload;
|
|
965
|
+
const { cursorRow, cursorCol, lines, visualLayout, preferredCol } = state;
|
|
966
|
+
// Visual movements
|
|
967
|
+
if (dir === 'left' ||
|
|
968
|
+
dir === 'right' ||
|
|
969
|
+
dir === 'up' ||
|
|
970
|
+
dir === 'down' ||
|
|
971
|
+
dir === 'home' ||
|
|
972
|
+
dir === 'end') {
|
|
973
|
+
const visualCursor = calculateVisualCursorFromLayout(visualLayout, [
|
|
974
|
+
cursorRow,
|
|
975
|
+
cursorCol,
|
|
976
|
+
]);
|
|
977
|
+
const { visualLines, visualToLogicalMap } = visualLayout;
|
|
978
|
+
let newVisualRow = visualCursor[0];
|
|
979
|
+
let newVisualCol = visualCursor[1];
|
|
980
|
+
let newPreferredCol = preferredCol;
|
|
981
|
+
const currentVisLineLen = cpLen(visualLines[newVisualRow] ?? '');
|
|
982
|
+
switch (dir) {
|
|
983
|
+
case 'left':
|
|
984
|
+
newPreferredCol = null;
|
|
985
|
+
if (newVisualCol > 0) {
|
|
986
|
+
newVisualCol--;
|
|
987
|
+
}
|
|
988
|
+
else if (newVisualRow > 0) {
|
|
989
|
+
newVisualRow--;
|
|
990
|
+
newVisualCol = cpLen(visualLines[newVisualRow] ?? '');
|
|
991
|
+
const previousMapping = visualToLogicalMap[newVisualRow];
|
|
992
|
+
if (previousMapping) {
|
|
993
|
+
const [previousLogRow, previousLogStartCol] = previousMapping;
|
|
994
|
+
const previousCursorCol = previousLogStartCol + newVisualCol;
|
|
995
|
+
if (previousLogRow === cursorRow &&
|
|
996
|
+
previousCursorCol === cursorCol &&
|
|
997
|
+
newVisualCol > 0) {
|
|
998
|
+
newVisualCol--;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
break;
|
|
1003
|
+
case 'right':
|
|
1004
|
+
// No stall-fix needed here (unlike 'left' above): the cursor
|
|
1005
|
+
// resolver (calculateVisualCursorFromLayout) selects segments with
|
|
1006
|
+
// a strict `logicalCol < nextStartColInLogical`, so a cursor at a
|
|
1007
|
+
// hard-wrap boundary always lands at the START of the next visual
|
|
1008
|
+
// row, not the end of the current one — wrapping right never maps
|
|
1009
|
+
// back to the same logical position. If that segment selection ever
|
|
1010
|
+
// changes (e.g. `<` → `<=`), a symmetric decrement would be needed
|
|
1011
|
+
// here to avoid a mirror-image right-movement stall.
|
|
1012
|
+
newPreferredCol = null;
|
|
1013
|
+
if (newVisualCol < currentVisLineLen) {
|
|
1014
|
+
newVisualCol++;
|
|
1015
|
+
}
|
|
1016
|
+
else if (newVisualRow < visualLines.length - 1) {
|
|
1017
|
+
newVisualRow++;
|
|
1018
|
+
newVisualCol = 0;
|
|
1019
|
+
}
|
|
1020
|
+
break;
|
|
1021
|
+
case 'up':
|
|
1022
|
+
if (newVisualRow > 0) {
|
|
1023
|
+
if (newPreferredCol === null)
|
|
1024
|
+
newPreferredCol = newVisualCol;
|
|
1025
|
+
newVisualRow--;
|
|
1026
|
+
newVisualCol = clamp(newPreferredCol, 0, cpLen(visualLines[newVisualRow] ?? ''));
|
|
1027
|
+
}
|
|
1028
|
+
break;
|
|
1029
|
+
case 'down':
|
|
1030
|
+
if (newVisualRow < visualLines.length - 1) {
|
|
1031
|
+
if (newPreferredCol === null)
|
|
1032
|
+
newPreferredCol = newVisualCol;
|
|
1033
|
+
newVisualRow++;
|
|
1034
|
+
newVisualCol = clamp(newPreferredCol, 0, cpLen(visualLines[newVisualRow] ?? ''));
|
|
1035
|
+
}
|
|
1036
|
+
break;
|
|
1037
|
+
case 'home':
|
|
1038
|
+
newPreferredCol = null;
|
|
1039
|
+
newVisualCol = 0;
|
|
1040
|
+
break;
|
|
1041
|
+
case 'end':
|
|
1042
|
+
newPreferredCol = null;
|
|
1043
|
+
newVisualCol = currentVisLineLen;
|
|
1044
|
+
break;
|
|
1045
|
+
default: {
|
|
1046
|
+
const exhaustiveCheck = dir;
|
|
1047
|
+
debugLogger.error(`Unknown visual movement direction: ${exhaustiveCheck}`);
|
|
1048
|
+
return state;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
if (visualToLogicalMap[newVisualRow]) {
|
|
1052
|
+
const [logRow, logStartCol] = visualToLogicalMap[newVisualRow];
|
|
1053
|
+
return {
|
|
1054
|
+
...state,
|
|
1055
|
+
cursorRow: logRow,
|
|
1056
|
+
cursorCol: clamp(logStartCol + newVisualCol, 0, cpLen(lines[logRow] ?? '')),
|
|
1057
|
+
preferredCol: newPreferredCol,
|
|
1058
|
+
};
|
|
1059
|
+
}
|
|
1060
|
+
return state;
|
|
1061
|
+
}
|
|
1062
|
+
// Logical movements
|
|
1063
|
+
switch (dir) {
|
|
1064
|
+
case 'wordLeft': {
|
|
1065
|
+
if (cursorCol === 0 && cursorRow === 0)
|
|
1066
|
+
return state;
|
|
1067
|
+
let newCursorRow = cursorRow;
|
|
1068
|
+
let newCursorCol = cursorCol;
|
|
1069
|
+
if (cursorCol === 0) {
|
|
1070
|
+
// At start of line, move to end of previous line
|
|
1071
|
+
newCursorRow--;
|
|
1072
|
+
newCursorCol = cpLen(lines[newCursorRow] ?? '');
|
|
1073
|
+
}
|
|
1074
|
+
else {
|
|
1075
|
+
const lineContent = lines[cursorRow];
|
|
1076
|
+
const arr = toCodePoints(lineContent);
|
|
1077
|
+
let start = cursorCol;
|
|
1078
|
+
// Try CJK segmentation first for lines containing CJK
|
|
1079
|
+
const boundaries = getWordBoundaries(lineContent, arr);
|
|
1080
|
+
const startBoundary = findPrevWordStart(boundaries, start);
|
|
1081
|
+
if (startBoundary !== null) {
|
|
1082
|
+
start = startBoundary;
|
|
1083
|
+
}
|
|
1084
|
+
else {
|
|
1085
|
+
// Fallback: word boundary detection
|
|
1086
|
+
// Check if we're in a whitespace-only prefix before any word
|
|
1087
|
+
let onlySpaces = true;
|
|
1088
|
+
for (let i = 0; i < start; i++) {
|
|
1089
|
+
if (isWordCharStrict(arr[i] ?? '')) {
|
|
1090
|
+
onlySpaces = false;
|
|
1091
|
+
break;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
if (onlySpaces) {
|
|
1095
|
+
// All characters before cursor are whitespace/special
|
|
1096
|
+
// Jump to column 0 (start of line)
|
|
1097
|
+
start = 0;
|
|
1098
|
+
}
|
|
1099
|
+
else {
|
|
1100
|
+
// First: skip backwards over non-word characters (punctuation)
|
|
1101
|
+
while (start > 0 && !isWordCharStrict(arr[start - 1] ?? ''))
|
|
1102
|
+
start--;
|
|
1103
|
+
// Then: move to the start of the current word
|
|
1104
|
+
// For CJK text (same script), treat each character as a word
|
|
1105
|
+
while (start > 0) {
|
|
1106
|
+
const prevChar = arr[start - 1];
|
|
1107
|
+
const currChar = arr[start];
|
|
1108
|
+
if (!isWordCharStrict(prevChar ?? '') ||
|
|
1109
|
+
(isWordCharStrict(currChar ?? '') &&
|
|
1110
|
+
isDifferentScript(currChar ?? '', prevChar ?? ''))) {
|
|
1111
|
+
break;
|
|
1112
|
+
}
|
|
1113
|
+
// If current and previous are both CJK (same script), stop here
|
|
1114
|
+
// so each CJK character becomes its own word
|
|
1115
|
+
if (isCjkChar(currChar ?? '') && isCjkChar(prevChar ?? '')) {
|
|
1116
|
+
break;
|
|
1117
|
+
}
|
|
1118
|
+
start--;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
newCursorCol = start;
|
|
1123
|
+
}
|
|
1124
|
+
return {
|
|
1125
|
+
...state,
|
|
1126
|
+
cursorRow: newCursorRow,
|
|
1127
|
+
cursorCol: newCursorCol,
|
|
1128
|
+
preferredCol: null,
|
|
1129
|
+
};
|
|
1130
|
+
}
|
|
1131
|
+
case 'wordRight': {
|
|
1132
|
+
if (cursorRow === lines.length - 1 &&
|
|
1133
|
+
cursorCol === cpLen(lines[cursorRow] ?? '')) {
|
|
1134
|
+
return state;
|
|
1135
|
+
}
|
|
1136
|
+
let newCursorRow = cursorRow;
|
|
1137
|
+
let newCursorCol = cursorCol;
|
|
1138
|
+
const lineContent = lines[cursorRow] ?? '';
|
|
1139
|
+
const arr = toCodePoints(lineContent);
|
|
1140
|
+
if (cursorCol >= arr.length) {
|
|
1141
|
+
newCursorRow++;
|
|
1142
|
+
newCursorCol = 0;
|
|
1143
|
+
}
|
|
1144
|
+
else {
|
|
1145
|
+
// Try segmentation first for lines containing CJK
|
|
1146
|
+
const boundaries = getWordBoundaries(lineContent, arr);
|
|
1147
|
+
const endBoundary = findNextWordEnd(boundaries, cursorCol);
|
|
1148
|
+
let end;
|
|
1149
|
+
if (endBoundary !== null) {
|
|
1150
|
+
end = endBoundary;
|
|
1151
|
+
// Modern editor behavior: skip whitespace to land on next word's start
|
|
1152
|
+
while (end < arr.length && isWhitespace(arr[end] ?? '')) {
|
|
1153
|
+
end++;
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
else if (cursorCol < arr.length &&
|
|
1157
|
+
!isWordCharStrict(arr[cursorCol] ?? '')) {
|
|
1158
|
+
// Cursor is on non-word character (space/punctuation)
|
|
1159
|
+
// Skip over non-word characters first, then find next word end
|
|
1160
|
+
end = cursorCol;
|
|
1161
|
+
while (end < arr.length && !isWordCharStrict(arr[end] ?? ''))
|
|
1162
|
+
end++;
|
|
1163
|
+
// Now find the end of the word we just reached
|
|
1164
|
+
if (end < arr.length) {
|
|
1165
|
+
// Check if boundaries cover this new position
|
|
1166
|
+
const nextEnd = findNextWordEnd(boundaries, end);
|
|
1167
|
+
if (nextEnd !== null) {
|
|
1168
|
+
end = nextEnd;
|
|
1169
|
+
}
|
|
1170
|
+
else {
|
|
1171
|
+
end = findWordEndFallback(arr, end);
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
else {
|
|
1176
|
+
// Fallback: word boundary detection
|
|
1177
|
+
end = cursorCol;
|
|
1178
|
+
// Skip over non-word characters (punctuation/whitespace)
|
|
1179
|
+
while (end < arr.length && !isWordCharStrict(arr[end] ?? ''))
|
|
1180
|
+
end++;
|
|
1181
|
+
end = findWordEndFallback(arr, end);
|
|
1182
|
+
}
|
|
1183
|
+
newCursorCol = end;
|
|
1184
|
+
}
|
|
1185
|
+
return {
|
|
1186
|
+
...state,
|
|
1187
|
+
cursorRow: newCursorRow,
|
|
1188
|
+
cursorCol: newCursorCol,
|
|
1189
|
+
preferredCol: null,
|
|
1190
|
+
};
|
|
1191
|
+
}
|
|
1192
|
+
default:
|
|
1193
|
+
return state;
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
case 'set_cursor': {
|
|
1197
|
+
return {
|
|
1198
|
+
...state,
|
|
1199
|
+
...action.payload,
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
case 'delete': {
|
|
1203
|
+
const { cursorRow, cursorCol, lines } = state;
|
|
1204
|
+
const lineContent = currentLine(cursorRow);
|
|
1205
|
+
if (cursorCol < currentLineLen(cursorRow)) {
|
|
1206
|
+
const nextState = pushUndoLocal(state);
|
|
1207
|
+
const newLines = [...nextState.lines];
|
|
1208
|
+
newLines[cursorRow] =
|
|
1209
|
+
cpSlice(lineContent, 0, cursorCol) +
|
|
1210
|
+
cpSlice(lineContent, cursorCol + 1);
|
|
1211
|
+
return {
|
|
1212
|
+
...nextState,
|
|
1213
|
+
lines: newLines,
|
|
1214
|
+
preferredCol: null,
|
|
1215
|
+
};
|
|
1216
|
+
}
|
|
1217
|
+
else if (cursorRow < lines.length - 1) {
|
|
1218
|
+
const nextState = pushUndoLocal(state);
|
|
1219
|
+
const nextLineContent = currentLine(cursorRow + 1);
|
|
1220
|
+
const newLines = [...nextState.lines];
|
|
1221
|
+
newLines[cursorRow] = lineContent + nextLineContent;
|
|
1222
|
+
newLines.splice(cursorRow + 1, 1);
|
|
1223
|
+
return {
|
|
1224
|
+
...nextState,
|
|
1225
|
+
lines: newLines,
|
|
1226
|
+
preferredCol: null,
|
|
1227
|
+
};
|
|
1228
|
+
}
|
|
1229
|
+
return state;
|
|
1230
|
+
}
|
|
1231
|
+
case 'delete_word_left': {
|
|
1232
|
+
const { cursorRow, cursorCol } = state;
|
|
1233
|
+
if (cursorCol === 0 && cursorRow === 0)
|
|
1234
|
+
return state;
|
|
1235
|
+
const nextState = pushUndoLocal(state);
|
|
1236
|
+
const newLines = [...nextState.lines];
|
|
1237
|
+
let newCursorRow = cursorRow;
|
|
1238
|
+
let newCursorCol = cursorCol;
|
|
1239
|
+
if (newCursorCol > 0) {
|
|
1240
|
+
const lineContent = currentLine(newCursorRow);
|
|
1241
|
+
const arr = toCodePoints(lineContent);
|
|
1242
|
+
// Try segmentation first
|
|
1243
|
+
const boundaries = getWordBoundaries(lineContent, arr);
|
|
1244
|
+
const startBoundary = findPrevWordStart(boundaries, newCursorCol);
|
|
1245
|
+
let start;
|
|
1246
|
+
if (startBoundary !== null) {
|
|
1247
|
+
start = startBoundary;
|
|
1248
|
+
}
|
|
1249
|
+
else {
|
|
1250
|
+
const prevWordStart = findPrevWordStartInLine(lineContent, newCursorCol);
|
|
1251
|
+
start = prevWordStart === null ? 0 : prevWordStart;
|
|
1252
|
+
}
|
|
1253
|
+
newLines[newCursorRow] =
|
|
1254
|
+
cpSlice(lineContent, 0, start) + cpSlice(lineContent, newCursorCol);
|
|
1255
|
+
newCursorCol = start;
|
|
1256
|
+
}
|
|
1257
|
+
else {
|
|
1258
|
+
// Act as a backspace
|
|
1259
|
+
const prevLineContent = currentLine(cursorRow - 1);
|
|
1260
|
+
const currentLineContentVal = currentLine(cursorRow);
|
|
1261
|
+
const newCol = cpLen(prevLineContent);
|
|
1262
|
+
newLines[cursorRow - 1] = prevLineContent + currentLineContentVal;
|
|
1263
|
+
newLines.splice(cursorRow, 1);
|
|
1264
|
+
newCursorRow--;
|
|
1265
|
+
newCursorCol = newCol;
|
|
1266
|
+
}
|
|
1267
|
+
return {
|
|
1268
|
+
...nextState,
|
|
1269
|
+
lines: newLines,
|
|
1270
|
+
cursorRow: newCursorRow,
|
|
1271
|
+
cursorCol: newCursorCol,
|
|
1272
|
+
preferredCol: null,
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
case 'delete_word_right': {
|
|
1276
|
+
const { cursorRow, cursorCol, lines } = state;
|
|
1277
|
+
const lineContent = currentLine(cursorRow);
|
|
1278
|
+
const lineLen = cpLen(lineContent);
|
|
1279
|
+
if (cursorCol >= lineLen && cursorRow === lines.length - 1) {
|
|
1280
|
+
return state;
|
|
1281
|
+
}
|
|
1282
|
+
const nextState = pushUndoLocal(state);
|
|
1283
|
+
const newLines = [...nextState.lines];
|
|
1284
|
+
if (cursorCol >= lineLen) {
|
|
1285
|
+
// Act as a delete, joining with the next line
|
|
1286
|
+
const nextLineContent = currentLine(cursorRow + 1);
|
|
1287
|
+
newLines[cursorRow] = lineContent + nextLineContent;
|
|
1288
|
+
newLines.splice(cursorRow + 1, 1);
|
|
1289
|
+
}
|
|
1290
|
+
else {
|
|
1291
|
+
const arr = toCodePoints(lineContent);
|
|
1292
|
+
// Try segmentation first
|
|
1293
|
+
const boundaries = getWordBoundaries(lineContent, arr);
|
|
1294
|
+
const endBoundary = findNextWordEnd(boundaries, cursorCol);
|
|
1295
|
+
let end;
|
|
1296
|
+
if (endBoundary !== null) {
|
|
1297
|
+
end = endBoundary;
|
|
1298
|
+
// Skip over any whitespace after the word to reach next word's start
|
|
1299
|
+
while (end < arr.length && isWhitespace(arr[end] ?? '')) {
|
|
1300
|
+
end++;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
else {
|
|
1304
|
+
const nextWordStart = findNextWordStartInLine(lineContent, cursorCol);
|
|
1305
|
+
end = nextWordStart === null ? lineLen : nextWordStart;
|
|
1306
|
+
}
|
|
1307
|
+
newLines[cursorRow] =
|
|
1308
|
+
cpSlice(lineContent, 0, cursorCol) + cpSlice(lineContent, end);
|
|
1309
|
+
}
|
|
1310
|
+
return {
|
|
1311
|
+
...nextState,
|
|
1312
|
+
lines: newLines,
|
|
1313
|
+
preferredCol: null,
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1316
|
+
case 'kill_line_right': {
|
|
1317
|
+
const { cursorRow, cursorCol, lines } = state;
|
|
1318
|
+
const lineContent = currentLine(cursorRow);
|
|
1319
|
+
if (cursorCol < currentLineLen(cursorRow)) {
|
|
1320
|
+
const nextState = pushUndoLocal(state);
|
|
1321
|
+
const newLines = [...nextState.lines];
|
|
1322
|
+
newLines[cursorRow] = cpSlice(lineContent, 0, cursorCol);
|
|
1323
|
+
return {
|
|
1324
|
+
...nextState,
|
|
1325
|
+
lines: newLines,
|
|
1326
|
+
};
|
|
1327
|
+
}
|
|
1328
|
+
else if (cursorRow < lines.length - 1) {
|
|
1329
|
+
// Act as a delete
|
|
1330
|
+
const nextState = pushUndoLocal(state);
|
|
1331
|
+
const nextLineContent = currentLine(cursorRow + 1);
|
|
1332
|
+
const newLines = [...nextState.lines];
|
|
1333
|
+
newLines[cursorRow] = lineContent + nextLineContent;
|
|
1334
|
+
newLines.splice(cursorRow + 1, 1);
|
|
1335
|
+
return {
|
|
1336
|
+
...nextState,
|
|
1337
|
+
lines: newLines,
|
|
1338
|
+
preferredCol: null,
|
|
1339
|
+
};
|
|
1340
|
+
}
|
|
1341
|
+
return state;
|
|
1342
|
+
}
|
|
1343
|
+
case 'kill_line_left': {
|
|
1344
|
+
const { cursorRow, cursorCol } = state;
|
|
1345
|
+
if (cursorCol > 0) {
|
|
1346
|
+
const nextState = pushUndoLocal(state);
|
|
1347
|
+
const lineContent = currentLine(cursorRow);
|
|
1348
|
+
const newLines = [...nextState.lines];
|
|
1349
|
+
newLines[cursorRow] = cpSlice(lineContent, cursorCol);
|
|
1350
|
+
return {
|
|
1351
|
+
...nextState,
|
|
1352
|
+
lines: newLines,
|
|
1353
|
+
cursorCol: 0,
|
|
1354
|
+
preferredCol: null,
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1357
|
+
return state;
|
|
1358
|
+
}
|
|
1359
|
+
case 'undo': {
|
|
1360
|
+
const stateToRestore = state.undoStack[state.undoStack.length - 1];
|
|
1361
|
+
if (!stateToRestore)
|
|
1362
|
+
return state;
|
|
1363
|
+
const currentSnapshot = {
|
|
1364
|
+
lines: [...state.lines],
|
|
1365
|
+
cursorRow: state.cursorRow,
|
|
1366
|
+
cursorCol: state.cursorCol,
|
|
1367
|
+
};
|
|
1368
|
+
return {
|
|
1369
|
+
...state,
|
|
1370
|
+
...stateToRestore,
|
|
1371
|
+
undoStack: state.undoStack.slice(0, -1),
|
|
1372
|
+
redoStack: [...state.redoStack, currentSnapshot],
|
|
1373
|
+
};
|
|
1374
|
+
}
|
|
1375
|
+
case 'redo': {
|
|
1376
|
+
const stateToRestore = state.redoStack[state.redoStack.length - 1];
|
|
1377
|
+
if (!stateToRestore)
|
|
1378
|
+
return state;
|
|
1379
|
+
const currentSnapshot = {
|
|
1380
|
+
lines: [...state.lines],
|
|
1381
|
+
cursorRow: state.cursorRow,
|
|
1382
|
+
cursorCol: state.cursorCol,
|
|
1383
|
+
};
|
|
1384
|
+
return {
|
|
1385
|
+
...state,
|
|
1386
|
+
...stateToRestore,
|
|
1387
|
+
redoStack: state.redoStack.slice(0, -1),
|
|
1388
|
+
undoStack: [...state.undoStack, currentSnapshot],
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1391
|
+
case 'replace_range': {
|
|
1392
|
+
const { startRow, startCol, endRow, endCol, text } = action.payload;
|
|
1393
|
+
const nextState = pushUndoLocal(state);
|
|
1394
|
+
return replaceRangeInternal(nextState, startRow, startCol, endRow, endCol, text);
|
|
1395
|
+
}
|
|
1396
|
+
case 'move_to_offset': {
|
|
1397
|
+
const { offset } = action.payload;
|
|
1398
|
+
const [newRow, newCol] = offsetToLogicalPos(state.lines.join('\n'), offset);
|
|
1399
|
+
return {
|
|
1400
|
+
...state,
|
|
1401
|
+
cursorRow: newRow,
|
|
1402
|
+
cursorCol: newCol,
|
|
1403
|
+
preferredCol: null,
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
case 'create_undo_snapshot': {
|
|
1407
|
+
return pushUndoLocal(state);
|
|
1408
|
+
}
|
|
1409
|
+
// Vim-specific operations
|
|
1410
|
+
case 'vim_delete_word_forward':
|
|
1411
|
+
case 'vim_delete_word_backward':
|
|
1412
|
+
case 'vim_delete_word_end':
|
|
1413
|
+
case 'vim_change_word_forward':
|
|
1414
|
+
case 'vim_change_word_backward':
|
|
1415
|
+
case 'vim_change_word_end':
|
|
1416
|
+
case 'vim_delete_line':
|
|
1417
|
+
case 'vim_change_line':
|
|
1418
|
+
case 'vim_delete_to_end_of_line':
|
|
1419
|
+
case 'vim_change_to_end_of_line':
|
|
1420
|
+
case 'vim_change_movement':
|
|
1421
|
+
case 'vim_delete_movement':
|
|
1422
|
+
case 'vim_move_left':
|
|
1423
|
+
case 'vim_move_right':
|
|
1424
|
+
case 'vim_move_up':
|
|
1425
|
+
case 'vim_move_down':
|
|
1426
|
+
case 'vim_move_word_forward':
|
|
1427
|
+
case 'vim_move_word_backward':
|
|
1428
|
+
case 'vim_move_word_end':
|
|
1429
|
+
case 'vim_delete_char':
|
|
1430
|
+
case 'vim_insert_at_cursor':
|
|
1431
|
+
case 'vim_append_at_cursor':
|
|
1432
|
+
case 'vim_open_line_below':
|
|
1433
|
+
case 'vim_open_line_above':
|
|
1434
|
+
case 'vim_append_at_line_end':
|
|
1435
|
+
case 'vim_insert_at_line_start':
|
|
1436
|
+
case 'vim_move_to_line_start':
|
|
1437
|
+
case 'vim_move_to_line_end':
|
|
1438
|
+
case 'vim_move_to_first_nonwhitespace':
|
|
1439
|
+
case 'vim_move_to_first_line':
|
|
1440
|
+
case 'vim_move_to_last_line':
|
|
1441
|
+
case 'vim_move_to_line':
|
|
1442
|
+
case 'vim_escape_insert_mode':
|
|
1443
|
+
return handleVimAction(state, action);
|
|
1444
|
+
default: {
|
|
1445
|
+
const exhaustiveCheck = action;
|
|
1446
|
+
debugLogger.error(`Unknown action encountered: ${exhaustiveCheck}`);
|
|
1447
|
+
return state;
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
export function textBufferReducer(state, action) {
|
|
1452
|
+
const newState = textBufferReducerLogic(state, action);
|
|
1453
|
+
if (newState.lines !== state.lines ||
|
|
1454
|
+
newState.viewportWidth !== state.viewportWidth) {
|
|
1455
|
+
return {
|
|
1456
|
+
...newState,
|
|
1457
|
+
visualLayout: calculateLayout(newState.lines, newState.viewportWidth),
|
|
1458
|
+
};
|
|
1459
|
+
}
|
|
1460
|
+
return newState;
|
|
1461
|
+
}
|
|
1462
|
+
// --- End of reducer logic ---
|
|
1463
|
+
// --- Path extraction helpers (pure functions, outside useTextBuffer) ---
|
|
1464
|
+
/**
|
|
1465
|
+
* Check if a string looks like a path prefix (starts with /, ./, ../, ~/, ., .., or drive letter).
|
|
1466
|
+
* Strips surrounding quotes first to handle quoted paths.
|
|
1467
|
+
* Used to pre-filter tokens before expensive fs calls.
|
|
1468
|
+
*/
|
|
1469
|
+
function looksLikePath(str) {
|
|
1470
|
+
// Strip surrounding quotes first to handle quoted paths
|
|
1471
|
+
const unquoted = str.replace(/^'(.*)'$/, '$1');
|
|
1472
|
+
// Also handle tokens that are the start of a quoted path split by whitespace
|
|
1473
|
+
const inner = unquoted.startsWith("'") ? unquoted.slice(1) : unquoted;
|
|
1474
|
+
return (inner.startsWith('/') ||
|
|
1475
|
+
inner.startsWith('./') ||
|
|
1476
|
+
inner.startsWith('../') ||
|
|
1477
|
+
inner.startsWith('~/') ||
|
|
1478
|
+
inner.startsWith('.') ||
|
|
1479
|
+
/^[A-Za-z]:/.test(inner));
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* Extract file paths from content and prepend @ prefix.
|
|
1483
|
+
* Handles quoted paths, unquoted paths, whitespace-separated, and newline-separated.
|
|
1484
|
+
* Supports file paths with spaces using greedy matching.
|
|
1485
|
+
* IMPORTANT: Escapes shell-special characters (spaces, commas, parentheses,
|
|
1486
|
+
* brackets, semicolons, etc.) with backslash so that the downstream
|
|
1487
|
+
* `parseAllAtCommands` parser correctly includes the entire path.
|
|
1488
|
+
*
|
|
1489
|
+
* Only transforms when ALL non-whitespace tokens are valid paths. If any
|
|
1490
|
+
* non-path, non-separator token exists, returns null to preserve original
|
|
1491
|
+
* content (prevents silent data loss).
|
|
1492
|
+
*/
|
|
1493
|
+
function tryExtractFilePaths(content, isValidPath) {
|
|
1494
|
+
const normalized = content.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
1495
|
+
const lines = normalized.split(/\n/).filter((s) => s.trim().length > 0);
|
|
1496
|
+
const validPaths = [];
|
|
1497
|
+
const hadNonPathToken = { value: false };
|
|
1498
|
+
for (const line of lines) {
|
|
1499
|
+
// Short-circuit: once any token is flagged as non-path, the result will be null
|
|
1500
|
+
if (hadNonPathToken.value)
|
|
1501
|
+
break;
|
|
1502
|
+
// Use a regex that only matches quoted content starting with path-like chars
|
|
1503
|
+
// to avoid false matches on English contractions (e.g., "don't").
|
|
1504
|
+
const quotedPathRegex = /'((?:[~/.]|[A-Za-z]:)[^']*)'/g;
|
|
1505
|
+
let lastIndex = 0;
|
|
1506
|
+
let match;
|
|
1507
|
+
let hasQuotedPaths = false;
|
|
1508
|
+
while ((match = quotedPathRegex.exec(line)) !== null) {
|
|
1509
|
+
const gap = line.slice(lastIndex, match.index).trim();
|
|
1510
|
+
if (gap) {
|
|
1511
|
+
const gapPaths = extractPathsFromSegment(gap, isValidPath, hadNonPathToken);
|
|
1512
|
+
validPaths.push(...gapPaths);
|
|
1513
|
+
}
|
|
1514
|
+
const unescaped = unescapePath(match[1]);
|
|
1515
|
+
if (isValidPath(unescaped)) {
|
|
1516
|
+
validPaths.push(`@${escapePath(unescaped)}`);
|
|
1517
|
+
}
|
|
1518
|
+
else {
|
|
1519
|
+
// Quoted path found but not a valid path — mark as non-path
|
|
1520
|
+
hadNonPathToken.value = true;
|
|
1521
|
+
}
|
|
1522
|
+
lastIndex = quotedPathRegex.lastIndex;
|
|
1523
|
+
hasQuotedPaths = true;
|
|
1524
|
+
}
|
|
1525
|
+
if (hasQuotedPaths) {
|
|
1526
|
+
const trailing = line.slice(lastIndex).trim();
|
|
1527
|
+
if (trailing) {
|
|
1528
|
+
const trailingPaths = extractPathsFromSegment(trailing, isValidPath, hadNonPathToken);
|
|
1529
|
+
validPaths.push(...trailingPaths);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
else {
|
|
1533
|
+
const linePaths = extractPathsFromSegment(line.trim(), isValidPath, hadNonPathToken);
|
|
1534
|
+
validPaths.push(...linePaths);
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
// Only return paths if we extracted at least one AND the content looks like
|
|
1538
|
+
// a pure list of paths (all non-whitespace tokens are valid paths).
|
|
1539
|
+
// This prevents silent data loss when pasting prose mixed with paths.
|
|
1540
|
+
if (validPaths.length > 0 && !hadNonPathToken.value) {
|
|
1541
|
+
return validPaths;
|
|
1542
|
+
}
|
|
1543
|
+
return null;
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Extract file paths from a whitespace-separated segment.
|
|
1547
|
+
* Tries longest possible path first (greedy) so paths with spaces are matched
|
|
1548
|
+
* before shorter prefixes.
|
|
1549
|
+
* Pre-filters tokens that don't look like paths to avoid O(n²) fs calls.
|
|
1550
|
+
* Sets `hadNonPathToken` to true if any token was skipped (not a valid path).
|
|
1551
|
+
*/
|
|
1552
|
+
function extractPathsFromSegment(segment, isValidPath, hadNonPathToken) {
|
|
1553
|
+
const tokens = segment.split(/\s+/).filter(Boolean);
|
|
1554
|
+
const paths = [];
|
|
1555
|
+
let i = 0;
|
|
1556
|
+
while (i < tokens.length) {
|
|
1557
|
+
// Short-circuit: once any token is flagged as non-path, the result will be null
|
|
1558
|
+
if (hadNonPathToken.value)
|
|
1559
|
+
break;
|
|
1560
|
+
// Pre-filter: skip tokens that can't possibly be paths.
|
|
1561
|
+
// For single-token segments, let isValidPath decide (preserves
|
|
1562
|
+
// old behavior for bare filenames like README.md).
|
|
1563
|
+
if (tokens.length > 1 && !looksLikePath(tokens[i])) {
|
|
1564
|
+
hadNonPathToken.value = true;
|
|
1565
|
+
i++;
|
|
1566
|
+
continue;
|
|
1567
|
+
}
|
|
1568
|
+
let found = false;
|
|
1569
|
+
// Try longest-match-first so paths with spaces are tried before shorter
|
|
1570
|
+
// prefixes (e.g., "/tmp/a b.txt" before "/tmp/a").
|
|
1571
|
+
for (let j = tokens.length; j >= i + 1; j--) {
|
|
1572
|
+
const candidate = tokens.slice(i, j).join(' ');
|
|
1573
|
+
let unquoted = candidate;
|
|
1574
|
+
const quoteMatch = unquoted.match(/^'(.*)'$/);
|
|
1575
|
+
if (quoteMatch) {
|
|
1576
|
+
unquoted = quoteMatch[1];
|
|
1577
|
+
}
|
|
1578
|
+
const unescaped = unescapePath(unquoted);
|
|
1579
|
+
if (isValidPath(unescaped)) {
|
|
1580
|
+
paths.push(`@${escapePath(unescaped)}`);
|
|
1581
|
+
i = j;
|
|
1582
|
+
found = true;
|
|
1583
|
+
break;
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
if (!found) {
|
|
1587
|
+
// Token looked like a path but isn't valid — mark as non-path
|
|
1588
|
+
hadNonPathToken.value = true;
|
|
1589
|
+
i++;
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
return paths;
|
|
1593
|
+
}
|
|
1594
|
+
export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewport, stdin, setRawMode, onChange, isValidPath, shellModeActive = false, preferredEditor, }) {
|
|
1595
|
+
const initialState = useMemo(() => {
|
|
1596
|
+
const lines = initialText.split('\n');
|
|
1597
|
+
const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(lines.length === 0 ? [''] : lines, initialCursorOffset);
|
|
1598
|
+
const visualLayout = calculateLayout(lines.length === 0 ? [''] : lines, viewport.width);
|
|
1599
|
+
return {
|
|
1600
|
+
lines: lines.length === 0 ? [''] : lines,
|
|
1601
|
+
cursorRow: initialCursorRow,
|
|
1602
|
+
cursorCol: initialCursorCol,
|
|
1603
|
+
preferredCol: null,
|
|
1604
|
+
undoStack: [],
|
|
1605
|
+
redoStack: [],
|
|
1606
|
+
clipboard: null,
|
|
1607
|
+
selectionAnchor: null,
|
|
1608
|
+
viewportWidth: viewport.width,
|
|
1609
|
+
viewportHeight: viewport.height,
|
|
1610
|
+
visualLayout,
|
|
1611
|
+
};
|
|
1612
|
+
}, [initialText, initialCursorOffset, viewport.width, viewport.height]);
|
|
1613
|
+
const stateRef = useRef(initialState);
|
|
1614
|
+
const [state, setState] = useState(initialState);
|
|
1615
|
+
const dispatch = useCallback((action) => {
|
|
1616
|
+
stateRef.current = textBufferReducer(stateRef.current, action);
|
|
1617
|
+
setState(stateRef.current);
|
|
1618
|
+
}, []);
|
|
1619
|
+
const { lines, cursorRow, cursorCol, preferredCol, selectionAnchor, visualLayout, } = state;
|
|
1620
|
+
const text = useMemo(() => lines.join('\n'), [lines]);
|
|
1621
|
+
const visualCursor = useMemo(() => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]), [visualLayout, cursorRow, cursorCol]);
|
|
1622
|
+
const { visualLines, visualToLogicalMap } = visualLayout;
|
|
1623
|
+
const [visualScrollRow, setVisualScrollRow] = useState(0);
|
|
1624
|
+
useEffect(() => {
|
|
1625
|
+
if (onChange) {
|
|
1626
|
+
onChange(text);
|
|
1627
|
+
}
|
|
1628
|
+
}, [text, onChange]);
|
|
1629
|
+
useEffect(() => {
|
|
1630
|
+
dispatch({
|
|
1631
|
+
type: 'set_viewport',
|
|
1632
|
+
payload: { width: viewport.width, height: viewport.height },
|
|
1633
|
+
});
|
|
1634
|
+
}, [dispatch, viewport.width, viewport.height]);
|
|
1635
|
+
// Update visual scroll (vertical)
|
|
1636
|
+
useEffect(() => {
|
|
1637
|
+
const { height } = viewport;
|
|
1638
|
+
const totalVisualLines = visualLines.length;
|
|
1639
|
+
const maxScrollStart = Math.max(0, totalVisualLines - height);
|
|
1640
|
+
let newVisualScrollRow = visualScrollRow;
|
|
1641
|
+
if (visualCursor[0] < visualScrollRow) {
|
|
1642
|
+
newVisualScrollRow = visualCursor[0];
|
|
1643
|
+
}
|
|
1644
|
+
else if (visualCursor[0] >= visualScrollRow + height) {
|
|
1645
|
+
newVisualScrollRow = visualCursor[0] - height + 1;
|
|
1646
|
+
}
|
|
1647
|
+
// When the number of visual lines shrinks (e.g., after widening the viewport),
|
|
1648
|
+
// ensure scroll never starts beyond the last valid start so we can render a full window.
|
|
1649
|
+
newVisualScrollRow = clamp(newVisualScrollRow, 0, maxScrollStart);
|
|
1650
|
+
if (newVisualScrollRow !== visualScrollRow) {
|
|
1651
|
+
setVisualScrollRow(newVisualScrollRow);
|
|
1652
|
+
}
|
|
1653
|
+
}, [visualCursor, visualScrollRow, viewport, visualLines.length]);
|
|
1654
|
+
const insert = useCallback((ch, { paste = false } = {}) => {
|
|
1655
|
+
// Handle pastes that contain newlines (e.g., file paths separated by newlines).
|
|
1656
|
+
// We need to process these before the newline check below, which would
|
|
1657
|
+
// otherwise cause an early return and skip the @-path detection.
|
|
1658
|
+
if (paste && /[\n\r]/.test(ch) && !shellModeActive) {
|
|
1659
|
+
const validPaths = tryExtractFilePaths(ch, isValidPath);
|
|
1660
|
+
if (validPaths) {
|
|
1661
|
+
ch = `${validPaths.join(' ')} `;
|
|
1662
|
+
}
|
|
1663
|
+
dispatch({ type: 'insert', payload: ch });
|
|
1664
|
+
return;
|
|
1665
|
+
}
|
|
1666
|
+
if (/[\n\r]/.test(ch)) {
|
|
1667
|
+
dispatch({ type: 'insert', payload: ch });
|
|
1668
|
+
return;
|
|
1669
|
+
}
|
|
1670
|
+
const minLengthToInferAsDragDrop = 3;
|
|
1671
|
+
if (paste &&
|
|
1672
|
+
ch.length >= minLengthToInferAsDragDrop &&
|
|
1673
|
+
!shellModeActive) {
|
|
1674
|
+
const validPaths = tryExtractFilePaths(ch.trim(), isValidPath);
|
|
1675
|
+
if (validPaths) {
|
|
1676
|
+
ch = `${validPaths.join(' ')} `;
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
let currentText = '';
|
|
1680
|
+
for (const char of toCodePoints(ch)) {
|
|
1681
|
+
if (char.codePointAt(0) === 127) {
|
|
1682
|
+
if (currentText.length > 0) {
|
|
1683
|
+
dispatch({ type: 'insert', payload: currentText });
|
|
1684
|
+
currentText = '';
|
|
1685
|
+
}
|
|
1686
|
+
dispatch({ type: 'backspace' });
|
|
1687
|
+
}
|
|
1688
|
+
else {
|
|
1689
|
+
currentText += char;
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
if (currentText.length > 0) {
|
|
1693
|
+
dispatch({ type: 'insert', payload: currentText });
|
|
1694
|
+
}
|
|
1695
|
+
}, [dispatch, isValidPath, shellModeActive]);
|
|
1696
|
+
const newline = useCallback(() => {
|
|
1697
|
+
dispatch({ type: 'insert', payload: '\n' });
|
|
1698
|
+
}, [dispatch]);
|
|
1699
|
+
const backspace = useCallback(() => {
|
|
1700
|
+
dispatch({ type: 'backspace' });
|
|
1701
|
+
}, [dispatch]);
|
|
1702
|
+
const del = useCallback(() => {
|
|
1703
|
+
dispatch({ type: 'delete' });
|
|
1704
|
+
}, [dispatch]);
|
|
1705
|
+
const move = useCallback((dir) => {
|
|
1706
|
+
dispatch({ type: 'move', payload: { dir } });
|
|
1707
|
+
}, [dispatch]);
|
|
1708
|
+
const undo = useCallback(() => {
|
|
1709
|
+
dispatch({ type: 'undo' });
|
|
1710
|
+
}, [dispatch]);
|
|
1711
|
+
const redo = useCallback(() => {
|
|
1712
|
+
dispatch({ type: 'redo' });
|
|
1713
|
+
}, [dispatch]);
|
|
1714
|
+
const setText = useCallback((newText) => {
|
|
1715
|
+
dispatch({ type: 'set_text', payload: newText });
|
|
1716
|
+
}, [dispatch]);
|
|
1717
|
+
const deleteWordLeft = useCallback(() => {
|
|
1718
|
+
dispatch({ type: 'delete_word_left' });
|
|
1719
|
+
}, [dispatch]);
|
|
1720
|
+
const deleteWordRight = useCallback(() => {
|
|
1721
|
+
dispatch({ type: 'delete_word_right' });
|
|
1722
|
+
}, [dispatch]);
|
|
1723
|
+
const killLineRight = useCallback(() => {
|
|
1724
|
+
dispatch({ type: 'kill_line_right' });
|
|
1725
|
+
}, [dispatch]);
|
|
1726
|
+
const killLineLeft = useCallback(() => {
|
|
1727
|
+
dispatch({ type: 'kill_line_left' });
|
|
1728
|
+
}, [dispatch]);
|
|
1729
|
+
// Vim-specific operations
|
|
1730
|
+
const vimDeleteWordForward = useCallback((count) => {
|
|
1731
|
+
dispatch({ type: 'vim_delete_word_forward', payload: { count } });
|
|
1732
|
+
}, [dispatch]);
|
|
1733
|
+
const vimDeleteWordBackward = useCallback((count) => {
|
|
1734
|
+
dispatch({ type: 'vim_delete_word_backward', payload: { count } });
|
|
1735
|
+
}, [dispatch]);
|
|
1736
|
+
const vimDeleteWordEnd = useCallback((count) => {
|
|
1737
|
+
dispatch({ type: 'vim_delete_word_end', payload: { count } });
|
|
1738
|
+
}, [dispatch]);
|
|
1739
|
+
const vimChangeWordForward = useCallback((count) => {
|
|
1740
|
+
dispatch({ type: 'vim_change_word_forward', payload: { count } });
|
|
1741
|
+
}, [dispatch]);
|
|
1742
|
+
const vimChangeWordBackward = useCallback((count) => {
|
|
1743
|
+
dispatch({ type: 'vim_change_word_backward', payload: { count } });
|
|
1744
|
+
}, [dispatch]);
|
|
1745
|
+
const vimChangeWordEnd = useCallback((count) => {
|
|
1746
|
+
dispatch({ type: 'vim_change_word_end', payload: { count } });
|
|
1747
|
+
}, [dispatch]);
|
|
1748
|
+
const vimDeleteLine = useCallback((count) => {
|
|
1749
|
+
dispatch({ type: 'vim_delete_line', payload: { count } });
|
|
1750
|
+
}, [dispatch]);
|
|
1751
|
+
const vimChangeLine = useCallback((count) => {
|
|
1752
|
+
dispatch({ type: 'vim_change_line', payload: { count } });
|
|
1753
|
+
}, [dispatch]);
|
|
1754
|
+
const vimDeleteToEndOfLine = useCallback(() => {
|
|
1755
|
+
dispatch({ type: 'vim_delete_to_end_of_line' });
|
|
1756
|
+
}, [dispatch]);
|
|
1757
|
+
const vimChangeToEndOfLine = useCallback(() => {
|
|
1758
|
+
dispatch({ type: 'vim_change_to_end_of_line' });
|
|
1759
|
+
}, [dispatch]);
|
|
1760
|
+
const vimChangeMovement = useCallback((movement, count) => {
|
|
1761
|
+
dispatch({ type: 'vim_change_movement', payload: { movement, count } });
|
|
1762
|
+
}, [dispatch]);
|
|
1763
|
+
const vimDeleteMovement = useCallback((movement, count) => {
|
|
1764
|
+
dispatch({ type: 'vim_delete_movement', payload: { movement, count } });
|
|
1765
|
+
}, [dispatch]);
|
|
1766
|
+
// New vim navigation and operation methods
|
|
1767
|
+
const vimMoveLeft = useCallback((count) => {
|
|
1768
|
+
dispatch({ type: 'vim_move_left', payload: { count } });
|
|
1769
|
+
}, [dispatch]);
|
|
1770
|
+
const vimMoveRight = useCallback((count) => {
|
|
1771
|
+
dispatch({ type: 'vim_move_right', payload: { count } });
|
|
1772
|
+
}, [dispatch]);
|
|
1773
|
+
const vimMoveUp = useCallback((count) => {
|
|
1774
|
+
dispatch({ type: 'vim_move_up', payload: { count } });
|
|
1775
|
+
}, [dispatch]);
|
|
1776
|
+
const vimMoveDown = useCallback((count) => {
|
|
1777
|
+
dispatch({ type: 'vim_move_down', payload: { count } });
|
|
1778
|
+
}, [dispatch]);
|
|
1779
|
+
const vimMoveWordForward = useCallback((count) => {
|
|
1780
|
+
dispatch({ type: 'vim_move_word_forward', payload: { count } });
|
|
1781
|
+
}, [dispatch]);
|
|
1782
|
+
const vimMoveWordBackward = useCallback((count) => {
|
|
1783
|
+
dispatch({ type: 'vim_move_word_backward', payload: { count } });
|
|
1784
|
+
}, [dispatch]);
|
|
1785
|
+
const vimMoveWordEnd = useCallback((count) => {
|
|
1786
|
+
dispatch({ type: 'vim_move_word_end', payload: { count } });
|
|
1787
|
+
}, [dispatch]);
|
|
1788
|
+
const vimDeleteChar = useCallback((count) => {
|
|
1789
|
+
dispatch({ type: 'vim_delete_char', payload: { count } });
|
|
1790
|
+
}, [dispatch]);
|
|
1791
|
+
const vimInsertAtCursor = useCallback(() => {
|
|
1792
|
+
dispatch({ type: 'vim_insert_at_cursor' });
|
|
1793
|
+
}, [dispatch]);
|
|
1794
|
+
const vimAppendAtCursor = useCallback(() => {
|
|
1795
|
+
dispatch({ type: 'vim_append_at_cursor' });
|
|
1796
|
+
}, [dispatch]);
|
|
1797
|
+
const vimOpenLineBelow = useCallback(() => {
|
|
1798
|
+
dispatch({ type: 'vim_open_line_below' });
|
|
1799
|
+
}, [dispatch]);
|
|
1800
|
+
const vimOpenLineAbove = useCallback(() => {
|
|
1801
|
+
dispatch({ type: 'vim_open_line_above' });
|
|
1802
|
+
}, [dispatch]);
|
|
1803
|
+
const vimAppendAtLineEnd = useCallback(() => {
|
|
1804
|
+
dispatch({ type: 'vim_append_at_line_end' });
|
|
1805
|
+
}, [dispatch]);
|
|
1806
|
+
const vimInsertAtLineStart = useCallback(() => {
|
|
1807
|
+
dispatch({ type: 'vim_insert_at_line_start' });
|
|
1808
|
+
}, [dispatch]);
|
|
1809
|
+
const vimMoveToLineStart = useCallback(() => {
|
|
1810
|
+
dispatch({ type: 'vim_move_to_line_start' });
|
|
1811
|
+
}, [dispatch]);
|
|
1812
|
+
const vimMoveToLineEnd = useCallback(() => {
|
|
1813
|
+
dispatch({ type: 'vim_move_to_line_end' });
|
|
1814
|
+
}, [dispatch]);
|
|
1815
|
+
const vimMoveToFirstNonWhitespace = useCallback(() => {
|
|
1816
|
+
dispatch({ type: 'vim_move_to_first_nonwhitespace' });
|
|
1817
|
+
}, [dispatch]);
|
|
1818
|
+
const vimMoveToFirstLine = useCallback(() => {
|
|
1819
|
+
dispatch({ type: 'vim_move_to_first_line' });
|
|
1820
|
+
}, [dispatch]);
|
|
1821
|
+
const vimMoveToLastLine = useCallback(() => {
|
|
1822
|
+
dispatch({ type: 'vim_move_to_last_line' });
|
|
1823
|
+
}, [dispatch]);
|
|
1824
|
+
const vimMoveToLine = useCallback((lineNumber) => {
|
|
1825
|
+
dispatch({ type: 'vim_move_to_line', payload: { lineNumber } });
|
|
1826
|
+
}, [dispatch]);
|
|
1827
|
+
const vimEscapeInsertMode = useCallback(() => {
|
|
1828
|
+
dispatch({ type: 'vim_escape_insert_mode' });
|
|
1829
|
+
}, [dispatch]);
|
|
1830
|
+
const openInExternalEditor = useCallback(async (opts = {}) => {
|
|
1831
|
+
let tmpDir;
|
|
1832
|
+
let filePath;
|
|
1833
|
+
try {
|
|
1834
|
+
tmpDir = fs.mkdtempSync(pathMod.join(os.tmpdir(), 'qwen-edit-'));
|
|
1835
|
+
filePath = pathMod.join(tmpDir, 'buffer.txt');
|
|
1836
|
+
}
|
|
1837
|
+
catch (err) {
|
|
1838
|
+
debugLogger.error('[useTextBuffer] failed to create temp directory', err);
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
let editorCmd;
|
|
1842
|
+
let editorArgs;
|
|
1843
|
+
let useShell = false;
|
|
1844
|
+
let editorSource = 'env/default';
|
|
1845
|
+
if (opts.editor) {
|
|
1846
|
+
// Explicit programmatic override takes highest priority
|
|
1847
|
+
editorCmd = opts.editor;
|
|
1848
|
+
editorArgs = [filePath];
|
|
1849
|
+
editorSource = 'opts';
|
|
1850
|
+
if (process.platform === 'win32' && /\.(cmd|bat)$/i.test(editorCmd)) {
|
|
1851
|
+
if (/["|%!]/.test(editorCmd)) {
|
|
1852
|
+
debugLogger.error(`[useTextBuffer] opts.editor command contains unsafe characters: ${editorCmd}`);
|
|
1853
|
+
try {
|
|
1854
|
+
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
1855
|
+
}
|
|
1856
|
+
catch {
|
|
1857
|
+
/* ignore */
|
|
1858
|
+
}
|
|
1859
|
+
return;
|
|
1860
|
+
}
|
|
1861
|
+
useShell = true;
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
else {
|
|
1865
|
+
const resolved = preferredEditor
|
|
1866
|
+
? getExternalEditorCommand(preferredEditor, filePath)
|
|
1867
|
+
: null;
|
|
1868
|
+
if (resolved) {
|
|
1869
|
+
editorCmd = resolved.command;
|
|
1870
|
+
editorArgs = resolved.args;
|
|
1871
|
+
useShell = resolved.needsShell;
|
|
1872
|
+
editorSource = 'preferred';
|
|
1873
|
+
}
|
|
1874
|
+
else {
|
|
1875
|
+
if (preferredEditor) {
|
|
1876
|
+
debugLogger.warn(`[useTextBuffer] preferred editor "${preferredEditor}" not found, falling back to env/default`);
|
|
1877
|
+
}
|
|
1878
|
+
editorCmd =
|
|
1879
|
+
process.env['VISUAL'] ??
|
|
1880
|
+
process.env['EDITOR'] ??
|
|
1881
|
+
(process.platform === 'win32' ? 'notepad' : 'vi');
|
|
1882
|
+
editorArgs = [filePath];
|
|
1883
|
+
if (process.platform === 'win32' && /\.(cmd|bat)$/i.test(editorCmd)) {
|
|
1884
|
+
if (/["|%!]/.test(editorCmd)) {
|
|
1885
|
+
debugLogger.error(`[useTextBuffer] Editor command from environment contains unsafe characters: ${editorCmd}`);
|
|
1886
|
+
try {
|
|
1887
|
+
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
1888
|
+
}
|
|
1889
|
+
catch {
|
|
1890
|
+
/* ignore */
|
|
1891
|
+
}
|
|
1892
|
+
return;
|
|
1893
|
+
}
|
|
1894
|
+
useShell = true;
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
if (useShell) {
|
|
1899
|
+
// .cmd/.bat launch through cmd.exe on Windows. Quote both the
|
|
1900
|
+
// command and args so paths with spaces survive cmd.exe parsing.
|
|
1901
|
+
// These are process-generated paths; do not reuse for
|
|
1902
|
+
// user-controlled arguments.
|
|
1903
|
+
editorCmd = `"${editorCmd}"`;
|
|
1904
|
+
editorArgs = editorArgs.map((a) => `"${a}"`);
|
|
1905
|
+
}
|
|
1906
|
+
const wasRaw = stdin?.isRaw ?? false;
|
|
1907
|
+
try {
|
|
1908
|
+
const currentText = stateRef.current.lines.join('\n');
|
|
1909
|
+
fs.writeFileSync(filePath, currentText, {
|
|
1910
|
+
encoding: 'utf8',
|
|
1911
|
+
mode: 0o600,
|
|
1912
|
+
});
|
|
1913
|
+
setRawMode?.(false);
|
|
1914
|
+
debugLogger.warn(`[useTextBuffer] launching external editor (cmd=${editorCmd}, shell=${useShell}, source=${editorSource}, file=${filePath})`);
|
|
1915
|
+
const { status, error, signal } = spawnSync(editorCmd, editorArgs, {
|
|
1916
|
+
stdio: 'inherit',
|
|
1917
|
+
shell: useShell,
|
|
1918
|
+
timeout: 30 * 60 * 1000,
|
|
1919
|
+
});
|
|
1920
|
+
if (error)
|
|
1921
|
+
throw error;
|
|
1922
|
+
if (signal)
|
|
1923
|
+
throw new Error(`External editor was killed by signal ${signal}`);
|
|
1924
|
+
if (typeof status === 'number' && status !== 0)
|
|
1925
|
+
throw new Error(`External editor exited with status ${status}`);
|
|
1926
|
+
let newText = fs.readFileSync(filePath, 'utf8');
|
|
1927
|
+
newText = newText.replace(/\r\n?/g, '\n');
|
|
1928
|
+
if (newText !== currentText) {
|
|
1929
|
+
dispatch({ type: 'create_undo_snapshot' });
|
|
1930
|
+
dispatch({ type: 'set_text', payload: newText, pushToUndo: false });
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
catch (err) {
|
|
1934
|
+
debugLogger.error(`[useTextBuffer] external editor error (cmd=${editorCmd}, shell=${useShell}, source=${editorSource}, file=${filePath})`, err);
|
|
1935
|
+
}
|
|
1936
|
+
finally {
|
|
1937
|
+
try {
|
|
1938
|
+
if (wasRaw)
|
|
1939
|
+
setRawMode?.(true);
|
|
1940
|
+
}
|
|
1941
|
+
catch (rawErr) {
|
|
1942
|
+
debugLogger.error('[useTextBuffer] failed to restore raw mode after external editor', rawErr);
|
|
1943
|
+
}
|
|
1944
|
+
try {
|
|
1945
|
+
// recursive+force handles leftover swap files (.swp) from vim/neovim.
|
|
1946
|
+
// On Windows, EPERM/EBUSY from locked files may still cause a partial
|
|
1947
|
+
// delete — the catch below keeps it non-fatal.
|
|
1948
|
+
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
1949
|
+
}
|
|
1950
|
+
catch {
|
|
1951
|
+
/* best-effort cleanup */
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
}, [dispatch, stdin, setRawMode, preferredEditor]);
|
|
1955
|
+
const handleInput = useCallback((key) => {
|
|
1956
|
+
const { sequence: input } = key;
|
|
1957
|
+
if (key.paste) {
|
|
1958
|
+
// Do not do any other processing on pastes so ensure we handle them
|
|
1959
|
+
// before all other cases.
|
|
1960
|
+
insert(input, { paste: key.paste });
|
|
1961
|
+
return;
|
|
1962
|
+
}
|
|
1963
|
+
if (key.name === 'return' ||
|
|
1964
|
+
input === '\r' ||
|
|
1965
|
+
input === '\n' ||
|
|
1966
|
+
input === '\\\r' // VSCode terminal represents shift + enter this way
|
|
1967
|
+
)
|
|
1968
|
+
newline();
|
|
1969
|
+
else if (key.name === 'left' && !key.meta && !key.ctrl)
|
|
1970
|
+
move('left');
|
|
1971
|
+
else if (key.ctrl && key.name === 'b')
|
|
1972
|
+
move('left');
|
|
1973
|
+
else if (key.name === 'right' && !key.meta && !key.ctrl)
|
|
1974
|
+
move('right');
|
|
1975
|
+
else if (key.ctrl && key.name === 'f')
|
|
1976
|
+
move('right');
|
|
1977
|
+
else if (key.name === 'up' && !key.shift)
|
|
1978
|
+
move('up');
|
|
1979
|
+
else if (key.name === 'down' && !key.shift)
|
|
1980
|
+
move('down');
|
|
1981
|
+
else if ((key.ctrl || key.meta) && key.name === 'left')
|
|
1982
|
+
move('wordLeft');
|
|
1983
|
+
else if (key.meta && key.name === 'b')
|
|
1984
|
+
move('wordLeft');
|
|
1985
|
+
else if ((key.ctrl || key.meta) && key.name === 'right')
|
|
1986
|
+
move('wordRight');
|
|
1987
|
+
else if (key.meta && key.name === 'd')
|
|
1988
|
+
deleteWordRight();
|
|
1989
|
+
else if (key.meta && key.name === 'f')
|
|
1990
|
+
move('wordRight');
|
|
1991
|
+
else if (key.name === 'home')
|
|
1992
|
+
move('home');
|
|
1993
|
+
else if (key.ctrl && key.name === 'a')
|
|
1994
|
+
move('home');
|
|
1995
|
+
else if (key.name === 'end')
|
|
1996
|
+
move('end');
|
|
1997
|
+
else if (key.ctrl && key.name === 'e')
|
|
1998
|
+
move('end');
|
|
1999
|
+
else if (key.ctrl && key.name === 'w')
|
|
2000
|
+
deleteWordLeft();
|
|
2001
|
+
else if ((key.meta || key.ctrl) &&
|
|
2002
|
+
(key.name === 'backspace' || input === '\x7f'))
|
|
2003
|
+
deleteWordLeft();
|
|
2004
|
+
else if ((key.meta || key.ctrl) && key.name === 'delete')
|
|
2005
|
+
deleteWordRight();
|
|
2006
|
+
else if (key.name === 'backspace' ||
|
|
2007
|
+
input === '\x7f' ||
|
|
2008
|
+
(key.ctrl && key.name === 'h'))
|
|
2009
|
+
backspace();
|
|
2010
|
+
else if (key.name === 'delete' || (key.ctrl && key.name === 'd'))
|
|
2011
|
+
del();
|
|
2012
|
+
else if (key.ctrl && !key.shift && key.name === 'z')
|
|
2013
|
+
undo();
|
|
2014
|
+
else if (key.ctrl && key.shift && key.name === 'z')
|
|
2015
|
+
redo();
|
|
2016
|
+
else if (input &&
|
|
2017
|
+
!key.ctrl &&
|
|
2018
|
+
!key.meta &&
|
|
2019
|
+
key.name !== 'tab' &&
|
|
2020
|
+
input !== '\t') {
|
|
2021
|
+
insert(input, { paste: key.paste });
|
|
2022
|
+
}
|
|
2023
|
+
}, [
|
|
2024
|
+
newline,
|
|
2025
|
+
move,
|
|
2026
|
+
deleteWordLeft,
|
|
2027
|
+
deleteWordRight,
|
|
2028
|
+
backspace,
|
|
2029
|
+
del,
|
|
2030
|
+
insert,
|
|
2031
|
+
undo,
|
|
2032
|
+
redo,
|
|
2033
|
+
]);
|
|
2034
|
+
const renderedVisualLines = useMemo(() => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height), [visualLines, visualScrollRow, viewport.height]);
|
|
2035
|
+
const replaceRange = useCallback((startRow, startCol, endRow, endCol, text) => {
|
|
2036
|
+
dispatch({
|
|
2037
|
+
type: 'replace_range',
|
|
2038
|
+
payload: { startRow, startCol, endRow, endCol, text },
|
|
2039
|
+
});
|
|
2040
|
+
}, [dispatch]);
|
|
2041
|
+
const replaceRangeByOffset = useCallback((startOffset, endOffset, replacementText) => {
|
|
2042
|
+
const currentText = stateRef.current.lines.join('\n');
|
|
2043
|
+
const [startRow, startCol] = offsetToLogicalPos(currentText, startOffset);
|
|
2044
|
+
const [endRow, endCol] = offsetToLogicalPos(currentText, endOffset);
|
|
2045
|
+
replaceRange(startRow, startCol, endRow, endCol, replacementText);
|
|
2046
|
+
}, [replaceRange]);
|
|
2047
|
+
const moveToOffset = useCallback((offset) => {
|
|
2048
|
+
dispatch({ type: 'move_to_offset', payload: { offset } });
|
|
2049
|
+
}, [dispatch]);
|
|
2050
|
+
// Getters read from stateRef.current so event handlers (which may hold a stale
|
|
2051
|
+
// closure reference to this object) always see the latest state.
|
|
2052
|
+
const returnValue = useMemo(() => ({
|
|
2053
|
+
get lines() {
|
|
2054
|
+
return stateRef.current.lines;
|
|
2055
|
+
},
|
|
2056
|
+
get text() {
|
|
2057
|
+
return stateRef.current.lines.join('\n');
|
|
2058
|
+
},
|
|
2059
|
+
get cursor() {
|
|
2060
|
+
return [stateRef.current.cursorRow, stateRef.current.cursorCol];
|
|
2061
|
+
},
|
|
2062
|
+
preferredCol,
|
|
2063
|
+
selectionAnchor,
|
|
2064
|
+
allVisualLines: visualLines,
|
|
2065
|
+
viewportVisualLines: renderedVisualLines,
|
|
2066
|
+
visualCursor,
|
|
2067
|
+
visualScrollRow,
|
|
2068
|
+
visualToLogicalMap,
|
|
2069
|
+
setText,
|
|
2070
|
+
insert,
|
|
2071
|
+
newline,
|
|
2072
|
+
backspace,
|
|
2073
|
+
del,
|
|
2074
|
+
move,
|
|
2075
|
+
undo,
|
|
2076
|
+
redo,
|
|
2077
|
+
replaceRange,
|
|
2078
|
+
replaceRangeByOffset,
|
|
2079
|
+
moveToOffset,
|
|
2080
|
+
deleteWordLeft,
|
|
2081
|
+
deleteWordRight,
|
|
2082
|
+
killLineRight,
|
|
2083
|
+
killLineLeft,
|
|
2084
|
+
handleInput,
|
|
2085
|
+
openInExternalEditor,
|
|
2086
|
+
// Vim-specific operations
|
|
2087
|
+
vimDeleteWordForward,
|
|
2088
|
+
vimDeleteWordBackward,
|
|
2089
|
+
vimDeleteWordEnd,
|
|
2090
|
+
vimChangeWordForward,
|
|
2091
|
+
vimChangeWordBackward,
|
|
2092
|
+
vimChangeWordEnd,
|
|
2093
|
+
vimDeleteLine,
|
|
2094
|
+
vimChangeLine,
|
|
2095
|
+
vimDeleteToEndOfLine,
|
|
2096
|
+
vimChangeToEndOfLine,
|
|
2097
|
+
vimChangeMovement,
|
|
2098
|
+
vimDeleteMovement,
|
|
2099
|
+
vimMoveLeft,
|
|
2100
|
+
vimMoveRight,
|
|
2101
|
+
vimMoveUp,
|
|
2102
|
+
vimMoveDown,
|
|
2103
|
+
vimMoveWordForward,
|
|
2104
|
+
vimMoveWordBackward,
|
|
2105
|
+
vimMoveWordEnd,
|
|
2106
|
+
vimDeleteChar,
|
|
2107
|
+
vimInsertAtCursor,
|
|
2108
|
+
vimAppendAtCursor,
|
|
2109
|
+
vimOpenLineBelow,
|
|
2110
|
+
vimOpenLineAbove,
|
|
2111
|
+
vimAppendAtLineEnd,
|
|
2112
|
+
vimInsertAtLineStart,
|
|
2113
|
+
vimMoveToLineStart,
|
|
2114
|
+
vimMoveToLineEnd,
|
|
2115
|
+
vimMoveToFirstNonWhitespace,
|
|
2116
|
+
vimMoveToFirstLine,
|
|
2117
|
+
vimMoveToLastLine,
|
|
2118
|
+
vimMoveToLine,
|
|
2119
|
+
vimEscapeInsertMode,
|
|
2120
|
+
}), [
|
|
2121
|
+
preferredCol,
|
|
2122
|
+
selectionAnchor,
|
|
2123
|
+
visualLines,
|
|
2124
|
+
renderedVisualLines,
|
|
2125
|
+
visualCursor,
|
|
2126
|
+
visualScrollRow,
|
|
2127
|
+
setText,
|
|
2128
|
+
insert,
|
|
2129
|
+
newline,
|
|
2130
|
+
backspace,
|
|
2131
|
+
del,
|
|
2132
|
+
move,
|
|
2133
|
+
undo,
|
|
2134
|
+
redo,
|
|
2135
|
+
replaceRange,
|
|
2136
|
+
replaceRangeByOffset,
|
|
2137
|
+
moveToOffset,
|
|
2138
|
+
deleteWordLeft,
|
|
2139
|
+
deleteWordRight,
|
|
2140
|
+
killLineRight,
|
|
2141
|
+
killLineLeft,
|
|
2142
|
+
handleInput,
|
|
2143
|
+
openInExternalEditor,
|
|
2144
|
+
vimDeleteWordForward,
|
|
2145
|
+
vimDeleteWordBackward,
|
|
2146
|
+
vimDeleteWordEnd,
|
|
2147
|
+
vimChangeWordForward,
|
|
2148
|
+
vimChangeWordBackward,
|
|
2149
|
+
vimChangeWordEnd,
|
|
2150
|
+
vimDeleteLine,
|
|
2151
|
+
vimChangeLine,
|
|
2152
|
+
vimDeleteToEndOfLine,
|
|
2153
|
+
vimChangeToEndOfLine,
|
|
2154
|
+
vimChangeMovement,
|
|
2155
|
+
vimDeleteMovement,
|
|
2156
|
+
vimMoveLeft,
|
|
2157
|
+
vimMoveRight,
|
|
2158
|
+
vimMoveUp,
|
|
2159
|
+
vimMoveDown,
|
|
2160
|
+
vimMoveWordForward,
|
|
2161
|
+
vimMoveWordBackward,
|
|
2162
|
+
vimMoveWordEnd,
|
|
2163
|
+
vimDeleteChar,
|
|
2164
|
+
vimInsertAtCursor,
|
|
2165
|
+
vimAppendAtCursor,
|
|
2166
|
+
vimOpenLineBelow,
|
|
2167
|
+
vimOpenLineAbove,
|
|
2168
|
+
vimAppendAtLineEnd,
|
|
2169
|
+
vimInsertAtLineStart,
|
|
2170
|
+
vimMoveToLineStart,
|
|
2171
|
+
vimMoveToLineEnd,
|
|
2172
|
+
vimMoveToFirstNonWhitespace,
|
|
2173
|
+
vimMoveToFirstLine,
|
|
2174
|
+
vimMoveToLastLine,
|
|
2175
|
+
vimMoveToLine,
|
|
2176
|
+
vimEscapeInsertMode,
|
|
2177
|
+
visualToLogicalMap,
|
|
2178
|
+
]);
|
|
2179
|
+
return returnValue;
|
|
2180
|
+
}
|
|
2181
|
+
//# sourceMappingURL=text-buffer.js.map
|