@umsai/ums-code 0.0.14-v2 → 0.3.0-v1
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 +25 -12
- package/dist/src/commands/extensions/disable.d.ts +2 -3
- package/dist/src/commands/extensions/disable.js +20 -6
- package/dist/src/commands/extensions/disable.js.map +1 -1
- package/dist/src/commands/extensions/enable.d.ts +2 -3
- package/dist/src/commands/extensions/enable.js +21 -10
- package/dist/src/commands/extensions/enable.js.map +1 -1
- package/dist/src/commands/extensions/examples/context/QWEN.md +8 -0
- package/dist/src/commands/extensions/examples/context/qwen-extension.json +4 -0
- package/dist/src/commands/extensions/examples/custom-commands/commands/fs/grep-code.toml +6 -0
- package/dist/src/commands/extensions/examples/custom-commands/qwen-extension.json +4 -0
- package/dist/src/commands/extensions/examples/exclude-tools/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 +11 -0
- package/dist/src/commands/extensions/examples/mcp-server/tsconfig.json +13 -0
- package/dist/src/commands/extensions/install.d.ts +3 -2
- package/dist/src/commands/extensions/install.js +47 -17
- package/dist/src/commands/extensions/install.js.map +1 -1
- package/dist/src/commands/extensions/install.test.js +86 -9
- package/dist/src/commands/extensions/install.test.js.map +1 -1
- package/dist/src/commands/extensions/link.d.ts +12 -0
- package/dist/src/commands/extensions/link.js +37 -0
- package/dist/src/commands/extensions/link.js.map +1 -0
- package/dist/src/commands/extensions/list.js +1 -1
- package/dist/src/commands/extensions/list.js.map +1 -1
- package/dist/src/commands/extensions/new.d.ts +7 -0
- package/dist/src/commands/extensions/new.js +90 -0
- package/dist/src/commands/extensions/new.js.map +1 -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/uninstall.js +1 -1
- package/dist/src/commands/extensions/uninstall.js.map +1 -1
- package/dist/src/commands/extensions/uninstall.test.js +2 -2
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -1
- package/dist/src/commands/extensions/update.d.ts +2 -1
- package/dist/src/commands/extensions/update.js +80 -14
- package/dist/src/commands/extensions/update.js.map +1 -1
- package/dist/src/commands/extensions.js +4 -0
- package/dist/src/commands/extensions.js.map +1 -1
- package/dist/src/commands/mcp/add.js +6 -1
- package/dist/src/commands/mcp/add.js.map +1 -1
- package/dist/src/commands/mcp/list.js +4 -3
- package/dist/src/commands/mcp/list.js.map +1 -1
- package/dist/src/commands/mcp/remove.js +1 -1
- package/dist/src/commands/mcp/remove.js.map +1 -1
- package/dist/src/config/auth.d.ts +2 -4
- package/dist/src/config/auth.js +10 -36
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/auth.test.js +12 -32
- package/dist/src/config/auth.test.js.map +1 -1
- package/dist/src/config/config.d.ts +13 -2
- package/dist/src/config/config.js +278 -128
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/extension.d.ts +41 -18
- package/dist/src/config/extension.js +352 -195
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/config/extensions/extensionEnablement.d.ts +47 -0
- package/dist/src/config/extensions/extensionEnablement.js +189 -0
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.test.js +333 -0
- package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -0
- package/dist/src/config/extensions/github.d.ts +30 -0
- package/dist/src/config/extensions/github.js +322 -0
- package/dist/src/config/extensions/github.js.map +1 -0
- package/dist/src/config/extensions/github.test.d.ts +6 -0
- package/dist/src/config/extensions/github.test.js +334 -0
- package/dist/src/config/extensions/github.test.js.map +1 -0
- package/dist/src/config/extensions/update.d.ts +19 -0
- package/dist/src/config/extensions/update.js +113 -0
- package/dist/src/config/extensions/update.js.map +1 -0
- package/dist/src/config/extensions/update.test.d.ts +6 -0
- package/dist/src/config/extensions/update.test.js +342 -0
- package/dist/src/config/extensions/update.test.js.map +1 -0
- package/dist/src/config/extensions/variableSchema.d.ts +8 -0
- package/dist/src/config/extensions/variableSchema.js +4 -0
- package/dist/src/config/extensions/variableSchema.js.map +1 -1
- package/dist/src/config/keyBindings.d.ts +5 -1
- package/dist/src/config/keyBindings.js +14 -25
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/config/settings.d.ts +15 -5
- package/dist/src/config/settings.js +231 -274
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +425 -149
- package/dist/src/config/settingsSchema.js +396 -145
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +64 -57
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/config/trustedFolders.d.ts +24 -5
- package/dist/src/config/trustedFolders.js +98 -48
- package/dist/src/config/trustedFolders.js.map +1 -1
- package/dist/src/config/trustedFolders.test.js +196 -20
- package/dist/src/config/trustedFolders.test.js.map +1 -1
- package/dist/src/config/webSearch.d.ts +35 -0
- package/dist/src/config/webSearch.js +87 -0
- package/dist/src/config/webSearch.js.map +1 -0
- package/dist/src/core/auth.d.ts +13 -0
- package/dist/src/core/auth.js +43 -0
- package/dist/src/core/auth.js.map +1 -0
- package/dist/src/core/initializer.d.ts +21 -0
- package/dist/src/core/initializer.js +44 -0
- package/dist/src/core/initializer.js.map +1 -0
- package/dist/src/core/theme.d.ts +12 -0
- package/dist/src/core/theme.js +23 -0
- package/dist/src/core/theme.js.map +1 -0
- package/dist/src/gemini.d.ts +2 -1
- package/dist/src/gemini.js +166 -128
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +307 -47
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/i18n/index.d.ts +18 -0
- package/dist/src/i18n/index.js +184 -0
- package/dist/src/i18n/index.js.map +1 -0
- package/dist/src/i18n/locales/en.js +1129 -0
- package/dist/src/i18n/locales/zh.js +1052 -0
- package/dist/src/nonInteractive/control/ControlContext.d.ts +63 -0
- package/dist/src/nonInteractive/control/ControlContext.js +31 -0
- package/dist/src/nonInteractive/control/ControlContext.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.d.ts +86 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js +238 -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 +549 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlService.d.ts +78 -0
- package/dist/src/nonInteractive/control/ControlService.js +154 -0
- package/dist/src/nonInteractive/control/ControlService.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/baseController.d.ts +50 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js +102 -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 +42 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.d.ts +42 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.js +205 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.d.ts +78 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js +358 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/systemController.d.ts +56 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js +166 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js.map +1 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.d.ts +120 -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 +446 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js +891 -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 +1197 -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 +56 -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 +624 -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 +69 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js +185 -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 +808 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/session.d.ts +23 -0
- package/dist/src/nonInteractive/session.js +549 -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 +407 -0
- package/dist/src/nonInteractive/session.test.js.map +1 -0
- package/dist/src/nonInteractive/types.d.ts +344 -0
- package/dist/src/nonInteractive/types.js +78 -0
- package/dist/src/nonInteractive/types.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +22 -1
- package/dist/src/nonInteractiveCli.js +245 -69
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCliCommands.d.ts +35 -0
- package/dist/src/nonInteractiveCliCommands.js +144 -0
- package/dist/src/nonInteractiveCliCommands.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.js +5 -3
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +53 -19
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
- package/dist/src/services/FileCommandLoader.d.ts +2 -0
- package/dist/src/services/FileCommandLoader.js +11 -1
- package/dist/src/services/FileCommandLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.js +43 -8
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.test.js +228 -1
- package/dist/src/services/McpPromptLoader.test.js.map +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.js +8 -1
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
- package/dist/src/test-utils/createExtension.d.ts +15 -0
- package/dist/src/test-utils/createExtension.js +25 -0
- package/dist/src/test-utils/createExtension.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.js +2 -0
- package/dist/src/test-utils/mockCommandContext.js.map +1 -1
- package/dist/src/test-utils/render.d.ts +5 -1
- package/dist/src/test-utils/render.js +5 -1
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/App.d.ts +1 -10
- package/dist/src/ui/App.js +26 -833
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/AppContainer.d.ts +17 -0
- package/dist/src/ui/AppContainer.js +1072 -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 +831 -0
- package/dist/src/ui/AppContainer.test.js.map +1 -0
- package/dist/src/ui/IdeIntegrationNudge.d.ts +2 -2
- package/dist/src/ui/IdeIntegrationNudge.js +6 -8
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.d.ts +7 -0
- package/dist/src/ui/auth/AuthDialog.js +90 -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/{components → auth}/AuthDialog.test.js +141 -29
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -0
- package/dist/src/ui/{components → auth}/AuthInProgress.js +3 -2
- package/dist/src/ui/auth/AuthInProgress.js.map +1 -0
- package/dist/src/ui/auth/useAuth.d.ts +25 -0
- package/dist/src/ui/auth/useAuth.js +180 -0
- package/dist/src/ui/auth/useAuth.js.map +1 -0
- package/dist/src/ui/commands/aboutCommand.js +7 -25
- package/dist/src/ui/commands/aboutCommand.js.map +1 -1
- package/dist/src/ui/commands/agentsCommand.js +10 -3
- package/dist/src/ui/commands/agentsCommand.js.map +1 -1
- package/dist/src/ui/commands/approvalModeCommand.js +8 -329
- package/dist/src/ui/commands/approvalModeCommand.js.map +1 -1
- package/dist/src/ui/commands/approvalModeCommand.test.js +19 -263
- package/dist/src/ui/commands/approvalModeCommand.test.js.map +1 -1
- package/dist/src/ui/commands/authCommand.js +4 -1
- package/dist/src/ui/commands/authCommand.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.js +13 -33
- package/dist/src/ui/commands/bugCommand.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.d.ts +2 -0
- package/dist/src/ui/commands/chatCommand.js +137 -21
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.js +7 -4
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/compressCommand.js +9 -4
- package/dist/src/ui/commands/compressCommand.js.map +1 -1
- package/dist/src/ui/commands/copyCommand.js +4 -1
- package/dist/src/ui/commands/copyCommand.js.map +1 -1
- package/dist/src/ui/commands/corgiCommand.js +1 -0
- package/dist/src/ui/commands/corgiCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.js +31 -13
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/docsCommand.js +9 -3
- package/dist/src/ui/commands/docsCommand.js.map +1 -1
- package/dist/src/ui/commands/editorCommand.js +4 -1
- package/dist/src/ui/commands/editorCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +99 -15
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/helpCommand.js +4 -1
- package/dist/src/ui/commands/helpCommand.js.map +1 -1
- package/dist/src/ui/commands/ideCommand.d.ts +1 -2
- package/dist/src/ui/commands/ideCommand.js +42 -17
- package/dist/src/ui/commands/ideCommand.js.map +1 -1
- package/dist/src/ui/commands/initCommand.js +5 -3
- package/dist/src/ui/commands/initCommand.js.map +1 -1
- package/dist/src/ui/commands/{privacyCommand.d.ts → languageCommand.d.ts} +1 -1
- package/dist/src/ui/commands/languageCommand.js +386 -0
- package/dist/src/ui/commands/languageCommand.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.js +124 -279
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.js +55 -26
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/modelCommand.js +10 -20
- package/dist/src/ui/commands/modelCommand.js.map +1 -1
- package/dist/src/ui/commands/modelCommand.test.js +10 -11
- package/dist/src/ui/commands/modelCommand.test.js.map +1 -1
- package/dist/src/ui/commands/permissionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/permissionsCommand.js +19 -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/quitCommand.js +7 -2
- package/dist/src/ui/commands/quitCommand.js.map +1 -1
- package/dist/src/ui/commands/settingsCommand.js +4 -1
- package/dist/src/ui/commands/settingsCommand.js.map +1 -1
- package/dist/src/ui/commands/setupGithubCommand.js +4 -1
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
- package/dist/src/ui/commands/statsCommand.js +11 -4
- package/dist/src/ui/commands/statsCommand.js.map +1 -1
- package/dist/src/ui/commands/summaryCommand.js +16 -9
- package/dist/src/ui/commands/summaryCommand.js.map +1 -1
- package/dist/src/ui/commands/terminalSetupCommand.js +9 -3
- package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -1
- package/dist/src/ui/commands/themeCommand.js +4 -1
- package/dist/src/ui/commands/themeCommand.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.js +15 -26
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +8 -3
- package/dist/src/ui/commands/types.js +0 -1
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/commands/vimCommand.js +4 -1
- package/dist/src/ui/commands/vimCommand.js.map +1 -1
- package/dist/src/ui/components/AboutBox.d.ts +2 -9
- package/dist/src/ui/components/AboutBox.js +7 -3
- package/dist/src/ui/components/AboutBox.js.map +1 -1
- package/dist/src/ui/components/AnsiOutput.d.ts +13 -0
- package/dist/src/ui/components/AnsiOutput.js +12 -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 +97 -0
- package/dist/src/ui/components/AnsiOutput.test.js.map +1 -0
- package/dist/src/ui/components/AppHeader.d.ts +10 -0
- package/dist/src/ui/components/AppHeader.js +19 -0
- package/dist/src/ui/components/AppHeader.js.map +1 -0
- package/dist/src/ui/components/ApprovalModeDialog.d.ts +21 -0
- package/dist/src/ui/components/ApprovalModeDialog.js +68 -0
- package/dist/src/ui/components/ApprovalModeDialog.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +12 -11
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -1
- package/dist/src/ui/components/Composer.d.ts +6 -0
- package/dist/src/ui/components/Composer.js +55 -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 +337 -0
- package/dist/src/ui/components/Composer.test.js.map +1 -0
- package/dist/src/ui/components/ConfigInitDisplay.d.ts +6 -0
- package/dist/src/ui/components/ConfigInitDisplay.js +42 -0
- package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.d.ts +13 -0
- package/dist/src/ui/components/ConsentPrompt.js +19 -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 +67 -0
- package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +2 -2
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js +34 -10
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +4 -1
- package/dist/src/ui/components/ContextUsageDisplay.js +27 -5
- package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -1
- package/dist/src/ui/components/DebugProfiler.js +2 -2
- package/dist/src/ui/components/DebugProfiler.js.map +1 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.js +7 -7
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -1
- package/dist/src/ui/components/DialogManager.d.ts +12 -0
- package/dist/src/ui/components/DialogManager.js +177 -0
- package/dist/src/ui/components/DialogManager.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +21 -7
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
- 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/FolderTrustDialog.js +22 -9
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +37 -12
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.d.ts +1 -17
- package/dist/src/ui/components/Footer.js +33 -11
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +5 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js +7 -2
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -1
- package/dist/src/ui/components/Header.js +2 -2
- package/dist/src/ui/components/Header.js.map +1 -1
- package/dist/src/ui/components/Help.d.ts +1 -1
- package/dist/src/ui/components/Help.js +20 -7
- package/dist/src/ui/components/Help.js.map +1 -1
- package/dist/src/ui/components/Help.test.d.ts +6 -0
- package/dist/src/ui/components/Help.test.js +57 -0
- package/dist/src/ui/components/Help.test.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +5 -4
- package/dist/src/ui/components/HistoryItemDisplay.js +13 -4
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +107 -17
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +11 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js +32 -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 +57 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +9 -0
- package/dist/src/ui/components/InputPrompt.js +187 -167
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.js +8 -3
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.test.js +4 -0
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -1
- 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 +28 -0
- package/dist/src/ui/components/MainContent.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +6 -4
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.d.ts +11 -0
- package/dist/src/ui/components/ModelDialog.js +43 -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 +158 -0
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +10 -9
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/ModelSwitchDialog.d.ts +3 -1
- package/dist/src/ui/components/ModelSwitchDialog.js +11 -7
- package/dist/src/ui/components/ModelSwitchDialog.js.map +1 -1
- package/dist/src/ui/components/ModelSwitchDialog.test.js +14 -10
- package/dist/src/ui/components/ModelSwitchDialog.test.js.map +1 -1
- package/dist/src/ui/components/Notifications.d.ts +6 -0
- package/dist/src/ui/components/Notifications.js +23 -0
- package/dist/src/ui/components/Notifications.js.map +1 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.d.ts +19 -1
- package/dist/src/ui/components/OpenAIKeyPrompt.js +99 -43
- package/dist/src/ui/components/OpenAIKeyPrompt.js.map +1 -1
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js +8 -1
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js.map +1 -1
- package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +13 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js +48 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +154 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/PrepareLabel.d.ts +5 -5
- package/dist/src/ui/components/PrepareLabel.js +67 -11
- package/dist/src/ui/components/PrepareLabel.js.map +1 -1
- 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/ProQuotaDialog.d.ts +13 -0
- package/dist/src/ui/components/ProQuotaDialog.js +24 -0
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -0
- package/dist/src/ui/components/ProQuotaDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js +58 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.d.ts +9 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js +20 -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 +56 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -0
- package/dist/src/ui/components/QuitConfirmationDialog.js +10 -5
- package/dist/src/ui/components/QuitConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/QuittingDisplay.d.ts +6 -0
- package/dist/src/ui/components/QuittingDisplay.js +20 -0
- package/dist/src/ui/components/QuittingDisplay.js.map +1 -0
- package/dist/src/ui/components/QwenOAuthProgress.d.ts +2 -2
- package/dist/src/ui/components/QwenOAuthProgress.js +19 -11
- package/dist/src/ui/components/QwenOAuthProgress.js.map +1 -1
- package/dist/src/ui/components/QwenOAuthProgress.test.js +85 -13
- package/dist/src/ui/components/QwenOAuthProgress.test.js.map +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.js +2 -1
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +4 -1
- package/dist/src/ui/components/SettingsDialog.js +125 -28
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +475 -84
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +9 -5
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/ShellInputPrompt.d.ts +11 -0
- package/dist/src/ui/components/ShellInputPrompt.js +36 -0
- package/dist/src/ui/components/ShellInputPrompt.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.js +2 -2
- package/dist/src/ui/components/ShellModeIndicator.js.map +1 -1
- package/dist/src/ui/components/ShowMoreLines.js +2 -2
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.js +8 -7
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +7 -2
- package/dist/src/ui/components/SuggestionsDisplay.js +17 -17
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.js +17 -29
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- 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/Tips.js +2 -2
- package/dist/src/ui/components/Tips.js.map +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.js +5 -4
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/UpdateNotification.js +2 -2
- package/dist/src/ui/components/UpdateNotification.js.map +1 -1
- package/dist/src/ui/components/WelcomeBackDialog.js +15 -4
- package/dist/src/ui/components/WelcomeBackDialog.js.map +1 -1
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +14 -11
- package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +1 -2
- package/dist/src/ui/components/messages/CompressionMessage.js +41 -8
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -1
- 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/DiffRenderer.d.ts +2 -1
- package/dist/src/ui/components/messages/DiffRenderer.js +14 -22
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
- package/dist/src/ui/components/messages/ErrorMessage.js +2 -2
- package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -1
- package/dist/src/ui/components/messages/GeminiMessage.js +2 -2
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -1
- package/dist/src/ui/components/messages/InfoMessage.js +2 -2
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +91 -45
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +36 -8
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +3 -2
- package/dist/src/ui/components/messages/ToolGroupMessage.js +18 -10
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +17 -15
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.d.ts +3 -1
- package/dist/src/ui/components/messages/ToolMessage.js +53 -11
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.test.js +34 -1
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/UserMessage.js +3 -4
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
- package/dist/src/ui/components/messages/UserShellMessage.js +2 -2
- package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -1
- package/dist/src/ui/components/messages/WarningMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/WarningMessage.js +10 -0
- package/dist/src/ui/components/messages/WarningMessage.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.d.ts +38 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js +72 -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 +35 -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.js +2 -2
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +2 -3
- package/dist/src/ui/components/shared/RadioButtonSelect.js +10 -105
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +115 -92
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -1
- 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/text-buffer.d.ts +25 -2
- package/dist/src/ui/components/shared/text-buffer.js +296 -187
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +41 -29
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +1 -1
- package/dist/src/ui/components/subagents/create/ColorSelector.js +3 -2
- package/dist/src/ui/components/subagents/create/ColorSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/create/CreationSummary.js +26 -15
- package/dist/src/ui/components/subagents/create/CreationSummary.js.map +1 -1
- package/dist/src/ui/components/subagents/create/DescriptionInput.js +7 -5
- package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +1 -1
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +8 -2
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/create/LocationSelector.js +8 -2
- package/dist/src/ui/components/subagents/create/LocationSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/create/TextEntryStep.js +2 -2
- package/dist/src/ui/components/subagents/create/TextEntryStep.js.map +1 -1
- package/dist/src/ui/components/subagents/create/ToolSelector.js +10 -8
- package/dist/src/ui/components/subagents/create/ToolSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +29 -4
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +6 -3
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js +15 -5
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +13 -7
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js +3 -2
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +15 -15
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +1 -1
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +16 -17
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js.map +1 -1
- package/dist/src/ui/components/ums/UMSKeyPrompt.d.ts +2 -2
- package/dist/src/ui/components/ums/UMSKeyPrompt.js +66 -64
- package/dist/src/ui/components/ums/UMSKeyPrompt.js.map +1 -1
- package/dist/src/ui/components/views/ExtensionsList.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.js +47 -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 +97 -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/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 +1 -0
- package/dist/src/ui/constants.js +1 -0
- package/dist/src/ui/constants.js.map +1 -1
- 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/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 +3 -0
- package/dist/src/ui/contexts/KeypressContext.js +309 -44
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +288 -2
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +6 -0
- package/dist/src/ui/contexts/SessionContext.js +107 -5
- package/dist/src/ui/contexts/SessionContext.js.map +1 -1
- 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/UIActionsContext.d.ts +46 -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 +115 -0
- package/dist/src/ui/contexts/UIStateContext.js +17 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -0
- package/dist/src/ui/editors/editorSettingsManager.js +1 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.js +12 -12
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +23 -19
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- 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 +2 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +65 -15
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +196 -17
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +21 -3
- package/dist/src/ui/hooks/slashCommandProcessor.js +52 -97
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- 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/useAtCompletion.js +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useAttentionNotifications.d.ts +14 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js +41 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js.map +1 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js +113 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +3 -2
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +20 -18
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +43 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +1 -4
- package/dist/src/ui/hooks/useCommandCompletion.js +1 -23
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useDialogClose.d.ts +6 -5
- package/dist/src/ui/hooks/useDialogClose.js +3 -12
- package/dist/src/ui/hooks/useDialogClose.js.map +1 -1
- package/dist/src/ui/hooks/useEditorSettings.js +1 -1
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -1
- package/dist/src/ui/hooks/useEditorSettings.test.js +4 -4
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.d.ts +21 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js +116 -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 +243 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -0
- package/dist/src/ui/hooks/useFocus.js +10 -0
- package/dist/src/ui/hooks/useFocus.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.js +6 -10
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +14 -3
- package/dist/src/ui/hooks/useGeminiStream.js +184 -83
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.js +18 -18
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.js +66 -52
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -1
- 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/useInputHistoryStore.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistoryStore.js +81 -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 +234 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.js +2 -2
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +2 -2
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/useMemoryMonitor.d.ts +13 -0
- package/dist/src/ui/hooks/useMemoryMonitor.js +28 -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 +57 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +1 -0
- package/dist/src/ui/hooks/useMessageQueue.d.ts +2 -1
- package/dist/src/ui/hooks/useMessageQueue.js +5 -3
- package/dist/src/ui/hooks/useMessageQueue.js.map +1 -1
- package/dist/src/ui/hooks/useMessageQueue.test.js +9 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -1
- package/dist/src/ui/hooks/useModelCommand.d.ts +12 -0
- package/dist/src/ui/hooks/useModelCommand.js +21 -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/usePermissionsModifyTrust.d.ts +17 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js +78 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +6 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +182 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.js +15 -10
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +21 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.js +122 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +6 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +269 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -0
- package/dist/src/ui/hooks/useQwenAuth.d.ts +7 -12
- package/dist/src/ui/hooks/useQwenAuth.js +4 -8
- package/dist/src/ui/hooks/useQwenAuth.js.map +1 -1
- package/dist/src/ui/hooks/useQwenAuth.test.js +72 -98
- package/dist/src/ui/hooks/useQwenAuth.test.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +3 -2
- package/dist/src/ui/hooks/useReactToolScheduler.js +23 -17
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.js +67 -20
- package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSelectionList.d.ts +34 -0
- package/dist/src/ui/hooks/useSelectionList.js +245 -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 +701 -0
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.js +281 -67
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +4 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.js +390 -65
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useStateAndRef.d.ts +1 -1
- package/dist/src/ui/hooks/useStateAndRef.js +2 -2
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -1
- package/dist/src/ui/hooks/useThemeCommand.d.ts +1 -1
- package/dist/src/ui/hooks/useThemeCommand.js +11 -17
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +64 -291
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/hooks/useVisionAutoSwitch.d.ts +1 -1
- package/dist/src/ui/hooks/useVisionAutoSwitch.js +36 -6
- package/dist/src/ui/hooks/useVisionAutoSwitch.js.map +1 -1
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.js +3 -3
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.js.map +1 -1
- package/dist/src/ui/hooks/useWelcomeBack.js +2 -2
- package/dist/src/ui/hooks/useWelcomeBack.js.map +1 -1
- package/dist/src/ui/hooks/useWorkspaceMigration.js +2 -1
- package/dist/src/ui/hooks/useWorkspaceMigration.js.map +1 -1
- package/dist/src/ui/keyMatchers.test.js +17 -0
- package/dist/src/ui/keyMatchers.test.js.map +1 -1
- package/dist/src/ui/layouts/DefaultAppLayout.d.ts +9 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js +13 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +7 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js +14 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +1 -0
- package/dist/src/ui/models/availableModels.d.ts +11 -5
- package/dist/src/ui/models/availableModels.js +94 -3
- package/dist/src/ui/models/availableModels.js.map +1 -1
- package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +12 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js +28 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -0
- package/dist/src/ui/state/extensions.d.ts +42 -0
- package/dist/src/ui/state/extensions.js +62 -0
- package/dist/src/ui/state/extensions.js.map +1 -0
- package/dist/src/ui/themes/ayu.js +1 -1
- package/dist/src/ui/themes/dracula.js +2 -2
- package/dist/src/ui/themes/github-dark.js +1 -1
- package/dist/src/ui/themes/theme.js +19 -19
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/types.d.ts +111 -17
- package/dist/src/ui/types.js +14 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.js +3 -2
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +7 -7
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +11 -11
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js +95 -87
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
- package/dist/src/ui/utils/TableRenderer.js +4 -4
- package/dist/src/ui/utils/TableRenderer.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.js +5 -6
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.d.ts +16 -0
- package/dist/src/ui/utils/commandUtils.js +16 -1
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.test.js +5 -2
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
- package/dist/src/ui/utils/displayUtils.d.ts +1 -0
- package/dist/src/ui/utils/displayUtils.js +7 -4
- package/dist/src/ui/utils/displayUtils.js.map +1 -1
- package/dist/src/ui/utils/displayUtils.test.js +37 -18
- package/dist/src/ui/utils/displayUtils.test.js.map +1 -1
- package/dist/src/ui/utils/highlight.d.ts +11 -0
- package/dist/src/ui/utils/highlight.js +78 -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 +120 -0
- package/dist/src/ui/utils/highlight.test.js.map +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js +39 -29
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -1
- package/dist/src/ui/utils/platformConstants.d.ts +24 -1
- package/dist/src/ui/utils/platformConstants.js +26 -1
- package/dist/src/ui/utils/platformConstants.js.map +1 -1
- package/dist/src/ui/utils/terminalSetup.js +45 -18
- package/dist/src/ui/utils/terminalSetup.js.map +1 -1
- package/dist/src/ui/utils/textUtils.d.ts +10 -0
- package/dist/src/ui/utils/textUtils.js +108 -3
- package/dist/src/ui/utils/textUtils.js.map +1 -1
- package/dist/src/ui/utils/textUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/textUtils.test.js +132 -0
- package/dist/src/ui/utils/textUtils.test.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +1 -0
- package/dist/src/ui/utils/updateCheck.js +53 -2
- package/dist/src/ui/utils/updateCheck.js.map +1 -1
- package/dist/src/utils/attentionNotification.d.ts +20 -0
- package/dist/src/utils/attentionNotification.js +34 -0
- package/dist/src/utils/attentionNotification.js.map +1 -0
- package/dist/src/utils/attentionNotification.test.d.ts +6 -0
- package/dist/src/utils/attentionNotification.test.js +46 -0
- package/dist/src/utils/attentionNotification.test.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 +9 -0
- package/dist/src/utils/commentJson.js +48 -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 +146 -0
- package/dist/src/utils/commentJson.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 +0 -4
- package/dist/src/utils/dialogScopeUtils.js +5 -2
- package/dist/src/utils/dialogScopeUtils.js.map +1 -1
- package/dist/src/utils/envVarResolver.d.ts +39 -0
- package/dist/src/utils/envVarResolver.js +97 -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 +29 -0
- package/dist/src/utils/errors.js +94 -0
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/errors.test.d.ts +6 -0
- package/dist/src/utils/errors.test.js +340 -0
- package/dist/src/utils/errors.test.js.map +1 -0
- package/dist/src/utils/events.d.ts +2 -1
- package/dist/src/utils/events.js +1 -0
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.js +6 -3
- package/dist/src/utils/handleAutoUpdate.js.map +1 -1
- 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/nonInteractiveHelpers.d.ts +88 -0
- package/dist/src/utils/nonInteractiveHelpers.js +470 -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 +945 -0
- package/dist/src/utils/nonInteractiveHelpers.test.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/relaunch.d.ts +7 -0
- package/dist/src/utils/relaunch.js +57 -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 +273 -0
- package/dist/src/utils/relaunch.test.js.map +1 -0
- package/dist/src/utils/sandbox.d.ts +1 -1
- package/dist/src/utils/sandbox.js +43 -18
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/settingsUtils.d.ts +16 -6
- package/dist/src/utils/settingsUtils.js +41 -25
- package/dist/src/utils/settingsUtils.js.map +1 -1
- package/dist/src/utils/settingsUtils.test.js +455 -158
- package/dist/src/utils/settingsUtils.test.js.map +1 -1
- package/dist/src/utils/startupWarnings.js +1 -1
- package/dist/src/utils/startupWarnings.js.map +1 -1
- package/dist/src/utils/systemInfo.d.ts +66 -0
- package/dist/src/utils/systemInfo.js +125 -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 +259 -0
- package/dist/src/utils/systemInfo.test.js.map +1 -0
- package/dist/src/utils/systemInfoFields.d.ts +22 -0
- package/dist/src/utils/systemInfoFields.js +96 -0
- package/dist/src/utils/systemInfoFields.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +7 -1
- package/dist/src/utils/userStartupWarnings.js +26 -6
- package/dist/src/utils/userStartupWarnings.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.test.js +26 -5
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -1
- 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/validateNonInterActiveAuth.d.ts +4 -2
- package/dist/src/validateNonInterActiveAuth.js +57 -21
- package/dist/src/validateNonInterActiveAuth.js.map +1 -1
- package/dist/src/zed-integration/acp.js +1 -2
- package/dist/src/zed-integration/acp.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +1 -0
- package/dist/src/zed-integration/fileSystemService.js +3 -0
- package/dist/src/zed-integration/fileSystemService.js.map +1 -1
- package/dist/src/zed-integration/schema.d.ts +608 -366
- package/dist/src/zed-integration/schema.js +13 -0
- package/dist/src/zed-integration/schema.js.map +1 -1
- package/dist/src/zed-integration/zedIntegration.d.ts +8 -1
- package/dist/src/zed-integration/zedIntegration.js +409 -61
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -12
- package/dist/src/ui/commands/privacyCommand.js +0 -16
- package/dist/src/ui/commands/privacyCommand.js.map +0 -1
- package/dist/src/ui/components/AuthDialog.d.ts +0 -15
- package/dist/src/ui/components/AuthDialog.js +0 -163
- package/dist/src/ui/components/AuthDialog.js.map +0 -1
- package/dist/src/ui/components/AuthDialog.test.js.map +0 -1
- package/dist/src/ui/components/AuthInProgress.js.map +0 -1
- package/dist/src/ui/components/ModelSelectionDialog.d.ts +0 -14
- package/dist/src/ui/components/ModelSelectionDialog.js +0 -26
- package/dist/src/ui/components/ModelSelectionDialog.js.map +0 -1
- package/dist/src/ui/components/ModelSelectionDialog.test.js +0 -124
- package/dist/src/ui/components/ModelSelectionDialog.test.js.map +0 -1
- package/dist/src/ui/hooks/useAuthCommand.d.ts +0 -14
- package/dist/src/ui/hooks/useAuthCommand.js +0 -66
- package/dist/src/ui/hooks/useAuthCommand.js.map +0 -1
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +0 -16
- package/dist/src/ui/hooks/usePrivacySettings.js +0 -119
- package/dist/src/ui/hooks/usePrivacySettings.js.map +0 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.js +0 -154
- package/dist/src/ui/hooks/usePrivacySettings.test.js.map +0 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +0 -12
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +0 -41
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +0 -1
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +0 -10
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +0 -18
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +0 -1
- package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +0 -10
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js +0 -18
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +0 -1
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +0 -12
- package/dist/src/ui/privacy/PrivacyNotice.js +0 -25
- package/dist/src/ui/privacy/PrivacyNotice.js.map +0 -1
- /package/dist/src/{ui/components/AuthDialog.test.d.ts → commands/extensions/new.test.d.ts} +0 -0
- /package/dist/src/{ui/hooks/usePrivacySettings.test.d.ts → config/extensions/extensionEnablement.test.d.ts} +0 -0
- /package/dist/src/ui/{components → auth}/AuthInProgress.d.ts +0 -0
- /package/dist/src/ui/{components/ModelSelectionDialog.test.d.ts → hooks/useAttentionNotifications.test.d.ts} +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2025 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
|
8
|
+
import * as processUtils from '../../utils/processUtils.js';
|
|
9
|
+
import { renderWithProviders } from '../../test-utils/render.js';
|
|
10
|
+
import { IdeTrustChangeDialog } from './IdeTrustChangeDialog.js';
|
|
11
|
+
describe('IdeTrustChangeDialog', () => {
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
vi.clearAllMocks();
|
|
14
|
+
});
|
|
15
|
+
it('renders the correct message for CONNECTION_CHANGE', () => {
|
|
16
|
+
const { lastFrame } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "CONNECTION_CHANGE" }));
|
|
17
|
+
const frameText = lastFrame();
|
|
18
|
+
expect(frameText).toContain('Workspace trust has changed due to a change in the IDE connection.');
|
|
19
|
+
expect(frameText).toContain("Press 'r' to restart Gemini");
|
|
20
|
+
});
|
|
21
|
+
it('renders the correct message for TRUST_CHANGE', () => {
|
|
22
|
+
const { lastFrame } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "TRUST_CHANGE" }));
|
|
23
|
+
const frameText = lastFrame();
|
|
24
|
+
expect(frameText).toContain('Workspace trust has changed due to a change in the IDE trust.');
|
|
25
|
+
expect(frameText).toContain("Press 'r' to restart Gemini");
|
|
26
|
+
});
|
|
27
|
+
it('renders a generic message and logs an error for NONE reason', () => {
|
|
28
|
+
const consoleErrorSpy = vi
|
|
29
|
+
.spyOn(console, 'error')
|
|
30
|
+
.mockImplementation(() => { });
|
|
31
|
+
const { lastFrame } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "NONE" }));
|
|
32
|
+
const frameText = lastFrame();
|
|
33
|
+
expect(frameText).toContain('Workspace trust has changed.');
|
|
34
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith('IdeTrustChangeDialog rendered with unexpected reason "NONE"');
|
|
35
|
+
});
|
|
36
|
+
it('calls relaunchApp when "r" is pressed', () => {
|
|
37
|
+
const relaunchAppSpy = vi.spyOn(processUtils, 'relaunchApp');
|
|
38
|
+
const { stdin } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "NONE" }));
|
|
39
|
+
stdin.write('r');
|
|
40
|
+
expect(relaunchAppSpy).toHaveBeenCalledTimes(1);
|
|
41
|
+
});
|
|
42
|
+
it('calls relaunchApp when "R" is pressed', () => {
|
|
43
|
+
const relaunchAppSpy = vi.spyOn(processUtils, 'relaunchApp');
|
|
44
|
+
const { stdin } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "CONNECTION_CHANGE" }));
|
|
45
|
+
stdin.write('R');
|
|
46
|
+
expect(relaunchAppSpy).toHaveBeenCalledTimes(1);
|
|
47
|
+
});
|
|
48
|
+
it('does not call relaunchApp when another key is pressed', async () => {
|
|
49
|
+
const relaunchAppSpy = vi.spyOn(processUtils, 'relaunchApp');
|
|
50
|
+
const { stdin } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "CONNECTION_CHANGE" }));
|
|
51
|
+
stdin.write('a');
|
|
52
|
+
// Give it a moment to ensure no async actions are triggered
|
|
53
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
54
|
+
expect(relaunchAppSpy).not.toHaveBeenCalled();
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=IdeTrustChangeDialog.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdeTrustChangeDialog.test.js","sourceRoot":"","sources":["../../../../src/ui/components/IdeTrustChangeDialog.test.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,UAAU,CAAC,GAAG,EAAE;QACd,EAAE,CAAC,aAAa,EAAE,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAmB,CACvC,KAAC,oBAAoB,IAAC,MAAM,EAAC,mBAAmB,GAAG,CACpD,CAAC;QAEF,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;QAC9B,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CACzB,oEAAoE,CACrE,CAAC;QACF,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,6BAA6B,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAmB,CACvC,KAAC,oBAAoB,IAAC,MAAM,EAAC,cAAc,GAAG,CAC/C,CAAC;QAEF,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;QAC9B,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CACzB,+DAA+D,CAChE,CAAC;QACF,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,6BAA6B,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;QACrE,MAAM,eAAe,GAAG,EAAE;aACvB,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC;aACvB,kBAAkB,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAChC,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAmB,CACvC,KAAC,oBAAoB,IAAC,MAAM,EAAC,MAAM,GAAG,CACvC,CAAC;QAEF,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;QAC9B,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC;QAC5D,MAAM,CAAC,eAAe,CAAC,CAAC,oBAAoB,CAC1C,6DAA6D,CAC9D,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAC7D,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,CACnC,KAAC,oBAAoB,IAAC,MAAM,EAAC,MAAM,GAAG,CACvC,CAAC;QAEF,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjB,MAAM,CAAC,cAAc,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAC7D,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,CACnC,KAAC,oBAAoB,IAAC,MAAM,EAAC,mBAAmB,GAAG,CACpD,CAAC;QAEF,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjB,MAAM,CAAC,cAAc,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;QACrE,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAC7D,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,CACnC,KAAC,oBAAoB,IAAC,MAAM,EAAC,mBAAmB,GAAG,CACpD,CAAC;QAEF,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjB,4DAA4D;QAC5D,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QAExD,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -8,6 +8,7 @@ import type { TextBuffer } from './shared/text-buffer.js';
|
|
|
8
8
|
import type { Key } from '../hooks/useKeypress.js';
|
|
9
9
|
import type { CommandContext, SlashCommand } from '../commands/types.js';
|
|
10
10
|
import type { Config } from '@umsai/ums-code-core';
|
|
11
|
+
import { ApprovalMode } from '@umsai/ums-code-core';
|
|
11
12
|
export interface InputPromptProps {
|
|
12
13
|
buffer: TextBuffer;
|
|
13
14
|
onSubmit: (value: string) => void;
|
|
@@ -22,7 +23,15 @@ export interface InputPromptProps {
|
|
|
22
23
|
suggestionsWidth: number;
|
|
23
24
|
shellModeActive: boolean;
|
|
24
25
|
setShellModeActive: (value: boolean) => void;
|
|
26
|
+
approvalMode: ApprovalMode;
|
|
25
27
|
onEscapePromptChange?: (showPrompt: boolean) => void;
|
|
26
28
|
vimHandleInput?: (key: Key) => boolean;
|
|
29
|
+
isEmbeddedShellFocused?: boolean;
|
|
27
30
|
}
|
|
31
|
+
export declare const calculatePromptWidths: (terminalWidth: number) => {
|
|
32
|
+
readonly inputWidth: number;
|
|
33
|
+
readonly containerWidth: number;
|
|
34
|
+
readonly suggestionsWidth: number;
|
|
35
|
+
readonly frameOverhead: number;
|
|
36
|
+
};
|
|
28
37
|
export declare const InputPrompt: React.FC<InputPromptProps>;
|
|
@@ -1,27 +1,52 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useState, useRef } from 'react';
|
|
3
3
|
import { Box, Text } from 'ink';
|
|
4
|
+
import { SuggestionsDisplay, MAX_WIDTH } from './SuggestionsDisplay.js';
|
|
4
5
|
import { theme } from '../semantic-colors.js';
|
|
5
|
-
import { SuggestionsDisplay } from './SuggestionsDisplay.js';
|
|
6
6
|
import { useInputHistory } from '../hooks/useInputHistory.js';
|
|
7
7
|
import { logicalPosToOffset } from './shared/text-buffer.js';
|
|
8
|
-
import { cpSlice, cpLen
|
|
8
|
+
import { cpSlice, cpLen } from '../utils/textUtils.js';
|
|
9
9
|
import chalk from 'chalk';
|
|
10
|
-
import stringWidth from 'string-width';
|
|
11
10
|
import { useShellHistory } from '../hooks/useShellHistory.js';
|
|
12
11
|
import { useReverseSearchCompletion } from '../hooks/useReverseSearchCompletion.js';
|
|
13
12
|
import { useCommandCompletion } from '../hooks/useCommandCompletion.js';
|
|
14
13
|
import { useKeypress } from '../hooks/useKeypress.js';
|
|
15
14
|
import { keyMatchers, Command } from '../keyMatchers.js';
|
|
15
|
+
import { ApprovalMode } from '@umsai/ums-code-core';
|
|
16
|
+
import { parseInputForHighlighting, buildSegmentsForVisualSlice, } from '../utils/highlight.js';
|
|
17
|
+
import { t } from '../../i18n/index.js';
|
|
16
18
|
import { clipboardHasImage, saveClipboardImage, cleanupOldClipboardImages, } from '../utils/clipboardUtils.js';
|
|
17
19
|
import * as path from 'node:path';
|
|
18
20
|
import { SCREEN_READER_USER_PREFIX } from '../textConstants.js';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
import { useShellFocusState } from '../contexts/ShellFocusContext.js';
|
|
22
|
+
// The input content, input container, and input suggestions list may have different widths
|
|
23
|
+
export const calculatePromptWidths = (terminalWidth) => {
|
|
24
|
+
const widthFraction = 0.9;
|
|
25
|
+
const FRAME_PADDING_AND_BORDER = 4; // Border (2) + padding (2)
|
|
26
|
+
const PROMPT_PREFIX_WIDTH = 2; // '> ' or '! '
|
|
27
|
+
const MIN_CONTENT_WIDTH = 2;
|
|
28
|
+
const innerContentWidth = Math.floor(terminalWidth * widthFraction) -
|
|
29
|
+
FRAME_PADDING_AND_BORDER -
|
|
30
|
+
PROMPT_PREFIX_WIDTH;
|
|
31
|
+
const inputWidth = Math.max(MIN_CONTENT_WIDTH, innerContentWidth);
|
|
32
|
+
const FRAME_OVERHEAD = FRAME_PADDING_AND_BORDER + PROMPT_PREFIX_WIDTH;
|
|
33
|
+
const containerWidth = inputWidth + FRAME_OVERHEAD;
|
|
34
|
+
const suggestionsWidth = Math.max(20, Math.floor(terminalWidth * 1.0));
|
|
35
|
+
return {
|
|
36
|
+
inputWidth,
|
|
37
|
+
containerWidth,
|
|
38
|
+
suggestionsWidth,
|
|
39
|
+
frameOverhead: FRAME_OVERHEAD,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, config, slashCommands, commandContext, placeholder, focus = true, suggestionsWidth, shellModeActive, setShellModeActive, approvalMode, onEscapePromptChange, vimHandleInput, isEmbeddedShellFocused, }) => {
|
|
43
|
+
const isShellFocused = useShellFocusState();
|
|
21
44
|
const [justNavigatedHistory, setJustNavigatedHistory] = useState(false);
|
|
22
45
|
const [escPressCount, setEscPressCount] = useState(0);
|
|
23
46
|
const [showEscapePrompt, setShowEscapePrompt] = useState(false);
|
|
24
47
|
const escapeTimerRef = useRef(null);
|
|
48
|
+
const [recentPasteTime, setRecentPasteTime] = useState(null);
|
|
49
|
+
const pasteTimeoutRef = useRef(null);
|
|
25
50
|
const [dirs, setDirs] = useState(config.getWorkspaceContext().getDirectories());
|
|
26
51
|
const dirsChanged = config.getWorkspaceContext().getDirectories();
|
|
27
52
|
useEffect(() => {
|
|
@@ -30,16 +55,21 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
30
55
|
}
|
|
31
56
|
}, [dirs.length, dirsChanged]);
|
|
32
57
|
const [reverseSearchActive, setReverseSearchActive] = useState(false);
|
|
58
|
+
const [commandSearchActive, setCommandSearchActive] = useState(false);
|
|
33
59
|
const [textBeforeReverseSearch, setTextBeforeReverseSearch] = useState('');
|
|
34
60
|
const [cursorPosition, setCursorPosition] = useState([
|
|
35
61
|
0, 0,
|
|
36
62
|
]);
|
|
37
|
-
const
|
|
38
|
-
const
|
|
63
|
+
const [expandedSuggestionIndex, setExpandedSuggestionIndex] = useState(-1);
|
|
64
|
+
const shellHistory = useShellHistory(config.getProjectRoot());
|
|
65
|
+
const shellHistoryData = shellHistory.history;
|
|
39
66
|
const completion = useCommandCompletion(buffer, dirs, config.getTargetDir(), slashCommands, commandContext, reverseSearchActive, config);
|
|
40
|
-
const reverseSearchCompletion = useReverseSearchCompletion(buffer,
|
|
67
|
+
const reverseSearchCompletion = useReverseSearchCompletion(buffer, shellHistoryData, reverseSearchActive);
|
|
68
|
+
const commandSearchCompletion = useReverseSearchCompletion(buffer, userMessages, commandSearchActive);
|
|
41
69
|
const resetCompletionState = completion.resetCompletionState;
|
|
42
70
|
const resetReverseSearchCompletionState = reverseSearchCompletion.resetCompletionState;
|
|
71
|
+
const resetCommandSearchCompletionState = commandSearchCompletion.resetCompletionState;
|
|
72
|
+
const showCursor = focus && isShellFocused && !isEmbeddedShellFocused;
|
|
43
73
|
const resetEscapeState = useCallback(() => {
|
|
44
74
|
if (escapeTimerRef.current) {
|
|
45
75
|
clearTimeout(escapeTimerRef.current);
|
|
@@ -59,6 +89,9 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
59
89
|
if (escapeTimerRef.current) {
|
|
60
90
|
clearTimeout(escapeTimerRef.current);
|
|
61
91
|
}
|
|
92
|
+
if (pasteTimeoutRef.current) {
|
|
93
|
+
clearTimeout(pasteTimeoutRef.current);
|
|
94
|
+
}
|
|
62
95
|
}, []);
|
|
63
96
|
const handleSubmitAndClear = useCallback((submittedValue) => {
|
|
64
97
|
if (shellModeActive) {
|
|
@@ -95,6 +128,8 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
95
128
|
if (justNavigatedHistory) {
|
|
96
129
|
resetCompletionState();
|
|
97
130
|
resetReverseSearchCompletionState();
|
|
131
|
+
resetCommandSearchCompletionState();
|
|
132
|
+
setExpandedSuggestionIndex(-1);
|
|
98
133
|
setJustNavigatedHistory(false);
|
|
99
134
|
}
|
|
100
135
|
}, [
|
|
@@ -103,6 +138,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
103
138
|
resetCompletionState,
|
|
104
139
|
setJustNavigatedHistory,
|
|
105
140
|
resetReverseSearchCompletionState,
|
|
141
|
+
resetCommandSearchCompletionState,
|
|
106
142
|
]);
|
|
107
143
|
// Handle clipboard image pasting with Ctrl+V
|
|
108
144
|
const handleClipboardImage = useCallback(async () => {
|
|
@@ -146,11 +182,25 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
146
182
|
}
|
|
147
183
|
}, [buffer, config]);
|
|
148
184
|
const handleInput = useCallback((key) => {
|
|
185
|
+
// TODO(jacobr): this special case is likely not needed anymore.
|
|
186
|
+
// We should probably stop supporting paste if the InputPrompt is not
|
|
187
|
+
// focused.
|
|
149
188
|
/// We want to handle paste even when not focused to support drag and drop.
|
|
150
189
|
if (!focus && !key.paste) {
|
|
151
190
|
return;
|
|
152
191
|
}
|
|
153
192
|
if (key.paste) {
|
|
193
|
+
// Record paste time to prevent accidental auto-submission
|
|
194
|
+
setRecentPasteTime(Date.now());
|
|
195
|
+
// Clear any existing paste timeout
|
|
196
|
+
if (pasteTimeoutRef.current) {
|
|
197
|
+
clearTimeout(pasteTimeoutRef.current);
|
|
198
|
+
}
|
|
199
|
+
// Clear the paste protection after a safe delay
|
|
200
|
+
pasteTimeoutRef.current = setTimeout(() => {
|
|
201
|
+
setRecentPasteTime(null);
|
|
202
|
+
pasteTimeoutRef.current = null;
|
|
203
|
+
}, 500);
|
|
154
204
|
// Ensure we never accidentally interpret paste as regular input.
|
|
155
205
|
buffer.handleInput(key);
|
|
156
206
|
return;
|
|
@@ -172,12 +222,20 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
172
222
|
return;
|
|
173
223
|
}
|
|
174
224
|
if (keyMatchers[Command.ESCAPE](key)) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
225
|
+
const cancelSearch = (setActive, resetCompletion) => {
|
|
226
|
+
setActive(false);
|
|
227
|
+
resetCompletion();
|
|
178
228
|
buffer.setText(textBeforeReverseSearch);
|
|
179
229
|
const offset = logicalPosToOffset(buffer.lines, cursorPosition[0], cursorPosition[1]);
|
|
180
230
|
buffer.moveToOffset(offset);
|
|
231
|
+
setExpandedSuggestionIndex(-1);
|
|
232
|
+
};
|
|
233
|
+
if (reverseSearchActive) {
|
|
234
|
+
cancelSearch(setReverseSearchActive, reverseSearchCompletion.resetCompletionState);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (commandSearchActive) {
|
|
238
|
+
cancelSearch(setCommandSearchActive, commandSearchCompletion.resetCompletionState);
|
|
181
239
|
return;
|
|
182
240
|
}
|
|
183
241
|
if (shellModeActive) {
|
|
@@ -187,6 +245,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
187
245
|
}
|
|
188
246
|
if (completion.showSuggestions) {
|
|
189
247
|
completion.resetCompletionState();
|
|
248
|
+
setExpandedSuggestionIndex(-1);
|
|
190
249
|
resetEscapeState();
|
|
191
250
|
return;
|
|
192
251
|
}
|
|
@@ -222,8 +281,16 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
222
281
|
onClearScreen();
|
|
223
282
|
return;
|
|
224
283
|
}
|
|
225
|
-
if (reverseSearchActive) {
|
|
226
|
-
const
|
|
284
|
+
if (reverseSearchActive || commandSearchActive) {
|
|
285
|
+
const isCommandSearch = commandSearchActive;
|
|
286
|
+
const sc = isCommandSearch
|
|
287
|
+
? commandSearchCompletion
|
|
288
|
+
: reverseSearchCompletion;
|
|
289
|
+
const { activeSuggestionIndex, navigateUp, navigateDown, showSuggestions, suggestions, } = sc;
|
|
290
|
+
const setActive = isCommandSearch
|
|
291
|
+
? setCommandSearchActive
|
|
292
|
+
: setReverseSearchActive;
|
|
293
|
+
const resetState = sc.resetCompletionState;
|
|
227
294
|
if (showSuggestions) {
|
|
228
295
|
if (keyMatchers[Command.NAVIGATION_UP](key)) {
|
|
229
296
|
navigateUp();
|
|
@@ -233,10 +300,22 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
233
300
|
navigateDown();
|
|
234
301
|
return;
|
|
235
302
|
}
|
|
303
|
+
if (keyMatchers[Command.COLLAPSE_SUGGESTION](key)) {
|
|
304
|
+
if (suggestions[activeSuggestionIndex].value.length >= MAX_WIDTH) {
|
|
305
|
+
setExpandedSuggestionIndex(-1);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (keyMatchers[Command.EXPAND_SUGGESTION](key)) {
|
|
310
|
+
if (suggestions[activeSuggestionIndex].value.length >= MAX_WIDTH) {
|
|
311
|
+
setExpandedSuggestionIndex(activeSuggestionIndex);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
236
315
|
if (keyMatchers[Command.ACCEPT_SUGGESTION_REVERSE_SEARCH](key)) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
316
|
+
sc.handleAutocomplete(activeSuggestionIndex);
|
|
317
|
+
resetState();
|
|
318
|
+
setActive(false);
|
|
240
319
|
return;
|
|
241
320
|
}
|
|
242
321
|
}
|
|
@@ -245,8 +324,8 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
245
324
|
? suggestions[activeSuggestionIndex].value
|
|
246
325
|
: buffer.text;
|
|
247
326
|
handleSubmitAndClear(textToSubmit);
|
|
248
|
-
|
|
249
|
-
|
|
327
|
+
resetState();
|
|
328
|
+
setActive(false);
|
|
250
329
|
return;
|
|
251
330
|
}
|
|
252
331
|
// Prevent up/down from falling through to regular history navigation
|
|
@@ -264,10 +343,12 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
264
343
|
if (completion.suggestions.length > 1) {
|
|
265
344
|
if (keyMatchers[Command.COMPLETION_UP](key)) {
|
|
266
345
|
completion.navigateUp();
|
|
346
|
+
setExpandedSuggestionIndex(-1); // Reset expansion when navigating
|
|
267
347
|
return;
|
|
268
348
|
}
|
|
269
349
|
if (keyMatchers[Command.COMPLETION_DOWN](key)) {
|
|
270
350
|
completion.navigateDown();
|
|
351
|
+
setExpandedSuggestionIndex(-1); // Reset expansion when navigating
|
|
271
352
|
return;
|
|
272
353
|
}
|
|
273
354
|
}
|
|
@@ -278,19 +359,19 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
278
359
|
: completion.activeSuggestionIndex;
|
|
279
360
|
if (targetIndex < completion.suggestions.length) {
|
|
280
361
|
completion.handleAutocomplete(targetIndex);
|
|
362
|
+
setExpandedSuggestionIndex(-1); // Reset expansion after selection
|
|
281
363
|
}
|
|
282
364
|
}
|
|
283
365
|
return;
|
|
284
366
|
}
|
|
285
367
|
}
|
|
286
|
-
// Handle Tab key for ghost text acceptance
|
|
287
|
-
if (key.name === 'tab' &&
|
|
288
|
-
!completion.showSuggestions &&
|
|
289
|
-
completion.promptCompletion.text) {
|
|
290
|
-
completion.promptCompletion.accept();
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
368
|
if (!shellModeActive) {
|
|
369
|
+
if (keyMatchers[Command.REVERSE_SEARCH](key)) {
|
|
370
|
+
setCommandSearchActive(true);
|
|
371
|
+
setTextBeforeReverseSearch(buffer.text);
|
|
372
|
+
setCursorPosition(buffer.cursor);
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
294
375
|
if (keyMatchers[Command.HISTORY_UP](key)) {
|
|
295
376
|
inputHistory.navigateUp();
|
|
296
377
|
return;
|
|
@@ -330,6 +411,11 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
330
411
|
}
|
|
331
412
|
if (keyMatchers[Command.SUBMIT](key)) {
|
|
332
413
|
if (buffer.text.trim()) {
|
|
414
|
+
// Check if a paste operation occurred recently to prevent accidental auto-submission
|
|
415
|
+
if (recentPasteTime !== null) {
|
|
416
|
+
// Paste occurred recently, ignore this submit to prevent auto-execution
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
333
419
|
const [row, col] = buffer.cursor;
|
|
334
420
|
const line = buffer.lines[row];
|
|
335
421
|
const charBefore = col > 0 ? cpSlice(line, col - 1, col) : '';
|
|
@@ -374,6 +460,10 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
374
460
|
buffer.killLineLeft();
|
|
375
461
|
return;
|
|
376
462
|
}
|
|
463
|
+
if (keyMatchers[Command.DELETE_WORD_BACKWARD](key)) {
|
|
464
|
+
buffer.deleteWordLeft();
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
377
467
|
// External editor
|
|
378
468
|
if (keyMatchers[Command.OPEN_EXTERNAL_EDITOR](key)) {
|
|
379
469
|
buffer.openInExternalEditor();
|
|
@@ -386,14 +476,6 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
386
476
|
}
|
|
387
477
|
// Fall back to the text buffer's default input handling for all other keys
|
|
388
478
|
buffer.handleInput(key);
|
|
389
|
-
// Clear ghost text when user types regular characters (not navigation/control keys)
|
|
390
|
-
if (completion.promptCompletion.text &&
|
|
391
|
-
key.sequence &&
|
|
392
|
-
key.sequence.length === 1 &&
|
|
393
|
-
!key.ctrl &&
|
|
394
|
-
!key.meta) {
|
|
395
|
-
completion.promptCompletion.clear();
|
|
396
|
-
}
|
|
397
479
|
}, [
|
|
398
480
|
focus,
|
|
399
481
|
buffer,
|
|
@@ -414,150 +496,88 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
414
496
|
reverseSearchActive,
|
|
415
497
|
textBeforeReverseSearch,
|
|
416
498
|
cursorPosition,
|
|
499
|
+
recentPasteTime,
|
|
500
|
+
commandSearchActive,
|
|
501
|
+
commandSearchCompletion,
|
|
417
502
|
]);
|
|
418
|
-
useKeypress(handleInput, {
|
|
419
|
-
isActive: true,
|
|
420
|
-
});
|
|
503
|
+
useKeypress(handleInput, { isActive: !isEmbeddedShellFocused });
|
|
421
504
|
const linesToRender = buffer.viewportVisualLines;
|
|
422
505
|
const [cursorVisualRowAbsolute, cursorVisualColAbsolute] = buffer.visualCursor;
|
|
423
506
|
const scrollVisualRow = buffer.visualScrollRow;
|
|
424
|
-
const
|
|
425
|
-
if (
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
return
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}
|
|
455
|
-
currentLine = prospectiveLine;
|
|
456
|
-
wordIdx++;
|
|
457
|
-
}
|
|
458
|
-
inlineGhost = currentLine;
|
|
459
|
-
if (words.length > wordIdx) {
|
|
460
|
-
remainingFirstLine = words.slice(wordIdx).join(' ');
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
const linesToWrap = [];
|
|
464
|
-
if (remainingFirstLine) {
|
|
465
|
-
linesToWrap.push(remainingFirstLine);
|
|
466
|
-
}
|
|
467
|
-
linesToWrap.push(...ghostTextLinesRaw);
|
|
468
|
-
const remainingGhostText = linesToWrap.join('\n');
|
|
469
|
-
const additionalLines = [];
|
|
470
|
-
if (remainingGhostText) {
|
|
471
|
-
const textLines = remainingGhostText.split('\n');
|
|
472
|
-
for (const textLine of textLines) {
|
|
473
|
-
const words = textLine.split(' ');
|
|
474
|
-
let currentLine = '';
|
|
475
|
-
for (const word of words) {
|
|
476
|
-
const prospectiveLine = currentLine ? `${currentLine} ${word}` : word;
|
|
477
|
-
const prospectiveWidth = stringWidth(prospectiveLine);
|
|
478
|
-
if (prospectiveWidth > inputWidth) {
|
|
479
|
-
if (currentLine) {
|
|
480
|
-
additionalLines.push(currentLine);
|
|
481
|
-
}
|
|
482
|
-
let wordToProcess = word;
|
|
483
|
-
while (stringWidth(wordToProcess) > inputWidth) {
|
|
484
|
-
let part = '';
|
|
485
|
-
const wordCP = toCodePoints(wordToProcess);
|
|
486
|
-
let partWidth = 0;
|
|
487
|
-
let splitIndex = 0;
|
|
488
|
-
for (let i = 0; i < wordCP.length; i++) {
|
|
489
|
-
const char = wordCP[i];
|
|
490
|
-
const charWidth = stringWidth(char);
|
|
491
|
-
if (partWidth + charWidth > inputWidth) {
|
|
492
|
-
break;
|
|
493
|
-
}
|
|
494
|
-
part += char;
|
|
495
|
-
partWidth += charWidth;
|
|
496
|
-
splitIndex = i + 1;
|
|
497
|
-
}
|
|
498
|
-
additionalLines.push(part);
|
|
499
|
-
wordToProcess = cpSlice(wordToProcess, splitIndex);
|
|
500
|
-
}
|
|
501
|
-
currentLine = wordToProcess;
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
currentLine = prospectiveLine;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
if (currentLine) {
|
|
508
|
-
additionalLines.push(currentLine);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
return { inlineGhost, additionalLines };
|
|
513
|
-
}, [
|
|
514
|
-
completion.promptCompletion.text,
|
|
515
|
-
buffer.text,
|
|
516
|
-
buffer.lines,
|
|
517
|
-
buffer.cursor,
|
|
518
|
-
inputWidth,
|
|
519
|
-
]);
|
|
520
|
-
const { inlineGhost, additionalLines } = getGhostTextLines();
|
|
521
|
-
return (_jsxs(_Fragment, { children: [_jsxs(Box, { borderStyle: "round", borderColor: shellModeActive ? theme.status.warning : theme.border.focused, paddingX: 1, children: [_jsx(Text, { color: shellModeActive ? theme.status.warning : theme.text.accent, children: shellModeActive ? (reverseSearchActive ? (_jsxs(Text, { color: theme.text.link, "aria-label": SCREEN_READER_USER_PREFIX, children: ["(r:)", ' '] })) : ('! ')) : ('> ') }), _jsx(Box, { flexGrow: 1, flexDirection: "column", children: buffer.text.length === 0 && placeholder ? (focus ? (_jsxs(Text, { children: [chalk.inverse(placeholder.slice(0, 1)), _jsx(Text, { color: theme.text.secondary, children: placeholder.slice(1) })] })) : (_jsx(Text, { color: theme.text.secondary, children: placeholder }))) : (linesToRender
|
|
522
|
-
.map((lineText, visualIdxInRenderedSet) => {
|
|
507
|
+
const getActiveCompletion = () => {
|
|
508
|
+
if (commandSearchActive)
|
|
509
|
+
return commandSearchCompletion;
|
|
510
|
+
if (reverseSearchActive)
|
|
511
|
+
return reverseSearchCompletion;
|
|
512
|
+
return completion;
|
|
513
|
+
};
|
|
514
|
+
const activeCompletion = getActiveCompletion();
|
|
515
|
+
const shouldShowSuggestions = activeCompletion.showSuggestions;
|
|
516
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
|
|
517
|
+
const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
|
|
518
|
+
let statusColor;
|
|
519
|
+
let statusText = '';
|
|
520
|
+
if (shellModeActive) {
|
|
521
|
+
statusColor = theme.ui.symbol;
|
|
522
|
+
statusText = t('Shell mode');
|
|
523
|
+
}
|
|
524
|
+
else if (showYoloStyling) {
|
|
525
|
+
statusColor = theme.status.error;
|
|
526
|
+
statusText = t('YOLO mode');
|
|
527
|
+
}
|
|
528
|
+
else if (showAutoAcceptStyling) {
|
|
529
|
+
statusColor = theme.status.warning;
|
|
530
|
+
statusText = t('Accepting edits');
|
|
531
|
+
}
|
|
532
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Box, { borderStyle: "round", borderColor: isShellFocused && !isEmbeddedShellFocused
|
|
533
|
+
? (statusColor ?? theme.border.focused)
|
|
534
|
+
: theme.border.default, paddingX: 1, children: [_jsxs(Text, { color: statusColor ?? theme.text.accent, "aria-label": statusText || undefined, children: [shellModeActive ? (reverseSearchActive ? (_jsxs(Text, { color: theme.text.link, "aria-label": SCREEN_READER_USER_PREFIX, children: ["(r:)", ' '] })) : ('!')) : commandSearchActive ? (_jsx(Text, { color: theme.text.accent, children: "(r:) " })) : showYoloStyling ? ('*') : ('>'), ' '] }), _jsx(Box, { flexGrow: 1, flexDirection: "column", children: buffer.text.length === 0 && placeholder ? (showCursor ? (_jsxs(Text, { children: [chalk.inverse(placeholder.slice(0, 1)), _jsx(Text, { color: theme.text.secondary, children: placeholder.slice(1) })] })) : (_jsx(Text, { color: theme.text.secondary, children: placeholder }))) : (linesToRender.map((lineText, visualIdxInRenderedSet) => {
|
|
535
|
+
const absoluteVisualIdx = scrollVisualRow + visualIdxInRenderedSet;
|
|
536
|
+
const mapEntry = buffer.visualToLogicalMap[absoluteVisualIdx];
|
|
523
537
|
const cursorVisualRow = cursorVisualRowAbsolute - scrollVisualRow;
|
|
524
|
-
let display = cpSlice(lineText, 0, inputWidth);
|
|
525
538
|
const isOnCursorLine = focus && visualIdxInRenderedSet === cursorVisualRow;
|
|
526
|
-
const
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
539
|
+
const renderedLine = [];
|
|
540
|
+
const [logicalLineIdx, logicalStartCol] = mapEntry;
|
|
541
|
+
const logicalLine = buffer.lines[logicalLineIdx] || '';
|
|
542
|
+
const tokens = parseInputForHighlighting(logicalLine, logicalLineIdx);
|
|
543
|
+
const visualStart = logicalStartCol;
|
|
544
|
+
const visualEnd = logicalStartCol + cpLen(lineText);
|
|
545
|
+
const segments = buildSegmentsForVisualSlice(tokens, visualStart, visualEnd);
|
|
546
|
+
let charCount = 0;
|
|
547
|
+
segments.forEach((seg, segIdx) => {
|
|
548
|
+
const segLen = cpLen(seg.text);
|
|
549
|
+
let display = seg.text;
|
|
550
|
+
if (isOnCursorLine) {
|
|
551
|
+
const relativeVisualColForHighlight = cursorVisualColAbsolute;
|
|
552
|
+
const segStart = charCount;
|
|
553
|
+
const segEnd = segStart + segLen;
|
|
554
|
+
if (relativeVisualColForHighlight >= segStart &&
|
|
555
|
+
relativeVisualColForHighlight < segEnd) {
|
|
556
|
+
const charToHighlight = cpSlice(seg.text, relativeVisualColForHighlight - segStart, relativeVisualColForHighlight - segStart + 1);
|
|
557
|
+
const highlighted = showCursor
|
|
558
|
+
? chalk.inverse(charToHighlight)
|
|
559
|
+
: charToHighlight;
|
|
534
560
|
display =
|
|
535
|
-
cpSlice(
|
|
561
|
+
cpSlice(seg.text, 0, relativeVisualColForHighlight - segStart) +
|
|
536
562
|
highlighted +
|
|
537
|
-
cpSlice(
|
|
538
|
-
}
|
|
539
|
-
else if (relativeVisualColForHighlight === cpLen(display)) {
|
|
540
|
-
if (!currentLineGhost) {
|
|
541
|
-
display = display + chalk.inverse(' ');
|
|
542
|
-
}
|
|
563
|
+
cpSlice(seg.text, relativeVisualColForHighlight - segStart + 1);
|
|
543
564
|
}
|
|
565
|
+
charCount = segEnd;
|
|
544
566
|
}
|
|
567
|
+
const color = seg.type === 'command' || seg.type === 'file'
|
|
568
|
+
? theme.text.accent
|
|
569
|
+
: theme.text.primary;
|
|
570
|
+
renderedLine.push(_jsx(Text, { color: color, children: display }, `token-${segIdx}`));
|
|
571
|
+
});
|
|
572
|
+
if (isOnCursorLine &&
|
|
573
|
+
cursorVisualColAbsolute === cpLen(lineText)) {
|
|
574
|
+
renderedLine.push(_jsx(Text, { children: showCursor ? chalk.inverse(' ') : ' ' }, `cursor-end-${cursorVisualColAbsolute}`));
|
|
545
575
|
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
const actualDisplayWidth = stringWidth(display);
|
|
553
|
-
const cursorWidth = showCursorBeforeGhost ? 1 : 0;
|
|
554
|
-
const totalContentWidth = actualDisplayWidth + cursorWidth + ghostWidth;
|
|
555
|
-
const trailingPadding = Math.max(0, inputWidth - totalContentWidth);
|
|
556
|
-
return (_jsxs(Text, { children: [display, showCursorBeforeGhost && chalk.inverse(' '), currentLineGhost && (_jsx(Text, { color: theme.text.secondary, children: currentLineGhost })), trailingPadding > 0 && ' '.repeat(trailingPadding)] }, `line-${visualIdxInRenderedSet}`));
|
|
557
|
-
})
|
|
558
|
-
.concat(additionalLines.map((ghostLine, index) => {
|
|
559
|
-
const padding = Math.max(0, inputWidth - stringWidth(ghostLine));
|
|
560
|
-
return (_jsxs(Text, { color: theme.text.secondary, children: [ghostLine, ' '.repeat(padding)] }, `ghost-line-${index}`));
|
|
561
|
-
}))) })] }), completion.showSuggestions && (_jsx(Box, { paddingRight: 2, children: _jsx(SuggestionsDisplay, { suggestions: completion.suggestions, activeIndex: completion.activeSuggestionIndex, isLoading: completion.isLoadingSuggestions, width: suggestionsWidth, scrollOffset: completion.visibleStartIndex, userInput: buffer.text }) })), reverseSearchActive && (_jsx(Box, { paddingRight: 2, children: _jsx(SuggestionsDisplay, { suggestions: reverseSearchCompletion.suggestions, activeIndex: reverseSearchCompletion.activeSuggestionIndex, isLoading: reverseSearchCompletion.isLoadingSuggestions, width: suggestionsWidth, scrollOffset: reverseSearchCompletion.visibleStartIndex, userInput: buffer.text }) }))] }));
|
|
576
|
+
return (_jsx(Box, { height: 1, children: _jsx(Text, { children: renderedLine }) }, `line-${visualIdxInRenderedSet}`));
|
|
577
|
+
})) })] }), shouldShowSuggestions && (_jsx(Box, { paddingRight: 2, children: _jsx(SuggestionsDisplay, { suggestions: activeCompletion.suggestions, activeIndex: activeCompletion.activeSuggestionIndex, isLoading: activeCompletion.isLoadingSuggestions, width: suggestionsWidth, scrollOffset: activeCompletion.visibleStartIndex, userInput: buffer.text, mode: buffer.text.startsWith('/') &&
|
|
578
|
+
!reverseSearchActive &&
|
|
579
|
+
!commandSearchActive
|
|
580
|
+
? 'slash'
|
|
581
|
+
: 'reverse', expandedIndex: expandedSuggestionIndex }) }))] }));
|
|
562
582
|
};
|
|
563
583
|
//# sourceMappingURL=InputPrompt.js.map
|