@machina.ai/cell-cli 1.22.5-rc1 → 1.25.0-rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +5 -4
- package/dist/src/commands/extensions/configure.d.ts +13 -0
- package/dist/src/commands/extensions/configure.js +131 -0
- package/dist/src/commands/extensions/configure.js.map +1 -0
- package/dist/src/commands/extensions/configure.test.d.ts +1 -0
- package/dist/src/commands/extensions/configure.test.js +197 -0
- package/dist/src/commands/extensions/configure.test.js.map +1 -0
- package/dist/src/commands/extensions/disable.test.js.map +1 -1
- package/dist/src/commands/extensions/enable.test.js.map +1 -1
- package/dist/src/commands/extensions/install.js +7 -31
- package/dist/src/commands/extensions/install.js.map +1 -1
- package/dist/src/commands/extensions/install.test.js +21 -3
- package/dist/src/commands/extensions/install.test.js.map +1 -1
- package/dist/src/commands/extensions/link.test.js.map +1 -1
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -1
- package/dist/src/commands/extensions/utils.d.ts +2 -1
- package/dist/src/commands/extensions/utils.js +5 -1
- package/dist/src/commands/extensions/utils.js.map +1 -1
- package/dist/src/commands/extensions/validate.js +1 -1
- package/dist/src/commands/extensions/validate.js.map +1 -1
- package/dist/src/commands/extensions/validate.test.js +1 -1
- package/dist/src/commands/extensions/validate.test.js.map +1 -1
- package/dist/src/commands/extensions.js +2 -2
- package/dist/src/commands/extensions.js.map +1 -1
- package/dist/src/commands/hooks/migrate.js +1 -1
- package/dist/src/commands/hooks/migrate.js.map +1 -1
- package/dist/src/commands/hooks/migrate.test.js +1 -1
- package/dist/src/commands/hooks/migrate.test.js.map +1 -1
- package/dist/src/commands/mcp/add.test.js +1 -1
- package/dist/src/commands/mcp/add.test.js.map +1 -1
- package/dist/src/commands/mcp/list.js +7 -1
- package/dist/src/commands/mcp/list.js.map +1 -1
- package/dist/src/commands/skills/disable.d.ts +14 -0
- package/dist/src/commands/skills/disable.js +45 -0
- package/dist/src/commands/skills/disable.js.map +1 -0
- package/dist/src/commands/skills/disable.test.d.ts +6 -0
- package/dist/src/commands/skills/disable.test.js +80 -0
- package/dist/src/commands/skills/disable.test.js.map +1 -0
- package/dist/src/commands/skills/enable.d.ts +12 -0
- package/dist/src/commands/skills/enable.js +35 -0
- package/dist/src/commands/skills/enable.js.map +1 -0
- package/dist/src/commands/skills/enable.test.d.ts +6 -0
- package/dist/src/commands/skills/enable.test.js +107 -0
- package/dist/src/commands/skills/enable.test.js.map +1 -0
- package/dist/src/commands/skills/install.d.ts +14 -0
- package/dist/src/commands/skills/install.js +61 -0
- package/dist/src/commands/skills/install.js.map +1 -0
- package/dist/src/commands/skills/install.test.d.ts +6 -0
- package/dist/src/commands/skills/install.test.js +57 -0
- package/dist/src/commands/skills/install.test.js.map +1 -0
- package/dist/src/commands/skills/list.d.ts +10 -0
- package/dist/src/commands/skills/list.js +60 -0
- package/dist/src/commands/skills/list.js.map +1 -0
- package/dist/src/commands/skills/list.test.d.ts +6 -0
- package/dist/src/commands/skills/list.test.js +136 -0
- package/dist/src/commands/skills/list.test.js.map +1 -0
- package/dist/src/commands/skills/uninstall.d.ts +13 -0
- package/dist/src/commands/skills/uninstall.js +56 -0
- package/dist/src/commands/skills/uninstall.js.map +1 -0
- package/dist/src/commands/skills/uninstall.test.d.ts +6 -0
- package/dist/src/commands/skills/uninstall.test.js +61 -0
- package/dist/src/commands/skills/uninstall.test.js.map +1 -0
- package/dist/src/commands/{extensions/settings.d.ts → skills.d.ts} +2 -2
- package/dist/src/commands/skills.js +30 -0
- package/dist/src/commands/skills.js.map +1 -0
- package/dist/src/commands/skills.test.d.ts +6 -0
- package/dist/src/commands/skills.test.js +49 -0
- package/dist/src/commands/skills.test.js.map +1 -0
- package/dist/src/config/config.d.ts +10 -3
- package/dist/src/config/config.js +91 -31
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +224 -13
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/extension-manager-agents.test.d.ts +6 -0
- package/dist/src/config/extension-manager-agents.test.js +115 -0
- package/dist/src/config/extension-manager-agents.test.js.map +1 -0
- package/dist/src/config/extension-manager-scope.test.js +164 -0
- package/dist/src/config/extension-manager-scope.test.js.map +1 -0
- package/dist/src/config/extension-manager-skills.test.js +150 -0
- package/dist/src/config/extension-manager-skills.test.js.map +1 -0
- package/dist/src/config/extension-manager.d.ts +6 -1
- package/dist/src/config/extension-manager.js +157 -34
- package/dist/src/config/extension-manager.js.map +1 -1
- package/dist/src/config/extension.test.js +98 -16
- package/dist/src/config/extension.test.js.map +1 -1
- package/dist/src/config/extensions/consent.d.ts +5 -3
- package/dist/src/config/extensions/consent.js +30 -7
- package/dist/src/config/extensions/consent.js.map +1 -1
- package/dist/src/config/extensions/consent.test.js +97 -3
- package/dist/src/config/extensions/consent.test.js.map +1 -1
- package/dist/src/config/extensions/extensionSettings.d.ts +5 -3
- package/dist/src/config/extensions/extensionSettings.js +32 -12
- package/dist/src/config/extensions/extensionSettings.js.map +1 -1
- package/dist/src/config/extensions/extensionSettings.test.js +8 -8
- package/dist/src/config/extensions/extensionSettings.test.js.map +1 -1
- package/dist/src/config/extensions/extensionUpdates.test.js +231 -0
- package/dist/src/config/extensions/extensionUpdates.test.js.map +1 -0
- package/dist/src/config/extensions/github.js +1 -1
- package/dist/src/config/extensions/github.js.map +1 -1
- package/dist/src/config/extensions/github.test.js +2 -2
- package/dist/src/config/extensions/github.test.js.map +1 -1
- package/dist/src/config/extensions/storage.js +2 -2
- package/dist/src/config/extensions/storage.js.map +1 -1
- package/dist/src/config/extensions/update.js +1 -1
- package/dist/src/config/extensions/update.js.map +1 -1
- package/dist/src/config/extensions/update.test.js +8 -8
- package/dist/src/config/extensions/update.test.js.map +1 -1
- package/dist/src/config/keyBindings.d.ts +14 -2
- package/dist/src/config/keyBindings.js +89 -11
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/config/policy-engine.integration.test.js +13 -1
- package/dist/src/config/policy-engine.integration.test.js.map +1 -1
- package/dist/src/config/settings-validation.js +1 -1
- package/dist/src/config/settings-validation.js.map +1 -1
- package/dist/src/config/settings-validation.test.js +49 -1
- package/dist/src/config/settings-validation.test.js.map +1 -1
- package/dist/src/config/settings.d.ts +9 -7
- package/dist/src/config/settings.js +127 -250
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settings.test.js +245 -594
- package/dist/src/config/settings.test.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +284 -33
- package/dist/src/config/settingsSchema.js +328 -31
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +17 -9
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/config/settings_repro.test.js +1 -1
- package/dist/src/config/settings_repro.test.js.map +1 -1
- package/dist/src/config/settings_validation_warning.test.d.ts +6 -0
- package/dist/src/config/settings_validation_warning.test.js +123 -0
- package/dist/src/config/settings_validation_warning.test.js.map +1 -0
- package/dist/src/config/trustedFolders.d.ts +1 -0
- package/dist/src/config/trustedFolders.js +18 -4
- package/dist/src/config/trustedFolders.js.map +1 -1
- package/dist/src/config/trustedFolders.test.js +45 -0
- package/dist/src/config/trustedFolders.test.js.map +1 -1
- package/dist/src/gemini.js +117 -85
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +72 -95
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/gemini_cleanup.test.js +6 -0
- package/dist/src/gemini_cleanup.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +3 -3
- package/dist/src/generated/git-commit.js +3 -3
- package/dist/src/nonInteractiveCli.js +54 -1
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCli.test.js +94 -11
- package/dist/src/nonInteractiveCli.test.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.d.ts +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +65 -9
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +67 -13
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
- package/dist/src/services/FileCommandLoader.js +6 -6
- package/dist/src/services/FileCommandLoader.js.map +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.js +13 -11
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.test.js +93 -61
- package/dist/src/services/prompt-processors/shellProcessor.test.js.map +1 -1
- package/dist/src/test-utils/render.js +4 -2
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/App.test.js +2 -2
- package/dist/src/ui/App.test.js.map +1 -1
- package/dist/src/ui/AppContainer.js +158 -77
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/AppContainer.test.js +230 -41
- package/dist/src/ui/AppContainer.test.js.map +1 -1
- package/dist/src/ui/IdeIntegrationNudge.test.js +18 -7
- package/dist/src/ui/IdeIntegrationNudge.test.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.d.ts +4 -1
- package/dist/src/ui/auth/AuthDialog.js +8 -2
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.test.js +17 -0
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/auth/AuthInProgress.test.js +16 -6
- package/dist/src/ui/auth/AuthInProgress.test.js.map +1 -1
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.d.ts +10 -0
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.js +27 -0
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.js.map +1 -0
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.d.ts +6 -0
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js +68 -0
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js.map +1 -0
- package/dist/src/ui/commands/aboutCommand.js +1 -1
- package/dist/src/ui/commands/aboutCommand.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.test.js +4 -4
- package/dist/src/ui/commands/aboutCommand.test.js.map +1 -1
- package/dist/src/ui/commands/agentsCommand.d.ts +7 -0
- package/dist/src/ui/commands/agentsCommand.js +79 -0
- package/dist/src/ui/commands/agentsCommand.js.map +1 -0
- package/dist/src/ui/commands/agentsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/agentsCommand.test.js +91 -0
- package/dist/src/ui/commands/agentsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/authCommand.js +30 -3
- package/dist/src/ui/commands/authCommand.js.map +1 -1
- package/dist/src/ui/commands/authCommand.test.js +72 -4
- package/dist/src/ui/commands/authCommand.test.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.js +36 -4
- package/dist/src/ui/commands/bugCommand.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.test.js +83 -2
- package/dist/src/ui/commands/bugCommand.test.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.d.ts +1 -2
- package/dist/src/ui/commands/chatCommand.js +50 -50
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.test.js +84 -58
- package/dist/src/ui/commands/chatCommand.test.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.js +12 -8
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.test.js +4 -0
- package/dist/src/ui/commands/clearCommand.test.js.map +1 -1
- package/dist/src/ui/commands/copyCommand.js +1 -1
- package/dist/src/ui/commands/copyCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.js +27 -10
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.test.js +47 -11
- package/dist/src/ui/commands/directoryCommand.test.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +193 -24
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.test.js +217 -27
- package/dist/src/ui/commands/extensionsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/helpCommand.js +1 -1
- package/dist/src/ui/commands/helpCommand.js.map +1 -1
- package/dist/src/ui/commands/helpCommand.test.js +1 -1
- package/dist/src/ui/commands/helpCommand.test.js.map +1 -1
- package/dist/src/ui/commands/hooksCommand.js +155 -20
- package/dist/src/ui/commands/hooksCommand.js.map +1 -1
- package/dist/src/ui/commands/hooksCommand.test.js +196 -17
- package/dist/src/ui/commands/hooksCommand.test.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js +7 -7
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.test.js +14 -6
- package/dist/src/ui/commands/mcpCommand.test.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.js +19 -33
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.test.js +112 -16
- package/dist/src/ui/commands/memoryCommand.test.js.map +1 -1
- package/dist/src/ui/commands/restoreCommand.js +1 -1
- package/dist/src/ui/commands/restoreCommand.js.map +1 -1
- package/dist/src/ui/commands/skillsCommand.d.ts +7 -0
- package/dist/src/ui/commands/skillsCommand.js +235 -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 +405 -0
- package/dist/src/ui/commands/skillsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.js +4 -4
- package/dist/src/ui/commands/statsCommand.js.map +1 -1
- package/dist/src/ui/commands/statsCommand.test.js +4 -4
- package/dist/src/ui/commands/statsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.js +2 -2
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.test.js +2 -2
- package/dist/src/ui/commands/toolsCommand.test.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +15 -2
- package/dist/src/ui/commands/types.js +1 -0
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/components/AsciiArt.d.ts +6 -6
- package/dist/src/ui/components/AsciiArt.js +6 -6
- package/dist/src/ui/components/Composer.js +7 -7
- package/dist/src/ui/components/Composer.js.map +1 -1
- package/dist/src/ui/components/Composer.test.js +23 -4
- package/dist/src/ui/components/Composer.test.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +12 -5
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.test.js +56 -25
- package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +1 -1
- package/dist/src/ui/components/DialogManager.js +2 -2
- package/dist/src/ui/components/DialogManager.js.map +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.js +2 -1
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.test.js +3 -2
- package/dist/src/ui/components/EditorSettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.js +20 -15
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +12 -2
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.js +4 -4
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/Help.js +1 -1
- package/dist/src/ui/components/Help.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +3 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +21 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/HookStatusDisplay.d.ts +12 -0
- package/dist/src/ui/components/HookStatusDisplay.js +20 -0
- package/dist/src/ui/components/HookStatusDisplay.js.map +1 -0
- package/dist/src/ui/components/HookStatusDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/HookStatusDisplay.test.js +51 -0
- package/dist/src/ui/components/HookStatusDisplay.test.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js +2 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +4 -3
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +54 -24
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.test.js +172 -7
- package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
- package/dist/src/ui/components/LogoutConfirmationDialog.d.ts +15 -0
- package/dist/src/ui/components/LogoutConfirmationDialog.js +37 -0
- package/dist/src/ui/components/LogoutConfirmationDialog.js.map +1 -0
- package/dist/src/ui/components/LogoutConfirmationDialog.test.d.ts +6 -0
- package/dist/src/ui/components/LogoutConfirmationDialog.test.js +59 -0
- package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +1 -0
- package/dist/src/ui/components/MainContent.js +12 -10
- package/dist/src/ui/components/MainContent.js.map +1 -1
- package/dist/src/ui/components/MainContent.test.js +19 -9
- package/dist/src/ui/components/MainContent.test.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.js +7 -3
- package/dist/src/ui/components/ModelDialog.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.test.js +16 -2
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.js +68 -14
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.js +53 -2
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +2 -2
- package/dist/src/ui/components/MultiFolderTrustDialog.js +2 -2
- package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js +9 -9
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Notifications.js +3 -4
- package/dist/src/ui/components/Notifications.js.map +1 -1
- package/dist/src/ui/components/Notifications.test.js +1 -0
- package/dist/src/ui/components/Notifications.test.js.map +1 -1
- package/dist/src/ui/components/ProQuotaDialog.d.ts +1 -3
- package/dist/src/ui/components/ProQuotaDialog.js +3 -21
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
- package/dist/src/ui/components/ProQuotaDialog.test.js +25 -10
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.js +36 -16
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +20 -3
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/StatusDisplay.d.ts +11 -0
- package/dist/src/ui/components/StatusDisplay.js +40 -0
- package/dist/src/ui/components/StatusDisplay.js.map +1 -0
- package/dist/src/ui/components/StatusDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/StatusDisplay.test.js +144 -0
- package/dist/src/ui/components/StatusDisplay.test.js.map +1 -0
- package/dist/src/ui/components/StickyHeader.d.ts +2 -0
- package/dist/src/ui/components/StickyHeader.js +1 -1
- package/dist/src/ui/components/StickyHeader.js.map +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.js +7 -2
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
- package/dist/src/ui/components/Table.d.ts +21 -0
- package/dist/src/ui/components/Table.js +7 -0
- package/dist/src/ui/components/Table.js.map +1 -0
- package/dist/src/ui/components/Table.test.d.ts +6 -0
- package/dist/src/ui/components/Table.test.js +53 -0
- package/dist/src/ui/components/Table.test.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.js +63 -17
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.test.js +66 -1
- package/dist/src/ui/components/ThemeDialog.test.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.js +5 -13
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.js +26 -17
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.js +8 -5
- package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +1 -5
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.js +6 -2
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.test.js +1 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolResultDisplay.js +22 -16
- package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -1
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js +36 -18
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +134 -0
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +2 -38
- package/dist/src/ui/components/shared/MaxSizedBox.js +34 -418
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +48 -133
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +4 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.js +11 -10
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.d.ts +40 -4
- package/dist/src/ui/components/shared/text-buffer.js +234 -64
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.test.js +147 -1
- package/dist/src/ui/components/shared/text-buffer.test.js.map +1 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.test.js +3 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.test.js.map +1 -1
- package/dist/src/ui/components/views/AgentsStatus.d.ts +13 -0
- package/dist/src/ui/components/views/AgentsStatus.js +23 -0
- package/dist/src/ui/components/views/AgentsStatus.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.js +3 -2
- package/dist/src/ui/components/views/ExtensionsList.js.map +1 -1
- package/dist/src/ui/components/views/ExtensionsList.test.js +37 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -1
- package/dist/src/ui/components/views/HooksList.d.ts +2 -0
- package/dist/src/ui/components/views/HooksList.js +12 -7
- package/dist/src/ui/components/views/HooksList.js.map +1 -1
- package/dist/src/ui/components/views/McpStatus.js +7 -2
- package/dist/src/ui/components/views/McpStatus.js.map +1 -1
- package/dist/src/ui/components/views/McpStatus.test.js +10 -0
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -1
- package/dist/src/ui/components/views/SkillsList.d.ts +13 -0
- package/dist/src/ui/components/views/SkillsList.js +17 -0
- package/dist/src/ui/components/views/SkillsList.js.map +1 -0
- package/dist/src/ui/components/views/SkillsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/SkillsList.test.js +97 -0
- package/dist/src/ui/components/views/SkillsList.test.js.map +1 -0
- package/dist/src/ui/constants/tips.js +1 -4
- package/dist/src/ui/constants/tips.js.map +1 -1
- package/dist/src/ui/constants.d.ts +4 -3
- package/dist/src/ui/constants.js +5 -6
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.d.ts +1 -0
- package/dist/src/ui/contexts/KeypressContext.js +84 -6
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +130 -9
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
- package/dist/src/ui/contexts/UIActionsContext.d.ts +3 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +5 -1
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
- package/dist/src/ui/contexts/VimModeContext.js +1 -1
- package/dist/src/ui/contexts/VimModeContext.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.js +17 -3
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +9 -3
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.d.ts +6 -0
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.js +183 -0
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +18 -7
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +2 -3
- package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js +31 -0
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion_agents.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAtCompletion_agents.test.js +85 -0
- package/dist/src/ui/hooks/useAtCompletion_agents.test.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +2 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +5 -4
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +1 -0
- package/dist/src/ui/hooks/useCommandCompletion.js +13 -8
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.test.js +88 -2
- package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.js +5 -7
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +20 -4
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.js +14 -19
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.test.js +31 -23
- package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +2 -1
- package/dist/src/ui/hooks/useGeminiStream.js +84 -16
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +290 -10
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
- package/dist/src/ui/hooks/useHistoryManager.d.ts +1 -1
- package/dist/src/ui/hooks/useHistoryManager.js +1 -1
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -1
- package/dist/src/ui/hooks/useHistoryManager.test.js +16 -0
- package/dist/src/ui/hooks/useHistoryManager.test.js.map +1 -1
- package/dist/src/ui/hooks/useHookDisplayState.d.ts +7 -0
- package/dist/src/ui/hooks/useHookDisplayState.js +83 -0
- package/dist/src/ui/hooks/useHookDisplayState.js.map +1 -0
- package/dist/src/ui/hooks/useHookDisplayState.test.d.ts +6 -0
- package/dist/src/ui/hooks/useHookDisplayState.test.js +180 -0
- package/dist/src/ui/hooks/useHookDisplayState.test.js.map +1 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.js +4 -4
- package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -1
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +2 -2
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +2 -2
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +2 -1
- package/dist/src/ui/hooks/useLoadingIndicator.js +7 -3
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +14 -4
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +10 -3
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.js +2 -2
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
- package/dist/src/ui/hooks/usePromptCompletion.js +0 -2
- package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.js +11 -9
- package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +22 -16
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useRewind.d.ts +14 -0
- package/dist/src/ui/hooks/useRewind.js +31 -0
- package/dist/src/ui/hooks/useRewind.js.map +1 -0
- package/dist/src/ui/hooks/useRewind.test.d.ts +6 -0
- package/dist/src/ui/hooks/useRewind.test.js +100 -0
- package/dist/src/ui/hooks/useRewind.test.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.js +2 -1
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.js +3 -3
- package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.test.js +4 -10
- package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -1
- package/dist/src/ui/hooks/useShellHistory.js +3 -3
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.js +26 -11
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.js +115 -5
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +73 -50
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/hooks/vim.test.js +7 -0
- package/dist/src/ui/hooks/vim.test.js.map +1 -1
- package/dist/src/ui/keyMatchers.test.js +79 -53
- package/dist/src/ui/keyMatchers.test.js.map +1 -1
- package/dist/src/ui/themes/ansi-light.js +1 -1
- package/dist/src/ui/themes/ansi-light.js.map +1 -1
- package/dist/src/ui/themes/ansi.js +1 -1
- package/dist/src/ui/themes/ansi.js.map +1 -1
- package/dist/src/ui/themes/color-utils.d.ts +1 -0
- package/dist/src/ui/themes/color-utils.js +13 -0
- package/dist/src/ui/themes/color-utils.js.map +1 -1
- package/dist/src/ui/themes/color-utils.test.js +20 -1
- package/dist/src/ui/themes/color-utils.test.js.map +1 -1
- package/dist/src/ui/themes/shades-of-purple.js +1 -1
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.d.ts +5 -0
- package/dist/src/ui/themes/theme-manager.js +9 -3
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.test.js +7 -0
- package/dist/src/ui/themes/theme-manager.test.js.map +1 -1
- package/dist/src/ui/themes/theme.d.ts +12 -0
- package/dist/src/ui/themes/theme.js +34 -4
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/themes/theme.test.js +23 -0
- package/dist/src/ui/themes/theme.test.js.map +1 -1
- package/dist/src/ui/types.d.ts +23 -4
- package/dist/src/ui/types.js +4 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.js +2 -2
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.test.js +1 -1
- package/dist/src/ui/utils/CodeColorizer.test.js.map +1 -1
- package/dist/src/ui/utils/ConsolePatcher.js +1 -0
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +2 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.d.ts +2 -2
- package/dist/src/ui/utils/clipboardUtils.js +50 -4
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.test.js +12 -12
- package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.windows.test.d.ts +6 -0
- package/dist/src/ui/utils/clipboardUtils.windows.test.js +52 -0
- package/dist/src/ui/utils/clipboardUtils.windows.test.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.js +13 -10
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.test.js +39 -2
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
- package/dist/src/ui/utils/directoryUtils.d.ts +8 -0
- package/dist/src/ui/utils/directoryUtils.js +95 -3
- package/dist/src/ui/utils/directoryUtils.js.map +1 -1
- package/dist/src/ui/utils/directoryUtils.test.js +193 -3
- package/dist/src/ui/utils/directoryUtils.test.js.map +1 -1
- package/dist/src/ui/utils/highlight.d.ts +3 -2
- package/dist/src/ui/utils/highlight.js +46 -36
- package/dist/src/ui/utils/highlight.js.map +1 -1
- package/dist/src/ui/utils/highlight.test.js +75 -0
- package/dist/src/ui/utils/highlight.test.js.map +1 -1
- package/dist/src/ui/utils/historyExportUtils.d.ts +21 -0
- package/dist/src/ui/utils/historyExportUtils.js +59 -0
- package/dist/src/ui/utils/historyExportUtils.js.map +1 -0
- package/dist/src/ui/utils/rewindFileOps.d.ts +47 -0
- package/dist/src/ui/utils/rewindFileOps.js +190 -0
- package/dist/src/ui/utils/rewindFileOps.js.map +1 -0
- package/dist/src/ui/utils/rewindFileOps.test.d.ts +6 -0
- package/dist/src/ui/utils/rewindFileOps.test.js +375 -0
- package/dist/src/ui/utils/rewindFileOps.test.js.map +1 -0
- package/dist/src/ui/utils/terminalCapabilityManager.d.ts +41 -0
- package/dist/src/ui/utils/terminalCapabilityManager.js +209 -0
- package/dist/src/ui/utils/terminalCapabilityManager.js.map +1 -0
- package/dist/src/ui/utils/terminalCapabilityManager.test.d.ts +6 -0
- package/dist/src/ui/utils/terminalCapabilityManager.test.js +221 -0
- package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +1 -0
- package/dist/src/ui/utils/terminalSetup.d.ts +1 -1
- package/dist/src/ui/utils/terminalSetup.js +21 -6
- package/dist/src/ui/utils/terminalSetup.js.map +1 -1
- package/dist/src/ui/utils/terminalSetup.test.js +11 -2
- package/dist/src/ui/utils/terminalSetup.test.js.map +1 -1
- package/dist/src/ui/utils/textUtils.js +9 -1
- package/dist/src/ui/utils/textUtils.js.map +1 -1
- package/dist/src/ui/utils/textUtils.test.js +12 -1
- package/dist/src/ui/utils/textUtils.test.js.map +1 -1
- package/dist/src/ui/utils/ui-sizing.js +1 -1
- package/dist/src/ui/utils/ui-sizing.js.map +1 -1
- package/dist/src/ui/utils/ui-sizing.test.js +2 -2
- package/dist/src/ui/utils/ui-sizing.test.js.map +1 -1
- package/dist/src/utils/activityLogger.d.ts +47 -0
- package/dist/src/utils/activityLogger.js +297 -0
- package/dist/src/utils/activityLogger.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +5 -0
- package/dist/src/utils/cleanup.js +17 -0
- package/dist/src/utils/cleanup.js.map +1 -1
- package/dist/src/utils/cleanup.test.js +21 -31
- package/dist/src/utils/cleanup.test.js.map +1 -1
- package/dist/src/utils/errors.js +9 -10
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/errors.test.js +95 -37
- package/dist/src/utils/errors.test.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.test.js +2 -2
- package/dist/src/utils/processUtils.d.ts +1 -1
- package/dist/src/utils/processUtils.js +1 -1
- package/dist/src/utils/processUtils.js.map +1 -1
- package/dist/src/utils/readStdin.js +7 -0
- package/dist/src/utils/readStdin.js.map +1 -1
- package/dist/src/utils/readStdin.test.js +4 -0
- package/dist/src/utils/readStdin.test.js.map +1 -1
- package/dist/src/utils/readStdin_safety.test.d.ts +6 -0
- package/dist/src/utils/readStdin_safety.test.js +68 -0
- package/dist/src/utils/readStdin_safety.test.js.map +1 -0
- package/dist/src/utils/relaunch.js +3 -1
- package/dist/src/utils/relaunch.js.map +1 -1
- package/dist/src/utils/relaunch.test.js +13 -7
- package/dist/src/utils/relaunch.test.js.map +1 -1
- package/dist/src/utils/resolvePath.js +3 -3
- package/dist/src/utils/resolvePath.js.map +1 -1
- package/dist/src/utils/resolvePath.test.js +3 -0
- package/dist/src/utils/resolvePath.test.js.map +1 -1
- package/dist/src/utils/sandbox.js +27 -17
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/sandbox.test.js +17 -5
- package/dist/src/utils/sandbox.test.js.map +1 -1
- package/dist/src/utils/sessionCleanup.integration.test.js +2 -2
- package/dist/src/utils/sessionCleanup.integration.test.js.map +1 -1
- package/dist/src/utils/sessionCleanup.js +16 -4
- package/dist/src/utils/sessionCleanup.js.map +1 -1
- package/dist/src/utils/sessionCleanup.test.js +18 -68
- package/dist/src/utils/sessionCleanup.test.js.map +1 -1
- package/dist/src/utils/sessionUtils.d.ts +20 -0
- package/dist/src/utils/sessionUtils.js +32 -4
- package/dist/src/utils/sessionUtils.js.map +1 -1
- package/dist/src/utils/sessionUtils.test.js +3 -3
- package/dist/src/utils/sessionUtils.test.js.map +1 -1
- package/dist/src/utils/sessions.js +9 -9
- package/dist/src/utils/sessions.js.map +1 -1
- package/dist/src/utils/sessions.test.js +38 -41
- package/dist/src/utils/sessions.test.js.map +1 -1
- package/dist/src/utils/settingsUtils.js +0 -5
- package/dist/src/utils/settingsUtils.js.map +1 -1
- package/dist/src/utils/skillSettings.d.ts +33 -0
- package/dist/src/utils/skillSettings.js +101 -0
- package/dist/src/utils/skillSettings.js.map +1 -0
- package/dist/src/utils/skillUtils.d.ts +29 -0
- package/dist/src/utils/skillUtils.js +144 -0
- package/dist/src/utils/skillUtils.js.map +1 -0
- package/dist/src/utils/skillUtils.test.d.ts +6 -0
- package/dist/src/utils/skillUtils.test.js +57 -0
- package/dist/src/utils/skillUtils.test.js.map +1 -0
- package/dist/src/utils/terminalTheme.d.ts +15 -0
- package/dist/src/utils/terminalTheme.js +50 -0
- package/dist/src/utils/terminalTheme.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +2 -1
- package/dist/src/utils/userStartupWarnings.js +17 -7
- package/dist/src/utils/userStartupWarnings.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.test.js +37 -6
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -1
- package/dist/src/utils/windowTitle.d.ts +13 -4
- package/dist/src/utils/windowTitle.js +65 -7
- package/dist/src/utils/windowTitle.js.map +1 -1
- package/dist/src/utils/windowTitle.test.js +183 -40
- package/dist/src/utils/windowTitle.test.js.map +1 -1
- package/dist/src/validateNonInterActiveAuth.d.ts +1 -1
- package/dist/src/validateNonInterActiveAuth.js +1 -2
- package/dist/src/validateNonInterActiveAuth.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +3 -3
- package/dist/src/zed-integration/fileSystemService.js +5 -7
- package/dist/src/zed-integration/fileSystemService.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.test.js +11 -13
- package/dist/src/zed-integration/fileSystemService.test.js.map +1 -1
- package/dist/src/zed-integration/zedIntegration.d.ts +5 -5
- package/dist/src/zed-integration/zedIntegration.js +42 -21
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/src/zed-integration/zedIntegration.test.js +29 -18
- package/dist/src/zed-integration/zedIntegration.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/dist/src/commands/extensions/settings.js +0 -111
- package/dist/src/commands/extensions/settings.js.map +0 -1
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +0 -12
- package/dist/src/ui/hooks/useBracketedPaste.js +0 -31
- package/dist/src/ui/hooks/useBracketedPaste.js.map +0 -1
- package/dist/src/ui/utils/bracketedPaste.d.ts +0 -7
- package/dist/src/ui/utils/bracketedPaste.js +0 -15
- package/dist/src/ui/utils/bracketedPaste.js.map +0 -1
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +0 -17
- package/dist/src/ui/utils/kittyProtocolDetector.js +0 -111
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +0 -1
- package/dist/src/ui/utils/kittyProtocolDetector.test.js +0 -113
- package/dist/src/ui/utils/kittyProtocolDetector.test.js.map +0 -1
- package/dist/src/zed-integration/acp.d.ts +0 -41
- package/dist/src/zed-integration/acp.js +0 -72
- package/dist/src/zed-integration/acp.js.map +0 -1
- package/dist/src/zed-integration/acp.test.js +0 -214
- package/dist/src/zed-integration/acp.test.js.map +0 -1
- package/dist/src/zed-integration/connection.d.ts +0 -28
- package/dist/src/zed-integration/connection.js +0 -165
- package/dist/src/zed-integration/connection.js.map +0 -1
- package/dist/src/zed-integration/connection.test.js +0 -175
- package/dist/src/zed-integration/connection.test.js.map +0 -1
- package/dist/src/zed-integration/schema.d.ts +0 -11792
- package/dist/src/zed-integration/schema.js +0 -311
- package/dist/src/zed-integration/schema.js.map +0 -1
- /package/dist/src/{ui/utils/kittyProtocolDetector.test.d.ts → config/extension-manager-scope.test.d.ts} +0 -0
- /package/dist/src/{zed-integration/acp.test.d.ts → config/extension-manager-skills.test.d.ts} +0 -0
- /package/dist/src/{zed-integration/connection.test.d.ts → config/extensions/extensionUpdates.test.d.ts} +0 -0
|
@@ -7,12 +7,13 @@ import { spawnSync } from 'node:child_process';
|
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import os from 'node:os';
|
|
9
9
|
import pathMod from 'node:path';
|
|
10
|
+
import * as path from 'node:path';
|
|
10
11
|
import { useState, useCallback, useEffect, useMemo, useReducer } from 'react';
|
|
11
|
-
import { coreEvents, CoreEvent } from '@google/gemini-cli-core';
|
|
12
|
+
import { coreEvents, CoreEvent, debugLogger, unescapePath, getEditorCommand, isGuiEditor, } from '@google/gemini-cli-core';
|
|
12
13
|
import { toCodePoints, cpLen, cpSlice, stripUnsafeCharacters, getCachedStringWidth, } from '../../utils/textUtils.js';
|
|
13
14
|
import { parsePastedPaths } from '../../utils/clipboardUtils.js';
|
|
15
|
+
import { keyMatchers, Command } from '../../keyMatchers.js';
|
|
14
16
|
import { handleVimAction } from './vim-buffer-actions.js';
|
|
15
|
-
import { enableSupportedProtocol } from '../../utils/kittyProtocolDetector.js';
|
|
16
17
|
// Helper functions for line-based word navigation
|
|
17
18
|
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
|
|
18
19
|
export const isWhitespace = (char) => /\s/.test(char);
|
|
@@ -484,24 +485,136 @@ export function logicalPosToOffset(lines, row, col) {
|
|
|
484
485
|
}
|
|
485
486
|
return offset;
|
|
486
487
|
}
|
|
488
|
+
export const imagePathRegex = /@((?:\\.|[^\s\r\n\\])+?\.(?:png|jpg|jpeg|gif|webp|svg|bmp))\b/gi;
|
|
489
|
+
export function getTransformedImagePath(filePath) {
|
|
490
|
+
const raw = filePath;
|
|
491
|
+
// Ignore leading @ when stripping directories, but keep it for simple '@file.png'
|
|
492
|
+
const withoutAt = raw.startsWith('@') ? raw.slice(1) : raw;
|
|
493
|
+
// Unescape the path to handle escaped spaces and other characters
|
|
494
|
+
const unescaped = unescapePath(withoutAt);
|
|
495
|
+
// Find last directory separator, supporting both POSIX and Windows styles
|
|
496
|
+
const lastSepIndex = Math.max(unescaped.lastIndexOf('/'), unescaped.lastIndexOf('\\'));
|
|
497
|
+
// If we saw a separator, take the segment after it; otherwise fall back to the unescaped string
|
|
498
|
+
const fileName = lastSepIndex >= 0 ? unescaped.slice(lastSepIndex + 1) : unescaped;
|
|
499
|
+
const extension = path.extname(fileName);
|
|
500
|
+
const baseName = path.basename(fileName, extension);
|
|
501
|
+
const maxBaseLength = 10;
|
|
502
|
+
const truncatedBase = baseName.length > maxBaseLength
|
|
503
|
+
? `...${baseName.slice(-maxBaseLength)}`
|
|
504
|
+
: baseName;
|
|
505
|
+
return `[Image ${truncatedBase}${extension}]`;
|
|
506
|
+
}
|
|
507
|
+
export function calculateTransformationsForLine(line) {
|
|
508
|
+
const transformations = [];
|
|
509
|
+
let match;
|
|
510
|
+
// Reset regex state to ensure clean matching from start of line
|
|
511
|
+
imagePathRegex.lastIndex = 0;
|
|
512
|
+
while ((match = imagePathRegex.exec(line)) !== null) {
|
|
513
|
+
const logicalText = match[0];
|
|
514
|
+
const logStart = cpLen(line.substring(0, match.index));
|
|
515
|
+
const logEnd = logStart + cpLen(logicalText);
|
|
516
|
+
transformations.push({
|
|
517
|
+
logStart,
|
|
518
|
+
logEnd,
|
|
519
|
+
logicalText,
|
|
520
|
+
collapsedText: getTransformedImagePath(logicalText),
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
return transformations;
|
|
524
|
+
}
|
|
525
|
+
export function calculateTransformations(lines) {
|
|
526
|
+
return lines.map((ln) => calculateTransformationsForLine(ln));
|
|
527
|
+
}
|
|
528
|
+
export function getTransformUnderCursor(row, col, spansByLine) {
|
|
529
|
+
const spans = spansByLine[row];
|
|
530
|
+
if (!spans || spans.length === 0)
|
|
531
|
+
return null;
|
|
532
|
+
for (const span of spans) {
|
|
533
|
+
if (col >= span.logStart && col <= span.logEnd) {
|
|
534
|
+
return span;
|
|
535
|
+
}
|
|
536
|
+
if (col < span.logStart)
|
|
537
|
+
break;
|
|
538
|
+
}
|
|
539
|
+
return null;
|
|
540
|
+
}
|
|
541
|
+
export function calculateTransformedLine(logLine, logIndex, logicalCursor, transformations) {
|
|
542
|
+
let transformedLine = '';
|
|
543
|
+
const transformedToLogMap = [];
|
|
544
|
+
let lastLogPos = 0;
|
|
545
|
+
const cursorIsOnThisLine = logIndex === logicalCursor[0];
|
|
546
|
+
const cursorCol = logicalCursor[1];
|
|
547
|
+
for (const transform of transformations) {
|
|
548
|
+
const textBeforeTransformation = cpSlice(logLine, lastLogPos, transform.logStart);
|
|
549
|
+
transformedLine += textBeforeTransformation;
|
|
550
|
+
for (let i = 0; i < cpLen(textBeforeTransformation); i++) {
|
|
551
|
+
transformedToLogMap.push(lastLogPos + i);
|
|
552
|
+
}
|
|
553
|
+
const isExpanded = cursorIsOnThisLine &&
|
|
554
|
+
cursorCol >= transform.logStart &&
|
|
555
|
+
cursorCol <= transform.logEnd;
|
|
556
|
+
const transformedText = isExpanded
|
|
557
|
+
? transform.logicalText
|
|
558
|
+
: transform.collapsedText;
|
|
559
|
+
transformedLine += transformedText;
|
|
560
|
+
// Map transformed characters back to logical characters
|
|
561
|
+
const transformedLen = cpLen(transformedText);
|
|
562
|
+
if (isExpanded) {
|
|
563
|
+
for (let i = 0; i < transformedLen; i++) {
|
|
564
|
+
transformedToLogMap.push(transform.logStart + i);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
else {
|
|
568
|
+
// Collapsed: distribute transformed positions monotonically across the raw span.
|
|
569
|
+
// This preserves ordering across wrapped slices so logicalToVisualMap has
|
|
570
|
+
// increasing startColInLogical and visual cursor mapping remains consistent.
|
|
571
|
+
const logicalLength = Math.max(0, transform.logEnd - transform.logStart);
|
|
572
|
+
for (let i = 0; i < transformedLen; i++) {
|
|
573
|
+
// Map the i-th transformed code point into [logStart, logEnd)
|
|
574
|
+
const transformationToLogicalOffset = logicalLength === 0
|
|
575
|
+
? 0
|
|
576
|
+
: Math.floor((i * logicalLength) / transformedLen);
|
|
577
|
+
const transformationToLogicalIndex = transform.logStart +
|
|
578
|
+
Math.min(transformationToLogicalOffset, Math.max(logicalLength - 1, 0));
|
|
579
|
+
transformedToLogMap.push(transformationToLogicalIndex);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
lastLogPos = transform.logEnd;
|
|
583
|
+
}
|
|
584
|
+
// Append text after last transform
|
|
585
|
+
const remainingUntransformedText = cpSlice(logLine, lastLogPos);
|
|
586
|
+
transformedLine += remainingUntransformedText;
|
|
587
|
+
for (let i = 0; i < cpLen(remainingUntransformedText); i++) {
|
|
588
|
+
transformedToLogMap.push(lastLogPos + i);
|
|
589
|
+
}
|
|
590
|
+
// For a cursor at the very end of the transformed line
|
|
591
|
+
transformedToLogMap.push(cpLen(logLine));
|
|
592
|
+
return { transformedLine, transformedToLogMap };
|
|
593
|
+
}
|
|
487
594
|
// Calculates the visual wrapping of lines and the mapping between logical and visual coordinates.
|
|
488
595
|
// This is an expensive operation and should be memoized.
|
|
489
|
-
function calculateLayout(logicalLines, viewportWidth) {
|
|
596
|
+
function calculateLayout(logicalLines, viewportWidth, logicalCursor) {
|
|
490
597
|
const visualLines = [];
|
|
491
598
|
const logicalToVisualMap = [];
|
|
492
599
|
const visualToLogicalMap = [];
|
|
600
|
+
const transformedToLogicalMaps = [];
|
|
601
|
+
const visualToTransformedMap = [];
|
|
493
602
|
logicalLines.forEach((logLine, logIndex) => {
|
|
494
603
|
logicalToVisualMap[logIndex] = [];
|
|
495
|
-
|
|
604
|
+
const transformations = calculateTransformationsForLine(logLine);
|
|
605
|
+
const { transformedLine, transformedToLogMap } = calculateTransformedLine(logLine, logIndex, logicalCursor, transformations);
|
|
606
|
+
transformedToLogicalMaps[logIndex] = transformedToLogMap;
|
|
607
|
+
if (transformedLine.length === 0) {
|
|
496
608
|
// Handle empty logical line
|
|
497
609
|
logicalToVisualMap[logIndex].push([visualLines.length, 0]);
|
|
498
610
|
visualToLogicalMap.push([logIndex, 0]);
|
|
611
|
+
visualToTransformedMap.push(0);
|
|
499
612
|
visualLines.push('');
|
|
500
613
|
}
|
|
501
614
|
else {
|
|
502
615
|
// Non-empty logical line
|
|
503
616
|
let currentPosInLogLine = 0; // Tracks position within the current logical line (code point index)
|
|
504
|
-
const codePointsInLogLine = toCodePoints(
|
|
617
|
+
const codePointsInLogLine = toCodePoints(transformedLine);
|
|
505
618
|
while (currentPosInLogLine < codePointsInLogLine.length) {
|
|
506
619
|
let currentChunk = '';
|
|
507
620
|
let currentChunkVisualWidth = 0;
|
|
@@ -571,11 +684,13 @@ function calculateLayout(logicalLines, viewportWidth) {
|
|
|
571
684
|
currentChunk = codePointsInLogLine[currentPosInLogLine];
|
|
572
685
|
numCodePointsInChunk = 1;
|
|
573
686
|
}
|
|
687
|
+
const logicalStartCol = transformedToLogMap[currentPosInLogLine] ?? 0;
|
|
574
688
|
logicalToVisualMap[logIndex].push([
|
|
575
689
|
visualLines.length,
|
|
576
|
-
|
|
690
|
+
logicalStartCol,
|
|
577
691
|
]);
|
|
578
|
-
visualToLogicalMap.push([logIndex,
|
|
692
|
+
visualToLogicalMap.push([logIndex, logicalStartCol]);
|
|
693
|
+
visualToTransformedMap.push(currentPosInLogLine);
|
|
579
694
|
visualLines.push(currentChunk);
|
|
580
695
|
const logicalStartOfThisChunk = currentPosInLogLine;
|
|
581
696
|
currentPosInLogLine += numCodePointsInChunk;
|
|
@@ -600,18 +715,21 @@ function calculateLayout(logicalLines, viewportWidth) {
|
|
|
600
715
|
logicalToVisualMap[0] = [];
|
|
601
716
|
logicalToVisualMap[0].push([0, 0]);
|
|
602
717
|
visualToLogicalMap.push([0, 0]);
|
|
718
|
+
visualToTransformedMap.push(0);
|
|
603
719
|
}
|
|
604
720
|
}
|
|
605
721
|
return {
|
|
606
722
|
visualLines,
|
|
607
723
|
logicalToVisualMap,
|
|
608
724
|
visualToLogicalMap,
|
|
725
|
+
transformedToLogicalMaps,
|
|
726
|
+
visualToTransformedMap,
|
|
609
727
|
};
|
|
610
728
|
}
|
|
611
729
|
// Calculates the visual cursor position based on a pre-calculated layout.
|
|
612
730
|
// This is a lightweight operation.
|
|
613
731
|
function calculateVisualCursorFromLayout(layout, logicalCursor) {
|
|
614
|
-
const { logicalToVisualMap, visualLines } = layout;
|
|
732
|
+
const { logicalToVisualMap, visualLines, transformedToLogicalMaps } = layout;
|
|
615
733
|
const [logicalRow, logicalCol] = logicalCursor;
|
|
616
734
|
const segmentsForLogicalLine = logicalToVisualMap[logicalRow];
|
|
617
735
|
if (!segmentsForLogicalLine || segmentsForLogicalLine.length === 0) {
|
|
@@ -636,9 +754,26 @@ function calculateVisualCursorFromLayout(layout, logicalCursor) {
|
|
|
636
754
|
}
|
|
637
755
|
}
|
|
638
756
|
const [visualRow, startColInLogical] = segmentsForLogicalLine[targetSegmentIndex];
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
757
|
+
// Find the coordinates in transformed space in order to conver to visual
|
|
758
|
+
const transformedToLogicalMap = transformedToLogicalMaps[logicalRow] ?? [];
|
|
759
|
+
let transformedCol = 0;
|
|
760
|
+
for (let i = 0; i < transformedToLogicalMap.length; i++) {
|
|
761
|
+
if (transformedToLogicalMap[i] > logicalCol) {
|
|
762
|
+
transformedCol = Math.max(0, i - 1);
|
|
763
|
+
break;
|
|
764
|
+
}
|
|
765
|
+
if (i === transformedToLogicalMap.length - 1) {
|
|
766
|
+
transformedCol = transformedToLogicalMap.length - 1;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
let startColInTransformed = 0;
|
|
770
|
+
while (startColInTransformed < transformedToLogicalMap.length &&
|
|
771
|
+
transformedToLogicalMap[startColInTransformed] < startColInLogical) {
|
|
772
|
+
startColInTransformed++;
|
|
773
|
+
}
|
|
774
|
+
const clampedTransformedCol = Math.min(transformedCol, Math.max(0, transformedToLogicalMap.length - 1));
|
|
775
|
+
const visualCol = clampedTransformedCol - startColInTransformed;
|
|
776
|
+
const clampedVisualCol = Math.min(Math.max(visualCol, 0), cpLen(visualLines[visualRow] ?? ''));
|
|
642
777
|
return [visualRow, clampedVisualCol];
|
|
643
778
|
}
|
|
644
779
|
const historyLimit = 100;
|
|
@@ -828,16 +963,25 @@ function textBufferReducerLogic(state, action, options = {}) {
|
|
|
828
963
|
break;
|
|
829
964
|
default: {
|
|
830
965
|
const exhaustiveCheck = dir;
|
|
831
|
-
|
|
966
|
+
debugLogger.error(`Unknown visual movement direction: ${exhaustiveCheck}`);
|
|
832
967
|
return state;
|
|
833
968
|
}
|
|
834
969
|
}
|
|
835
970
|
if (visualToLogicalMap[newVisualRow]) {
|
|
836
|
-
const [logRow,
|
|
971
|
+
const [logRow, logicalStartCol] = visualToLogicalMap[newVisualRow];
|
|
972
|
+
const transformedToLogicalMap = visualLayout.transformedToLogicalMaps?.[logRow] ?? [];
|
|
973
|
+
let transformedStartCol = 0;
|
|
974
|
+
while (transformedStartCol < transformedToLogicalMap.length &&
|
|
975
|
+
transformedToLogicalMap[transformedStartCol] < logicalStartCol) {
|
|
976
|
+
transformedStartCol++;
|
|
977
|
+
}
|
|
978
|
+
const clampedTransformedCol = Math.min(transformedStartCol + newVisualCol, Math.max(0, transformedToLogicalMap.length - 1));
|
|
979
|
+
const newLogicalCol = transformedToLogicalMap[clampedTransformedCol] ??
|
|
980
|
+
cpLen(lines[logRow] ?? '');
|
|
837
981
|
return {
|
|
838
982
|
...state,
|
|
839
983
|
cursorRow: logRow,
|
|
840
|
-
cursorCol:
|
|
984
|
+
cursorCol: newLogicalCol,
|
|
841
985
|
preferredCol: newPreferredCol,
|
|
842
986
|
};
|
|
843
987
|
}
|
|
@@ -1117,32 +1261,51 @@ function textBufferReducerLogic(state, action, options = {}) {
|
|
|
1117
1261
|
return handleVimAction(state, action);
|
|
1118
1262
|
default: {
|
|
1119
1263
|
const exhaustiveCheck = action;
|
|
1120
|
-
|
|
1264
|
+
debugLogger.error(`Unknown action encountered: ${exhaustiveCheck}`);
|
|
1121
1265
|
return state;
|
|
1122
1266
|
}
|
|
1123
1267
|
}
|
|
1124
1268
|
}
|
|
1125
1269
|
export function textBufferReducer(state, action, options = {}) {
|
|
1126
1270
|
const newState = textBufferReducerLogic(state, action, options);
|
|
1271
|
+
const newTransformedLines = newState.lines !== state.lines
|
|
1272
|
+
? calculateTransformations(newState.lines)
|
|
1273
|
+
: state.transformationsByLine;
|
|
1274
|
+
const oldTransform = getTransformUnderCursor(state.cursorRow, state.cursorCol, state.transformationsByLine);
|
|
1275
|
+
const newTransform = getTransformUnderCursor(newState.cursorRow, newState.cursorCol, newTransformedLines);
|
|
1276
|
+
const oldInside = oldTransform !== null;
|
|
1277
|
+
const newInside = newTransform !== null;
|
|
1278
|
+
const movedBetweenTransforms = oldTransform !== newTransform &&
|
|
1279
|
+
(oldTransform !== null || newTransform !== null);
|
|
1127
1280
|
if (newState.lines !== state.lines ||
|
|
1128
|
-
newState.viewportWidth !== state.viewportWidth
|
|
1281
|
+
newState.viewportWidth !== state.viewportWidth ||
|
|
1282
|
+
oldInside !== newInside ||
|
|
1283
|
+
movedBetweenTransforms) {
|
|
1284
|
+
const shouldResetPreferred = oldInside !== newInside || movedBetweenTransforms;
|
|
1129
1285
|
return {
|
|
1130
1286
|
...newState,
|
|
1131
|
-
|
|
1287
|
+
preferredCol: shouldResetPreferred ? null : newState.preferredCol,
|
|
1288
|
+
visualLayout: calculateLayout(newState.lines, newState.viewportWidth, [
|
|
1289
|
+
newState.cursorRow,
|
|
1290
|
+
newState.cursorCol,
|
|
1291
|
+
]),
|
|
1292
|
+
transformationsByLine: newTransformedLines,
|
|
1132
1293
|
};
|
|
1133
1294
|
}
|
|
1134
1295
|
return newState;
|
|
1135
1296
|
}
|
|
1136
1297
|
// --- End of reducer logic ---
|
|
1137
|
-
export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewport, stdin, setRawMode, onChange, isValidPath, shellModeActive = false, inputFilter, singleLine = false, }) {
|
|
1298
|
+
export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewport, stdin, setRawMode, onChange, isValidPath, shellModeActive = false, inputFilter, singleLine = false, getPreferredEditor, }) {
|
|
1138
1299
|
const initialState = useMemo(() => {
|
|
1139
1300
|
const lines = initialText.split('\n');
|
|
1140
1301
|
const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(lines.length === 0 ? [''] : lines, initialCursorOffset);
|
|
1141
|
-
const
|
|
1302
|
+
const transformationsByLine = calculateTransformations(lines.length === 0 ? [''] : lines);
|
|
1303
|
+
const visualLayout = calculateLayout(lines.length === 0 ? [''] : lines, viewport.width, [initialCursorRow, initialCursorCol]);
|
|
1142
1304
|
return {
|
|
1143
1305
|
lines: lines.length === 0 ? [''] : lines,
|
|
1144
1306
|
cursorRow: initialCursorRow,
|
|
1145
1307
|
cursorCol: initialCursorCol,
|
|
1308
|
+
transformationsByLine,
|
|
1146
1309
|
preferredCol: null,
|
|
1147
1310
|
undoStack: [],
|
|
1148
1311
|
redoStack: [],
|
|
@@ -1154,10 +1317,10 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1154
1317
|
};
|
|
1155
1318
|
}, [initialText, initialCursorOffset, viewport.width, viewport.height]);
|
|
1156
1319
|
const [state, dispatch] = useReducer((s, a) => textBufferReducer(s, a, { inputFilter, singleLine }), initialState);
|
|
1157
|
-
const { lines, cursorRow, cursorCol, preferredCol, selectionAnchor, visualLayout, } = state;
|
|
1320
|
+
const { lines, cursorRow, cursorCol, preferredCol, selectionAnchor, visualLayout, transformationsByLine, } = state;
|
|
1158
1321
|
const text = useMemo(() => lines.join('\n'), [lines]);
|
|
1159
1322
|
const visualCursor = useMemo(() => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]), [visualLayout, cursorRow, cursorCol]);
|
|
1160
|
-
const { visualLines, visualToLogicalMap } = visualLayout;
|
|
1323
|
+
const { visualLines, visualToLogicalMap, transformedToLogicalMaps, visualToTransformedMap, } = visualLayout;
|
|
1161
1324
|
const [visualScrollRow, setVisualScrollRow] = useState(0);
|
|
1162
1325
|
useEffect(() => {
|
|
1163
1326
|
if (onChange) {
|
|
@@ -1360,19 +1523,32 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1360
1523
|
const vimEscapeInsertMode = useCallback(() => {
|
|
1361
1524
|
dispatch({ type: 'vim_escape_insert_mode' });
|
|
1362
1525
|
}, []);
|
|
1363
|
-
const openInExternalEditor = useCallback(async (
|
|
1364
|
-
const editor = opts.editor ??
|
|
1365
|
-
process.env['VISUAL'] ??
|
|
1366
|
-
process.env['EDITOR'] ??
|
|
1367
|
-
(process.platform === 'win32' ? 'notepad' : 'vi');
|
|
1526
|
+
const openInExternalEditor = useCallback(async () => {
|
|
1368
1527
|
const tmpDir = fs.mkdtempSync(pathMod.join(os.tmpdir(), 'gemini-edit-'));
|
|
1369
1528
|
const filePath = pathMod.join(tmpDir, 'buffer.txt');
|
|
1370
1529
|
fs.writeFileSync(filePath, text, 'utf8');
|
|
1530
|
+
let command = undefined;
|
|
1531
|
+
const args = [filePath];
|
|
1532
|
+
const preferredEditorType = getPreferredEditor?.();
|
|
1533
|
+
if (!command && preferredEditorType) {
|
|
1534
|
+
command = getEditorCommand(preferredEditorType);
|
|
1535
|
+
if (isGuiEditor(preferredEditorType)) {
|
|
1536
|
+
args.unshift('--wait');
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
if (!command) {
|
|
1540
|
+
command =
|
|
1541
|
+
(process.env['VISUAL'] ??
|
|
1542
|
+
process.env['EDITOR'] ??
|
|
1543
|
+
process.platform === 'win32')
|
|
1544
|
+
? 'notepad'
|
|
1545
|
+
: 'vi';
|
|
1546
|
+
}
|
|
1371
1547
|
dispatch({ type: 'create_undo_snapshot' });
|
|
1372
1548
|
const wasRaw = stdin?.isRaw ?? false;
|
|
1373
1549
|
try {
|
|
1374
1550
|
setRawMode?.(false);
|
|
1375
|
-
const { status, error } = spawnSync(
|
|
1551
|
+
const { status, error } = spawnSync(command, args, {
|
|
1376
1552
|
stdio: 'inherit',
|
|
1377
1553
|
});
|
|
1378
1554
|
if (error)
|
|
@@ -1384,10 +1560,9 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1384
1560
|
dispatch({ type: 'set_text', payload: newText, pushToUndo: false });
|
|
1385
1561
|
}
|
|
1386
1562
|
catch (err) {
|
|
1387
|
-
|
|
1563
|
+
coreEvents.emitFeedback('error', '[useTextBuffer] external editor error', err);
|
|
1388
1564
|
}
|
|
1389
1565
|
finally {
|
|
1390
|
-
enableSupportedProtocol();
|
|
1391
1566
|
coreEvents.emit(CoreEvent.ExternalEditorClosed);
|
|
1392
1567
|
if (wasRaw)
|
|
1393
1568
|
setRawMode?.(true);
|
|
@@ -1404,7 +1579,7 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1404
1579
|
/* ignore */
|
|
1405
1580
|
}
|
|
1406
1581
|
}
|
|
1407
|
-
}, [text, stdin, setRawMode]);
|
|
1582
|
+
}, [text, stdin, setRawMode, getPreferredEditor]);
|
|
1408
1583
|
const handleInput = useCallback((key) => {
|
|
1409
1584
|
const { sequence: input } = key;
|
|
1410
1585
|
if (key.paste) {
|
|
@@ -1420,50 +1595,33 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1420
1595
|
input === '\\r') // VSCode terminal represents shift + enter this way
|
|
1421
1596
|
)
|
|
1422
1597
|
newline();
|
|
1423
|
-
else if (
|
|
1598
|
+
else if (keyMatchers[Command.MOVE_LEFT](key))
|
|
1424
1599
|
move('left');
|
|
1425
|
-
else if (
|
|
1426
|
-
move('left');
|
|
1427
|
-
else if (key.name === 'right' && !key.meta && !key.ctrl)
|
|
1428
|
-
move('right');
|
|
1429
|
-
else if (key.ctrl && key.name === 'f')
|
|
1600
|
+
else if (keyMatchers[Command.MOVE_RIGHT](key))
|
|
1430
1601
|
move('right');
|
|
1431
1602
|
else if (key.name === 'up')
|
|
1432
1603
|
move('up');
|
|
1433
1604
|
else if (key.name === 'down')
|
|
1434
1605
|
move('down');
|
|
1435
|
-
else if ((key
|
|
1436
|
-
move('wordLeft');
|
|
1437
|
-
else if (key.meta && key.name === 'b')
|
|
1606
|
+
else if (keyMatchers[Command.MOVE_WORD_LEFT](key))
|
|
1438
1607
|
move('wordLeft');
|
|
1439
|
-
else if ((key
|
|
1608
|
+
else if (keyMatchers[Command.MOVE_WORD_RIGHT](key))
|
|
1440
1609
|
move('wordRight');
|
|
1441
|
-
else if (
|
|
1442
|
-
move('wordRight');
|
|
1443
|
-
else if (key.name === 'home')
|
|
1444
|
-
move('home');
|
|
1445
|
-
else if (key.ctrl && key.name === 'a')
|
|
1610
|
+
else if (keyMatchers[Command.HOME](key))
|
|
1446
1611
|
move('home');
|
|
1447
|
-
else if (key
|
|
1612
|
+
else if (keyMatchers[Command.END](key))
|
|
1448
1613
|
move('end');
|
|
1449
|
-
else if (
|
|
1450
|
-
move('end');
|
|
1451
|
-
else if (key.ctrl && key.name === 'w')
|
|
1452
|
-
deleteWordLeft();
|
|
1453
|
-
else if ((key.meta || key.ctrl) &&
|
|
1454
|
-
(key.name === 'backspace' || input === '\x7f'))
|
|
1614
|
+
else if (keyMatchers[Command.DELETE_WORD_BACKWARD](key))
|
|
1455
1615
|
deleteWordLeft();
|
|
1456
|
-
else if ((key
|
|
1616
|
+
else if (keyMatchers[Command.DELETE_WORD_FORWARD](key))
|
|
1457
1617
|
deleteWordRight();
|
|
1458
|
-
else if (key
|
|
1459
|
-
input === '\x7f' ||
|
|
1460
|
-
(key.ctrl && key.name === 'h'))
|
|
1618
|
+
else if (keyMatchers[Command.DELETE_CHAR_LEFT](key))
|
|
1461
1619
|
backspace();
|
|
1462
|
-
else if (
|
|
1620
|
+
else if (keyMatchers[Command.DELETE_CHAR_RIGHT](key))
|
|
1463
1621
|
del();
|
|
1464
|
-
else if (
|
|
1622
|
+
else if (keyMatchers[Command.UNDO](key))
|
|
1465
1623
|
undo();
|
|
1466
|
-
else if (
|
|
1624
|
+
else if (keyMatchers[Command.REDO](key))
|
|
1467
1625
|
redo();
|
|
1468
1626
|
else if (key.insertable) {
|
|
1469
1627
|
insert(input, { paste: key.paste });
|
|
@@ -1496,12 +1654,16 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1496
1654
|
dispatch({ type: 'move_to_offset', payload: { offset } });
|
|
1497
1655
|
}, []);
|
|
1498
1656
|
const moveToVisualPosition = useCallback((visRow, visCol) => {
|
|
1499
|
-
const { visualLines, visualToLogicalMap } = visualLayout;
|
|
1657
|
+
const { visualLines, visualToLogicalMap, transformedToLogicalMaps, visualToTransformedMap, } = visualLayout;
|
|
1500
1658
|
// Clamp visRow to valid range
|
|
1501
1659
|
const clampedVisRow = Math.max(0, Math.min(visRow, visualLines.length - 1));
|
|
1502
1660
|
const visualLine = visualLines[clampedVisRow] || '';
|
|
1503
1661
|
if (visualToLogicalMap[clampedVisRow]) {
|
|
1504
|
-
const [logRow
|
|
1662
|
+
const [logRow] = visualToLogicalMap[clampedVisRow];
|
|
1663
|
+
const transformedToLogicalMap = transformedToLogicalMaps?.[logRow] ?? [];
|
|
1664
|
+
// Where does this visual line begin within the transformed line?
|
|
1665
|
+
const startColInTransformed = visualToTransformedMap?.[clampedVisRow] ?? 0;
|
|
1666
|
+
// Handle wide characters: convert visual X position to character offset
|
|
1505
1667
|
const codePoints = toCodePoints(visualLine);
|
|
1506
1668
|
let currentVisX = 0;
|
|
1507
1669
|
let charOffset = 0;
|
|
@@ -1520,8 +1682,10 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1520
1682
|
}
|
|
1521
1683
|
// Clamp charOffset to length
|
|
1522
1684
|
charOffset = Math.min(charOffset, codePoints.length);
|
|
1685
|
+
// Map character offset through transformations to get logical position
|
|
1686
|
+
const transformedCol = Math.min(startColInTransformed + charOffset, Math.max(0, transformedToLogicalMap.length - 1));
|
|
1523
1687
|
const newCursorRow = logRow;
|
|
1524
|
-
const newCursorCol =
|
|
1688
|
+
const newCursorCol = transformedToLogicalMap[transformedCol] ?? cpLen(lines[logRow] ?? '');
|
|
1525
1689
|
dispatch({
|
|
1526
1690
|
type: 'set_cursor',
|
|
1527
1691
|
payload: {
|
|
@@ -1531,7 +1695,7 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1531
1695
|
},
|
|
1532
1696
|
});
|
|
1533
1697
|
}
|
|
1534
|
-
}, [visualLayout]);
|
|
1698
|
+
}, [visualLayout, lines]);
|
|
1535
1699
|
const getOffset = useCallback(() => logicalPosToOffset(lines, cursorRow, cursorCol), [lines, cursorRow, cursorCol]);
|
|
1536
1700
|
const returnValue = useMemo(() => ({
|
|
1537
1701
|
lines,
|
|
@@ -1544,6 +1708,9 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1544
1708
|
visualCursor,
|
|
1545
1709
|
visualScrollRow,
|
|
1546
1710
|
visualToLogicalMap,
|
|
1711
|
+
transformedToLogicalMaps,
|
|
1712
|
+
visualToTransformedMap,
|
|
1713
|
+
transformationsByLine,
|
|
1547
1714
|
setText,
|
|
1548
1715
|
insert,
|
|
1549
1716
|
newline,
|
|
@@ -1607,6 +1774,10 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1607
1774
|
renderedVisualLines,
|
|
1608
1775
|
visualCursor,
|
|
1609
1776
|
visualScrollRow,
|
|
1777
|
+
visualToLogicalMap,
|
|
1778
|
+
transformedToLogicalMaps,
|
|
1779
|
+
visualToTransformedMap,
|
|
1780
|
+
transformationsByLine,
|
|
1610
1781
|
setText,
|
|
1611
1782
|
insert,
|
|
1612
1783
|
newline,
|
|
@@ -1658,7 +1829,6 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1658
1829
|
vimMoveToLastLine,
|
|
1659
1830
|
vimMoveToLine,
|
|
1660
1831
|
vimEscapeInsertMode,
|
|
1661
|
-
visualToLogicalMap,
|
|
1662
1832
|
]);
|
|
1663
1833
|
return returnValue;
|
|
1664
1834
|
}
|