@vybestack/llxprt-code 0.2.25 → 0.3.4-nightly.250912.86a20bc3
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/index.d.ts +5 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/package.json +3 -5
- package/dist/src/auth/anthropic-oauth-provider.d.ts +5 -0
- package/dist/src/auth/anthropic-oauth-provider.js +3 -1
- package/dist/src/auth/anthropic-oauth-provider.js.map +1 -1
- package/dist/src/auth/gemini-oauth-provider.d.ts +5 -0
- package/dist/src/auth/gemini-oauth-provider.js +3 -4
- package/dist/src/auth/gemini-oauth-provider.js.map +1 -1
- package/dist/src/auth/qwen-oauth-provider.d.ts +5 -0
- package/dist/src/auth/qwen-oauth-provider.js +3 -2
- package/dist/src/auth/qwen-oauth-provider.js.map +1 -1
- package/dist/src/commands/extensions/disable.d.ts +14 -0
- package/dist/src/commands/extensions/disable.js +40 -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 +47 -0
- package/dist/src/commands/extensions/enable.js.map +1 -0
- package/dist/src/commands/extensions/install.d.ts +13 -0
- package/dist/src/commands/extensions/install.js +47 -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 +19 -0
- package/dist/src/commands/extensions/install.test.js.map +1 -0
- package/dist/src/commands/extensions/list.d.ts +8 -0
- package/dist/src/commands/extensions/list.js +31 -0
- package/dist/src/commands/extensions/list.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.d.ts +12 -0
- package/dist/src/commands/extensions/uninstall.js +37 -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 +12 -0
- package/dist/src/commands/extensions/update.js +37 -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 +29 -0
- package/dist/src/commands/extensions.js.map +1 -0
- package/dist/src/commands/mcp/add.d.ts +1 -1
- package/dist/src/commands/mcp/add.js +1 -1
- package/dist/src/commands/mcp/list.d.ts +1 -1
- package/dist/src/commands/mcp/list.js +1 -1
- package/dist/src/commands/mcp/remove.d.ts +1 -1
- package/dist/src/commands/mcp/remove.js +1 -1
- package/dist/src/commands/mcp.d.ts +1 -1
- package/dist/src/commands/mcp.js +1 -1
- package/dist/src/config/auth.d.ts +1 -1
- package/dist/src/config/auth.js +1 -1
- package/dist/src/config/auth.test.d.ts +1 -1
- package/dist/src/config/auth.test.js +1 -1
- package/dist/src/config/config.d.ts +4 -4
- package/dist/src/config/config.js +39 -24
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/extension.d.ts +33 -2
- package/dist/src/config/extension.js +256 -10
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/config/extensions/variableSchema.d.ts +28 -0
- package/dist/src/config/extensions/variableSchema.js +18 -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 +1 -1
- package/dist/src/config/keyBindings.js +1 -1
- package/dist/src/config/keyBindings.test.d.ts +1 -1
- package/dist/src/config/keyBindings.test.js +1 -1
- package/dist/src/config/sandboxConfig.d.ts +2 -2
- package/dist/src/config/sandboxConfig.js +5 -7
- package/dist/src/config/sandboxConfig.js.map +1 -1
- package/dist/src/config/settings.d.ts +9 -5
- package/dist/src/config/settings.js +89 -21
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +94 -2
- package/dist/src/config/settingsSchema.js +94 -2
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.d.ts +1 -1
- package/dist/src/config/settingsSchema.test.js +12 -1
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/config/trustedFolders.d.ts +1 -1
- package/dist/src/config/trustedFolders.js +1 -1
- package/dist/src/config/trustedFolders.test.d.ts +1 -1
- package/dist/src/config/trustedFolders.test.js +1 -1
- package/dist/src/gemini.d.ts +4 -2
- package/dist/src/gemini.js +84 -59
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.d.ts +1 -1
- package/dist/src/gemini.test.js +75 -24
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +1 -1
- package/dist/src/generated/git-commit.js +1 -1
- package/dist/src/integration-tests/retry-settings.integration.test.d.ts +1 -1
- package/dist/src/integration-tests/retry-settings.integration.test.js +1 -1
- package/dist/src/nonInteractiveCli.d.ts +1 -1
- package/dist/src/nonInteractiveCli.js +20 -37
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/patches/is-in-ci.d.ts +1 -1
- package/dist/src/patches/is-in-ci.js +1 -1
- package/dist/src/providers/providerConfigUtils.d.ts +1 -1
- package/dist/src/providers/providerConfigUtils.js +1 -1
- package/dist/src/providers/providerManagerInstance.js +3 -1
- package/dist/src/providers/providerManagerInstance.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.d.ts +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.d.ts +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +1 -1
- package/dist/src/services/CommandService.d.ts +1 -1
- package/dist/src/services/CommandService.js +1 -1
- package/dist/src/services/CommandService.test.d.ts +1 -1
- package/dist/src/services/CommandService.test.js +1 -1
- package/dist/src/services/FileCommandLoader.d.ts +1 -1
- package/dist/src/services/FileCommandLoader.js +5 -4
- package/dist/src/services/FileCommandLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.d.ts +12 -2
- package/dist/src/services/McpPromptLoader.js +43 -17
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.test.d.ts +6 -0
- package/dist/src/services/McpPromptLoader.test.js +114 -0
- package/dist/src/services/McpPromptLoader.test.js.map +1 -0
- package/dist/src/services/prompt-processors/argumentProcessor.d.ts +1 -1
- package/dist/src/services/prompt-processors/argumentProcessor.js +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.d.ts +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.js +1 -1
- package/dist/src/services/prompt-processors/types.d.ts +1 -1
- package/dist/src/services/prompt-processors/types.js +1 -1
- package/dist/src/services/types.d.ts +1 -1
- package/dist/src/services/types.js +1 -1
- package/dist/src/test-utils/customMatchers.d.ts +1 -1
- package/dist/src/test-utils/customMatchers.js +1 -1
- package/dist/src/test-utils/mockCommandContext.d.ts +1 -1
- package/dist/src/test-utils/mockCommandContext.js +1 -1
- package/dist/src/test-utils/mockCommandContext.test.d.ts +1 -1
- package/dist/src/test-utils/mockCommandContext.test.js +1 -1
- package/dist/src/test-utils/render.d.ts +1 -1
- package/dist/src/test-utils/render.js +1 -1
- package/dist/src/test-utils/responsive-testing.d.ts +1 -1
- package/dist/src/test-utils/responsive-testing.js +1 -1
- package/dist/src/test-utils/responsive-testing.test.d.ts +1 -1
- package/dist/src/test-utils/responsive-testing.test.js +1 -1
- package/dist/src/ui/App.d.ts +1 -1
- package/dist/src/ui/App.e2e.test.d.ts +2 -2
- package/dist/src/ui/App.e2e.test.js +2 -2
- package/dist/src/ui/App.js +60 -24
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/IdeIntegrationNudge.d.ts +0 -1
- package/dist/src/ui/IdeIntegrationNudge.js +1 -2
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
- package/dist/src/ui/colors.d.ts +33 -1
- package/dist/src/ui/colors.js +65 -1
- package/dist/src/ui/colors.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.d.ts +1 -1
- package/dist/src/ui/commands/aboutCommand.js +1 -1
- package/dist/src/ui/commands/authCommand.d.ts +6 -1
- package/dist/src/ui/commands/authCommand.js +30 -1
- package/dist/src/ui/commands/authCommand.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.d.ts +1 -1
- package/dist/src/ui/commands/bugCommand.js +1 -1
- package/dist/src/ui/commands/chatCommand.d.ts +1 -1
- package/dist/src/ui/commands/chatCommand.js +21 -4
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.d.ts +1 -1
- package/dist/src/ui/commands/clearCommand.js +1 -1
- package/dist/src/ui/commands/compressCommand.d.ts +1 -1
- package/dist/src/ui/commands/compressCommand.js +3 -1
- package/dist/src/ui/commands/compressCommand.js.map +1 -1
- package/dist/src/ui/commands/copyCommand.d.ts +1 -1
- package/dist/src/ui/commands/copyCommand.js +2 -2
- package/dist/src/ui/commands/copyCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.d.ts +1 -1
- package/dist/src/ui/commands/directoryCommand.js +1 -1
- package/dist/src/ui/commands/docsCommand.d.ts +1 -1
- package/dist/src/ui/commands/docsCommand.js +1 -1
- package/dist/src/ui/commands/editorCommand.d.ts +1 -1
- package/dist/src/ui/commands/editorCommand.js +1 -1
- package/dist/src/ui/commands/extensionsCommand.d.ts +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +1 -1
- package/dist/src/ui/commands/helpCommand.d.ts +1 -1
- package/dist/src/ui/commands/helpCommand.js +1 -1
- package/dist/src/ui/commands/ideCommand.d.ts +1 -1
- package/dist/src/ui/commands/ideCommand.js +2 -2
- package/dist/src/ui/commands/ideCommand.js.map +1 -1
- package/dist/src/ui/commands/initCommand.d.ts +1 -1
- package/dist/src/ui/commands/initCommand.js +1 -1
- package/dist/src/ui/commands/mcpCommand.d.ts +1 -1
- package/dist/src/ui/commands/mcpCommand.js +5 -2
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.d.ts +1 -1
- package/dist/src/ui/commands/memoryCommand.js +1 -1
- package/dist/src/ui/commands/privacyCommand.d.ts +1 -1
- package/dist/src/ui/commands/privacyCommand.js +1 -1
- package/dist/src/ui/commands/providerCommand.js +1 -1
- package/dist/src/ui/commands/providerCommand.js.map +1 -1
- package/dist/src/ui/commands/quitCommand.d.ts +1 -1
- package/dist/src/ui/commands/quitCommand.js +1 -1
- package/dist/src/ui/commands/restoreCommand.d.ts +1 -1
- package/dist/src/ui/commands/restoreCommand.js +3 -7
- package/dist/src/ui/commands/restoreCommand.js.map +1 -1
- package/dist/src/ui/commands/settingsCommand.d.ts +1 -1
- package/dist/src/ui/commands/settingsCommand.js +1 -1
- package/dist/src/ui/commands/setupGithubCommand.d.ts +1 -1
- package/dist/src/ui/commands/setupGithubCommand.js +1 -1
- package/dist/src/ui/commands/setupGithubCommand.test.d.ts +1 -1
- package/dist/src/ui/commands/setupGithubCommand.test.js +1 -1
- package/dist/src/ui/commands/statsCommand.d.ts +1 -1
- package/dist/src/ui/commands/statsCommand.js +1 -1
- package/dist/src/ui/commands/terminalSetupCommand.d.ts +1 -1
- package/dist/src/ui/commands/terminalSetupCommand.js +1 -1
- package/dist/src/ui/commands/themeCommand.d.ts +1 -1
- package/dist/src/ui/commands/themeCommand.js +1 -1
- package/dist/src/ui/commands/toolformatCommand.test.d.ts +5 -0
- package/dist/src/ui/commands/toolformatCommand.test.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.d.ts +1 -1
- package/dist/src/ui/commands/toolsCommand.js +13 -43
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +1 -1
- package/dist/src/ui/commands/types.js +1 -1
- package/dist/src/ui/commands/vimCommand.d.ts +1 -1
- package/dist/src/ui/commands/vimCommand.js +1 -1
- package/dist/src/ui/components/AboutBox.d.ts +1 -1
- package/dist/src/ui/components/AsciiArt.d.ts +1 -1
- package/dist/src/ui/components/AsciiArt.js +1 -1
- package/dist/src/ui/components/AuthDialog.d.ts +1 -1
- package/dist/src/ui/components/AuthDialog.js +1 -1
- package/dist/src/ui/components/AuthDialog.test.d.ts +1 -1
- package/dist/src/ui/components/AuthDialog.test.js +41 -11
- package/dist/src/ui/components/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/components/AuthInProgress.d.ts +1 -1
- package/dist/src/ui/components/AuthInProgress.js +1 -1
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +1 -1
- package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +1 -1
- package/dist/src/ui/components/ContextIndicator.ui.test.d.ts +5 -0
- package/dist/src/ui/components/ContextIndicator.ui.test.js +5 -0
- package/dist/src/ui/components/ContextIndicator.ui.test.js.map +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.js +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.semantic.test.d.ts +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.semantic.test.js +1 -1
- package/dist/src/ui/components/DebugProfiler.d.ts +1 -1
- package/dist/src/ui/components/DebugProfiler.js +1 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.js +1 -1
- package/dist/src/ui/components/ErrorBoundary.d.ts +1 -1
- package/dist/src/ui/components/ErrorBoundary.js +1 -1
- package/dist/src/ui/components/FolderTrustDialog.d.ts +2 -1
- package/dist/src/ui/components/FolderTrustDialog.js +10 -4
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.d.ts +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +41 -4
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.d.ts +1 -1
- package/dist/src/ui/components/Footer.js +1 -1
- package/dist/src/ui/components/Footer.responsive.test.d.ts +1 -1
- package/dist/src/ui/components/Footer.responsive.test.js +1 -1
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +1 -1
- package/dist/src/ui/components/Header.d.ts +1 -1
- package/dist/src/ui/components/Help.d.ts +1 -1
- package/dist/src/ui/components/Help.js +1 -1
- package/dist/src/ui/components/Help.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +2 -2
- package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +3 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.d.ts +1 -1
- package/dist/src/ui/components/InputPrompt.js +150 -66
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.paste.test.d.ts +1 -1
- package/dist/src/ui/components/InputPrompt.paste.test.js +37 -12
- package/dist/src/ui/components/InputPrompt.paste.test.js.map +1 -1
- package/dist/src/ui/components/LayoutManager.d.ts +1 -1
- package/dist/src/ui/components/LayoutManager.js +1 -1
- package/dist/src/ui/components/LoadingIndicator.d.ts +1 -1
- package/dist/src/ui/components/LoadingIndicator.test.d.ts +1 -1
- package/dist/src/ui/components/LoadingIndicator.test.js +1 -1
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +1 -1
- package/dist/src/ui/components/MemoryUsageDisplay.js +1 -1
- package/dist/src/ui/components/MemoryUsageDisplay.semantic.test.d.ts +1 -1
- package/dist/src/ui/components/MemoryUsageDisplay.semantic.test.js +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +1 -1
- package/dist/src/ui/components/OAuthCodeDialog.d.ts +5 -0
- package/dist/src/ui/components/OAuthCodeDialog.js +5 -0
- package/dist/src/ui/components/OAuthCodeDialog.js.map +1 -1
- package/dist/src/ui/components/OAuthCodeDialog.test.d.ts +1 -1
- package/dist/src/ui/components/OAuthCodeDialog.test.js +1 -1
- package/dist/src/ui/components/PrepareLabel.d.ts +1 -1
- package/dist/src/ui/components/ProviderDialog.d.ts +5 -0
- package/dist/src/ui/components/ProviderDialog.js +6 -3
- package/dist/src/ui/components/ProviderDialog.js.map +1 -1
- package/dist/src/ui/components/ProviderDialog.responsive.test.d.ts +1 -1
- package/dist/src/ui/components/ProviderDialog.responsive.test.js +1 -1
- package/dist/src/ui/components/ProviderModelDialog.d.ts +1 -1
- package/dist/src/ui/components/ProviderModelDialog.js +5 -2
- package/dist/src/ui/components/ProviderModelDialog.js.map +1 -1
- package/dist/src/ui/components/ProviderModelDialog.responsive.test.d.ts +1 -1
- package/dist/src/ui/components/ProviderModelDialog.responsive.test.js +1 -1
- package/dist/src/ui/components/ProviderModelDialog.test.d.ts +1 -1
- package/dist/src/ui/components/ProviderModelDialog.test.js +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +1 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +1 -1
- package/dist/src/ui/components/SettingsDialog.js +66 -35
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.d.ts +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +114 -48
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.d.ts +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.test.js +1 -1
- package/dist/src/ui/components/ShellModeIndicator.d.ts +1 -1
- package/dist/src/ui/components/ShowMoreLines.d.ts +1 -1
- package/dist/src/ui/components/ShowMoreLines.js +1 -1
- package/dist/src/ui/components/StatsDisplay.d.ts +1 -1
- package/dist/src/ui/components/StatsDisplay.js +10 -11
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.js +13 -5
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.d.ts +1 -1
- package/dist/src/ui/components/ThemeDialog.js +1 -1
- package/dist/src/ui/components/Tips.d.ts +1 -1
- package/dist/src/ui/components/TodoPanel.responsive.test.d.ts +1 -1
- package/dist/src/ui/components/TodoPanel.responsive.test.js +1 -1
- package/dist/src/ui/components/TodoPanel.semantic.test.d.ts +1 -1
- package/dist/src/ui/components/TodoPanel.semantic.test.js +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +1 -1
- package/dist/src/ui/components/UpdateNotification.d.ts +1 -1
- package/dist/src/ui/components/UpdateNotification.js +1 -1
- package/dist/src/ui/components/WorkspaceMigrationDialog.d.ts +11 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +43 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -0
- package/dist/src/ui/components/__tests__/LayoutManager.test.d.ts +1 -1
- package/dist/src/ui/components/__tests__/LayoutManager.test.js +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.js +2 -1
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.js +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.js +1 -1
- package/dist/src/ui/components/messages/ErrorMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/GeminiMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/GeminiMessage.js +2 -1
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -1
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +1 -1
- package/dist/src/ui/components/messages/InfoMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +2 -2
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +40 -23
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.responsive.test.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.responsive.test.js +16 -12
- package/dist/src/ui/components/messages/ToolConfirmationMessage.responsive.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +88 -3
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +2 -2
- package/dist/src/ui/components/messages/ToolGroupMessage.js +2 -2
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +256 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolMessage.js +2 -2
- package/dist/src/ui/components/messages/ToolMessage.test.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolMessage.test.js +7 -7
- package/dist/src/ui/components/messages/UserMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/UserMessage.js +4 -2
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
- package/dist/src/ui/components/messages/UserShellMessage.d.ts +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.js +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.js +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +1 -1
- package/dist/src/ui/components/shared/text-buffer.d.ts +1 -1
- package/dist/src/ui/components/shared/text-buffer.js +2 -46
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +1 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.js +1 -1
- package/dist/src/ui/constants.d.ts +3 -1
- package/dist/src/ui/constants.js +3 -1
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/containers/SessionController.d.ts +5 -0
- package/dist/src/ui/containers/SessionController.js +5 -0
- package/dist/src/ui/containers/SessionController.js.map +1 -1
- package/dist/src/ui/containers/SessionController.test.d.ts +1 -1
- package/dist/src/ui/containers/SessionController.test.js +1 -1
- package/dist/src/ui/containers/UIStateShell.d.ts +5 -0
- package/dist/src/ui/containers/UIStateShell.js.map +1 -1
- package/dist/src/ui/contexts/AppDispatchContext.d.ts +1 -1
- package/dist/src/ui/contexts/AppDispatchContext.js +1 -1
- package/dist/src/ui/contexts/KeypressContext.d.ts +3 -2
- package/dist/src/ui/contexts/KeypressContext.js +33 -41
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.d.ts +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +122 -12
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
- package/dist/src/ui/contexts/OverflowContext.d.ts +1 -1
- package/dist/src/ui/contexts/OverflowContext.js +1 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +1 -1
- package/dist/src/ui/contexts/SessionContext.js +1 -1
- package/dist/src/ui/contexts/SessionStateContext.d.ts +1 -1
- package/dist/src/ui/contexts/SessionStateContext.js +1 -1
- package/dist/src/ui/contexts/SettingsContext.d.ts +1 -1
- package/dist/src/ui/contexts/SettingsContext.js +1 -1
- package/dist/src/ui/contexts/StreamingContext.d.ts +1 -1
- package/dist/src/ui/contexts/StreamingContext.js +1 -1
- package/dist/src/ui/contexts/TodoProvider.d.ts +5 -0
- package/dist/src/ui/contexts/TodoProvider.js +5 -0
- package/dist/src/ui/contexts/TodoProvider.js.map +1 -1
- package/dist/src/ui/contexts/VimModeContext.d.ts +1 -1
- package/dist/src/ui/contexts/VimModeContext.js +1 -1
- package/dist/src/ui/editors/editorSettingsManager.d.ts +1 -1
- package/dist/src/ui/editors/editorSettingsManager.js +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.js +1 -2
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +10 -2
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/index.d.ts +5 -0
- package/dist/src/ui/hooks/index.js +5 -0
- package/dist/src/ui/hooks/index.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +27 -16
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.js +8 -5
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js +2 -1
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useAuthCommand.d.ts +1 -1
- package/dist/src/ui/hooks/useAuthCommand.js +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +4 -2
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +14 -5
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +123 -3
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +1 -1
- package/dist/src/ui/hooks/useBracketedPaste.js +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +32 -0
- package/dist/src/ui/hooks/useCommandCompletion.js +196 -0
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useCompletion.js +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.js +1 -1
- package/dist/src/ui/hooks/useEditorSettings.d.ts +1 -1
- package/dist/src/ui/hooks/useEditorSettings.js +1 -1
- package/dist/src/ui/hooks/useEditorSettings.test.d.ts +1 -1
- package/dist/src/ui/hooks/useEditorSettings.test.js +1 -1
- package/dist/src/ui/hooks/useFocus.d.ts +1 -1
- package/dist/src/ui/hooks/useFocus.js +1 -1
- package/dist/src/ui/hooks/useFolderTrust.d.ts +2 -1
- package/dist/src/ui/hooks/useFolderTrust.js +28 -5
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +2 -2
- package/dist/src/ui/hooks/useGeminiStream.integration.test.d.ts +1 -1
- package/dist/src/ui/hooks/useGeminiStream.integration.test.js +2 -2
- package/dist/src/ui/hooks/useGeminiStream.integration.test.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.js +77 -348
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.d.ts +1 -1
- package/dist/src/ui/hooks/useGitBranchName.js +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.d.ts +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.js +1 -1
- package/dist/src/ui/hooks/useHistoryManager.d.ts +1 -1
- package/dist/src/ui/hooks/useHistoryManager.js +1 -1
- package/dist/src/ui/hooks/useHistoryManager.test.d.ts +1 -1
- package/dist/src/ui/hooks/useHistoryManager.test.js +1 -1
- package/dist/src/ui/hooks/useInputHistory.d.ts +1 -1
- package/dist/src/ui/hooks/useInputHistory.js +1 -1
- package/dist/src/ui/hooks/useInputHistory.test.d.ts +1 -1
- package/dist/src/ui/hooks/useInputHistory.test.js +1 -1
- package/dist/src/ui/hooks/useKeypress.d.ts +1 -1
- package/dist/src/ui/hooks/useKeypress.js +1 -1
- package/dist/src/ui/hooks/useKeypress.test.d.ts +1 -1
- package/dist/src/ui/hooks/useKeypress.test.js +1 -1
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +1 -1
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.js +1 -1
- package/dist/src/ui/hooks/useLogger.d.ts +3 -3
- package/dist/src/ui/hooks/useLogger.js +4 -4
- package/dist/src/ui/hooks/useLogger.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.js +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.js +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.js +1 -1
- 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/useProviderModelDialog.d.ts +1 -1
- package/dist/src/ui/hooks/useProviderModelDialog.js +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +3 -4
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +1 -1
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js +1 -1
- package/dist/src/ui/hooks/useResponsive.d.ts +1 -1
- package/dist/src/ui/hooks/useResponsive.js +1 -1
- package/dist/src/ui/hooks/useResponsive.test.d.ts +1 -1
- package/dist/src/ui/hooks/useResponsive.test.js +1 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.js +1 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +1 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +1 -1
- package/dist/src/ui/hooks/useSession.d.ts +1 -1
- package/dist/src/ui/hooks/useSession.js +1 -1
- package/dist/src/ui/hooks/useSettingsCommand.d.ts +1 -1
- package/dist/src/ui/hooks/useSettingsCommand.js +1 -1
- package/dist/src/ui/hooks/useShellHistory.d.ts +3 -2
- package/dist/src/ui/hooks/useShellHistory.js +8 -9
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
- package/dist/src/ui/hooks/useShellHistory.test.d.ts +1 -1
- package/dist/src/ui/hooks/useShellHistory.test.js +32 -2
- package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -1
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +1 -1
- package/dist/src/ui/hooks/useShowMemoryCommand.js +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.js +14 -3
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.js +1 -1
- package/dist/src/ui/hooks/useStableCallback.d.ts +1 -1
- package/dist/src/ui/hooks/useStableCallback.js +1 -1
- package/dist/src/ui/hooks/useStableCallback.test.d.ts +1 -1
- package/dist/src/ui/hooks/useStableCallback.test.js +1 -1
- package/dist/src/ui/hooks/useStateAndRef.d.ts +1 -1
- package/dist/src/ui/hooks/useStateAndRef.js +1 -1
- package/dist/src/ui/hooks/useTerminalSize.d.ts +1 -1
- package/dist/src/ui/hooks/useTerminalSize.js +1 -1
- package/dist/src/ui/hooks/useThemeCommand.d.ts +1 -1
- package/dist/src/ui/hooks/useThemeCommand.js +1 -1
- package/dist/src/ui/hooks/useTimer.d.ts +1 -1
- package/dist/src/ui/hooks/useTimer.js +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.d.ts +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +23 -11
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/hooks/useWorkspaceMigration.d.ts +13 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.js +50 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.js.map +1 -0
- package/dist/src/ui/hooks/vim.d.ts +1 -1
- package/dist/src/ui/hooks/vim.js +1 -1
- package/dist/src/ui/keyMatchers.d.ts +1 -1
- package/dist/src/ui/keyMatchers.js +1 -1
- package/dist/src/ui/keyMatchers.test.d.ts +1 -1
- package/dist/src/ui/keyMatchers.test.js +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +1 -1
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +1 -1
- package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js +1 -1
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/PrivacyNotice.js +1 -1
- package/dist/src/ui/reducers/appReducer.d.ts +1 -1
- package/dist/src/ui/reducers/appReducer.js +1 -1
- package/dist/src/ui/reducers/appReducer.test.d.ts +1 -1
- package/dist/src/ui/reducers/appReducer.test.js +1 -1
- package/dist/src/ui/reducers/sessionReducer.d.ts +1 -1
- package/dist/src/ui/reducers/sessionReducer.js +1 -1
- package/dist/src/ui/semantic-colors.d.ts +6 -0
- package/dist/src/ui/semantic-colors.js +8 -0
- package/dist/src/ui/semantic-colors.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.d.ts +1 -1
- package/dist/src/ui/themes/ansi-light.js +1 -1
- package/dist/src/ui/themes/ansi.d.ts +1 -1
- package/dist/src/ui/themes/ansi.js +1 -1
- package/dist/src/ui/themes/atom-one-dark.d.ts +1 -1
- package/dist/src/ui/themes/atom-one-dark.js +1 -1
- package/dist/src/ui/themes/ayu-light.d.ts +1 -1
- package/dist/src/ui/themes/ayu-light.js +1 -1
- package/dist/src/ui/themes/ayu.d.ts +1 -1
- package/dist/src/ui/themes/ayu.js +1 -1
- package/dist/src/ui/themes/color-utils.d.ts +1 -1
- package/dist/src/ui/themes/color-utils.js +1 -1
- package/dist/src/ui/themes/color-utils.test.d.ts +1 -1
- package/dist/src/ui/themes/color-utils.test.js +1 -1
- package/dist/src/ui/themes/default-light.d.ts +1 -1
- package/dist/src/ui/themes/default-light.js +1 -1
- package/dist/src/ui/themes/default.d.ts +1 -1
- package/dist/src/ui/themes/default.js +1 -1
- package/dist/src/ui/themes/dracula.d.ts +1 -1
- package/dist/src/ui/themes/dracula.js +1 -1
- package/dist/src/ui/themes/github-dark.d.ts +1 -1
- package/dist/src/ui/themes/github-dark.js +1 -1
- package/dist/src/ui/themes/github-light.d.ts +1 -1
- package/dist/src/ui/themes/github-light.js +1 -1
- package/dist/src/ui/themes/googlecode.d.ts +1 -1
- package/dist/src/ui/themes/googlecode.js +2 -2
- package/dist/src/ui/themes/googlecode.js.map +1 -1
- package/dist/src/ui/themes/green-screen.d.ts +1 -1
- package/dist/src/ui/themes/green-screen.js +1 -1
- package/dist/src/ui/themes/no-color.d.ts +1 -1
- package/dist/src/ui/themes/no-color.js +1 -1
- package/dist/src/ui/themes/semantic-resolver.d.ts +1 -1
- package/dist/src/ui/themes/semantic-resolver.js +1 -1
- package/dist/src/ui/themes/semantic-resolver.test.d.ts +1 -1
- package/dist/src/ui/themes/semantic-resolver.test.js +1 -1
- package/dist/src/ui/themes/semantic-tokens.d.ts +1 -1
- package/dist/src/ui/themes/semantic-tokens.js +1 -1
- package/dist/src/ui/themes/semantic-tokens.test.d.ts +1 -1
- package/dist/src/ui/themes/semantic-tokens.test.js +1 -1
- package/dist/src/ui/themes/shades-of-purple.d.ts +1 -1
- package/dist/src/ui/themes/shades-of-purple.js +1 -1
- package/dist/src/ui/themes/theme-compat.d.ts +1 -1
- package/dist/src/ui/themes/theme-compat.js +1 -1
- package/dist/src/ui/themes/theme-manager.d.ts +3 -1
- package/dist/src/ui/themes/theme-manager.js +73 -6
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.test.d.ts +1 -1
- package/dist/src/ui/themes/theme-manager.test.js +61 -2
- package/dist/src/ui/themes/theme-manager.test.js.map +1 -1
- package/dist/src/ui/themes/theme.d.ts +4 -2
- package/dist/src/ui/themes/theme.js +32 -2
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/themes/xcode.d.ts +1 -1
- package/dist/src/ui/themes/xcode.js +1 -1
- package/dist/src/ui/types.d.ts +3 -2
- package/dist/src/ui/types.js +1 -1
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.d.ts +1 -1
- package/dist/src/ui/utils/CodeColorizer.js +1 -1
- package/dist/src/ui/utils/ConsolePatcher.d.ts +1 -1
- package/dist/src/ui/utils/ConsolePatcher.js +1 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +1 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +9 -11
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js +18 -17
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
- package/dist/src/ui/utils/TableRenderer.d.ts +1 -1
- package/dist/src/ui/utils/TableRenderer.js +6 -6
- package/dist/src/ui/utils/TableRenderer.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.d.ts +1 -1
- package/dist/src/ui/utils/clipboardUtils.js +1 -1
- package/dist/src/ui/utils/clipboardUtils.test.d.ts +1 -1
- package/dist/src/ui/utils/clipboardUtils.test.js +1 -1
- package/dist/src/ui/utils/commandUtils.d.ts +2 -2
- package/dist/src/ui/utils/commandUtils.js +52 -14
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.test.d.ts +1 -1
- package/dist/src/ui/utils/commandUtils.test.js +75 -20
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
- package/dist/src/ui/utils/computeStats.d.ts +1 -1
- package/dist/src/ui/utils/computeStats.js +1 -1
- package/dist/src/ui/utils/displayUtils.d.ts +1 -1
- package/dist/src/ui/utils/displayUtils.js +1 -1
- package/dist/src/ui/utils/displayUtils.test.d.ts +1 -1
- package/dist/src/ui/utils/displayUtils.test.js +1 -1
- package/dist/src/ui/utils/formatters.d.ts +1 -1
- package/dist/src/ui/utils/formatters.js +1 -1
- package/dist/src/ui/utils/formatters.test.d.ts +1 -1
- package/dist/src/ui/utils/formatters.test.js +1 -1
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +1 -1
- package/dist/src/ui/utils/kittyProtocolDetector.js +1 -1
- package/dist/src/ui/utils/markdownUtilities.d.ts +1 -1
- package/dist/src/ui/utils/markdownUtilities.js +1 -1
- package/dist/src/ui/utils/markdownUtilities.test.d.ts +1 -1
- package/dist/src/ui/utils/markdownUtilities.test.js +1 -1
- package/dist/src/ui/utils/platformConstants.d.ts +8 -1
- package/dist/src/ui/utils/platformConstants.js +8 -1
- package/dist/src/ui/utils/platformConstants.js.map +1 -1
- package/dist/src/ui/utils/renderLoopDetector.d.ts +1 -1
- package/dist/src/ui/utils/renderLoopDetector.js +1 -1
- package/dist/src/ui/utils/responsive.d.ts +1 -1
- package/dist/src/ui/utils/responsive.js +1 -1
- package/dist/src/ui/utils/responsive.test.d.ts +1 -1
- package/dist/src/ui/utils/responsive.test.js +1 -1
- package/dist/src/ui/utils/terminalSetup.d.ts +1 -1
- package/dist/src/ui/utils/terminalSetup.js +1 -1
- package/dist/src/ui/utils/textUtils.d.ts +19 -1
- package/dist/src/ui/utils/textUtils.js +45 -1
- package/dist/src/ui/utils/textUtils.js.map +1 -1
- package/dist/src/ui/utils/updateCheck.d.ts +1 -1
- package/dist/src/ui/utils/updateCheck.js +1 -1
- package/dist/src/ui/utils/updateCheck.test.d.ts +1 -1
- package/dist/src/ui/utils/updateCheck.test.js +1 -1
- package/dist/src/utils/ConversationContext.d.ts +2 -12
- package/dist/src/utils/ConversationContext.js +2 -12
- package/dist/src/utils/ConversationContext.js.map +1 -1
- package/dist/src/utils/ConversationContext.test.d.ts +1 -1
- package/dist/src/utils/ConversationContext.test.js +1 -1
- package/dist/src/utils/checks.d.ts +1 -1
- package/dist/src/utils/checks.js +1 -1
- package/dist/src/utils/cleanup.d.ts +1 -1
- package/dist/src/utils/cleanup.js +4 -3
- package/dist/src/utils/cleanup.js.map +1 -1
- package/dist/src/utils/dialogScopeUtils.d.ts +1 -1
- package/dist/src/utils/dialogScopeUtils.js +1 -1
- package/dist/src/utils/events.d.ts +1 -1
- package/dist/src/utils/events.js +1 -1
- package/dist/src/utils/gitUtils.d.ts +1 -1
- package/dist/src/utils/gitUtils.js +1 -1
- package/dist/src/utils/gitUtils.test.d.ts +1 -1
- package/dist/src/utils/gitUtils.test.js +4 -4
- package/dist/src/utils/gitUtils.test.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.d.ts +1 -1
- package/dist/src/utils/handleAutoUpdate.js +1 -1
- package/dist/src/utils/installationInfo.d.ts +1 -1
- package/dist/src/utils/installationInfo.js +1 -1
- package/dist/src/utils/installationInfo.test.d.ts +1 -1
- package/dist/src/utils/installationInfo.test.js +1 -1
- package/dist/src/utils/package.d.ts +1 -1
- package/dist/src/utils/package.js +1 -1
- package/dist/src/utils/readStdin.d.ts +1 -1
- package/dist/src/utils/readStdin.js +16 -1
- package/dist/src/utils/readStdin.js.map +1 -1
- 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 +1 -1
- package/dist/src/utils/resolvePath.js +1 -1
- package/dist/src/utils/sandbox.d.ts +3 -3
- package/dist/src/utils/sandbox.js +22 -29
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/settingsUtils.d.ts +1 -1
- package/dist/src/utils/settingsUtils.js +1 -1
- package/dist/src/utils/settingsUtils.test.d.ts +1 -1
- package/dist/src/utils/settingsUtils.test.js +1 -1
- package/dist/src/utils/spawnWrapper.d.ts +1 -1
- package/dist/src/utils/spawnWrapper.js +1 -1
- package/dist/src/utils/startupWarnings.d.ts +1 -1
- package/dist/src/utils/startupWarnings.js +1 -1
- package/dist/src/utils/updateEventEmitter.d.ts +1 -1
- package/dist/src/utils/updateEventEmitter.js +1 -1
- package/dist/src/utils/userStartupWarnings.d.ts +1 -1
- package/dist/src/utils/userStartupWarnings.js +1 -1
- package/dist/src/utils/userStartupWarnings.test.d.ts +1 -1
- package/dist/src/utils/userStartupWarnings.test.js +1 -1
- package/dist/src/utils/version.d.ts +1 -1
- package/dist/src/utils/version.js +1 -1
- package/dist/src/validateNonInterActiveAuth.d.ts +1 -1
- package/dist/src/validateNonInterActiveAuth.js +1 -1
- package/dist/src/zed-integration/acp.d.ts +1 -1
- package/dist/src/zed-integration/acp.js +3 -2
- package/dist/src/zed-integration/acp.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +1 -1
- package/dist/src/zed-integration/fileSystemService.js +1 -1
- package/dist/src/zed-integration/schema.d.ts +79 -79
- package/dist/src/zed-integration/schema.js +1 -1
- package/dist/src/zed-integration/zedIntegration.d.ts +1 -1
- package/dist/src/zed-integration/zedIntegration.js +5 -13
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -5
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
2
|
* @license
|
3
|
-
* Copyright 2025
|
3
|
+
* Copyright 2025 Vybestack LLC
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
5
5
|
*/
|
6
6
|
import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
7
|
-
import { GeminiEventType as ServerGeminiEventType, getErrorMessage, isNodeError, MessageSenderType, GitService, UnauthorizedError,
|
7
|
+
import { GeminiEventType as ServerGeminiEventType, getErrorMessage, isNodeError, MessageSenderType, logUserPrompt, GitService, UnauthorizedError, UserPromptEvent, DEFAULT_GEMINI_FLASH_MODEL, parseAndFormatApiError, } from '@vybestack/llxprt-code-core';
|
8
8
|
import { FinishReason } from '@google/genai';
|
9
9
|
import { StreamingState, MessageType, ToolCallStatus, } from '../types.js';
|
10
10
|
import { isAtCommand } from '../utils/commandUtils.js';
|
@@ -17,7 +17,6 @@ import { promises as fs } from 'fs';
|
|
17
17
|
import path from 'path';
|
18
18
|
import { useReactToolScheduler, mapToDisplay as mapTrackedToolCallsToDisplay, } from './useReactToolScheduler.js';
|
19
19
|
import { useSessionStats } from '../contexts/SessionContext.js';
|
20
|
-
import { useTodoContinuation } from './useTodoContinuation.js';
|
21
20
|
import { useKeypress } from './useKeypress.js';
|
22
21
|
export function mergePartListUnions(list) {
|
23
22
|
const resultParts = [];
|
@@ -42,7 +41,6 @@ export function mergePartListUnions(list) {
|
|
42
41
|
}
|
43
42
|
return resultParts;
|
44
43
|
}
|
45
|
-
const debugLogger = new DebugLogger('llxprt:cli:gemini-stream');
|
46
44
|
var StreamProcessingStatus;
|
47
45
|
(function (StreamProcessingStatus) {
|
48
46
|
StreamProcessingStatus[StreamProcessingStatus["Completed"] = 0] = "Completed";
|
@@ -53,34 +51,23 @@ var StreamProcessingStatus;
|
|
53
51
|
* Manages the Gemini stream, including user input, command processing,
|
54
52
|
* API interaction, and tool call lifecycle.
|
55
53
|
*/
|
56
|
-
export const useGeminiStream = (geminiClient, history, addItem,
|
54
|
+
export const useGeminiStream = (geminiClient, history, addItem, config, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit) => {
|
57
55
|
const [initError, setInitError] = useState(null);
|
58
56
|
const abortControllerRef = useRef(null);
|
59
57
|
const turnCancelledRef = useRef(false);
|
60
58
|
const [isResponding, setIsResponding] = useState(false);
|
61
59
|
const [thought, setThought] = useState(null);
|
62
|
-
const queuedToolResponsesRef = useRef([]);
|
63
|
-
const queuedSystemFeedbackRef = useRef([]);
|
64
|
-
const handleCompletedToolsRef = useRef(null);
|
65
60
|
const [pendingHistoryItemRef, setPendingHistoryItem] = useStateAndRef(null);
|
66
61
|
const processedMemoryToolsRef = useRef(new Set());
|
67
|
-
// FIX: Use ref to access latest history without causing re-renders
|
68
|
-
// This prevents infinite loops in the useEffect that saves checkpoints
|
69
|
-
const historyRef = useRef(history);
|
70
|
-
// Keep historyRef updated with latest history value
|
71
|
-
useEffect(() => {
|
72
|
-
historyRef.current = history;
|
73
|
-
}, [history]);
|
74
62
|
const { startNewPrompt, getPromptCount } = useSessionStats();
|
75
|
-
const
|
76
|
-
|
77
|
-
const { handleStreamCompleted: _handleStreamCompleted } = useTodoContinuation(geminiClient, config, isResponding, onDebugMessage);
|
63
|
+
const storage = config.storage;
|
64
|
+
const logger = useLogger(storage);
|
78
65
|
const gitService = useMemo(() => {
|
79
66
|
if (!config.getProjectRoot()) {
|
80
67
|
return;
|
81
68
|
}
|
82
|
-
return new GitService(config.getProjectRoot());
|
83
|
-
}, [config]);
|
69
|
+
return new GitService(config.getProjectRoot(), storage);
|
70
|
+
}, [config, storage]);
|
84
71
|
const [toolCalls, scheduleToolCalls, markToolsAsSubmitted] = useReactToolScheduler(async (completedToolCallsFromScheduler) => {
|
85
72
|
// This onComplete is called when ALL scheduled tools for a given batch are done.
|
86
73
|
if (completedToolCallsFromScheduler.length > 0) {
|
@@ -124,33 +111,8 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
124
111
|
}
|
125
112
|
turnCancelledRef.current = true;
|
126
113
|
abortControllerRef.current?.abort();
|
127
|
-
setThought(null); // Reset thought when user cancels
|
128
|
-
// Don't add incomplete/partial assistant messages to history
|
129
|
-
// These can corrupt the context and cause 400 errors
|
130
114
|
if (pendingHistoryItemRef.current) {
|
131
|
-
|
132
|
-
const pendingItem = pendingHistoryItemRef.current;
|
133
|
-
if (pendingItem.type === 'gemini' ||
|
134
|
-
pendingItem.type === 'gemini_content') {
|
135
|
-
// Check if the message has meaningful content
|
136
|
-
if (pendingItem.text && pendingItem.text.trim().length > 0) {
|
137
|
-
// Add the partial response without cancellation marker to preserve clean content
|
138
|
-
addItem({
|
139
|
-
...pendingItem,
|
140
|
-
}, Date.now());
|
141
|
-
}
|
142
|
-
// Otherwise, don't add empty/incomplete messages that could corrupt context
|
143
|
-
}
|
144
|
-
else if (pendingItem.type === 'tool_group') {
|
145
|
-
// Don't add incomplete tool groups - these can corrupt context
|
146
|
-
// Tool groups are only valid if they have completed tool calls
|
147
|
-
debugLogger.debug(() => 'Skipping incomplete tool_group on cancel');
|
148
|
-
// Don't add incomplete tool groups to history
|
149
|
-
}
|
150
|
-
else {
|
151
|
-
// For other types that are complete (info, error, etc), add as-is
|
152
|
-
addItem(pendingHistoryItemRef.current, Date.now());
|
153
|
-
}
|
115
|
+
addItem(pendingHistoryItemRef.current, Date.now());
|
154
116
|
}
|
155
117
|
addItem({
|
156
118
|
type: MessageType.INFO,
|
@@ -169,9 +131,6 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
169
131
|
useKeypress((key) => {
|
170
132
|
if (key.name === 'escape') {
|
171
133
|
cancelOngoingRequest();
|
172
|
-
// Clear the queues on cancel - we don't want to process tools or feedback after user cancellation
|
173
|
-
queuedToolResponsesRef.current = [];
|
174
|
-
queuedSystemFeedbackRef.current = [];
|
175
134
|
}
|
176
135
|
}, { isActive: streamingState === StreamingState.Responding });
|
177
136
|
const prepareQueryForGemini = useCallback(async (query, userMessageTimestamp, abortSignal, prompt_id) => {
|
@@ -181,40 +140,10 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
181
140
|
if (typeof query === 'string' && query.trim().length === 0) {
|
182
141
|
return { queryToSend: null, shouldProceed: false };
|
183
142
|
}
|
184
|
-
// Lazily refresh auth if needed.
|
185
|
-
if (!geminiClient.isInitialized()) {
|
186
|
-
onDebugMessage('[Auth] GeminiClient not initialized, checking auth...');
|
187
|
-
// First check if we already have a content generator config
|
188
|
-
// This would be the case if refreshAuth was already called (e.g., from /key command)
|
189
|
-
let authType = config.getContentGeneratorConfig()?.authType;
|
190
|
-
onDebugMessage(`[Auth] Current authType from config: ${authType}`);
|
191
|
-
// If authType is not set, determine it from environment variables
|
192
|
-
if (!authType) {
|
193
|
-
if (process.env.GOOGLE_APPLICATION_CREDENTIALS) {
|
194
|
-
authType = AuthType.USE_VERTEX_AI;
|
195
|
-
}
|
196
|
-
else if (process.env.GEMINI_API_KEY) {
|
197
|
-
authType = AuthType.USE_GEMINI;
|
198
|
-
}
|
199
|
-
else {
|
200
|
-
authType = AuthType.LOGIN_WITH_GOOGLE; // Default to OAuth (interactive)
|
201
|
-
}
|
202
|
-
onDebugMessage(`[Auth] Determined authType from environment: ${authType}`);
|
203
|
-
}
|
204
|
-
// Only refresh auth if we don't have a valid content generator config
|
205
|
-
// or if the auth type differs from what's configured
|
206
|
-
const currentAuthType = config.getContentGeneratorConfig()?.authType;
|
207
|
-
if (!currentAuthType || currentAuthType !== authType) {
|
208
|
-
onDebugMessage(`[Auth] Refreshing auth with type: ${authType}`);
|
209
|
-
await config.refreshAuth(authType);
|
210
|
-
}
|
211
|
-
else {
|
212
|
-
onDebugMessage(`[Auth] Auth type unchanged, skipping refresh`);
|
213
|
-
}
|
214
|
-
}
|
215
143
|
let localQueryToSendToGemini = null;
|
216
144
|
if (typeof query === 'string') {
|
217
145
|
const trimmedQuery = query.trim();
|
146
|
+
logUserPrompt(config, new UserPromptEvent(trimmedQuery.length, prompt_id, config.getContentGeneratorConfig()?.authType, trimmedQuery));
|
218
147
|
onDebugMessage(`User query: '${trimmedQuery}'`);
|
219
148
|
await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
|
220
149
|
// Handle UI-only commands first
|
@@ -293,18 +222,14 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
293
222
|
logger,
|
294
223
|
shellModeActive,
|
295
224
|
scheduleToolCalls,
|
296
|
-
geminiClient,
|
297
225
|
]);
|
298
226
|
// --- Stream Event Handlers ---
|
299
227
|
const handleContentEvent = useCallback((eventValue, currentGeminiMessageBuffer, userMessageTimestamp) => {
|
300
228
|
if (turnCancelledRef.current) {
|
301
229
|
// Prevents additional output after a user initiated cancel.
|
302
|
-
|
303
|
-
return currentGeminiMessageBuffer;
|
230
|
+
return '';
|
304
231
|
}
|
305
232
|
let newGeminiMessageBuffer = currentGeminiMessageBuffer + eventValue;
|
306
|
-
// Debug logging for repetition issue
|
307
|
-
debugLogger.debug(() => `Content event: eventValue=${eventValue.substring(0, 100)}, currentBuffer=${currentGeminiMessageBuffer.substring(0, 100)}, newBuffer=${newGeminiMessageBuffer.substring(0, 100)}, pendingType=${pendingHistoryItemRef.current?.type}`);
|
308
233
|
if (pendingHistoryItemRef.current?.type !== 'gemini' &&
|
309
234
|
pendingHistoryItemRef.current?.type !== 'gemini_content') {
|
310
235
|
if (pendingHistoryItemRef.current) {
|
@@ -347,20 +272,13 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
347
272
|
if (turnCancelledRef.current) {
|
348
273
|
return;
|
349
274
|
}
|
350
|
-
// Track cancelled tool IDs for synthetic response generation
|
351
|
-
const cancelledToolIds = [];
|
352
275
|
if (pendingHistoryItemRef.current) {
|
353
276
|
if (pendingHistoryItemRef.current.type === 'tool_group') {
|
354
|
-
const updatedTools = pendingHistoryItemRef.current.tools.map((tool) =>
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
cancelledToolIds.push(tool.callId);
|
360
|
-
return { ...tool, status: ToolCallStatus.Canceled };
|
361
|
-
}
|
362
|
-
return tool;
|
363
|
-
});
|
277
|
+
const updatedTools = pendingHistoryItemRef.current.tools.map((tool) => tool.status === ToolCallStatus.Pending ||
|
278
|
+
tool.status === ToolCallStatus.Confirming ||
|
279
|
+
tool.status === ToolCallStatus.Executing
|
280
|
+
? { ...tool, status: ToolCallStatus.Canceled }
|
281
|
+
: tool);
|
364
282
|
const pendingItem = {
|
365
283
|
...pendingHistoryItemRef.current,
|
366
284
|
tools: updatedTools,
|
@@ -372,14 +290,7 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
372
290
|
}
|
373
291
|
setPendingHistoryItem(null);
|
374
292
|
}
|
375
|
-
|
376
|
-
if (cancelledToolIds.length > 0) {
|
377
|
-
debugLogger.debug(() => `[ESC] Cancelled tool IDs: ${JSON.stringify(cancelledToolIds)}`);
|
378
|
-
}
|
379
|
-
addItem({
|
380
|
-
type: MessageType.INFO,
|
381
|
-
text: `User cancelled the request${cancelledToolIds.length > 0 ? ` (${cancelledToolIds.length} tool${cancelledToolIds.length > 1 ? 's' : ''} cancelled)` : ''}.`,
|
382
|
-
}, userMessageTimestamp);
|
293
|
+
addItem({ type: MessageType.INFO, text: 'User cancelled the request.' }, userMessageTimestamp);
|
383
294
|
setIsResponding(false);
|
384
295
|
setThought(null); // Reset thought when user cancels
|
385
296
|
}, [addItem, pendingHistoryItemRef, setPendingHistoryItem, setThought]);
|
@@ -388,30 +299,12 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
388
299
|
addItem(pendingHistoryItemRef.current, userMessageTimestamp);
|
389
300
|
setPendingHistoryItem(null);
|
390
301
|
}
|
391
|
-
setThought(null); // Reset thought when there is an error
|
392
|
-
const errorText = parseAndFormatApiError(eventValue.error, config.getContentGeneratorConfig()?.authType, undefined, config.getModel(), DEFAULT_GEMINI_FLASH_MODEL);
|
393
|
-
// Check if this is an authentication error that should trigger onAuthError
|
394
|
-
// Match various authentication error patterns from different providers
|
395
|
-
// But DON'T trigger if we're in the middle of OAuth flow
|
396
|
-
if ((errorText.includes('Failed to resolve authentication') ||
|
397
|
-
errorText.includes('Authentication required')) &&
|
398
|
-
!global.__oauth_needs_code) {
|
399
|
-
// Call the onAuthError callback which will be handled by App.tsx
|
400
|
-
onAuthError();
|
401
|
-
}
|
402
302
|
addItem({
|
403
303
|
type: MessageType.ERROR,
|
404
|
-
text:
|
304
|
+
text: parseAndFormatApiError(eventValue.error, config.getContentGeneratorConfig()?.authType, undefined, config.getModel(), DEFAULT_GEMINI_FLASH_MODEL),
|
405
305
|
}, userMessageTimestamp);
|
406
306
|
setThought(null); // Reset thought when there's an error
|
407
|
-
}, [
|
408
|
-
addItem,
|
409
|
-
pendingHistoryItemRef,
|
410
|
-
setPendingHistoryItem,
|
411
|
-
config,
|
412
|
-
setThought,
|
413
|
-
onAuthError,
|
414
|
-
]);
|
307
|
+
}, [addItem, pendingHistoryItemRef, setPendingHistoryItem, config, setThought]);
|
415
308
|
const handleFinishedEvent = useCallback((event, userMessageTimestamp) => {
|
416
309
|
const finishReason = event.value;
|
417
310
|
const finishReasonMessages = {
|
@@ -458,69 +351,15 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
458
351
|
const processGeminiStreamEvents = useCallback(async (stream, userMessageTimestamp, signal) => {
|
459
352
|
let geminiMessageBuffer = '';
|
460
353
|
const toolCallRequests = [];
|
461
|
-
// Initialize emoji filter for stream processing from settings
|
462
|
-
const emojiFilterMode = config.getEphemeralSetting('emojifilter') || 'auto';
|
463
|
-
/**
|
464
|
-
* @requirement REQ-004.1 - Silent filtering in auto mode
|
465
|
-
* Use mode from settings or default to auto
|
466
|
-
*/
|
467
|
-
const filterConfig = { mode: emojiFilterMode };
|
468
|
-
const emojiFilter = new EmojiFilter(filterConfig);
|
469
354
|
for await (const event of stream) {
|
470
355
|
switch (event.type) {
|
471
356
|
case ServerGeminiEventType.Thought:
|
472
357
|
setThought(event.value);
|
473
358
|
break;
|
474
|
-
case ServerGeminiEventType.Content:
|
475
|
-
|
476
|
-
const filterResult = emojiFilter.filterStreamChunk(event.value);
|
477
|
-
if (filterResult.blocked) {
|
478
|
-
// In error mode: stop displaying and inject error feedback as tool response
|
479
|
-
// Clear any partial content that was being built (don't display it)
|
480
|
-
if (geminiMessageBuffer.trim()) {
|
481
|
-
geminiMessageBuffer = '';
|
482
|
-
}
|
483
|
-
// Show a brief message to user
|
484
|
-
addItem({
|
485
|
-
type: 'info',
|
486
|
-
text: 'Emojis detected - requesting retry without emojis...',
|
487
|
-
}, userMessageTimestamp);
|
488
|
-
// Queue the error feedback to be sent with the next tool response
|
489
|
-
// This ensures the model gets the feedback on the next interaction
|
490
|
-
if (!queuedSystemFeedbackRef.current) {
|
491
|
-
queuedSystemFeedbackRef.current = [];
|
492
|
-
}
|
493
|
-
queuedSystemFeedbackRef.current.push(`<system-reminder>ERROR: Your response contained emojis which are strictly prohibited. Please regenerate your response without using any emojis.</system-reminder>`);
|
494
|
-
// Cancel current stream to stop processing
|
495
|
-
if (abortControllerRef.current) {
|
496
|
-
abortControllerRef.current.abort();
|
497
|
-
}
|
498
|
-
// Stop processing this chunk
|
499
|
-
break;
|
500
|
-
}
|
501
|
-
// Handle the filtered content
|
502
|
-
const filteredText = typeof filterResult.filtered === 'string'
|
503
|
-
? filterResult.filtered
|
504
|
-
: '';
|
505
|
-
geminiMessageBuffer = handleContentEvent(filteredText, geminiMessageBuffer, userMessageTimestamp);
|
506
|
-
// Queue system feedback to be sent to model in next tool response
|
507
|
-
// This feedback is for the LLM, not for display to the user
|
508
|
-
if (filterResult.systemFeedback) {
|
509
|
-
// We'll append this to the next tool response or create a special system message
|
510
|
-
// Store it in a ref so it persists across renders
|
511
|
-
if (!queuedSystemFeedbackRef.current) {
|
512
|
-
queuedSystemFeedbackRef.current = [];
|
513
|
-
}
|
514
|
-
queuedSystemFeedbackRef.current.push(`<system-reminder>${filterResult.systemFeedback}</system-reminder>`);
|
515
|
-
}
|
516
|
-
// If cancelled after processing this content event, stop further processing
|
517
|
-
if (turnCancelledRef.current) {
|
518
|
-
break;
|
519
|
-
}
|
359
|
+
case ServerGeminiEventType.Content:
|
360
|
+
geminiMessageBuffer = handleContentEvent(event.value, geminiMessageBuffer, userMessageTimestamp);
|
520
361
|
break;
|
521
|
-
}
|
522
362
|
case ServerGeminiEventType.ToolCallRequest:
|
523
|
-
debugLogger.debug(() => `ToolCallRequest event: ${JSON.stringify(event.value, null, 2)}`);
|
524
363
|
toolCallRequests.push(event.value);
|
525
364
|
break;
|
526
365
|
case ServerGeminiEventType.UserCancelled:
|
@@ -534,7 +373,6 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
534
373
|
break;
|
535
374
|
case ServerGeminiEventType.ToolCallConfirmation:
|
536
375
|
case ServerGeminiEventType.ToolCallResponse:
|
537
|
-
case ServerGeminiEventType.UsageMetadata:
|
538
376
|
// do nothing
|
539
377
|
break;
|
540
378
|
case ServerGeminiEventType.MaxSessionTurns:
|
@@ -548,6 +386,9 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
548
386
|
// before we add loop detected message to history
|
549
387
|
loopDetectedRef.current = true;
|
550
388
|
break;
|
389
|
+
case ServerGeminiEventType.UsageMetadata:
|
390
|
+
// Handle usage metadata - for now just ignore
|
391
|
+
break;
|
551
392
|
default: {
|
552
393
|
// enforces exhaustive switch-case
|
553
394
|
const unreachable = event;
|
@@ -555,19 +396,10 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
555
396
|
}
|
556
397
|
}
|
557
398
|
}
|
558
|
-
// Flush any remaining content from emoji filter buffer
|
559
|
-
const remainingContent = emojiFilter.flushBuffer();
|
560
|
-
if (remainingContent.length > 0) {
|
561
|
-
geminiMessageBuffer = handleContentEvent(remainingContent, geminiMessageBuffer, userMessageTimestamp);
|
562
|
-
}
|
563
399
|
if (toolCallRequests.length > 0) {
|
564
|
-
debugLogger.debug(() => `Scheduling tool calls: ${JSON.stringify(toolCallRequests.map((tc) => ({ name: tc.name, callId: tc.callId })))}`);
|
565
400
|
scheduleToolCalls(toolCallRequests, signal);
|
566
401
|
}
|
567
|
-
return
|
568
|
-
status: StreamProcessingStatus.Completed,
|
569
|
-
hadToolCalls: toolCallRequests.length > 0,
|
570
|
-
};
|
402
|
+
return StreamProcessingStatus.Completed;
|
571
403
|
}, [
|
572
404
|
handleContentEvent,
|
573
405
|
handleUserCancelledEvent,
|
@@ -576,8 +408,6 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
576
408
|
handleChatCompressionEvent,
|
577
409
|
handleFinishedEvent,
|
578
410
|
handleMaxSessionTurnsEvent,
|
579
|
-
config,
|
580
|
-
addItem,
|
581
411
|
]);
|
582
412
|
const submitQuery = useCallback(async (query, options, prompt_id) => {
|
583
413
|
if ((streamingState === StreamingState.Responding ||
|
@@ -585,7 +415,6 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
585
415
|
!options?.isContinuation)
|
586
416
|
return;
|
587
417
|
const userMessageTimestamp = Date.now();
|
588
|
-
setShowHelp(false);
|
589
418
|
// Reset quota error flag when starting a new query (not a continuation)
|
590
419
|
if (!options?.isContinuation) {
|
591
420
|
setModelSwitchedFromQuotaError(false);
|
@@ -608,10 +437,9 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
608
437
|
setIsResponding(true);
|
609
438
|
setInitError(null);
|
610
439
|
try {
|
611
|
-
onDebugMessage(`[Submit] Sending message to Gemini: ${typeof queryToSend === 'string' ? queryToSend : 'non-string content'}`);
|
612
440
|
const stream = geminiClient.sendMessageStream(queryToSend, abortSignal, prompt_id);
|
613
|
-
const
|
614
|
-
if (
|
441
|
+
const processingStatus = await processGeminiStreamEvents(stream, userMessageTimestamp, abortSignal);
|
442
|
+
if (processingStatus === StreamProcessingStatus.UserCancelled) {
|
615
443
|
return;
|
616
444
|
}
|
617
445
|
if (pendingHistoryItemRef.current) {
|
@@ -622,10 +450,6 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
622
450
|
loopDetectedRef.current = false;
|
623
451
|
handleLoopDetectedEvent();
|
624
452
|
}
|
625
|
-
// TODO: Continuation hook integration point - stub implementation
|
626
|
-
// This triggers todo continuation logic when stream completes
|
627
|
-
// without tool calls but with active todos
|
628
|
-
_handleStreamCompleted(processingResult.hadToolCalls);
|
629
453
|
}
|
630
454
|
catch (error) {
|
631
455
|
if (error instanceof UnauthorizedError) {
|
@@ -640,20 +464,9 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
640
464
|
}
|
641
465
|
finally {
|
642
466
|
setIsResponding(false);
|
643
|
-
// Process any queued tool responses after the response completes
|
644
|
-
if (queuedToolResponsesRef.current.length > 0) {
|
645
|
-
const queuedTools = [...queuedToolResponsesRef.current];
|
646
|
-
queuedToolResponsesRef.current = [];
|
647
|
-
debugLogger.debug(() => `Processing queued tool responses: ${JSON.stringify(queuedTools.map((tc) => tc.request.name))}`);
|
648
|
-
// Process the queued tools now that we're not responding
|
649
|
-
if (handleCompletedToolsRef.current) {
|
650
|
-
await handleCompletedToolsRef.current(queuedTools);
|
651
|
-
}
|
652
|
-
}
|
653
467
|
}
|
654
468
|
}, [
|
655
469
|
streamingState,
|
656
|
-
setShowHelp,
|
657
470
|
setModelSwitchedFromQuotaError,
|
658
471
|
prepareQueryForGemini,
|
659
472
|
processGeminiStreamEvents,
|
@@ -667,17 +480,9 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
667
480
|
startNewPrompt,
|
668
481
|
getPromptCount,
|
669
482
|
handleLoopDetectedEvent,
|
670
|
-
onDebugMessage,
|
671
|
-
_handleStreamCompleted,
|
672
483
|
]);
|
673
484
|
const handleCompletedTools = useCallback(async (completedToolCallsFromScheduler) => {
|
674
485
|
if (isResponding) {
|
675
|
-
// Queue the tools to be processed after the current response completes
|
676
|
-
queuedToolResponsesRef.current = [
|
677
|
-
...queuedToolResponsesRef.current,
|
678
|
-
...completedToolCallsFromScheduler,
|
679
|
-
];
|
680
|
-
debugLogger.debug(() => `Queuing tool responses while model is responding: ${JSON.stringify(completedToolCallsFromScheduler.map((tc) => tc.request.name))}`);
|
681
486
|
return;
|
682
487
|
}
|
683
488
|
const completedAndReadyToSubmitTools = completedToolCallsFromScheduler.filter((tc) => {
|
@@ -709,120 +514,33 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
709
514
|
if (geminiTools.length === 0) {
|
710
515
|
return;
|
711
516
|
}
|
712
|
-
//
|
713
|
-
const
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
// Check if we're still waiting for other tools with the same prompt_id
|
724
|
-
// Include both global toolCalls and the current batch to ensure we have all tools
|
725
|
-
const allToolCallsGlobal = toolCalls.filter((tc) => !tc.request.isClientInitiated && tc.request.prompt_id === promptId);
|
726
|
-
// Also check if there are other tools in the current batch that we haven't processed yet
|
727
|
-
const allToolsInBatch = geminiTools.filter((tc) => tc.request.prompt_id === promptId);
|
728
|
-
const pendingTools = allToolCallsGlobal.filter((tc) => tc.status !== 'success' &&
|
729
|
-
tc.status !== 'error' &&
|
730
|
-
tc.status !== 'cancelled');
|
731
|
-
if (pendingTools.length > 0) {
|
732
|
-
// Still waiting for other tools in this turn, skip for now
|
733
|
-
debugLogger.debug(() => `Waiting for ${pendingTools.length} more tools to complete for prompt ${promptId}: ${JSON.stringify(pendingTools.map((t) => t.request.name))}`);
|
734
|
-
continue;
|
735
|
-
}
|
736
|
-
// If all tools for this prompt_id in the current batch are complete, use them all
|
737
|
-
// This ensures that if multiple tools complete together, they're processed together
|
738
|
-
const toolsToProcess = allToolsInBatch.length > 0 ? allToolsInBatch : toolsInPrompt;
|
739
|
-
// All tools for this prompt_id are complete, process them
|
740
|
-
debugLogger.debug(() => `All tools complete for prompt ${promptId}, sending ${toolsToProcess.length} responses`);
|
741
|
-
// If all the tools were cancelled, don't submit a response to Gemini.
|
742
|
-
const allToolsCancelled = toolsToProcess.every((tc) => tc.status === 'cancelled');
|
743
|
-
if (allToolsCancelled) {
|
744
|
-
if (geminiClient) {
|
745
|
-
// We need to manually add the function responses to the history
|
746
|
-
// so the model knows the tools were cancelled.
|
747
|
-
const responsesToAdd = toolsToProcess.flatMap((toolCall) => toolCall.response.responseParts);
|
748
|
-
const combinedParts = [];
|
749
|
-
for (const response of responsesToAdd) {
|
750
|
-
if (Array.isArray(response)) {
|
751
|
-
combinedParts.push(...response);
|
752
|
-
}
|
753
|
-
else if (typeof response === 'string') {
|
754
|
-
combinedParts.push({ text: response });
|
755
|
-
}
|
756
|
-
else {
|
757
|
-
combinedParts.push(response);
|
758
|
-
}
|
759
|
-
}
|
760
|
-
geminiClient.addHistory({
|
761
|
-
role: 'user',
|
762
|
-
parts: combinedParts,
|
763
|
-
});
|
764
|
-
}
|
765
|
-
const callIdsToMarkAsSubmitted = toolsToProcess.map((toolCall) => toolCall.request.callId);
|
766
|
-
markToolsAsSubmitted(callIdsToMarkAsSubmitted);
|
767
|
-
continue;
|
768
|
-
}
|
769
|
-
const responsesToSend = toolsToProcess
|
770
|
-
.map((toolCall, index) => {
|
771
|
-
// responseParts is now an array with [functionCall, functionResponse]
|
772
|
-
// We need to send BOTH to the model (they're not in history yet)
|
773
|
-
const parts = Array.isArray(toolCall.response.responseParts)
|
774
|
-
? toolCall.response.responseParts
|
775
|
-
: [toolCall.response.responseParts];
|
776
|
-
debugLogger.debug(() => `Tool response for ${toolCall.request.name} (${toolCall.request.callId}): ${JSON.stringify(parts, null, 2)}`);
|
777
|
-
// For the last tool response, append any queued system feedback
|
778
|
-
// This ensures the model receives the emoji filter warnings
|
779
|
-
if (index === toolsToProcess.length - 1 &&
|
780
|
-
queuedSystemFeedbackRef.current.length > 0) {
|
781
|
-
const feedbackMessages = queuedSystemFeedbackRef.current.join('\n');
|
782
|
-
queuedSystemFeedbackRef.current = []; // Clear the queue
|
783
|
-
// Since we need to return a single Part (functionResponse),
|
784
|
-
// we can't append text directly. Log a warning instead.
|
785
|
-
console.warn('[Warning] System feedback queued but cannot be appended to function response:', feedbackMessages);
|
786
|
-
}
|
787
|
-
// Return all parts (both tool call and response)
|
788
|
-
// They'll be added to history together after model responds
|
789
|
-
return parts;
|
790
|
-
})
|
791
|
-
.flat(); // Flatten since we now have arrays of parts
|
792
|
-
const callIdsToMarkAsSubmitted = toolsToProcess.map((toolCall) => toolCall.request.callId);
|
793
|
-
// Don't mark as submitted yet - wait until after responses are actually sent
|
794
|
-
// Don't continue if model was switched due to quota error
|
795
|
-
if (modelSwitchedFromQuotaError) {
|
796
|
-
return;
|
797
|
-
}
|
798
|
-
// Debug logging BEFORE merging
|
799
|
-
debugLogger.debug(() => `responsesToSend before merge: ${JSON.stringify(responsesToSend, null, 2)}, length: ${responsesToSend.length}`);
|
800
|
-
responsesToSend.forEach((resp, idx) => {
|
801
|
-
debugLogger.debug(() => `responsesToSend[${idx}] type: ${typeof resp}, isArray: ${Array.isArray(resp)}`);
|
802
|
-
});
|
803
|
-
// For Gemini, when there are multiple function responses, they should be sent
|
804
|
-
// as an array of parts in a single message
|
805
|
-
if (responsesToSend.length === 1) {
|
806
|
-
// Single response - send as-is
|
807
|
-
debugLogger.debug(() => 'Single function response, sending directly');
|
808
|
-
submitQuery(responsesToSend[0], {
|
809
|
-
isContinuation: true,
|
810
|
-
}, promptId);
|
811
|
-
// Mark as submitted after sending
|
812
|
-
markToolsAsSubmitted(callIdsToMarkAsSubmitted);
|
813
|
-
}
|
814
|
-
else {
|
815
|
-
// Multiple responses - send as array of parts
|
816
|
-
debugLogger.debug(() => `Multiple function responses (${responsesToSend.length}), sending as array: ${JSON.stringify(responsesToSend, null, 2)}`);
|
817
|
-
// Send all function responses as an array of parts
|
818
|
-
// Gemini expects multiple function responses as separate parts in the same message
|
819
|
-
submitQuery(responsesToSend, {
|
820
|
-
isContinuation: true,
|
821
|
-
}, promptId);
|
822
|
-
// Mark all as submitted after sending
|
823
|
-
markToolsAsSubmitted(callIdsToMarkAsSubmitted);
|
517
|
+
// If all the tools were cancelled, don't submit a response to Gemini.
|
518
|
+
const allToolsCancelled = geminiTools.every((tc) => tc.status === 'cancelled');
|
519
|
+
if (allToolsCancelled) {
|
520
|
+
if (geminiClient) {
|
521
|
+
// We need to manually add the function responses to the history
|
522
|
+
// so the model knows the tools were cancelled.
|
523
|
+
const combinedParts = geminiTools.flatMap((toolCall) => toolCall.response.responseParts);
|
524
|
+
geminiClient.addHistory({
|
525
|
+
role: 'user',
|
526
|
+
parts: combinedParts,
|
527
|
+
});
|
824
528
|
}
|
825
|
-
|
529
|
+
const callIdsToMarkAsSubmitted = geminiTools.map((toolCall) => toolCall.request.callId);
|
530
|
+
markToolsAsSubmitted(callIdsToMarkAsSubmitted);
|
531
|
+
return;
|
532
|
+
}
|
533
|
+
const responsesToSend = geminiTools.flatMap((toolCall) => toolCall.response.responseParts);
|
534
|
+
const callIdsToMarkAsSubmitted = geminiTools.map((toolCall) => toolCall.request.callId);
|
535
|
+
const prompt_ids = geminiTools.map((toolCall) => toolCall.request.prompt_id);
|
536
|
+
markToolsAsSubmitted(callIdsToMarkAsSubmitted);
|
537
|
+
// Don't continue if model was switched due to quota error
|
538
|
+
if (modelSwitchedFromQuotaError) {
|
539
|
+
return;
|
540
|
+
}
|
541
|
+
submitQuery(responsesToSend, {
|
542
|
+
isContinuation: true,
|
543
|
+
}, prompt_ids[0]);
|
826
544
|
}, [
|
827
545
|
isResponding,
|
828
546
|
submitQuery,
|
@@ -830,10 +548,7 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
830
548
|
geminiClient,
|
831
549
|
performMemoryRefresh,
|
832
550
|
modelSwitchedFromQuotaError,
|
833
|
-
toolCalls,
|
834
551
|
]);
|
835
|
-
// Assign the function to the ref so submitQuery can access it
|
836
|
-
handleCompletedToolsRef.current = handleCompletedTools;
|
837
552
|
const pendingHistoryItems = [
|
838
553
|
pendingHistoryItemRef.current,
|
839
554
|
pendingToolCallGroupDisplay,
|
@@ -847,9 +562,7 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
847
562
|
toolCall.request.name === 'write_file') &&
|
848
563
|
toolCall.status === 'awaiting_approval');
|
849
564
|
if (restorableToolCalls.length > 0) {
|
850
|
-
const checkpointDir =
|
851
|
-
? path.join(config.getProjectTempDir(), 'checkpoints')
|
852
|
-
: undefined;
|
565
|
+
const checkpointDir = storage.getProjectTempCheckpointsDir();
|
853
566
|
if (!checkpointDir) {
|
854
567
|
return;
|
855
568
|
}
|
@@ -869,12 +582,22 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
869
582
|
continue;
|
870
583
|
}
|
871
584
|
try {
|
872
|
-
|
585
|
+
if (!gitService) {
|
586
|
+
onDebugMessage(`Checkpointing is enabled but Git service is not available. Failed to create snapshot for ${filePath}. Ensure Git is installed and working properly.`);
|
587
|
+
continue;
|
588
|
+
}
|
589
|
+
let commitHash;
|
590
|
+
try {
|
591
|
+
commitHash = await gitService.createFileSnapshot(`Snapshot for ${toolCall.request.name}`);
|
592
|
+
}
|
593
|
+
catch (error) {
|
594
|
+
onDebugMessage(`Failed to create new snapshot: ${getErrorMessage(error)}. Attempting to use current commit.`);
|
595
|
+
}
|
873
596
|
if (!commitHash) {
|
874
|
-
commitHash = await gitService
|
597
|
+
commitHash = await gitService.getCurrentCommitHash();
|
875
598
|
}
|
876
599
|
if (!commitHash) {
|
877
|
-
onDebugMessage(`Failed to create snapshot for ${filePath}.
|
600
|
+
onDebugMessage(`Failed to create snapshot for ${filePath}. Checkpointing may not be working properly. Ensure Git is installed and the project directory is accessible.`);
|
878
601
|
continue;
|
879
602
|
}
|
880
603
|
const timestamp = new Date()
|
@@ -887,7 +610,7 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
887
610
|
const clientHistory = await geminiClient?.getHistory();
|
888
611
|
const toolCallWithSnapshotFilePath = path.join(checkpointDir, toolCallWithSnapshotFileName);
|
889
612
|
await fs.writeFile(toolCallWithSnapshotFilePath, JSON.stringify({
|
890
|
-
history
|
613
|
+
history,
|
891
614
|
clientHistory,
|
892
615
|
toolCall: {
|
893
616
|
name: toolCall.request.name,
|
@@ -898,15 +621,21 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
|
|
898
621
|
}, null, 2));
|
899
622
|
}
|
900
623
|
catch (error) {
|
901
|
-
onDebugMessage(`Failed to
|
624
|
+
onDebugMessage(`Failed to create checkpoint for ${filePath}: ${getErrorMessage(error)}. This may indicate a problem with Git or file system permissions.`);
|
902
625
|
}
|
903
626
|
}
|
904
627
|
}
|
905
628
|
};
|
906
629
|
saveRestorableToolCalls();
|
907
|
-
|
908
|
-
|
909
|
-
|
630
|
+
}, [
|
631
|
+
toolCalls,
|
632
|
+
config,
|
633
|
+
onDebugMessage,
|
634
|
+
gitService,
|
635
|
+
history,
|
636
|
+
geminiClient,
|
637
|
+
storage,
|
638
|
+
]);
|
910
639
|
return {
|
911
640
|
streamingState,
|
912
641
|
submitQuery,
|