@google/gemini-cli 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +320 -0
- package/dist/.last_build +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +84 -0
- package/dist/src/commands/extensions/disable.d.ts +14 -0
- package/dist/src/commands/extensions/disable.js +42 -0
- package/dist/src/commands/extensions/disable.js.map +1 -0
- package/dist/src/commands/extensions/enable.d.ts +14 -0
- package/dist/src/commands/extensions/enable.js +46 -0
- package/dist/src/commands/extensions/enable.js.map +1 -0
- package/dist/src/commands/extensions/examples/context/GEMINI.md +8 -0
- package/dist/src/commands/extensions/examples/context/gemini-extension.json +5 -0
- package/dist/src/commands/extensions/examples/custom-commands/commands/fs/grep-code.toml +6 -0
- package/dist/src/commands/extensions/examples/custom-commands/gemini-extension.json +4 -0
- package/dist/src/commands/extensions/examples/exclude-tools/gemini-extension.json +5 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.d.ts +6 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.js +46 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.js.map +1 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.ts +60 -0
- package/dist/src/commands/extensions/examples/mcp-server/gemini-extension.json +10 -0
- package/dist/src/commands/extensions/install.d.ts +14 -0
- package/dist/src/commands/extensions/install.js +77 -0
- package/dist/src/commands/extensions/install.js.map +1 -0
- package/dist/src/commands/extensions/install.test.d.ts +6 -0
- package/dist/src/commands/extensions/install.test.js +95 -0
- package/dist/src/commands/extensions/install.test.js.map +1 -0
- package/dist/src/commands/extensions/link.d.ts +12 -0
- package/dist/src/commands/extensions/link.js +37 -0
- package/dist/src/commands/extensions/link.js.map +1 -0
- package/dist/src/commands/extensions/list.d.ts +8 -0
- package/dist/src/commands/extensions/list.js +32 -0
- package/dist/src/commands/extensions/list.js.map +1 -0
- package/dist/src/commands/extensions/new.d.ts +7 -0
- package/dist/src/commands/extensions/new.js +70 -0
- package/dist/src/commands/extensions/new.js.map +1 -0
- package/dist/src/commands/extensions/new.test.d.ts +6 -0
- package/dist/src/commands/extensions/new.test.js +50 -0
- package/dist/src/commands/extensions/new.test.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.d.ts +12 -0
- package/dist/src/commands/extensions/uninstall.js +38 -0
- package/dist/src/commands/extensions/uninstall.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.test.d.ts +6 -0
- package/dist/src/commands/extensions/uninstall.test.js +15 -0
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -0
- package/dist/src/commands/extensions/update.d.ts +13 -0
- package/dist/src/commands/extensions/update.js +69 -0
- package/dist/src/commands/extensions/update.js.map +1 -0
- package/dist/src/commands/extensions.d.ts +7 -0
- package/dist/src/commands/extensions.js +33 -0
- package/dist/src/commands/extensions.js.map +1 -0
- package/dist/src/commands/mcp/add.d.ts +7 -0
- package/dist/src/commands/mcp/add.js +166 -0
- package/dist/src/commands/mcp/add.js.map +1 -0
- package/dist/src/commands/mcp/list.d.ts +8 -0
- package/dist/src/commands/mcp/list.js +110 -0
- package/dist/src/commands/mcp/list.js.map +1 -0
- package/dist/src/commands/mcp/remove.d.ts +7 -0
- package/dist/src/commands/mcp/remove.js +44 -0
- package/dist/src/commands/mcp/remove.js.map +1 -0
- package/dist/src/commands/mcp.d.ts +7 -0
- package/dist/src/commands/mcp.js +23 -0
- package/dist/src/commands/mcp.js.map +1 -0
- package/dist/src/config/auth.d.ts +6 -0
- package/dist/src/config/auth.js +34 -0
- package/dist/src/config/auth.js.map +1 -0
- package/dist/src/config/auth.test.d.ts +6 -0
- package/dist/src/config/auth.test.js +65 -0
- package/dist/src/config/auth.test.js.map +1 -0
- package/dist/src/config/config.d.ts +45 -0
- package/dist/src/config/config.js +477 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/extension.d.ts +66 -0
- package/dist/src/config/extension.js +524 -0
- package/dist/src/config/extension.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.d.ts +30 -0
- package/dist/src/config/extensions/extensionEnablement.js +113 -0
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.test.d.ts +6 -0
- package/dist/src/config/extensions/extensionEnablement.test.js +116 -0
- package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -0
- package/dist/src/config/extensions/github.d.ts +21 -0
- package/dist/src/config/extensions/github.js +256 -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 +194 -0
- package/dist/src/config/extensions/github.test.js.map +1 -0
- package/dist/src/config/extensions/variableSchema.d.ts +36 -0
- package/dist/src/config/extensions/variableSchema.js +22 -0
- package/dist/src/config/extensions/variableSchema.js.map +1 -0
- package/dist/src/config/extensions/variables.d.ts +17 -0
- package/dist/src/config/extensions/variables.js +40 -0
- package/dist/src/config/extensions/variables.js.map +1 -0
- package/dist/src/config/extensions/variables.test.d.ts +6 -0
- package/dist/src/config/extensions/variables.test.js +17 -0
- package/dist/src/config/extensions/variables.test.js.map +1 -0
- package/dist/src/config/keyBindings.d.ts +70 -0
- package/dist/src/config/keyBindings.js +130 -0
- package/dist/src/config/keyBindings.js.map +1 -0
- package/dist/src/config/keyBindings.test.d.ts +6 -0
- package/dist/src/config/keyBindings.test.js +51 -0
- package/dist/src/config/keyBindings.test.js.map +1 -0
- package/dist/src/config/sandboxConfig.d.ts +13 -0
- package/dist/src/config/sandboxConfig.js +73 -0
- package/dist/src/config/sandboxConfig.js.map +1 -0
- package/dist/src/config/settings.d.ts +65 -0
- package/dist/src/config/settings.js +553 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/config/settingsSchema.d.ts +959 -0
- package/dist/src/config/settingsSchema.js +925 -0
- package/dist/src/config/settingsSchema.js.map +1 -0
- package/dist/src/config/settingsSchema.test.d.ts +6 -0
- package/dist/src/config/settingsSchema.test.js +206 -0
- package/dist/src/config/settingsSchema.test.js.map +1 -0
- package/dist/src/config/trustedFolders.d.ts +47 -0
- package/dist/src/config/trustedFolders.js +142 -0
- package/dist/src/config/trustedFolders.js.map +1 -0
- package/dist/src/config/trustedFolders.test.d.ts +6 -0
- package/dist/src/config/trustedFolders.test.js +259 -0
- package/dist/src/config/trustedFolders.test.js.map +1 -0
- package/dist/src/core/auth.d.ts +13 -0
- package/dist/src/core/auth.js +27 -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 +33 -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 +20 -0
- package/dist/src/core/theme.js.map +1 -0
- package/dist/src/gemini.d.ts +12 -0
- package/dist/src/gemini.js +334 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/gemini.test.d.ts +6 -0
- package/dist/src/gemini.test.js +318 -0
- package/dist/src/gemini.test.js.map +1 -0
- package/dist/src/generated/git-commit.d.ts +7 -0
- package/dist/src/generated/git-commit.js +10 -0
- package/dist/src/generated/git-commit.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +7 -0
- package/dist/src/nonInteractiveCli.js +108 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/patches/is-in-ci.d.ts +7 -0
- package/dist/src/patches/is-in-ci.js +15 -0
- package/dist/src/patches/is-in-ci.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.d.ts +24 -0
- package/dist/src/services/BuiltinCommandLoader.js +82 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.test.d.ts +6 -0
- package/dist/src/services/BuiltinCommandLoader.test.js +107 -0
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -0
- package/dist/src/services/CommandService.d.ts +55 -0
- package/dist/src/services/CommandService.js +90 -0
- package/dist/src/services/CommandService.js.map +1 -0
- package/dist/src/services/CommandService.test.d.ts +6 -0
- package/dist/src/services/CommandService.test.js +233 -0
- package/dist/src/services/CommandService.test.js.map +1 -0
- package/dist/src/services/FileCommandLoader.d.ts +51 -0
- package/dist/src/services/FileCommandLoader.js +227 -0
- package/dist/src/services/FileCommandLoader.js.map +1 -0
- package/dist/src/services/McpPromptLoader.d.ts +35 -0
- package/dist/src/services/McpPromptLoader.js +253 -0
- package/dist/src/services/McpPromptLoader.js.map +1 -0
- package/dist/src/services/McpPromptLoader.test.d.ts +6 -0
- package/dist/src/services/McpPromptLoader.test.js +341 -0
- package/dist/src/services/McpPromptLoader.test.js.map +1 -0
- package/dist/src/services/prompt-processors/argumentProcessor.d.ts +16 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js +21 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/atFileProcessor.d.ts +12 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js +62 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.js +174 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +1 -0
- package/dist/src/services/prompt-processors/injectionParser.d.ts +29 -0
- package/dist/src/services/prompt-processors/injectionParser.js +60 -0
- package/dist/src/services/prompt-processors/injectionParser.js.map +1 -0
- package/dist/src/services/prompt-processors/injectionParser.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/injectionParser.test.js +189 -0
- package/dist/src/services/prompt-processors/injectionParser.test.js.map +1 -0
- package/dist/src/services/prompt-processors/shellProcessor.d.ts +27 -0
- package/dist/src/services/prompt-processors/shellProcessor.js +128 -0
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/types.d.ts +45 -0
- package/dist/src/services/prompt-processors/types.js +20 -0
- package/dist/src/services/prompt-processors/types.js.map +1 -0
- package/dist/src/services/types.d.ts +22 -0
- package/dist/src/services/types.js +7 -0
- package/dist/src/services/types.js.map +1 -0
- package/dist/src/test-utils/customMatchers.d.ts +14 -0
- package/dist/src/test-utils/customMatchers.js +40 -0
- package/dist/src/test-utils/customMatchers.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.d.ts +18 -0
- package/dist/src/test-utils/mockCommandContext.js +86 -0
- package/dist/src/test-utils/mockCommandContext.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.test.d.ts +6 -0
- package/dist/src/test-utils/mockCommandContext.test.js +51 -0
- package/dist/src/test-utils/mockCommandContext.test.js.map +1 -0
- package/dist/src/test-utils/render.d.ts +8 -0
- package/dist/src/test-utils/render.js +10 -0
- package/dist/src/test-utils/render.js.map +1 -0
- package/dist/src/ui/App.d.ts +6 -0
- package/dist/src/ui/App.js +22 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/AppContainer.d.ts +17 -0
- package/dist/src/ui/AppContainer.js +879 -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 +414 -0
- package/dist/src/ui/AppContainer.test.js.map +1 -0
- package/dist/src/ui/IdeIntegrationNudge.d.ts +16 -0
- package/dist/src/ui/IdeIntegrationNudge.js +47 -0
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.d.ts +18 -0
- package/dist/src/ui/auth/AuthDialog.js +99 -0
- package/dist/src/ui/auth/AuthDialog.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.test.d.ts +6 -0
- package/dist/src/ui/auth/AuthDialog.test.js +184 -0
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -0
- package/dist/src/ui/auth/AuthInProgress.d.ts +11 -0
- package/dist/src/ui/auth/AuthInProgress.js +23 -0
- package/dist/src/ui/auth/AuthInProgress.js.map +1 -0
- package/dist/src/ui/auth/useAuth.d.ts +15 -0
- package/dist/src/ui/auth/useAuth.js +73 -0
- package/dist/src/ui/auth/useAuth.js.map +1 -0
- package/dist/src/ui/colors.d.ts +7 -0
- package/dist/src/ui/colors.js +54 -0
- package/dist/src/ui/colors.js.map +1 -0
- package/dist/src/ui/commands/aboutCommand.d.ts +7 -0
- package/dist/src/ui/commands/aboutCommand.js +49 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -0
- package/dist/src/ui/commands/authCommand.d.ts +7 -0
- package/dist/src/ui/commands/authCommand.js +16 -0
- package/dist/src/ui/commands/authCommand.js.map +1 -0
- package/dist/src/ui/commands/bugCommand.d.ts +7 -0
- package/dist/src/ui/commands/bugCommand.js +76 -0
- package/dist/src/ui/commands/bugCommand.js.map +1 -0
- package/dist/src/ui/commands/chatCommand.d.ts +9 -0
- package/dist/src/ui/commands/chatCommand.js +314 -0
- package/dist/src/ui/commands/chatCommand.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.d.ts +7 -0
- package/dist/src/ui/commands/clearCommand.js +27 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -0
- package/dist/src/ui/commands/compressCommand.d.ts +7 -0
- package/dist/src/ui/commands/compressCommand.js +66 -0
- package/dist/src/ui/commands/compressCommand.js.map +1 -0
- package/dist/src/ui/commands/copyCommand.d.ts +7 -0
- package/dist/src/ui/commands/copyCommand.js +59 -0
- package/dist/src/ui/commands/copyCommand.js.map +1 -0
- package/dist/src/ui/commands/corgiCommand.d.ts +7 -0
- package/dist/src/ui/commands/corgiCommand.js +16 -0
- package/dist/src/ui/commands/corgiCommand.js.map +1 -0
- package/dist/src/ui/commands/directoryCommand.d.ts +8 -0
- package/dist/src/ui/commands/directoryCommand.js +135 -0
- package/dist/src/ui/commands/directoryCommand.js.map +1 -0
- package/dist/src/ui/commands/docsCommand.d.ts +7 -0
- package/dist/src/ui/commands/docsCommand.js +31 -0
- package/dist/src/ui/commands/docsCommand.js.map +1 -0
- package/dist/src/ui/commands/editorCommand.d.ts +7 -0
- package/dist/src/ui/commands/editorCommand.js +16 -0
- package/dist/src/ui/commands/editorCommand.js.map +1 -0
- package/dist/src/ui/commands/extensionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/extensionsCommand.js +85 -0
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.d.ts +7 -0
- package/dist/src/ui/commands/helpCommand.js +21 -0
- package/dist/src/ui/commands/helpCommand.js.map +1 -0
- package/dist/src/ui/commands/ideCommand.d.ts +7 -0
- package/dist/src/ui/commands/ideCommand.js +225 -0
- package/dist/src/ui/commands/ideCommand.js.map +1 -0
- package/dist/src/ui/commands/initCommand.d.ts +7 -0
- package/dist/src/ui/commands/initCommand.js +76 -0
- package/dist/src/ui/commands/initCommand.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.d.ts +7 -0
- package/dist/src/ui/commands/mcpCommand.js +433 -0
- package/dist/src/ui/commands/mcpCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/memoryCommand.js +92 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -0
- package/dist/src/ui/commands/privacyCommand.d.ts +7 -0
- package/dist/src/ui/commands/privacyCommand.js +16 -0
- package/dist/src/ui/commands/privacyCommand.js.map +1 -0
- package/dist/src/ui/commands/quitCommand.d.ts +7 -0
- package/dist/src/ui/commands/quitCommand.js +34 -0
- package/dist/src/ui/commands/quitCommand.js.map +1 -0
- package/dist/src/ui/commands/restoreCommand.d.ts +8 -0
- package/dist/src/ui/commands/restoreCommand.js +124 -0
- package/dist/src/ui/commands/restoreCommand.js.map +1 -0
- package/dist/src/ui/commands/settingsCommand.d.ts +7 -0
- package/dist/src/ui/commands/settingsCommand.js +16 -0
- package/dist/src/ui/commands/settingsCommand.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.d.ts +9 -0
- package/dist/src/ui/commands/setupGithubCommand.js +154 -0
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/setupGithubCommand.test.js +167 -0
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.d.ts +7 -0
- package/dist/src/ui/commands/statsCommand.js +54 -0
- package/dist/src/ui/commands/statsCommand.js.map +1 -0
- package/dist/src/ui/commands/terminalSetupCommand.d.ts +13 -0
- package/dist/src/ui/commands/terminalSetupCommand.js +41 -0
- package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -0
- package/dist/src/ui/commands/themeCommand.d.ts +7 -0
- package/dist/src/ui/commands/themeCommand.js +16 -0
- package/dist/src/ui/commands/themeCommand.js.map +1 -0
- package/dist/src/ui/commands/toolsCommand.d.ts +7 -0
- package/dist/src/ui/commands/toolsCommand.js +56 -0
- package/dist/src/ui/commands/toolsCommand.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +152 -0
- package/dist/src/ui/commands/types.js +12 -0
- package/dist/src/ui/commands/types.js.map +1 -0
- package/dist/src/ui/commands/vimCommand.d.ts +7 -0
- package/dist/src/ui/commands/vimCommand.js +23 -0
- package/dist/src/ui/commands/vimCommand.js.map +1 -0
- package/dist/src/ui/components/AboutBox.d.ts +17 -0
- package/dist/src/ui/components/AboutBox.js +6 -0
- package/dist/src/ui/components/AboutBox.js.map +1 -0
- 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 +22 -0
- package/dist/src/ui/components/AppHeader.js.map +1 -0
- package/dist/src/ui/components/AsciiArt.d.ts +8 -0
- package/dist/src/ui/components/AsciiArt.js +36 -0
- package/dist/src/ui/components/AsciiArt.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +12 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +26 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/components/Composer.d.ts +6 -0
- package/dist/src/ui/components/Composer.js +73 -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 +38 -0
- package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +20 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +66 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +9 -0
- package/dist/src/ui/components/ContextUsageDisplay.js +14 -0
- package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/DebugProfiler.d.ts +6 -0
- package/dist/src/ui/components/DebugProfiler.js +27 -0
- package/dist/src/ui/components/DebugProfiler.js.map +1 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +14 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js +34 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
- package/dist/src/ui/components/DialogManager.d.ts +6 -0
- package/dist/src/ui/components/DialogManager.js +85 -0
- package/dist/src/ui/components/DialogManager.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +16 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +71 -0
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.d.ts +17 -0
- package/dist/src/ui/components/FolderTrustDialog.js +55 -0
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/FolderTrustDialog.test.js +88 -0
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/Footer.d.ts +25 -0
- package/dist/src/ui/components/Footer.js +30 -0
- package/dist/src/ui/components/Footer.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +22 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js +23 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
- package/dist/src/ui/components/Header.d.ts +13 -0
- package/dist/src/ui/components/Header.js +28 -0
- package/dist/src/ui/components/Header.js.map +1 -0
- package/dist/src/ui/components/Header.test.d.ts +6 -0
- package/dist/src/ui/components/Header.test.js +37 -0
- package/dist/src/ui/components/Header.test.js.map +1 -0
- package/dist/src/ui/components/Help.d.ts +12 -0
- package/dist/src/ui/components/Help.js +13 -0
- package/dist/src/ui/components/Help.js.map +1 -0
- package/dist/src/ui/components/Help.test.d.ts +6 -0
- package/dist/src/ui/components/Help.test.js +57 -0
- package/dist/src/ui/components/Help.test.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +20 -0
- package/dist/src/ui/components/HistoryItemDisplay.js +20 -0
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js +93 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +37 -0
- package/dist/src/ui/components/InputPrompt.js +700 -0
- package/dist/src/ui/components/InputPrompt.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
- package/dist/src/ui/components/LoadingIndicator.js +25 -0
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.test.d.ts +6 -0
- package/dist/src/ui/components/LoadingIndicator.test.js +190 -0
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +13 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js +35 -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 +25 -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 +23 -0
- package/dist/src/ui/components/MainContent.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +24 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +33 -0
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/Notifications.d.ts +6 -0
- package/dist/src/ui/components/Notifications.js +23 -0
- package/dist/src/ui/components/Notifications.js.map +1 -0
- package/dist/src/ui/components/PrepareLabel.d.ts +15 -0
- package/dist/src/ui/components/PrepareLabel.js +72 -0
- package/dist/src/ui/components/PrepareLabel.js.map +1 -0
- package/dist/src/ui/components/PrepareLabel.test.d.ts +6 -0
- package/dist/src/ui/components/PrepareLabel.test.js +71 -0
- package/dist/src/ui/components/PrepareLabel.test.js.map +1 -0
- package/dist/src/ui/components/ProQuotaDialog.d.ts +13 -0
- package/dist/src/ui/components/ProQuotaDialog.js +21 -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 +56 -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/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/SessionSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js +4 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/SettingsDialog.d.ts +16 -0
- package/dist/src/ui/components/SettingsDialog.js +621 -0
- package/dist/src/ui/components/SettingsDialog.js.map +1 -0
- package/dist/src/ui/components/SettingsDialog.test.d.ts +6 -0
- package/dist/src/ui/components/SettingsDialog.test.js +1002 -0
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -0
- package/dist/src/ui/components/ShellConfirmationDialog.d.ts +15 -0
- package/dist/src/ui/components/ShellConfirmationDialog.js +46 -0
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.js +40 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +1 -0
- package/dist/src/ui/components/ShellInputPrompt.d.ts +11 -0
- package/dist/src/ui/components/ShellInputPrompt.js +36 -0
- package/dist/src/ui/components/ShellInputPrompt.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
- package/dist/src/ui/components/ShellModeIndicator.js +5 -0
- package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
- package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
- package/dist/src/ui/components/ShowMoreLines.js +24 -0
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
- package/dist/src/ui/components/StatsDisplay.d.ts +12 -0
- package/dist/src/ui/components/StatsDisplay.js +43 -0
- package/dist/src/ui/components/StatsDisplay.js.map +1 -0
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +27 -0
- package/dist/src/ui/components/SuggestionsDisplay.js +40 -0
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.d.ts +20 -0
- package/dist/src/ui/components/ThemeDialog.js +121 -0
- package/dist/src/ui/components/ThemeDialog.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ThemeDialog.test.js +75 -0
- package/dist/src/ui/components/ThemeDialog.test.js.map +1 -0
- package/dist/src/ui/components/Tips.d.ts +12 -0
- package/dist/src/ui/components/Tips.js +9 -0
- package/dist/src/ui/components/Tips.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ToolStatsDisplay.js +41 -0
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
- package/dist/src/ui/components/UpdateNotification.js +10 -0
- package/dist/src/ui/components/UpdateNotification.js.map +1 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.d.ts +11 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +42 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +10 -0
- package/dist/src/ui/components/messages/CompressionMessage.js +46 -0
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js +160 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +17 -0
- package/dist/src/ui/components/messages/DiffRenderer.js +218 -0
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +6 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js +239 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -0
- package/dist/src/ui/components/messages/ErrorMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
- package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessage.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessage.js +11 -0
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js +15 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
- package/dist/src/ui/components/messages/InfoMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/InfoMessage.js +10 -0
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +174 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +114 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +19 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +56 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +261 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +19 -0
- package/dist/src/ui/components/messages/ToolMessage.js +69 -0
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js +150 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/UserMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserMessage.js +14 -0
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
- package/dist/src/ui/components/messages/UserShellMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
- package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
- 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/EnumSelector.d.ts +18 -0
- package/dist/src/ui/components/shared/EnumSelector.js +44 -0
- package/dist/src/ui/components/shared/EnumSelector.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.test.d.ts +6 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js +70 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +61 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js +451 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +6 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +154 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +46 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js +116 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +6 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +111 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -0
- package/dist/src/ui/components/shared/ScopeSelector.d.ts +19 -0
- package/dist/src/ui/components/shared/ScopeSelector.js +11 -0
- package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +490 -0
- package/dist/src/ui/components/shared/text-buffer.js +1598 -0
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +72 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js +552 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -0
- 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/constants.d.ts +17 -0
- package/dist/src/ui/constants.js +22 -0
- package/dist/src/ui/constants.js.map +1 -0
- package/dist/src/ui/contexts/AppContext.d.ts +11 -0
- package/dist/src/ui/contexts/AppContext.js +15 -0
- package/dist/src/ui/contexts/AppContext.js.map +1 -0
- package/dist/src/ui/contexts/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/FocusContext.d.ts +7 -0
- package/dist/src/ui/contexts/FocusContext.js +9 -0
- package/dist/src/ui/contexts/FocusContext.js.map +1 -0
- package/dist/src/ui/contexts/KeypressContext.d.ts +34 -0
- package/dist/src/ui/contexts/KeypressContext.js +580 -0
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -0
- package/dist/src/ui/contexts/KeypressContext.test.d.ts +6 -0
- package/dist/src/ui/contexts/KeypressContext.test.js +671 -0
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -0
- package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
- package/dist/src/ui/contexts/OverflowContext.js +38 -0
- package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.d.ts +45 -0
- package/dist/src/ui/contexts/SessionContext.js +157 -0
- package/dist/src/ui/contexts/SessionContext.js.map +1 -0
- package/dist/src/ui/contexts/SettingsContext.d.ts +9 -0
- package/dist/src/ui/contexts/SettingsContext.js +15 -0
- package/dist/src/ui/contexts/SettingsContext.js.map +1 -0
- package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
- package/dist/src/ui/contexts/StreamingContext.js +15 -0
- package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
- package/dist/src/ui/contexts/UIActionsContext.d.ts +36 -0
- package/dist/src/ui/contexts/UIActionsContext.js +20 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -0
- package/dist/src/ui/contexts/UIStateContext.d.ts +95 -0
- package/dist/src/ui/contexts/UIStateContext.js +15 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -0
- package/dist/src/ui/contexts/VimModeContext.d.ts +19 -0
- package/dist/src/ui/contexts/VimModeContext.js +48 -0
- package/dist/src/ui/contexts/VimModeContext.js.map +1 -0
- package/dist/src/ui/editors/editorSettingsManager.d.ts +19 -0
- package/dist/src/ui/editors/editorSettingsManager.js +47 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +31 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +364 -0
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +6 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.js +834 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/keyToAnsi.d.ts +15 -0
- package/dist/src/ui/hooks/keyToAnsi.js +67 -0
- package/dist/src/ui/hooks/keyToAnsi.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +18 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +277 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +6 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +504 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +42 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +406 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/useAtCompletion.d.ts +23 -0
- package/dist/src/ui/hooks/useAtCompletion.js +179 -0
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +13 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +50 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +380 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -0
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +12 -0
- package/dist/src/ui/hooks/useBracketedPaste.js +32 -0
- package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +32 -0
- package/dist/src/ui/hooks/useCommandCompletion.js +186 -0
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useCompletion.d.ts +24 -0
- package/dist/src/ui/hooks/useCompletion.js +88 -0
- package/dist/src/ui/hooks/useCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +12 -0
- package/dist/src/ui/hooks/useConsoleMessages.js +76 -0
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
- package/dist/src/ui/hooks/useEditorSettings.js +43 -0
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.test.d.ts +6 -0
- package/dist/src/ui/hooks/useEditorSettings.test.js +164 -0
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -0
- package/dist/src/ui/hooks/useFocus.d.ts +10 -0
- package/dist/src/ui/hooks/useFocus.js +41 -0
- package/dist/src/ui/hooks/useFocus.js.map +1 -0
- package/dist/src/ui/hooks/useFolderTrust.d.ts +13 -0
- package/dist/src/ui/hooks/useFolderTrust.js +65 -0
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +35 -0
- package/dist/src/ui/hooks/useGeminiStream.js +724 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.js +58 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.test.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.test.js +171 -0
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.d.ts +22 -0
- package/dist/src/ui/hooks/useHistoryManager.js +72 -0
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.test.d.ts +6 -0
- package/dist/src/ui/hooks/useHistoryManager.test.js +171 -0
- package/dist/src/ui/hooks/useHistoryManager.test.js.map +1 -0
- package/dist/src/ui/hooks/useIdeTrustListener.d.ts +14 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js +39 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistory.js +84 -0
- package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.test.d.ts +6 -0
- package/dist/src/ui/hooks/useInputHistory.test.js +207 -0
- package/dist/src/ui/hooks/useInputHistory.test.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistoryStore.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistoryStore.js +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/useKeypress.d.ts +17 -0
- package/dist/src/ui/hooks/useKeypress.js +27 -0
- package/dist/src/ui/hooks/useKeypress.js.map +1 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +15 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +20 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js +44 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +6 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +91 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -0
- package/dist/src/ui/hooks/useLogger.d.ts +11 -0
- package/dist/src/ui/hooks/useLogger.js +29 -0
- package/dist/src/ui/hooks/useLogger.js.map +1 -0
- 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 +23 -0
- package/dist/src/ui/hooks/useMessageQueue.js +51 -0
- package/dist/src/ui/hooks/useMessageQueue.js.map +1 -0
- package/dist/src/ui/hooks/useMessageQueue.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js +167 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +190 -0
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +16 -0
- package/dist/src/ui/hooks/usePrivacySettings.js +114 -0
- package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -0
- package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +6 -0
- package/dist/src/ui/hooks/usePrivacySettings.test.js +90 -0
- package/dist/src/ui/hooks/usePrivacySettings.test.js.map +1 -0
- package/dist/src/ui/hooks/usePromptCompletion.d.ts +23 -0
- package/dist/src/ui/hooks/usePromptCompletion.js +177 -0
- package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -0
- 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 +267 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +34 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js +192 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +19 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.js +103 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +6 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +163 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useSettingsCommand.d.ts +10 -0
- package/dist/src/ui/hooks/useSettingsCommand.js +21 -0
- package/dist/src/ui/hooks/useSettingsCommand.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.d.ts +14 -0
- package/dist/src/ui/hooks/useShellHistory.js +111 -0
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.test.d.ts +6 -0
- package/dist/src/ui/hooks/useShellHistory.test.js +187 -0
- package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js +58 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +20 -0
- package/dist/src/ui/hooks/useSlashCompletion.js +344 -0
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +9 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.js +564 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
- package/dist/src/ui/hooks/useStateAndRef.js +26 -0
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
- package/dist/src/ui/hooks/useTerminalSize.js +27 -0
- package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.d.ts +15 -0
- package/dist/src/ui/hooks/useThemeCommand.js +68 -0
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.d.ts +12 -0
- package/dist/src/ui/hooks/useTimer.js +58 -0
- package/dist/src/ui/hooks/useTimer.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.test.d.ts +6 -0
- package/dist/src/ui/hooks/useTimer.test.js +90 -0
- package/dist/src/ui/hooks/useTimer.test.js.map +1 -0
- package/dist/src/ui/hooks/useToolScheduler.test.d.ts +6 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js +855 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.d.ts +13 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.js +54 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.js.map +1 -0
- package/dist/src/ui/hooks/vim.d.ts +28 -0
- package/dist/src/ui/hooks/vim.js +639 -0
- package/dist/src/ui/hooks/vim.js.map +1 -0
- package/dist/src/ui/keyMatchers.d.ts +27 -0
- package/dist/src/ui/keyMatchers.js +68 -0
- package/dist/src/ui/keyMatchers.js.map +1 -0
- package/dist/src/ui/keyMatchers.test.d.ts +6 -0
- package/dist/src/ui/keyMatchers.test.js +293 -0
- package/dist/src/ui/keyMatchers.test.js.map +1 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +12 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +41 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +10 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +18 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +10 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js +18 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +12 -0
- package/dist/src/ui/privacy/PrivacyNotice.js +25 -0
- package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -0
- package/dist/src/ui/semantic-colors.d.ts +7 -0
- package/dist/src/ui/semantic-colors.js +24 -0
- package/dist/src/ui/semantic-colors.js.map +1 -0
- package/dist/src/ui/state/extensions.d.ts +14 -0
- package/dist/src/ui/state/extensions.js +16 -0
- package/dist/src/ui/state/extensions.js.map +1 -0
- package/dist/src/ui/textConstants.d.ts +9 -0
- package/dist/src/ui/textConstants.js +10 -0
- package/dist/src/ui/textConstants.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.d.ts +7 -0
- package/dist/src/ui/themes/ansi-light.js +142 -0
- package/dist/src/ui/themes/ansi-light.js.map +1 -0
- package/dist/src/ui/themes/ansi.d.ts +7 -0
- package/dist/src/ui/themes/ansi.js +152 -0
- package/dist/src/ui/themes/ansi.js.map +1 -0
- package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
- package/dist/src/ui/themes/atom-one-dark.js +138 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
- package/dist/src/ui/themes/ayu-light.d.ts +7 -0
- package/dist/src/ui/themes/ayu-light.js +130 -0
- package/dist/src/ui/themes/ayu-light.js.map +1 -0
- package/dist/src/ui/themes/ayu.d.ts +7 -0
- package/dist/src/ui/themes/ayu.js +104 -0
- package/dist/src/ui/themes/ayu.js.map +1 -0
- package/dist/src/ui/themes/color-utils.d.ts +21 -0
- package/dist/src/ui/themes/color-utils.js +221 -0
- package/dist/src/ui/themes/color-utils.js.map +1 -0
- package/dist/src/ui/themes/color-utils.test.d.ts +6 -0
- package/dist/src/ui/themes/color-utils.test.js +197 -0
- package/dist/src/ui/themes/color-utils.test.js.map +1 -0
- package/dist/src/ui/themes/default-light.d.ts +7 -0
- package/dist/src/ui/themes/default-light.js +100 -0
- package/dist/src/ui/themes/default-light.js.map +1 -0
- package/dist/src/ui/themes/default.d.ts +7 -0
- package/dist/src/ui/themes/default.js +143 -0
- package/dist/src/ui/themes/default.js.map +1 -0
- package/dist/src/ui/themes/dracula.d.ts +7 -0
- package/dist/src/ui/themes/dracula.js +115 -0
- package/dist/src/ui/themes/dracula.js.map +1 -0
- package/dist/src/ui/themes/github-dark.d.ts +7 -0
- package/dist/src/ui/themes/github-dark.js +138 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -0
- package/dist/src/ui/themes/github-light.d.ts +7 -0
- package/dist/src/ui/themes/github-light.js +140 -0
- package/dist/src/ui/themes/github-light.js.map +1 -0
- package/dist/src/ui/themes/googlecode.d.ts +7 -0
- package/dist/src/ui/themes/googlecode.js +137 -0
- package/dist/src/ui/themes/googlecode.js.map +1 -0
- package/dist/src/ui/themes/no-color.d.ts +7 -0
- package/dist/src/ui/themes/no-color.js +115 -0
- package/dist/src/ui/themes/no-color.js.map +1 -0
- package/dist/src/ui/themes/semantic-tokens.d.ts +37 -0
- package/dist/src/ui/themes/semantic-tokens.js +94 -0
- package/dist/src/ui/themes/semantic-tokens.js.map +1 -0
- package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
- package/dist/src/ui/themes/shades-of-purple.js +304 -0
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.d.ts +66 -0
- package/dist/src/ui/themes/theme-manager.js +262 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.test.d.ts +6 -0
- package/dist/src/ui/themes/theme-manager.test.js +142 -0
- package/dist/src/ui/themes/theme-manager.test.js.map +1 -0
- package/dist/src/ui/themes/theme.d.ts +130 -0
- package/dist/src/ui/themes/theme.js +379 -0
- package/dist/src/ui/themes/theme.js.map +1 -0
- package/dist/src/ui/themes/xcode.d.ts +7 -0
- package/dist/src/ui/themes/xcode.js +145 -0
- package/dist/src/ui/themes/xcode.js.map +1 -0
- package/dist/src/ui/types.d.ts +224 -0
- package/dist/src/ui/types.js +56 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/utils/CodeColorizer.d.ts +17 -0
- package/dist/src/ui/utils/CodeColorizer.js +111 -0
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
- package/dist/src/ui/utils/ConsolePatcher.d.ts +25 -0
- package/dist/src/ui/utils/ConsolePatcher.js +52 -0
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +16 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +111 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +14 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +208 -0
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +6 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js +156 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -0
- package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
- package/dist/src/ui/utils/TableRenderer.js +84 -0
- package/dist/src/ui/utils/TableRenderer.js.map +1 -0
- package/dist/src/ui/utils/clipboardUtils.d.ts +22 -0
- package/dist/src/ui/utils/clipboardUtils.js +126 -0
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -0
- package/dist/src/ui/utils/clipboardUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/clipboardUtils.test.js +65 -0
- package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +24 -0
- package/dist/src/ui/utils/commandUtils.js +131 -0
- package/dist/src/ui/utils/commandUtils.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/commandUtils.test.js +349 -0
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -0
- package/dist/src/ui/utils/computeStats.d.ts +10 -0
- package/dist/src/ui/utils/computeStats.js +57 -0
- package/dist/src/ui/utils/computeStats.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.d.ts +17 -0
- package/dist/src/ui/utils/displayUtils.js +24 -0
- package/dist/src/ui/utils/displayUtils.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/displayUtils.test.js +42 -0
- package/dist/src/ui/utils/displayUtils.test.js.map +1 -0
- package/dist/src/ui/utils/formatters.d.ts +13 -0
- package/dist/src/ui/utils/formatters.js +56 -0
- package/dist/src/ui/utils/formatters.js.map +1 -0
- package/dist/src/ui/utils/formatters.test.d.ts +6 -0
- package/dist/src/ui/utils/formatters.test.js +56 -0
- package/dist/src/ui/utils/formatters.test.js.map +1 -0
- 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/isNarrowWidth.d.ts +6 -0
- package/dist/src/ui/utils/isNarrowWidth.js +9 -0
- package/dist/src/ui/utils/isNarrowWidth.js.map +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +13 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js +98 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.js +110 -0
- package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.test.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.test.js +42 -0
- package/dist/src/ui/utils/markdownUtilities.test.js.map +1 -0
- package/dist/src/ui/utils/platformConstants.d.ts +75 -0
- package/dist/src/ui/utils/platformConstants.js +78 -0
- package/dist/src/ui/utils/platformConstants.js.map +1 -0
- package/dist/src/ui/utils/terminalSetup.d.ts +30 -0
- package/dist/src/ui/utils/terminalSetup.js +281 -0
- package/dist/src/ui/utils/terminalSetup.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +41 -0
- package/dist/src/ui/utils/textUtils.js +129 -0
- package/dist/src/ui/utils/textUtils.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +12 -0
- package/dist/src/ui/utils/updateCheck.js +78 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.test.d.ts +6 -0
- package/dist/src/ui/utils/updateCheck.test.js +145 -0
- package/dist/src/ui/utils/updateCheck.test.js.map +1 -0
- package/dist/src/utils/checks.d.ts +19 -0
- package/dist/src/utils/checks.js +24 -0
- package/dist/src/utils/checks.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +8 -0
- package/dist/src/utils/cleanup.js +35 -0
- package/dist/src/utils/cleanup.js.map +1 -0
- package/dist/src/utils/commands.d.ts +20 -0
- package/dist/src/utils/commands.js +53 -0
- package/dist/src/utils/commands.js.map +1 -0
- package/dist/src/utils/commands.test.d.ts +6 -0
- package/dist/src/utils/commands.test.js +115 -0
- package/dist/src/utils/commands.test.js.map +1 -0
- package/dist/src/utils/commentJson.d.ts +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 +10 -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 +32 -0
- package/dist/src/utils/dialogScopeUtils.js +48 -0
- package/dist/src/utils/dialogScopeUtils.js.map +1 -0
- 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 +27 -0
- package/dist/src/utils/errors.js +105 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/errors.test.d.ts +6 -0
- package/dist/src/utils/errors.test.js +303 -0
- package/dist/src/utils/errors.test.js.map +1 -0
- package/dist/src/utils/events.d.ts +12 -0
- package/dist/src/utils/events.js +14 -0
- package/dist/src/utils/events.js.map +1 -0
- package/dist/src/utils/gitUtils.d.ts +30 -0
- package/dist/src/utils/gitUtils.js +89 -0
- package/dist/src/utils/gitUtils.js.map +1 -0
- package/dist/src/utils/gitUtils.test.d.ts +6 -0
- package/dist/src/utils/gitUtils.test.js +113 -0
- package/dist/src/utils/gitUtils.test.js.map +1 -0
- package/dist/src/utils/handleAutoUpdate.d.ts +11 -0
- package/dist/src/utils/handleAutoUpdate.js +102 -0
- package/dist/src/utils/handleAutoUpdate.js.map +1 -0
- package/dist/src/utils/installationInfo.d.ts +23 -0
- package/dist/src/utils/installationInfo.js +154 -0
- package/dist/src/utils/installationInfo.js.map +1 -0
- package/dist/src/utils/installationInfo.test.d.ts +6 -0
- package/dist/src/utils/installationInfo.test.js +242 -0
- package/dist/src/utils/installationInfo.test.js.map +1 -0
- package/dist/src/utils/package.d.ts +12 -0
- package/dist/src/utils/package.js +24 -0
- package/dist/src/utils/package.js.map +1 -0
- package/dist/src/utils/processUtils.d.ts +13 -0
- package/dist/src/utils/processUtils.js +18 -0
- package/dist/src/utils/processUtils.js.map +1 -0
- package/dist/src/utils/processUtils.test.d.ts +6 -0
- package/dist/src/utils/processUtils.test.js +20 -0
- package/dist/src/utils/processUtils.test.js.map +1 -0
- package/dist/src/utils/readStdin.d.ts +6 -0
- package/dist/src/utils/readStdin.js +59 -0
- package/dist/src/utils/readStdin.js.map +1 -0
- package/dist/src/utils/readStdin.test.d.ts +6 -0
- package/dist/src/utils/readStdin.test.js +88 -0
- package/dist/src/utils/readStdin.test.js.map +1 -0
- package/dist/src/utils/resolvePath.d.ts +6 -0
- package/dist/src/utils/resolvePath.js +21 -0
- package/dist/src/utils/resolvePath.js.map +1 -0
- package/dist/src/utils/sandbox-macos-permissive-closed.sb +32 -0
- package/dist/src/utils/sandbox-macos-permissive-open.sb +25 -0
- package/dist/src/utils/sandbox-macos-permissive-proxied.sb +37 -0
- package/dist/src/utils/sandbox-macos-restrictive-closed.sb +93 -0
- package/dist/src/utils/sandbox-macos-restrictive-open.sb +96 -0
- package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +98 -0
- package/dist/src/utils/sandbox.d.ts +7 -0
- package/dist/src/utils/sandbox.js +735 -0
- package/dist/src/utils/sandbox.js.map +1 -0
- package/dist/src/utils/settingsUtils.d.ts +144 -0
- package/dist/src/utils/settingsUtils.js +340 -0
- package/dist/src/utils/settingsUtils.js.map +1 -0
- package/dist/src/utils/settingsUtils.test.d.ts +6 -0
- package/dist/src/utils/settingsUtils.test.js +808 -0
- package/dist/src/utils/settingsUtils.test.js.map +1 -0
- package/dist/src/utils/spawnWrapper.d.ts +7 -0
- package/dist/src/utils/spawnWrapper.js +8 -0
- package/dist/src/utils/spawnWrapper.js.map +1 -0
- package/dist/src/utils/startupWarnings.d.ts +6 -0
- package/dist/src/utils/startupWarnings.js +40 -0
- package/dist/src/utils/startupWarnings.js.map +1 -0
- package/dist/src/utils/updateEventEmitter.d.ts +11 -0
- package/dist/src/utils/updateEventEmitter.js +12 -0
- package/dist/src/utils/updateEventEmitter.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.js +54 -0
- package/dist/src/utils/userStartupWarnings.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.test.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.test.js +67 -0
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -0
- package/dist/src/utils/version.d.ts +6 -0
- package/dist/src/utils/version.js +11 -0
- package/dist/src/utils/version.js.map +1 -0
- package/dist/src/validateNonInterActiveAuth.d.ts +9 -0
- package/dist/src/validateNonInterActiveAuth.js +58 -0
- package/dist/src/validateNonInterActiveAuth.js.map +1 -0
- package/dist/src/zed-integration/acp.d.ts +63 -0
- package/dist/src/zed-integration/acp.js +226 -0
- package/dist/src/zed-integration/acp.js.map +1 -0
- package/dist/src/zed-integration/fileSystemService.d.ts +19 -0
- package/dist/src/zed-integration/fileSystemService.js +43 -0
- package/dist/src/zed-integration/fileSystemService.js.map +1 -0
- package/dist/src/zed-integration/schema.d.ts +11782 -0
- package/dist/src/zed-integration/schema.js +311 -0
- package/dist/src/zed-integration/schema.js.map +1 -0
- package/dist/src/zed-integration/zedIntegration.d.ts +10 -0
- package/dist/src/zed-integration/zedIntegration.js +745 -0
- package/dist/src/zed-integration/zedIntegration.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/npm-shrinkwrap.json +17168 -0
- package/package.json +84 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { renderHook, act, waitFor } from '@testing-library/react';
|
|
7
|
+
import { useShellHistory } from './useShellHistory.js';
|
|
8
|
+
import * as fs from 'node:fs/promises';
|
|
9
|
+
import * as path from 'node:path';
|
|
10
|
+
import * as os from 'node:os';
|
|
11
|
+
import * as crypto from 'node:crypto';
|
|
12
|
+
vi.mock('fs/promises', () => ({
|
|
13
|
+
readFile: vi.fn(),
|
|
14
|
+
writeFile: vi.fn(),
|
|
15
|
+
mkdir: vi.fn(),
|
|
16
|
+
}));
|
|
17
|
+
vi.mock('os');
|
|
18
|
+
vi.mock('crypto');
|
|
19
|
+
vi.mock('fs', async (importOriginal) => {
|
|
20
|
+
const actualFs = await importOriginal();
|
|
21
|
+
return {
|
|
22
|
+
...actualFs,
|
|
23
|
+
mkdirSync: vi.fn(),
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
vi.mock('@google/gemini-cli-core', () => {
|
|
27
|
+
class Storage {
|
|
28
|
+
getProjectTempDir() {
|
|
29
|
+
return path.join('/test/home/', '.gemini', 'tmp', 'mocked_hash');
|
|
30
|
+
}
|
|
31
|
+
getHistoryFilePath() {
|
|
32
|
+
return path.join('/test/home/', '.gemini', 'tmp', 'mocked_hash', 'shell_history');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
isNodeError: (err) => typeof err === 'object' && err !== null && 'code' in err,
|
|
37
|
+
Storage,
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
const MOCKED_PROJECT_ROOT = '/test/project';
|
|
41
|
+
const MOCKED_HOME_DIR = '/test/home';
|
|
42
|
+
const MOCKED_PROJECT_HASH = 'mocked_hash';
|
|
43
|
+
const MOCKED_HISTORY_DIR = path.join(MOCKED_HOME_DIR, '.gemini', 'tmp', MOCKED_PROJECT_HASH);
|
|
44
|
+
const MOCKED_HISTORY_FILE = path.join(MOCKED_HISTORY_DIR, 'shell_history');
|
|
45
|
+
describe('useShellHistory', () => {
|
|
46
|
+
const mockedFs = vi.mocked(fs);
|
|
47
|
+
const mockedOs = vi.mocked(os);
|
|
48
|
+
const mockedCrypto = vi.mocked(crypto);
|
|
49
|
+
beforeEach(() => {
|
|
50
|
+
vi.resetAllMocks();
|
|
51
|
+
mockedFs.readFile.mockResolvedValue('');
|
|
52
|
+
mockedFs.writeFile.mockResolvedValue(undefined);
|
|
53
|
+
mockedFs.mkdir.mockResolvedValue(undefined);
|
|
54
|
+
mockedOs.homedir.mockReturnValue(MOCKED_HOME_DIR);
|
|
55
|
+
const hashMock = {
|
|
56
|
+
update: vi.fn().mockReturnThis(),
|
|
57
|
+
digest: vi.fn().mockReturnValue(MOCKED_PROJECT_HASH),
|
|
58
|
+
};
|
|
59
|
+
mockedCrypto.createHash.mockReturnValue(hashMock);
|
|
60
|
+
});
|
|
61
|
+
it('should initialize and read the history file from the correct path', async () => {
|
|
62
|
+
mockedFs.readFile.mockResolvedValue('cmd1\ncmd2');
|
|
63
|
+
const { result } = renderHook(() => useShellHistory(MOCKED_PROJECT_ROOT));
|
|
64
|
+
await waitFor(() => {
|
|
65
|
+
expect(mockedFs.readFile).toHaveBeenCalledWith(MOCKED_HISTORY_FILE, 'utf-8');
|
|
66
|
+
});
|
|
67
|
+
let command = null;
|
|
68
|
+
act(() => {
|
|
69
|
+
command = result.current.getPreviousCommand();
|
|
70
|
+
});
|
|
71
|
+
// History is loaded newest-first: ['cmd2', 'cmd1']
|
|
72
|
+
expect(command).toBe('cmd2');
|
|
73
|
+
});
|
|
74
|
+
it('should handle a nonexistent history file gracefully', async () => {
|
|
75
|
+
const error = new Error('File not found');
|
|
76
|
+
error.code = 'ENOENT';
|
|
77
|
+
mockedFs.readFile.mockRejectedValue(error);
|
|
78
|
+
const { result } = renderHook(() => useShellHistory(MOCKED_PROJECT_ROOT));
|
|
79
|
+
await waitFor(() => {
|
|
80
|
+
expect(mockedFs.readFile).toHaveBeenCalled();
|
|
81
|
+
});
|
|
82
|
+
let command = null;
|
|
83
|
+
act(() => {
|
|
84
|
+
command = result.current.getPreviousCommand();
|
|
85
|
+
});
|
|
86
|
+
expect(command).toBe(null);
|
|
87
|
+
});
|
|
88
|
+
it('should add a command and write to the history file', async () => {
|
|
89
|
+
const { result } = renderHook(() => useShellHistory(MOCKED_PROJECT_ROOT));
|
|
90
|
+
await waitFor(() => expect(mockedFs.readFile).toHaveBeenCalled());
|
|
91
|
+
act(() => {
|
|
92
|
+
result.current.addCommandToHistory('new_command');
|
|
93
|
+
});
|
|
94
|
+
await waitFor(() => {
|
|
95
|
+
expect(mockedFs.mkdir).toHaveBeenCalledWith(MOCKED_HISTORY_DIR, {
|
|
96
|
+
recursive: true,
|
|
97
|
+
});
|
|
98
|
+
expect(mockedFs.writeFile).toHaveBeenCalledWith(MOCKED_HISTORY_FILE, 'new_command');
|
|
99
|
+
});
|
|
100
|
+
let command = null;
|
|
101
|
+
act(() => {
|
|
102
|
+
command = result.current.getPreviousCommand();
|
|
103
|
+
});
|
|
104
|
+
expect(command).toBe('new_command');
|
|
105
|
+
});
|
|
106
|
+
it('should navigate history correctly with previous/next commands', async () => {
|
|
107
|
+
mockedFs.readFile.mockResolvedValue('cmd1\ncmd2\ncmd3');
|
|
108
|
+
const { result } = renderHook(() => useShellHistory(MOCKED_PROJECT_ROOT));
|
|
109
|
+
// Wait for history to be loaded: ['cmd3', 'cmd2', 'cmd1']
|
|
110
|
+
await waitFor(() => expect(mockedFs.readFile).toHaveBeenCalled());
|
|
111
|
+
let command = null;
|
|
112
|
+
act(() => {
|
|
113
|
+
command = result.current.getPreviousCommand();
|
|
114
|
+
});
|
|
115
|
+
expect(command).toBe('cmd3');
|
|
116
|
+
act(() => {
|
|
117
|
+
command = result.current.getPreviousCommand();
|
|
118
|
+
});
|
|
119
|
+
expect(command).toBe('cmd2');
|
|
120
|
+
act(() => {
|
|
121
|
+
command = result.current.getPreviousCommand();
|
|
122
|
+
});
|
|
123
|
+
expect(command).toBe('cmd1');
|
|
124
|
+
// Should stay at the oldest command
|
|
125
|
+
act(() => {
|
|
126
|
+
command = result.current.getPreviousCommand();
|
|
127
|
+
});
|
|
128
|
+
expect(command).toBe('cmd1');
|
|
129
|
+
act(() => {
|
|
130
|
+
command = result.current.getNextCommand();
|
|
131
|
+
});
|
|
132
|
+
expect(command).toBe('cmd2');
|
|
133
|
+
act(() => {
|
|
134
|
+
command = result.current.getNextCommand();
|
|
135
|
+
});
|
|
136
|
+
expect(command).toBe('cmd3');
|
|
137
|
+
// Should return to the "new command" line (represented as empty string)
|
|
138
|
+
act(() => {
|
|
139
|
+
command = result.current.getNextCommand();
|
|
140
|
+
});
|
|
141
|
+
expect(command).toBe('');
|
|
142
|
+
});
|
|
143
|
+
it('should not add empty or whitespace-only commands to history', async () => {
|
|
144
|
+
const { result } = renderHook(() => useShellHistory(MOCKED_PROJECT_ROOT));
|
|
145
|
+
await waitFor(() => expect(mockedFs.readFile).toHaveBeenCalled());
|
|
146
|
+
act(() => {
|
|
147
|
+
result.current.addCommandToHistory(' ');
|
|
148
|
+
});
|
|
149
|
+
expect(mockedFs.writeFile).not.toHaveBeenCalled();
|
|
150
|
+
});
|
|
151
|
+
it('should truncate history to MAX_HISTORY_LENGTH (100)', async () => {
|
|
152
|
+
const oldCommands = Array.from({ length: 120 }, (_, i) => `old_cmd_${i}`);
|
|
153
|
+
mockedFs.readFile.mockResolvedValue(oldCommands.join('\n'));
|
|
154
|
+
const { result } = renderHook(() => useShellHistory(MOCKED_PROJECT_ROOT));
|
|
155
|
+
await waitFor(() => expect(mockedFs.readFile).toHaveBeenCalled());
|
|
156
|
+
act(() => {
|
|
157
|
+
result.current.addCommandToHistory('new_cmd');
|
|
158
|
+
});
|
|
159
|
+
// Wait for the async write to happen and then inspect the arguments.
|
|
160
|
+
await waitFor(() => expect(mockedFs.writeFile).toHaveBeenCalled());
|
|
161
|
+
// The hook stores history newest-first.
|
|
162
|
+
// Initial state: ['old_cmd_119', ..., 'old_cmd_0']
|
|
163
|
+
// After adding 'new_cmd': ['new_cmd', 'old_cmd_119', ..., 'old_cmd_21'] (100 items)
|
|
164
|
+
// Written to file (reversed): ['old_cmd_21', ..., 'old_cmd_119', 'new_cmd']
|
|
165
|
+
const writtenContent = mockedFs.writeFile.mock.calls[0][1];
|
|
166
|
+
const writtenLines = writtenContent.split('\n');
|
|
167
|
+
expect(writtenLines.length).toBe(100);
|
|
168
|
+
expect(writtenLines[0]).toBe('old_cmd_21'); // New oldest command
|
|
169
|
+
expect(writtenLines[99]).toBe('new_cmd'); // Newest command
|
|
170
|
+
});
|
|
171
|
+
it('should move an existing command to the top when re-added', async () => {
|
|
172
|
+
mockedFs.readFile.mockResolvedValue('cmd1\ncmd2\ncmd3');
|
|
173
|
+
const { result } = renderHook(() => useShellHistory(MOCKED_PROJECT_ROOT));
|
|
174
|
+
// Initial state: ['cmd3', 'cmd2', 'cmd1']
|
|
175
|
+
await waitFor(() => expect(mockedFs.readFile).toHaveBeenCalled());
|
|
176
|
+
act(() => {
|
|
177
|
+
result.current.addCommandToHistory('cmd1');
|
|
178
|
+
});
|
|
179
|
+
// After re-adding 'cmd1': ['cmd1', 'cmd3', 'cmd2']
|
|
180
|
+
// Written to file (reversed): ['cmd2', 'cmd3', 'cmd1']
|
|
181
|
+
await waitFor(() => expect(mockedFs.writeFile).toHaveBeenCalled());
|
|
182
|
+
const writtenContent = mockedFs.writeFile.mock.calls[0][1];
|
|
183
|
+
const writtenLines = writtenContent.split('\n');
|
|
184
|
+
expect(writtenLines).toEqual(['cmd2', 'cmd3', 'cmd1']);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
//# sourceMappingURL=useShellHistory.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShellHistory.test.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useShellHistory.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,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,EAAE,CAAC,CAAC;QAEnE,MAAM,cAAc,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC;QACrE,MAAM,YAAY,GAAG,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEhD,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Message } from '../types.js';
|
|
7
|
+
import type { Config } from '@google/gemini-cli-core';
|
|
8
|
+
import type { LoadedSettings } from '../../config/settings.js';
|
|
9
|
+
export declare function createShowMemoryAction(config: Config | null, settings: LoadedSettings, addMessage: (message: Message) => void): () => Promise<void>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { MessageType } from '../types.js';
|
|
7
|
+
export function createShowMemoryAction(config, settings, addMessage) {
|
|
8
|
+
return async () => {
|
|
9
|
+
if (!config) {
|
|
10
|
+
addMessage({
|
|
11
|
+
type: MessageType.ERROR,
|
|
12
|
+
content: 'Configuration not available. Cannot show memory.',
|
|
13
|
+
timestamp: new Date(),
|
|
14
|
+
});
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const debugMode = config.getDebugMode();
|
|
18
|
+
if (debugMode) {
|
|
19
|
+
console.log('[DEBUG] Show Memory command invoked.');
|
|
20
|
+
}
|
|
21
|
+
const currentMemory = config.getUserMemory();
|
|
22
|
+
const fileCount = config.getGeminiMdFileCount();
|
|
23
|
+
const contextFileName = settings.merged.context?.fileName;
|
|
24
|
+
const contextFileNames = Array.isArray(contextFileName)
|
|
25
|
+
? contextFileName
|
|
26
|
+
: [contextFileName];
|
|
27
|
+
if (debugMode) {
|
|
28
|
+
console.log(`[DEBUG] Showing memory. Content from config.getUserMemory() (first 200 chars): ${currentMemory.substring(0, 200)}...`);
|
|
29
|
+
console.log(`[DEBUG] Number of context files loaded: ${fileCount}`);
|
|
30
|
+
}
|
|
31
|
+
if (fileCount > 0) {
|
|
32
|
+
const allNamesTheSame = new Set(contextFileNames).size < 2;
|
|
33
|
+
const name = allNamesTheSame ? contextFileNames[0] : 'context';
|
|
34
|
+
addMessage({
|
|
35
|
+
type: MessageType.INFO,
|
|
36
|
+
content: `Loaded memory from ${fileCount} ${name} file${fileCount > 1 ? 's' : ''}.`,
|
|
37
|
+
timestamp: new Date(),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (currentMemory && currentMemory.trim().length > 0) {
|
|
41
|
+
addMessage({
|
|
42
|
+
type: MessageType.INFO,
|
|
43
|
+
content: `Current combined memory content:\n\`\`\`markdown\n${currentMemory}\n\`\`\``,
|
|
44
|
+
timestamp: new Date(),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
addMessage({
|
|
49
|
+
type: MessageType.INFO,
|
|
50
|
+
content: fileCount > 0
|
|
51
|
+
? 'Hierarchical memory (GEMINI.md or other context files) is loaded but content is empty.'
|
|
52
|
+
: 'No hierarchical memory (GEMINI.md or other context files) is currently loaded.',
|
|
53
|
+
timestamp: new Date(),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=useShowMemoryCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShowMemoryCommand.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useShowMemoryCommand.ts"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AAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAC/D,UAAU,CAAC;gBACT,IAAI,EAAE,WAAW,CAAC,IAAI;gBACtB,OAAO,EAAE,sBAAsB,SAAS,IAAI,IAAI,QAC9C,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EACxB,GAAG;gBACH,SAAS,EAAE,IAAI,IAAI,EAAE;aACtB,CAAC,CAAC;QACL,CAAC;QAED,IAAI,aAAa,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrD,UAAU,CAAC;gBACT,IAAI,EAAE,WAAW,CAAC,IAAI;gBACtB,OAAO,EAAE,qDAAqD,aAAa,UAAU;gBACrF,SAAS,EAAE,IAAI,IAAI,EAAE;aACtB,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,UAAU,CAAC;gBACT,IAAI,EAAE,WAAW,CAAC,IAAI;gBACtB,OAAO,EACL,SAAS,GAAG,CAAC;oBACX,CAAC,CAAC,wFAAwF;oBAC1F,CAAC,CAAC,gFAAgF;gBACtF,SAAS,EAAE,IAAI,IAAI,EAAE;aACtB,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Suggestion } from '../components/SuggestionsDisplay.js';
|
|
7
|
+
import { type CommandContext, type SlashCommand } from '../commands/types.js';
|
|
8
|
+
export interface UseSlashCompletionProps {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
query: string | null;
|
|
11
|
+
slashCommands: readonly SlashCommand[];
|
|
12
|
+
commandContext: CommandContext;
|
|
13
|
+
setSuggestions: (suggestions: Suggestion[]) => void;
|
|
14
|
+
setIsLoadingSuggestions: (isLoading: boolean) => void;
|
|
15
|
+
setIsPerfectMatch: (isMatch: boolean) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function useSlashCompletion(props: UseSlashCompletionProps): {
|
|
18
|
+
completionStart: number;
|
|
19
|
+
completionEnd: number;
|
|
20
|
+
};
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { useState, useEffect, useMemo } from 'react';
|
|
7
|
+
import { AsyncFzf } from 'fzf';
|
|
8
|
+
import { CommandKind, } from '../commands/types.js';
|
|
9
|
+
// Utility function to safely handle errors without information disclosure
|
|
10
|
+
function logErrorSafely(error, context) {
|
|
11
|
+
if (error instanceof Error) {
|
|
12
|
+
// Log full error details securely for debugging
|
|
13
|
+
console.error(`[${context}]`, error);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
console.error(`[${context}] Non-error thrown:`, error);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
// Shared utility function for command matching logic
|
|
20
|
+
function matchesCommand(cmd, query) {
|
|
21
|
+
return (cmd.name.toLowerCase() === query.toLowerCase() ||
|
|
22
|
+
cmd.altNames?.some((alt) => alt.toLowerCase() === query.toLowerCase()) ||
|
|
23
|
+
false);
|
|
24
|
+
}
|
|
25
|
+
function useCommandParser(query, slashCommands) {
|
|
26
|
+
return useMemo(() => {
|
|
27
|
+
if (!query) {
|
|
28
|
+
return {
|
|
29
|
+
hasTrailingSpace: false,
|
|
30
|
+
commandPathParts: [],
|
|
31
|
+
partial: '',
|
|
32
|
+
currentLevel: slashCommands,
|
|
33
|
+
leafCommand: null,
|
|
34
|
+
exactMatchAsParent: undefined,
|
|
35
|
+
isArgumentCompletion: false,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const fullPath = query.substring(1) || '';
|
|
39
|
+
const hasTrailingSpace = !!query.endsWith(' ');
|
|
40
|
+
const rawParts = fullPath.split(/\s+/).filter((p) => p);
|
|
41
|
+
let commandPathParts = rawParts;
|
|
42
|
+
let partial = '';
|
|
43
|
+
if (!hasTrailingSpace && rawParts.length > 0) {
|
|
44
|
+
partial = rawParts[rawParts.length - 1];
|
|
45
|
+
commandPathParts = rawParts.slice(0, -1);
|
|
46
|
+
}
|
|
47
|
+
let currentLevel = slashCommands;
|
|
48
|
+
let leafCommand = null;
|
|
49
|
+
for (const part of commandPathParts) {
|
|
50
|
+
if (!currentLevel) {
|
|
51
|
+
leafCommand = null;
|
|
52
|
+
currentLevel = [];
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
const found = currentLevel.find((cmd) => matchesCommand(cmd, part));
|
|
56
|
+
if (found) {
|
|
57
|
+
leafCommand = found;
|
|
58
|
+
currentLevel = found.subCommands;
|
|
59
|
+
if (found.kind === CommandKind.MCP_PROMPT) {
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
leafCommand = null;
|
|
65
|
+
currentLevel = [];
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
let exactMatchAsParent;
|
|
70
|
+
if (!hasTrailingSpace && currentLevel) {
|
|
71
|
+
exactMatchAsParent = currentLevel.find((cmd) => matchesCommand(cmd, partial) && cmd.subCommands);
|
|
72
|
+
if (exactMatchAsParent) {
|
|
73
|
+
leafCommand = exactMatchAsParent;
|
|
74
|
+
currentLevel = exactMatchAsParent.subCommands;
|
|
75
|
+
partial = '';
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const depth = commandPathParts.length;
|
|
79
|
+
const isArgumentCompletion = !!(leafCommand?.completion &&
|
|
80
|
+
(hasTrailingSpace ||
|
|
81
|
+
(rawParts.length > depth && depth > 0 && partial !== '')));
|
|
82
|
+
return {
|
|
83
|
+
hasTrailingSpace,
|
|
84
|
+
commandPathParts,
|
|
85
|
+
partial,
|
|
86
|
+
currentLevel,
|
|
87
|
+
leafCommand,
|
|
88
|
+
exactMatchAsParent,
|
|
89
|
+
isArgumentCompletion,
|
|
90
|
+
};
|
|
91
|
+
}, [query, slashCommands]);
|
|
92
|
+
}
|
|
93
|
+
function useCommandSuggestions(parserResult, commandContext, getFzfForCommands, getPrefixSuggestions) {
|
|
94
|
+
const [suggestions, setSuggestions] = useState([]);
|
|
95
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
const abortController = new AbortController();
|
|
98
|
+
const { signal } = abortController;
|
|
99
|
+
const { isArgumentCompletion, leafCommand, commandPathParts, partial, currentLevel, } = parserResult;
|
|
100
|
+
if (isArgumentCompletion) {
|
|
101
|
+
const fetchAndSetSuggestions = async () => {
|
|
102
|
+
if (signal.aborted)
|
|
103
|
+
return;
|
|
104
|
+
// Safety check: ensure leafCommand and completion exist
|
|
105
|
+
if (!leafCommand?.completion) {
|
|
106
|
+
console.warn('Attempted argument completion without completion function');
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
setIsLoading(true);
|
|
110
|
+
try {
|
|
111
|
+
const rawParts = [...commandPathParts];
|
|
112
|
+
if (partial)
|
|
113
|
+
rawParts.push(partial);
|
|
114
|
+
const depth = commandPathParts.length;
|
|
115
|
+
const argString = rawParts.slice(depth).join(' ');
|
|
116
|
+
const results = (await leafCommand.completion({
|
|
117
|
+
...commandContext,
|
|
118
|
+
invocation: {
|
|
119
|
+
raw: `/${rawParts.join(' ')}`,
|
|
120
|
+
name: leafCommand.name,
|
|
121
|
+
args: argString,
|
|
122
|
+
},
|
|
123
|
+
}, argString)) || [];
|
|
124
|
+
if (!signal.aborted) {
|
|
125
|
+
const finalSuggestions = results.map((s) => ({
|
|
126
|
+
label: s,
|
|
127
|
+
value: s,
|
|
128
|
+
}));
|
|
129
|
+
setSuggestions(finalSuggestions);
|
|
130
|
+
setIsLoading(false);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
if (!signal.aborted) {
|
|
135
|
+
logErrorSafely(error, 'Argument completion');
|
|
136
|
+
setSuggestions([]);
|
|
137
|
+
setIsLoading(false);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
fetchAndSetSuggestions();
|
|
142
|
+
return () => abortController.abort();
|
|
143
|
+
}
|
|
144
|
+
const commandsToSearch = currentLevel || [];
|
|
145
|
+
if (commandsToSearch.length > 0) {
|
|
146
|
+
const performFuzzySearch = async () => {
|
|
147
|
+
if (signal.aborted)
|
|
148
|
+
return;
|
|
149
|
+
let potentialSuggestions = [];
|
|
150
|
+
if (partial === '') {
|
|
151
|
+
// If no partial query, show all available commands
|
|
152
|
+
potentialSuggestions = commandsToSearch.filter((cmd) => cmd.description && !cmd.hidden);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
// Use fuzzy search for non-empty partial queries with fallback
|
|
156
|
+
const fzfInstance = getFzfForCommands(commandsToSearch);
|
|
157
|
+
if (fzfInstance) {
|
|
158
|
+
try {
|
|
159
|
+
const fzfResults = await fzfInstance.fzf.find(partial);
|
|
160
|
+
if (signal.aborted)
|
|
161
|
+
return;
|
|
162
|
+
const uniqueCommands = new Set();
|
|
163
|
+
fzfResults.forEach((result) => {
|
|
164
|
+
const cmd = fzfInstance.commandMap.get(result.item);
|
|
165
|
+
if (cmd && cmd.description) {
|
|
166
|
+
uniqueCommands.add(cmd);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
potentialSuggestions = Array.from(uniqueCommands);
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
logErrorSafely(error, 'Fuzzy search - falling back to prefix matching');
|
|
173
|
+
// Fallback to prefix-based filtering
|
|
174
|
+
potentialSuggestions = getPrefixSuggestions(commandsToSearch, partial);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
// Fallback to prefix-based filtering when fzf instance creation fails
|
|
179
|
+
potentialSuggestions = getPrefixSuggestions(commandsToSearch, partial);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (!signal.aborted) {
|
|
183
|
+
const finalSuggestions = potentialSuggestions.map((cmd) => ({
|
|
184
|
+
label: cmd.name,
|
|
185
|
+
value: cmd.name,
|
|
186
|
+
description: cmd.description,
|
|
187
|
+
commandKind: cmd.kind,
|
|
188
|
+
}));
|
|
189
|
+
setSuggestions(finalSuggestions);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
performFuzzySearch().catch((error) => {
|
|
193
|
+
logErrorSafely(error, 'Unexpected fuzzy search error');
|
|
194
|
+
if (!signal.aborted) {
|
|
195
|
+
// Ultimate fallback: show no suggestions rather than confusing the user
|
|
196
|
+
// with all available commands when their query clearly doesn't match anything
|
|
197
|
+
setSuggestions([]);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
return () => abortController.abort();
|
|
201
|
+
}
|
|
202
|
+
setSuggestions([]);
|
|
203
|
+
return () => abortController.abort();
|
|
204
|
+
}, [parserResult, commandContext, getFzfForCommands, getPrefixSuggestions]);
|
|
205
|
+
return { suggestions, isLoading };
|
|
206
|
+
}
|
|
207
|
+
function useCompletionPositions(query, parserResult) {
|
|
208
|
+
return useMemo(() => {
|
|
209
|
+
if (!query) {
|
|
210
|
+
return { start: -1, end: -1 };
|
|
211
|
+
}
|
|
212
|
+
const { hasTrailingSpace, partial, exactMatchAsParent } = parserResult;
|
|
213
|
+
// Set completion start/end positions
|
|
214
|
+
if (hasTrailingSpace || exactMatchAsParent) {
|
|
215
|
+
return { start: query.length, end: query.length };
|
|
216
|
+
}
|
|
217
|
+
else if (partial) {
|
|
218
|
+
if (parserResult.isArgumentCompletion) {
|
|
219
|
+
const commandSoFar = `/${parserResult.commandPathParts.join(' ')}`;
|
|
220
|
+
const argStartIndex = commandSoFar.length +
|
|
221
|
+
(parserResult.commandPathParts.length > 0 ? 1 : 0);
|
|
222
|
+
return { start: argStartIndex, end: query.length };
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
return { start: query.length - partial.length, end: query.length };
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
return { start: 1, end: query.length };
|
|
230
|
+
}
|
|
231
|
+
}, [query, parserResult]);
|
|
232
|
+
}
|
|
233
|
+
function usePerfectMatch(parserResult) {
|
|
234
|
+
return useMemo(() => {
|
|
235
|
+
const { hasTrailingSpace, partial, leafCommand, currentLevel } = parserResult;
|
|
236
|
+
if (hasTrailingSpace) {
|
|
237
|
+
return { isPerfectMatch: false };
|
|
238
|
+
}
|
|
239
|
+
if (leafCommand && partial === '' && leafCommand.action) {
|
|
240
|
+
return { isPerfectMatch: true };
|
|
241
|
+
}
|
|
242
|
+
if (currentLevel) {
|
|
243
|
+
const perfectMatch = currentLevel.find((cmd) => matchesCommand(cmd, partial) && cmd.action);
|
|
244
|
+
if (perfectMatch) {
|
|
245
|
+
return { isPerfectMatch: true };
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return { isPerfectMatch: false };
|
|
249
|
+
}, [parserResult]);
|
|
250
|
+
}
|
|
251
|
+
export function useSlashCompletion(props) {
|
|
252
|
+
const { enabled, query, slashCommands, commandContext, setSuggestions, setIsLoadingSuggestions, setIsPerfectMatch, } = props;
|
|
253
|
+
const [completionStart, setCompletionStart] = useState(-1);
|
|
254
|
+
const [completionEnd, setCompletionEnd] = useState(-1);
|
|
255
|
+
// Simplified cache for AsyncFzf instances - WeakMap handles automatic cleanup
|
|
256
|
+
const fzfInstanceCache = useMemo(() => new WeakMap(), []);
|
|
257
|
+
// Helper function to create or retrieve cached AsyncFzf instance for a command level
|
|
258
|
+
const getFzfForCommands = useMemo(() => (commands) => {
|
|
259
|
+
if (!commands || commands.length === 0) {
|
|
260
|
+
return null;
|
|
261
|
+
}
|
|
262
|
+
// Check if we already have a cached instance
|
|
263
|
+
const cached = fzfInstanceCache.get(commands);
|
|
264
|
+
if (cached) {
|
|
265
|
+
return cached;
|
|
266
|
+
}
|
|
267
|
+
// Create new fzf instance
|
|
268
|
+
const commandItems = [];
|
|
269
|
+
const commandMap = new Map();
|
|
270
|
+
commands.forEach((cmd) => {
|
|
271
|
+
if (cmd.description && !cmd.hidden) {
|
|
272
|
+
commandItems.push(cmd.name);
|
|
273
|
+
commandMap.set(cmd.name, cmd);
|
|
274
|
+
if (cmd.altNames) {
|
|
275
|
+
cmd.altNames.forEach((alt) => {
|
|
276
|
+
commandItems.push(alt);
|
|
277
|
+
commandMap.set(alt, cmd);
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
if (commandItems.length === 0) {
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
try {
|
|
286
|
+
const instance = {
|
|
287
|
+
fzf: new AsyncFzf(commandItems, {
|
|
288
|
+
fuzzy: 'v2',
|
|
289
|
+
casing: 'case-insensitive', // Explicitly enforce case-insensitivity
|
|
290
|
+
}),
|
|
291
|
+
commandMap,
|
|
292
|
+
};
|
|
293
|
+
// Cache the instance - WeakMap will handle automatic cleanup
|
|
294
|
+
fzfInstanceCache.set(commands, instance);
|
|
295
|
+
return instance;
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
logErrorSafely(error, 'FZF instance creation');
|
|
299
|
+
return null;
|
|
300
|
+
}
|
|
301
|
+
}, [fzfInstanceCache]);
|
|
302
|
+
// Memoized helper function for prefix-based filtering to improve performance
|
|
303
|
+
const getPrefixSuggestions = useMemo(() => (commands, partial) => commands.filter((cmd) => cmd.description &&
|
|
304
|
+
!cmd.hidden &&
|
|
305
|
+
(cmd.name.toLowerCase().startsWith(partial.toLowerCase()) ||
|
|
306
|
+
cmd.altNames?.some((alt) => alt.toLowerCase().startsWith(partial.toLowerCase())))), []);
|
|
307
|
+
// Use extracted hooks for better separation of concerns
|
|
308
|
+
const parserResult = useCommandParser(query, slashCommands);
|
|
309
|
+
const { suggestions: hookSuggestions, isLoading } = useCommandSuggestions(parserResult, commandContext, getFzfForCommands, getPrefixSuggestions);
|
|
310
|
+
const { start: calculatedStart, end: calculatedEnd } = useCompletionPositions(query, parserResult);
|
|
311
|
+
const { isPerfectMatch } = usePerfectMatch(parserResult);
|
|
312
|
+
// Update external state - this is now much simpler and focused
|
|
313
|
+
useEffect(() => {
|
|
314
|
+
if (!enabled || query === null) {
|
|
315
|
+
setSuggestions([]);
|
|
316
|
+
setIsLoadingSuggestions(false);
|
|
317
|
+
setIsPerfectMatch(false);
|
|
318
|
+
setCompletionStart(-1);
|
|
319
|
+
setCompletionEnd(-1);
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
setSuggestions(hookSuggestions);
|
|
323
|
+
setIsLoadingSuggestions(isLoading);
|
|
324
|
+
setIsPerfectMatch(isPerfectMatch);
|
|
325
|
+
setCompletionStart(calculatedStart);
|
|
326
|
+
setCompletionEnd(calculatedEnd);
|
|
327
|
+
}, [
|
|
328
|
+
enabled,
|
|
329
|
+
query,
|
|
330
|
+
hookSuggestions,
|
|
331
|
+
isLoading,
|
|
332
|
+
isPerfectMatch,
|
|
333
|
+
calculatedStart,
|
|
334
|
+
calculatedEnd,
|
|
335
|
+
setSuggestions,
|
|
336
|
+
setIsLoadingSuggestions,
|
|
337
|
+
setIsPerfectMatch,
|
|
338
|
+
]);
|
|
339
|
+
return {
|
|
340
|
+
completionStart,
|
|
341
|
+
completionEnd,
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=useSlashCompletion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSlashCompletion.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useSlashCompletion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE/B,OAAO,EAC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