@hibanacloud/cli 0.3.15
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/.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 +115 -0
- package/dist/src/commands/extensions/disable.d.ts +13 -0
- package/dist/src/commands/extensions/disable.js +56 -0
- package/dist/src/commands/extensions/disable.js.map +1 -0
- package/dist/src/commands/extensions/enable.d.ts +13 -0
- package/dist/src/commands/extensions/enable.js +59 -0
- package/dist/src/commands/extensions/enable.js.map +1 -0
- package/dist/src/commands/extensions/examples/context/QWEN.md +8 -0
- package/dist/src/commands/extensions/examples/context/qwen-extension.json +4 -0
- package/dist/src/commands/extensions/examples/custom-commands/commands/fs/grep-code.toml +6 -0
- package/dist/src/commands/extensions/examples/custom-commands/qwen-extension.json +4 -0
- package/dist/src/commands/extensions/examples/exclude-tools/qwen-extension.json +5 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.ts +60 -0
- package/dist/src/commands/extensions/examples/mcp-server/package.json +18 -0
- package/dist/src/commands/extensions/examples/mcp-server/qwen-extension.json +11 -0
- package/dist/src/commands/extensions/examples/mcp-server/tsconfig.json +13 -0
- package/dist/src/commands/extensions/install.d.ts +14 -0
- package/dist/src/commands/extensions/install.js +78 -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 +102 -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 +90 -0
- package/dist/src/commands/extensions/new.js.map +1 -0
- package/dist/src/commands/extensions/new.test.d.ts +6 -0
- package/dist/src/commands/extensions/new.test.js +59 -0
- package/dist/src/commands/extensions/new.test.js.map +1 -0
- package/dist/src/commands/extensions/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 +18 -0
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -0
- package/dist/src/commands/extensions/update.d.ts +13 -0
- package/dist/src/commands/extensions/update.js +104 -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 +171 -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 +111 -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 +28 -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 +37 -0
- package/dist/src/config/auth.test.js.map +1 -0
- package/dist/src/config/config.d.ts +58 -0
- package/dist/src/config/config.js +678 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/extension.d.ts +83 -0
- package/dist/src/config/extension.js +534 -0
- package/dist/src/config/extension.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.d.ts +47 -0
- package/dist/src/config/extensions/extensionEnablement.js +189 -0
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.test.d.ts +6 -0
- package/dist/src/config/extensions/extensionEnablement.test.js +333 -0
- package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -0
- package/dist/src/config/extensions/github.d.ts +30 -0
- package/dist/src/config/extensions/github.js +322 -0
- package/dist/src/config/extensions/github.js.map +1 -0
- package/dist/src/config/extensions/github.test.d.ts +6 -0
- package/dist/src/config/extensions/github.test.js +334 -0
- package/dist/src/config/extensions/github.test.js.map +1 -0
- package/dist/src/config/extensions/update.d.ts +19 -0
- package/dist/src/config/extensions/update.js +113 -0
- package/dist/src/config/extensions/update.js.map +1 -0
- package/dist/src/config/extensions/update.test.d.ts +6 -0
- package/dist/src/config/extensions/update.test.js +342 -0
- package/dist/src/config/extensions/update.test.js.map +1 -0
- package/dist/src/config/extensions/variableSchema.d.ts +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/migration.d.ts +10 -0
- package/dist/src/config/migration.js +45 -0
- package/dist/src/config/migration.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 +72 -0
- package/dist/src/config/settings.js +631 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/config/settingsSchema.d.ts +1174 -0
- package/dist/src/config/settingsSchema.js +1118 -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 +201 -0
- package/dist/src/config/settingsSchema.test.js.map +1 -0
- package/dist/src/config/trustedFolders.d.ts +56 -0
- package/dist/src/config/trustedFolders.js +168 -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 +340 -0
- package/dist/src/config/trustedFolders.test.js.map +1 -0
- package/dist/src/config/webSearch.d.ts +35 -0
- package/dist/src/config/webSearch.js +87 -0
- package/dist/src/config/webSearch.js.map +1 -0
- package/dist/src/core/auth.d.ts +13 -0
- package/dist/src/core/auth.js +34 -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 +48 -0
- package/dist/src/core/initializer.js.map +1 -0
- package/dist/src/core/theme.d.ts +12 -0
- package/dist/src/core/theme.js +23 -0
- package/dist/src/core/theme.js.map +1 -0
- package/dist/src/gemini.d.ts +14 -0
- package/dist/src/gemini.js +327 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/gemini.test.d.ts +6 -0
- package/dist/src/gemini.test.js +507 -0
- package/dist/src/gemini.test.js.map +1 -0
- package/dist/src/generated/git-commit.d.ts +7 -0
- package/dist/src/generated/git-commit.js +10 -0
- package/dist/src/generated/git-commit.js.map +1 -0
- package/dist/src/i18n/index.d.ts +18 -0
- package/dist/src/i18n/index.js +184 -0
- package/dist/src/i18n/index.js.map +1 -0
- package/dist/src/i18n/locales/en.js +1129 -0
- package/dist/src/i18n/locales/zh.js +1052 -0
- package/dist/src/nonInteractive/control/ControlContext.d.ts +63 -0
- package/dist/src/nonInteractive/control/ControlContext.js +31 -0
- package/dist/src/nonInteractive/control/ControlContext.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.d.ts +86 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js +238 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.d.ts +6 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js +549 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlService.d.ts +78 -0
- package/dist/src/nonInteractive/control/ControlService.js +154 -0
- package/dist/src/nonInteractive/control/ControlService.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/baseController.d.ts +50 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js +102 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/hookController.d.ts +25 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js +42 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.d.ts +42 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.js +205 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.d.ts +78 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js +358 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/systemController.d.ts +56 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js +166 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js.map +1 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.d.ts +120 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.js +7 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.js.map +1 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.d.ts +446 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js +891 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js +1197 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.d.ts +29 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.js +56 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js +624 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.d.ts +16 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.js +54 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js +178 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.d.ts +69 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js +185 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js +808 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/session.d.ts +23 -0
- package/dist/src/nonInteractive/session.js +549 -0
- package/dist/src/nonInteractive/session.js.map +1 -0
- package/dist/src/nonInteractive/session.test.d.ts +6 -0
- package/dist/src/nonInteractive/session.test.js +407 -0
- package/dist/src/nonInteractive/session.test.js.map +1 -0
- package/dist/src/nonInteractive/types.d.ts +344 -0
- package/dist/src/nonInteractive/types.js +78 -0
- package/dist/src/nonInteractive/types.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +28 -0
- package/dist/src/nonInteractiveCli.js +268 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/nonInteractiveCliCommands.d.ts +35 -0
- package/dist/src/nonInteractiveCliCommands.js +144 -0
- package/dist/src/nonInteractiveCliCommands.js.map +1 -0
- package/dist/src/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/patches/punycode-shim.d.ts +6 -0
- package/dist/src/patches/punycode-shim.js +20 -0
- package/dist/src/patches/punycode-shim.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.d.ts +24 -0
- package/dist/src/services/BuiltinCommandLoader.js +99 -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 +167 -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 +230 -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 +254 -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/createExtension.d.ts +15 -0
- package/dist/src/test-utils/createExtension.js +25 -0
- package/dist/src/test-utils/createExtension.js.map +1 -0
- package/dist/src/test-utils/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 +93 -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 +12 -0
- package/dist/src/test-utils/render.js +14 -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 +37 -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 +1074 -0
- package/dist/src/ui/AppContainer.js.map +1 -0
- package/dist/src/ui/AppContainer.test.d.ts +6 -0
- package/dist/src/ui/AppContainer.test.js +831 -0
- package/dist/src/ui/AppContainer.test.js.map +1 -0
- package/dist/src/ui/IdeIntegrationNudge.d.ts +16 -0
- package/dist/src/ui/IdeIntegrationNudge.js +50 -0
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.d.ts +7 -0
- package/dist/src/ui/auth/AuthDialog.js +63 -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 +391 -0
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -0
- package/dist/src/ui/auth/AuthInProgress.d.ts +11 -0
- package/dist/src/ui/auth/AuthInProgress.js +24 -0
- package/dist/src/ui/auth/AuthInProgress.js.map +1 -0
- package/dist/src/ui/auth/OAuthFlow.d.ts +14 -0
- package/dist/src/ui/auth/OAuthFlow.js +48 -0
- package/dist/src/ui/auth/OAuthFlow.js.map +1 -0
- package/dist/src/ui/auth/useAuth.d.ts +27 -0
- package/dist/src/ui/auth/useAuth.js +244 -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 +25 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -0
- package/dist/src/ui/commands/agentsCommand.d.ts +7 -0
- package/dist/src/ui/commands/agentsCommand.js +39 -0
- package/dist/src/ui/commands/agentsCommand.js.map +1 -0
- package/dist/src/ui/commands/approvalModeCommand.d.ts +7 -0
- package/dist/src/ui/commands/approvalModeCommand.js +19 -0
- package/dist/src/ui/commands/approvalModeCommand.js.map +1 -0
- package/dist/src/ui/commands/approvalModeCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/approvalModeCommand.test.js +49 -0
- package/dist/src/ui/commands/approvalModeCommand.test.js.map +1 -0
- package/dist/src/ui/commands/authCommand.d.ts +7 -0
- package/dist/src/ui/commands/authCommand.js +19 -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 +51 -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 +351 -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 +30 -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 +71 -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 +62 -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 +153 -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 +39 -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 +19 -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 +115 -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 +24 -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 +241 -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 +118 -0
- package/dist/src/ui/commands/initCommand.js.map +1 -0
- package/dist/src/ui/commands/languageCommand.d.ts +7 -0
- package/dist/src/ui/commands/languageCommand.js +386 -0
- package/dist/src/ui/commands/languageCommand.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.d.ts +7 -0
- package/dist/src/ui/commands/mcpCommand.js +269 -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 +254 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -0
- package/dist/src/ui/commands/modelCommand.d.ts +7 -0
- package/dist/src/ui/commands/modelCommand.js +48 -0
- package/dist/src/ui/commands/modelCommand.js.map +1 -0
- package/dist/src/ui/commands/modelCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/modelCommand.test.js +137 -0
- package/dist/src/ui/commands/modelCommand.test.js.map +1 -0
- package/dist/src/ui/commands/openaiProfileCommand.d.ts +7 -0
- package/dist/src/ui/commands/openaiProfileCommand.js +135 -0
- package/dist/src/ui/commands/openaiProfileCommand.js.map +1 -0
- package/dist/src/ui/commands/permissionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/permissionsCommand.js +19 -0
- package/dist/src/ui/commands/permissionsCommand.js.map +1 -0
- package/dist/src/ui/commands/permissionsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/permissionsCommand.test.js +30 -0
- package/dist/src/ui/commands/permissionsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/quitCommand.d.ts +8 -0
- package/dist/src/ui/commands/quitCommand.js +64 -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 +19 -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 +157 -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/spCommand.d.ts +7 -0
- package/dist/src/ui/commands/spCommand.js +352 -0
- package/dist/src/ui/commands/spCommand.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.d.ts +7 -0
- package/dist/src/ui/commands/statsCommand.js +61 -0
- package/dist/src/ui/commands/statsCommand.js.map +1 -0
- package/dist/src/ui/commands/summaryCommand.d.ts +7 -0
- package/dist/src/ui/commands/summaryCommand.js +156 -0
- package/dist/src/ui/commands/summaryCommand.js.map +1 -0
- package/dist/src/ui/commands/systemPromptCommand.d.ts +7 -0
- package/dist/src/ui/commands/systemPromptCommand.js +322 -0
- package/dist/src/ui/commands/systemPromptCommand.js.map +1 -0
- package/dist/src/ui/commands/terminalSetupCommand.d.ts +13 -0
- package/dist/src/ui/commands/terminalSetupCommand.js +47 -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 +19 -0
- package/dist/src/ui/commands/themeCommand.js.map +1 -0
- package/dist/src/ui/commands/toolsCommand.d.ts +7 -0
- package/dist/src/ui/commands/toolsCommand.js +45 -0
- package/dist/src/ui/commands/toolsCommand.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +160 -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 +26 -0
- package/dist/src/ui/commands/vimCommand.js.map +1 -0
- package/dist/src/ui/components/AboutBox.d.ts +10 -0
- package/dist/src/ui/components/AboutBox.js +10 -0
- package/dist/src/ui/components/AboutBox.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.d.ts +13 -0
- package/dist/src/ui/components/AnsiOutput.js +12 -0
- package/dist/src/ui/components/AnsiOutput.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.test.d.ts +6 -0
- package/dist/src/ui/components/AnsiOutput.test.js +97 -0
- package/dist/src/ui/components/AnsiOutput.test.js.map +1 -0
- package/dist/src/ui/components/AppHeader.d.ts +10 -0
- package/dist/src/ui/components/AppHeader.js +19 -0
- package/dist/src/ui/components/AppHeader.js.map +1 -0
- package/dist/src/ui/components/ApprovalModeDialog.d.ts +21 -0
- package/dist/src/ui/components/ApprovalModeDialog.js +68 -0
- package/dist/src/ui/components/ApprovalModeDialog.js.map +1 -0
- package/dist/src/ui/components/AsciiArt.d.ts +8 -0
- package/dist/src/ui/components/AsciiArt.js +30 -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 +32 -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 +55 -0
- package/dist/src/ui/components/Composer.js.map +1 -0
- package/dist/src/ui/components/Composer.test.d.ts +6 -0
- package/dist/src/ui/components/Composer.test.js +337 -0
- package/dist/src/ui/components/Composer.test.js.map +1 -0
- package/dist/src/ui/components/ConfigInitDisplay.d.ts +6 -0
- package/dist/src/ui/components/ConfigInitDisplay.js +42 -0
- package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.d.ts +13 -0
- package/dist/src/ui/components/ConsentPrompt.js +19 -0
- package/dist/src/ui/components/ConsentPrompt.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/ConsentPrompt.test.js +67 -0
- package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.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 +90 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +10 -0
- package/dist/src/ui/components/ContextUsageDisplay.js +16 -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 +12 -0
- package/dist/src/ui/components/DialogManager.js +158 -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 +85 -0
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
- package/dist/src/ui/components/ExitWarning.d.ts +7 -0
- package/dist/src/ui/components/ExitWarning.js +9 -0
- package/dist/src/ui/components/ExitWarning.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.d.ts +17 -0
- package/dist/src/ui/components/FolderTrustDialog.js +58 -0
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/FolderTrustDialog.test.js +88 -0
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/Footer.d.ts +7 -0
- package/dist/src/ui/components/Footer.js +48 -0
- package/dist/src/ui/components/Footer.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +21 -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 +23 -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 +21 -0
- package/dist/src/ui/components/HistoryItemDisplay.js +31 -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 +183 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +11 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js +32 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +57 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +37 -0
- package/dist/src/ui/components/InputPrompt.js +583 -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 +30 -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 +194 -0
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +13 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js +37 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +6 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js +28 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -0
- package/dist/src/ui/components/MainContent.d.ts +6 -0
- package/dist/src/ui/components/MainContent.js +28 -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/ModelDialog.d.ts +11 -0
- package/dist/src/ui/components/ModelDialog.js +99 -0
- package/dist/src/ui/components/ModelDialog.js.map +1 -0
- package/dist/src/ui/components/ModelDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ModelDialog.test.js +158 -0
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +34 -0
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelSwitchDialog.d.ts +15 -0
- package/dist/src/ui/components/ModelSwitchDialog.js +40 -0
- package/dist/src/ui/components/ModelSwitchDialog.js.map +1 -0
- package/dist/src/ui/components/ModelSwitchDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ModelSwitchDialog.test.js +128 -0
- package/dist/src/ui/components/ModelSwitchDialog.test.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/OpenAIKeyPrompt.d.ts +25 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.js +90 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.js.map +1 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js +51 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +13 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js +48 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +154 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/PlanSummaryDisplay.d.ts +14 -0
- package/dist/src/ui/components/PlanSummaryDisplay.js +9 -0
- package/dist/src/ui/components/PlanSummaryDisplay.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 +24 -0
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -0
- package/dist/src/ui/components/ProQuotaDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js +58 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.d.ts +9 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js +20 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js +56 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -0
- package/dist/src/ui/components/QuitConfirmationDialog.d.ts +17 -0
- package/dist/src/ui/components/QuitConfirmationDialog.js +49 -0
- package/dist/src/ui/components/QuitConfirmationDialog.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/QwenOAuthProgress.d.ts +16 -0
- package/dist/src/ui/components/QwenOAuthProgress.js +111 -0
- package/dist/src/ui/components/QwenOAuthProgress.js.map +1 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.d.ts +6 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.js +364 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js +5 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/SettingsDialog.d.ts +18 -0
- package/dist/src/ui/components/SettingsDialog.js +647 -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 +1037 -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 +50 -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 +44 -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 +126 -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 +10 -0
- package/dist/src/ui/components/Tips.js.map +1 -0
- package/dist/src/ui/components/TodoDisplay.d.ts +16 -0
- package/dist/src/ui/components/TodoDisplay.js +27 -0
- package/dist/src/ui/components/TodoDisplay.js.map +1 -0
- package/dist/src/ui/components/TodoDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/TodoDisplay.test.js +77 -0
- package/dist/src/ui/components/TodoDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ToolStatsDisplay.js +42 -0
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
- package/dist/src/ui/components/UpdateNotification.js +10 -0
- package/dist/src/ui/components/UpdateNotification.js.map +1 -0
- package/dist/src/ui/components/WelcomeBackDialog.d.ts +13 -0
- package/dist/src/ui/components/WelcomeBackDialog.js +43 -0
- package/dist/src/ui/components/WelcomeBackDialog.js.map +1 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.d.ts +11 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +45 -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 +50 -0
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js +160 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/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 +14 -0
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/ui/components/messages/SummaryMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/SummaryMessage.js +35 -0
- package/dist/src/ui/components/messages/SummaryMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +16 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +245 -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 +165 -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 +58 -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 +180 -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 +182 -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 +13 -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/BaseSelectionList.d.ts +38 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js +72 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +6 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +376 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +35 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +13 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +6 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +79 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.d.ts +18 -0
- package/dist/src/ui/components/shared/EnumSelector.js +44 -0
- package/dist/src/ui/components/shared/EnumSelector.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.test.d.ts +6 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js +70 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.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 +45 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js +21 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +6 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +134 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -0
- package/dist/src/ui/components/shared/ScopeSelector.d.ts +19 -0
- package/dist/src/ui/components/shared/ScopeSelector.js +16 -0
- package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -0
- package/dist/src/ui/components/shared/TextInput.d.ts +16 -0
- package/dist/src/ui/components/shared/TextInput.js +127 -0
- package/dist/src/ui/components/shared/TextInput.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/subagents/constants.d.ts +23 -0
- package/dist/src/ui/components/subagents/constants.js +67 -0
- package/dist/src/ui/components/subagents/constants.js.map +1 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.d.ts +15 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +186 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +1 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.d.ts +15 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.js +43 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.js +174 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.js.map +1 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.js +107 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +1 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +39 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.js +39 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.d.ts +26 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.js +28 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.js.map +1 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.d.ts +16 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.js +145 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/index.d.ts +8 -0
- package/dist/src/ui/components/subagents/index.js +12 -0
- package/dist/src/ui/components/subagents/index.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.d.ts +13 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +71 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.d.ts +13 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +36 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.d.ts +15 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js +73 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.d.ts +12 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +231 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.d.ts +11 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js +20 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.d.ts +15 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +212 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +1 -0
- package/dist/src/ui/components/subagents/reducers.d.ts +14 -0
- package/dist/src/ui/components/subagents/reducers.js +162 -0
- package/dist/src/ui/components/subagents/reducers.js.map +1 -0
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.d.ts +20 -0
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +193 -0
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js.map +1 -0
- package/dist/src/ui/components/subagents/types.d.ts +137 -0
- package/dist/src/ui/components/subagents/types.js +15 -0
- package/dist/src/ui/components/subagents/types.js.map +1 -0
- package/dist/src/ui/components/subagents/utils.d.ts +15 -0
- package/dist/src/ui/components/subagents/utils.js +79 -0
- package/dist/src/ui/components/subagents/utils.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.js +47 -0
- package/dist/src/ui/components/views/ExtensionsList.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js +97 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.d.ts +27 -0
- package/dist/src/ui/components/views/McpStatus.js +90 -0
- package/dist/src/ui/components/views/McpStatus.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.test.d.ts +6 -0
- package/dist/src/ui/components/views/McpStatus.test.js +117 -0
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.d.ts +14 -0
- package/dist/src/ui/components/views/ToolsList.js +8 -0
- package/dist/src/ui/components/views/ToolsList.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ToolsList.test.js +45 -0
- package/dist/src/ui/components/views/ToolsList.test.js.map +1 -0
- package/dist/src/ui/constants.d.ts +18 -0
- package/dist/src/ui/constants.js +23 -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/KeypressContext.d.ts +35 -0
- package/dist/src/ui/contexts/KeypressContext.js +636 -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 +1180 -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/ShellFocusContext.d.ts +7 -0
- package/dist/src/ui/contexts/ShellFocusContext.js +9 -0
- package/dist/src/ui/contexts/ShellFocusContext.js.map +1 -0
- package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
- package/dist/src/ui/contexts/StreamingContext.js +15 -0
- package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
- package/dist/src/ui/contexts/UIActionsContext.d.ts +46 -0
- package/dist/src/ui/contexts/UIActionsContext.js +22 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -0
- package/dist/src/ui/contexts/UIStateContext.d.ts +117 -0
- package/dist/src/ui/contexts/UIStateContext.js +17 -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 +48 -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 +836 -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 +284 -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 +508 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +52 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +503 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.d.ts +11 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.js +21 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.js.map +1 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.d.ts +14 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.js +33 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useAtCompletion.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/useAttentionNotifications.d.ts +14 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js +41 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js.map +1 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js +113 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +13 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +40 -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 +306 -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 +29 -0
- package/dist/src/ui/hooks/useCommandCompletion.js +164 -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/useDialogClose.d.ts +35 -0
- package/dist/src/ui/hooks/useDialogClose.js +53 -0
- package/dist/src/ui/hooks/useDialogClose.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/useExtensionUpdates.d.ts +21 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js +116 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +6 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +243 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -0
- package/dist/src/ui/hooks/useFocus.d.ts +10 -0
- package/dist/src/ui/hooks/useFocus.js +51 -0
- package/dist/src/ui/hooks/useFocus.js.map +1 -0
- package/dist/src/ui/hooks/useFolderTrust.d.ts +13 -0
- package/dist/src/ui/hooks/useFolderTrust.js +60 -0
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +39 -0
- package/dist/src/ui/hooks/useGeminiStream.js +781 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.js +61 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.test.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.test.js +189 -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 +16 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js +65 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +6 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +183 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -0
- package/dist/src/ui/hooks/useInitializationAuthError.d.ts +22 -0
- package/dist/src/ui/hooks/useInitializationAuthError.js +40 -0
- package/dist/src/ui/hooks/useInitializationAuthError.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.d.ts +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/useLaunchEditor.d.ts +10 -0
- package/dist/src/ui/hooks/useLaunchEditor.js +70 -0
- package/dist/src/ui/hooks/useLaunchEditor.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/useModelCommand.d.ts +12 -0
- package/dist/src/ui/hooks/useModelCommand.js +21 -0
- package/dist/src/ui/hooks/useModelCommand.js.map +1 -0
- package/dist/src/ui/hooks/useModelCommand.test.d.ts +6 -0
- package/dist/src/ui/hooks/useModelCommand.test.js +35 -0
- package/dist/src/ui/hooks/useModelCommand.test.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +17 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js +78 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +6 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +182 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +192 -0
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
- package/dist/src/ui/hooks/useQuitConfirmation.d.ts +14 -0
- package/dist/src/ui/hooks/useQuitConfirmation.js +36 -0
- package/dist/src/ui/hooks/useQuitConfirmation.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 +269 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -0
- package/dist/src/ui/hooks/useQwenAuth.d.ts +15 -0
- package/dist/src/ui/hooks/useQwenAuth.js +74 -0
- package/dist/src/ui/hooks/useQwenAuth.js.map +1 -0
- package/dist/src/ui/hooks/useQwenAuth.test.d.ts +6 -0
- package/dist/src/ui/hooks/useQwenAuth.test.js +266 -0
- package/dist/src/ui/hooks/useQwenAuth.test.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +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/useSelectionList.d.ts +34 -0
- package/dist/src/ui/hooks/useSelectionList.js +245 -0
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSelectionList.test.js +701 -0
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -0
- package/dist/src/ui/hooks/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 +349 -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 +597 -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/useSubagentCreateDialog.d.ts +10 -0
- package/dist/src/ui/hooks/useSubagentCreateDialog.js +21 -0
- package/dist/src/ui/hooks/useSubagentCreateDialog.js.map +1 -0
- package/dist/src/ui/hooks/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 +73 -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 +623 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.d.ts +47 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.js +262 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.js.map +1 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.d.ts +6 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.js +515 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.js.map +1 -0
- package/dist/src/ui/hooks/useWelcomeBack.d.ts +23 -0
- package/dist/src/ui/hooks/useWelcomeBack.js +79 -0
- package/dist/src/ui/hooks/useWelcomeBack.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/layouts/DefaultAppLayout.d.ts +9 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js +13 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +7 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js +14 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +1 -0
- package/dist/src/ui/models/availableModels.d.ts +49 -0
- package/dist/src/ui/models/availableModels.js +130 -0
- package/dist/src/ui/models/availableModels.js.map +1 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +12 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js +29 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -0
- package/dist/src/ui/semantic-colors.d.ts +7 -0
- package/dist/src/ui/semantic-colors.js +24 -0
- package/dist/src/ui/semantic-colors.js.map +1 -0
- package/dist/src/ui/state/extensions.d.ts +42 -0
- package/dist/src/ui/state/extensions.js +62 -0
- package/dist/src/ui/state/extensions.js.map +1 -0
- package/dist/src/ui/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/hibana-dark.d.ts +7 -0
- package/dist/src/ui/themes/hibana-dark.js +105 -0
- package/dist/src/ui/themes/hibana-dark.js.map +1 -0
- package/dist/src/ui/themes/hibana-light.d.ts +7 -0
- package/dist/src/ui/themes/hibana-light.js +131 -0
- package/dist/src/ui/themes/hibana-light.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/qwen-dark.d.ts +7 -0
- package/dist/src/ui/themes/qwen-dark.js +105 -0
- package/dist/src/ui/themes/qwen-dark.js.map +1 -0
- package/dist/src/ui/themes/qwen-light.d.ts +7 -0
- package/dist/src/ui/themes/qwen-light.js +131 -0
- package/dist/src/ui/themes/qwen-light.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 +270 -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 +311 -0
- package/dist/src/ui/types.js +60 -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 +207 -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 +169 -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 +40 -0
- package/dist/src/ui/utils/commandUtils.js +146 -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 +352 -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 +18 -0
- package/dist/src/ui/utils/displayUtils.js +27 -0
- package/dist/src/ui/utils/displayUtils.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/displayUtils.test.js +61 -0
- package/dist/src/ui/utils/displayUtils.test.js.map +1 -0
- package/dist/src/ui/utils/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 +308 -0
- package/dist/src/ui/utils/terminalSetup.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +42 -0
- package/dist/src/ui/utils/textUtils.js +185 -0
- package/dist/src/ui/utils/textUtils.js.map +1 -0
- package/dist/src/ui/utils/textUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/textUtils.test.js +132 -0
- package/dist/src/ui/utils/textUtils.test.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/attentionNotification.d.ts +20 -0
- package/dist/src/utils/attentionNotification.js +34 -0
- package/dist/src/utils/attentionNotification.js.map +1 -0
- package/dist/src/utils/attentionNotification.test.d.ts +6 -0
- package/dist/src/utils/attentionNotification.test.js +46 -0
- package/dist/src/utils/attentionNotification.test.js.map +1 -0
- package/dist/src/utils/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 +55 -0
- package/dist/src/utils/commentJson.js.map +1 -0
- package/dist/src/utils/commentJson.test.d.ts +6 -0
- package/dist/src/utils/commentJson.test.js +146 -0
- package/dist/src/utils/commentJson.test.js.map +1 -0
- package/dist/src/utils/deepMerge.d.ts +9 -0
- package/dist/src/utils/deepMerge.js +58 -0
- package/dist/src/utils/deepMerge.js.map +1 -0
- package/dist/src/utils/deepMerge.test.d.ts +6 -0
- package/dist/src/utils/deepMerge.test.js +143 -0
- package/dist/src/utils/deepMerge.test.js.map +1 -0
- package/dist/src/utils/dialogScopeUtils.d.ts +28 -0
- package/dist/src/utils/dialogScopeUtils.js +51 -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 +35 -0
- package/dist/src/utils/errors.js +106 -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 +340 -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 +153 -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/math.d.ts +13 -0
- package/dist/src/utils/math.js +14 -0
- package/dist/src/utils/math.js.map +1 -0
- package/dist/src/utils/nonInteractiveHelpers.d.ts +88 -0
- package/dist/src/utils/nonInteractiveHelpers.js +470 -0
- package/dist/src/utils/nonInteractiveHelpers.js.map +1 -0
- package/dist/src/utils/nonInteractiveHelpers.test.d.ts +6 -0
- package/dist/src/utils/nonInteractiveHelpers.test.js +945 -0
- package/dist/src/utils/nonInteractiveHelpers.test.js.map +1 -0
- package/dist/src/utils/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/relaunch.d.ts +7 -0
- package/dist/src/utils/relaunch.js +57 -0
- package/dist/src/utils/relaunch.js.map +1 -0
- package/dist/src/utils/relaunch.test.d.ts +6 -0
- package/dist/src/utils/relaunch.test.js +273 -0
- package/dist/src/utils/relaunch.test.js.map +1 -0
- package/dist/src/utils/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 +763 -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 +346 -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/systemInfo.d.ts +66 -0
- package/dist/src/utils/systemInfo.js +125 -0
- package/dist/src/utils/systemInfo.js.map +1 -0
- package/dist/src/utils/systemInfo.test.d.ts +6 -0
- package/dist/src/utils/systemInfo.test.js +259 -0
- package/dist/src/utils/systemInfo.test.js.map +1 -0
- package/dist/src/utils/systemInfoFields.d.ts +22 -0
- package/dist/src/utils/systemInfoFields.js +96 -0
- package/dist/src/utils/systemInfoFields.js.map +1 -0
- package/dist/src/utils/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 +12 -0
- package/dist/src/utils/userStartupWarnings.js +74 -0
- package/dist/src/utils/userStartupWarnings.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.test.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.test.js +88 -0
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -0
- package/dist/src/utils/version.d.ts +6 -0
- package/dist/src/utils/version.js +11 -0
- package/dist/src/utils/version.js.map +1 -0
- package/dist/src/utils/windowTitle.d.ts +12 -0
- package/dist/src/utils/windowTitle.js +19 -0
- package/dist/src/utils/windowTitle.js.map +1 -0
- package/dist/src/utils/windowTitle.test.d.ts +6 -0
- package/dist/src/utils/windowTitle.test.js +49 -0
- package/dist/src/utils/windowTitle.test.js.map +1 -0
- package/dist/src/validateNonInterActiveAuth.d.ts +9 -0
- package/dist/src/validateNonInterActiveAuth.js +73 -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 +225 -0
- package/dist/src/zed-integration/acp.js.map +1 -0
- package/dist/src/zed-integration/fileSystemService.d.ts +20 -0
- package/dist/src/zed-integration/fileSystemService.js +46 -0
- package/dist/src/zed-integration/fileSystemService.js.map +1 -0
- package/dist/src/zed-integration/schema.d.ts +12024 -0
- package/dist/src/zed-integration/schema.js +324 -0
- package/dist/src/zed-integration/schema.js.map +1 -0
- package/dist/src/zed-integration/zedIntegration.d.ts +17 -0
- package/dist/src/zed-integration/zedIntegration.js +1135 -0
- package/dist/src/zed-integration/zedIntegration.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,781 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
7
|
+
import { GeminiEventType as ServerGeminiEventType, getErrorMessage, isNodeError, MessageSenderType, logUserPrompt, GitService, UnauthorizedError, UserPromptEvent, DEFAULT_GEMINI_FLASH_MODEL, logConversationFinishedEvent, ConversationFinishedEvent, ApprovalMode, parseAndFormatApiError, promptIdContext, ToolConfirmationOutcome, logApiCancel, ApiCancelEvent, } from '@hibanacloud/core';
|
|
8
|
+
import { FinishReason } from '@google/genai';
|
|
9
|
+
import { StreamingState, MessageType, ToolCallStatus } from '../types.js';
|
|
10
|
+
import { isAtCommand, isSlashCommand } from '../utils/commandUtils.js';
|
|
11
|
+
import { useShellCommandProcessor } from './shellCommandProcessor.js';
|
|
12
|
+
import { useVisionAutoSwitch } from './useVisionAutoSwitch.js';
|
|
13
|
+
import { handleAtCommand } from './atCommandProcessor.js';
|
|
14
|
+
import { findLastSafeSplitPoint } from '../utils/markdownUtilities.js';
|
|
15
|
+
import { useStateAndRef } from './useStateAndRef.js';
|
|
16
|
+
import { useLogger } from './useLogger.js';
|
|
17
|
+
import { useReactToolScheduler, mapToDisplay as mapTrackedToolCallsToDisplay, } from './useReactToolScheduler.js';
|
|
18
|
+
import { promises as fs } from 'node:fs';
|
|
19
|
+
import path from 'node:path';
|
|
20
|
+
import { useSessionStats } from '../contexts/SessionContext.js';
|
|
21
|
+
import { useKeypress } from './useKeypress.js';
|
|
22
|
+
var StreamProcessingStatus;
|
|
23
|
+
(function (StreamProcessingStatus) {
|
|
24
|
+
StreamProcessingStatus[StreamProcessingStatus["Completed"] = 0] = "Completed";
|
|
25
|
+
StreamProcessingStatus[StreamProcessingStatus["UserCancelled"] = 1] = "UserCancelled";
|
|
26
|
+
StreamProcessingStatus[StreamProcessingStatus["Error"] = 2] = "Error";
|
|
27
|
+
})(StreamProcessingStatus || (StreamProcessingStatus = {}));
|
|
28
|
+
const EDIT_TOOL_NAMES = new Set(['replace', 'write_file']);
|
|
29
|
+
function showCitations(settings) {
|
|
30
|
+
const enabled = settings?.merged?.ui?.showCitations;
|
|
31
|
+
if (enabled !== undefined) {
|
|
32
|
+
return enabled;
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Manages the Gemini stream, including user input, command processing,
|
|
38
|
+
* API interaction, and tool call lifecycle.
|
|
39
|
+
*/
|
|
40
|
+
export const useGeminiStream = (geminiClient, history, addItem, config, settings, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit, visionModelPreviewEnabled, setShellInputFocused, terminalWidth, terminalHeight, onVisionSwitchRequired, isShellFocused) => {
|
|
41
|
+
const [initError, setInitError] = useState(null);
|
|
42
|
+
const abortControllerRef = useRef(null);
|
|
43
|
+
const turnCancelledRef = useRef(false);
|
|
44
|
+
const isSubmittingQueryRef = useRef(false);
|
|
45
|
+
const [isResponding, setIsResponding] = useState(false);
|
|
46
|
+
const [thought, setThought] = useState(null);
|
|
47
|
+
const [pendingHistoryItem, pendingHistoryItemRef, setPendingHistoryItem] = useStateAndRef(null);
|
|
48
|
+
const processedMemoryToolsRef = useRef(new Set());
|
|
49
|
+
const { startNewPrompt, getPromptCount } = useSessionStats();
|
|
50
|
+
const storage = config.storage;
|
|
51
|
+
const logger = useLogger(storage);
|
|
52
|
+
const gitService = useMemo(() => {
|
|
53
|
+
if (!config.getProjectRoot()) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
return new GitService(config.getProjectRoot(), storage);
|
|
57
|
+
}, [config, storage]);
|
|
58
|
+
const [toolCalls, scheduleToolCalls, markToolsAsSubmitted] = useReactToolScheduler(async (completedToolCallsFromScheduler) => {
|
|
59
|
+
// This onComplete is called when ALL scheduled tools for a given batch are done.
|
|
60
|
+
if (completedToolCallsFromScheduler.length > 0) {
|
|
61
|
+
// Add the final state of these tools to the history for display.
|
|
62
|
+
addItem(mapTrackedToolCallsToDisplay(completedToolCallsFromScheduler), Date.now());
|
|
63
|
+
// Handle tool response submission immediately when tools complete
|
|
64
|
+
await handleCompletedTools(completedToolCallsFromScheduler);
|
|
65
|
+
}
|
|
66
|
+
}, config, getPreferredEditor, onEditorClose);
|
|
67
|
+
const pendingToolCallGroupDisplay = useMemo(() => toolCalls.length ? mapTrackedToolCallsToDisplay(toolCalls) : undefined, [toolCalls]);
|
|
68
|
+
const activeToolPtyId = useMemo(() => {
|
|
69
|
+
const executingShellTool = toolCalls?.find((tc) => tc.status === 'executing' && tc.request.name === 'run_shell_command');
|
|
70
|
+
if (executingShellTool) {
|
|
71
|
+
return executingShellTool.pid;
|
|
72
|
+
}
|
|
73
|
+
return undefined;
|
|
74
|
+
}, [toolCalls]);
|
|
75
|
+
const loopDetectedRef = useRef(false);
|
|
76
|
+
const [loopDetectionConfirmationRequest, setLoopDetectionConfirmationRequest,] = useState(null);
|
|
77
|
+
const onExec = useCallback(async (done) => {
|
|
78
|
+
setIsResponding(true);
|
|
79
|
+
await done;
|
|
80
|
+
setIsResponding(false);
|
|
81
|
+
}, []);
|
|
82
|
+
const { handleShellCommand, activeShellPtyId } = useShellCommandProcessor(addItem, setPendingHistoryItem, onExec, onDebugMessage, config, geminiClient, setShellInputFocused, terminalWidth, terminalHeight);
|
|
83
|
+
const { handleVisionSwitch, restoreOriginalModel } = useVisionAutoSwitch(config, addItem, visionModelPreviewEnabled, onVisionSwitchRequired);
|
|
84
|
+
const activePtyId = activeShellPtyId || activeToolPtyId;
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
if (!activePtyId) {
|
|
87
|
+
setShellInputFocused(false);
|
|
88
|
+
}
|
|
89
|
+
}, [activePtyId, setShellInputFocused]);
|
|
90
|
+
const streamingState = useMemo(() => {
|
|
91
|
+
if (toolCalls.some((tc) => tc.status === 'awaiting_approval')) {
|
|
92
|
+
return StreamingState.WaitingForConfirmation;
|
|
93
|
+
}
|
|
94
|
+
if (isResponding ||
|
|
95
|
+
toolCalls.some((tc) => tc.status === 'executing' ||
|
|
96
|
+
tc.status === 'scheduled' ||
|
|
97
|
+
tc.status === 'validating' ||
|
|
98
|
+
((tc.status === 'success' ||
|
|
99
|
+
tc.status === 'error' ||
|
|
100
|
+
tc.status === 'cancelled') &&
|
|
101
|
+
!tc
|
|
102
|
+
.responseSubmittedToGemini))) {
|
|
103
|
+
return StreamingState.Responding;
|
|
104
|
+
}
|
|
105
|
+
return StreamingState.Idle;
|
|
106
|
+
}, [isResponding, toolCalls]);
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
if (config.getApprovalMode() === ApprovalMode.YOLO &&
|
|
109
|
+
streamingState === StreamingState.Idle) {
|
|
110
|
+
const lastUserMessageIndex = history.findLastIndex((item) => item.type === MessageType.USER);
|
|
111
|
+
const turnCount = lastUserMessageIndex === -1 ? 0 : history.length - lastUserMessageIndex;
|
|
112
|
+
if (turnCount > 0) {
|
|
113
|
+
logConversationFinishedEvent(config, new ConversationFinishedEvent(config.getApprovalMode(), turnCount));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, [streamingState, config, history]);
|
|
117
|
+
const cancelOngoingRequest = useCallback(() => {
|
|
118
|
+
if (streamingState !== StreamingState.Responding) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (turnCancelledRef.current) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
turnCancelledRef.current = true;
|
|
125
|
+
isSubmittingQueryRef.current = false;
|
|
126
|
+
abortControllerRef.current?.abort();
|
|
127
|
+
// Log API cancellation
|
|
128
|
+
const prompt_id = config.getSessionId() + '########' + getPromptCount();
|
|
129
|
+
const cancellationEvent = new ApiCancelEvent(config.getModel(), prompt_id, config.getContentGeneratorConfig()?.authType);
|
|
130
|
+
logApiCancel(config, cancellationEvent);
|
|
131
|
+
if (pendingHistoryItemRef.current) {
|
|
132
|
+
addItem(pendingHistoryItemRef.current, Date.now());
|
|
133
|
+
}
|
|
134
|
+
addItem({
|
|
135
|
+
type: MessageType.INFO,
|
|
136
|
+
text: 'Request cancelled.',
|
|
137
|
+
}, Date.now());
|
|
138
|
+
setPendingHistoryItem(null);
|
|
139
|
+
onCancelSubmit();
|
|
140
|
+
setIsResponding(false);
|
|
141
|
+
setShellInputFocused(false);
|
|
142
|
+
}, [
|
|
143
|
+
streamingState,
|
|
144
|
+
addItem,
|
|
145
|
+
setPendingHistoryItem,
|
|
146
|
+
onCancelSubmit,
|
|
147
|
+
pendingHistoryItemRef,
|
|
148
|
+
setShellInputFocused,
|
|
149
|
+
config,
|
|
150
|
+
getPromptCount,
|
|
151
|
+
]);
|
|
152
|
+
useKeypress((key) => {
|
|
153
|
+
if (key.name === 'escape' && !isShellFocused) {
|
|
154
|
+
cancelOngoingRequest();
|
|
155
|
+
}
|
|
156
|
+
}, { isActive: streamingState === StreamingState.Responding });
|
|
157
|
+
const prepareQueryForGemini = useCallback(async (query, userMessageTimestamp, abortSignal, prompt_id) => {
|
|
158
|
+
if (turnCancelledRef.current) {
|
|
159
|
+
return { queryToSend: null, shouldProceed: false };
|
|
160
|
+
}
|
|
161
|
+
if (typeof query === 'string' && query.trim().length === 0) {
|
|
162
|
+
return { queryToSend: null, shouldProceed: false };
|
|
163
|
+
}
|
|
164
|
+
let localQueryToSendToGemini = null;
|
|
165
|
+
if (typeof query === 'string') {
|
|
166
|
+
const trimmedQuery = query.trim();
|
|
167
|
+
onDebugMessage(`User query: '${trimmedQuery}'`);
|
|
168
|
+
await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
|
|
169
|
+
// Handle UI-only commands first
|
|
170
|
+
const slashCommandResult = isSlashCommand(trimmedQuery)
|
|
171
|
+
? await handleSlashCommand(trimmedQuery)
|
|
172
|
+
: false;
|
|
173
|
+
if (slashCommandResult) {
|
|
174
|
+
switch (slashCommandResult.type) {
|
|
175
|
+
case 'schedule_tool': {
|
|
176
|
+
const { toolName, toolArgs } = slashCommandResult;
|
|
177
|
+
const toolCallRequest = {
|
|
178
|
+
callId: `${toolName}-${Date.now()}-${Math.random().toString(16).slice(2)}`,
|
|
179
|
+
name: toolName,
|
|
180
|
+
args: toolArgs,
|
|
181
|
+
isClientInitiated: true,
|
|
182
|
+
prompt_id,
|
|
183
|
+
};
|
|
184
|
+
scheduleToolCalls([toolCallRequest], abortSignal);
|
|
185
|
+
return { queryToSend: null, shouldProceed: false };
|
|
186
|
+
}
|
|
187
|
+
case 'submit_prompt': {
|
|
188
|
+
localQueryToSendToGemini = slashCommandResult.content;
|
|
189
|
+
return {
|
|
190
|
+
queryToSend: localQueryToSendToGemini,
|
|
191
|
+
shouldProceed: true,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
case 'handled': {
|
|
195
|
+
return { queryToSend: null, shouldProceed: false };
|
|
196
|
+
}
|
|
197
|
+
default: {
|
|
198
|
+
const unreachable = slashCommandResult;
|
|
199
|
+
throw new Error(`Unhandled slash command result type: ${unreachable}`);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (shellModeActive && handleShellCommand(trimmedQuery, abortSignal)) {
|
|
204
|
+
return { queryToSend: null, shouldProceed: false };
|
|
205
|
+
}
|
|
206
|
+
// Handle @-commands (which might involve tool calls)
|
|
207
|
+
if (isAtCommand(trimmedQuery)) {
|
|
208
|
+
const atCommandResult = await handleAtCommand({
|
|
209
|
+
query: trimmedQuery,
|
|
210
|
+
config,
|
|
211
|
+
addItem,
|
|
212
|
+
onDebugMessage,
|
|
213
|
+
messageId: userMessageTimestamp,
|
|
214
|
+
signal: abortSignal,
|
|
215
|
+
});
|
|
216
|
+
// Add user's turn after @ command processing is done.
|
|
217
|
+
addItem({ type: MessageType.USER, text: trimmedQuery }, userMessageTimestamp);
|
|
218
|
+
if (!atCommandResult.shouldProceed) {
|
|
219
|
+
return { queryToSend: null, shouldProceed: false };
|
|
220
|
+
}
|
|
221
|
+
localQueryToSendToGemini = atCommandResult.processedQuery;
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
// Normal query for Gemini
|
|
225
|
+
addItem({ type: MessageType.USER, text: trimmedQuery }, userMessageTimestamp);
|
|
226
|
+
localQueryToSendToGemini = trimmedQuery;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
// It's a function response (PartListUnion that isn't a string)
|
|
231
|
+
localQueryToSendToGemini = query;
|
|
232
|
+
}
|
|
233
|
+
if (localQueryToSendToGemini === null) {
|
|
234
|
+
onDebugMessage('Query processing resulted in null, not sending to Gemini.');
|
|
235
|
+
return { queryToSend: null, shouldProceed: false };
|
|
236
|
+
}
|
|
237
|
+
return { queryToSend: localQueryToSendToGemini, shouldProceed: true };
|
|
238
|
+
}, [
|
|
239
|
+
config,
|
|
240
|
+
addItem,
|
|
241
|
+
onDebugMessage,
|
|
242
|
+
handleShellCommand,
|
|
243
|
+
handleSlashCommand,
|
|
244
|
+
logger,
|
|
245
|
+
shellModeActive,
|
|
246
|
+
scheduleToolCalls,
|
|
247
|
+
]);
|
|
248
|
+
// --- Stream Event Handlers ---
|
|
249
|
+
const handleContentEvent = useCallback((eventValue, currentGeminiMessageBuffer, userMessageTimestamp) => {
|
|
250
|
+
if (turnCancelledRef.current) {
|
|
251
|
+
// Prevents additional output after a user initiated cancel.
|
|
252
|
+
return '';
|
|
253
|
+
}
|
|
254
|
+
let newGeminiMessageBuffer = currentGeminiMessageBuffer + eventValue;
|
|
255
|
+
if (pendingHistoryItemRef.current?.type !== 'gemini' &&
|
|
256
|
+
pendingHistoryItemRef.current?.type !== 'gemini_content') {
|
|
257
|
+
if (pendingHistoryItemRef.current) {
|
|
258
|
+
addItem(pendingHistoryItemRef.current, userMessageTimestamp);
|
|
259
|
+
}
|
|
260
|
+
setPendingHistoryItem({ type: 'gemini', text: '' });
|
|
261
|
+
newGeminiMessageBuffer = eventValue;
|
|
262
|
+
}
|
|
263
|
+
// Split large messages for better rendering performance. Ideally,
|
|
264
|
+
// we should maximize the amount of output sent to <Static />.
|
|
265
|
+
const splitPoint = findLastSafeSplitPoint(newGeminiMessageBuffer);
|
|
266
|
+
if (splitPoint === newGeminiMessageBuffer.length) {
|
|
267
|
+
// Update the existing message with accumulated content
|
|
268
|
+
setPendingHistoryItem((item) => ({
|
|
269
|
+
type: item?.type,
|
|
270
|
+
text: newGeminiMessageBuffer,
|
|
271
|
+
}));
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
// This indicates that we need to split up this Gemini Message.
|
|
275
|
+
// Splitting a message is primarily a performance consideration. There is a
|
|
276
|
+
// <Static> component at the root of App.tsx which takes care of rendering
|
|
277
|
+
// content statically or dynamically. Everything but the last message is
|
|
278
|
+
// treated as static in order to prevent re-rendering an entire message history
|
|
279
|
+
// multiple times per-second (as streaming occurs). Prior to this change you'd
|
|
280
|
+
// see heavy flickering of the terminal. This ensures that larger messages get
|
|
281
|
+
// broken up so that there are more "statically" rendered.
|
|
282
|
+
const beforeText = newGeminiMessageBuffer.substring(0, splitPoint);
|
|
283
|
+
const afterText = newGeminiMessageBuffer.substring(splitPoint);
|
|
284
|
+
addItem({
|
|
285
|
+
type: pendingHistoryItemRef.current?.type,
|
|
286
|
+
text: beforeText,
|
|
287
|
+
}, userMessageTimestamp);
|
|
288
|
+
setPendingHistoryItem({ type: 'gemini_content', text: afterText });
|
|
289
|
+
newGeminiMessageBuffer = afterText;
|
|
290
|
+
}
|
|
291
|
+
return newGeminiMessageBuffer;
|
|
292
|
+
}, [addItem, pendingHistoryItemRef, setPendingHistoryItem]);
|
|
293
|
+
const handleUserCancelledEvent = useCallback((userMessageTimestamp) => {
|
|
294
|
+
if (turnCancelledRef.current) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
if (pendingHistoryItemRef.current) {
|
|
298
|
+
if (pendingHistoryItemRef.current.type === 'tool_group') {
|
|
299
|
+
const updatedTools = pendingHistoryItemRef.current.tools.map((tool) => tool.status === ToolCallStatus.Pending ||
|
|
300
|
+
tool.status === ToolCallStatus.Confirming ||
|
|
301
|
+
tool.status === ToolCallStatus.Executing
|
|
302
|
+
? { ...tool, status: ToolCallStatus.Canceled }
|
|
303
|
+
: tool);
|
|
304
|
+
const pendingItem = {
|
|
305
|
+
...pendingHistoryItemRef.current,
|
|
306
|
+
tools: updatedTools,
|
|
307
|
+
};
|
|
308
|
+
addItem(pendingItem, userMessageTimestamp);
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
addItem(pendingHistoryItemRef.current, userMessageTimestamp);
|
|
312
|
+
}
|
|
313
|
+
setPendingHistoryItem(null);
|
|
314
|
+
}
|
|
315
|
+
addItem({ type: MessageType.INFO, text: 'User cancelled the request.' }, userMessageTimestamp);
|
|
316
|
+
setIsResponding(false);
|
|
317
|
+
setThought(null); // Reset thought when user cancels
|
|
318
|
+
}, [addItem, pendingHistoryItemRef, setPendingHistoryItem, setThought]);
|
|
319
|
+
const handleErrorEvent = useCallback((eventValue, userMessageTimestamp) => {
|
|
320
|
+
if (pendingHistoryItemRef.current) {
|
|
321
|
+
addItem(pendingHistoryItemRef.current, userMessageTimestamp);
|
|
322
|
+
setPendingHistoryItem(null);
|
|
323
|
+
}
|
|
324
|
+
addItem({
|
|
325
|
+
type: MessageType.ERROR,
|
|
326
|
+
text: parseAndFormatApiError(eventValue.error, config.getContentGeneratorConfig()?.authType, undefined, config.getModel(), DEFAULT_GEMINI_FLASH_MODEL),
|
|
327
|
+
}, userMessageTimestamp);
|
|
328
|
+
setThought(null); // Reset thought when there's an error
|
|
329
|
+
}, [addItem, pendingHistoryItemRef, setPendingHistoryItem, config, setThought]);
|
|
330
|
+
const handleCitationEvent = useCallback((text, userMessageTimestamp) => {
|
|
331
|
+
if (!showCitations(settings)) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
if (pendingHistoryItemRef.current) {
|
|
335
|
+
addItem(pendingHistoryItemRef.current, userMessageTimestamp);
|
|
336
|
+
setPendingHistoryItem(null);
|
|
337
|
+
}
|
|
338
|
+
addItem({ type: MessageType.INFO, text }, userMessageTimestamp);
|
|
339
|
+
}, [addItem, pendingHistoryItemRef, setPendingHistoryItem, settings]);
|
|
340
|
+
const handleFinishedEvent = useCallback((event, userMessageTimestamp) => {
|
|
341
|
+
const finishReason = event.value.reason;
|
|
342
|
+
if (!finishReason) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const finishReasonMessages = {
|
|
346
|
+
[FinishReason.FINISH_REASON_UNSPECIFIED]: undefined,
|
|
347
|
+
[FinishReason.STOP]: undefined,
|
|
348
|
+
[FinishReason.MAX_TOKENS]: 'Response truncated due to token limits.',
|
|
349
|
+
[FinishReason.SAFETY]: 'Response stopped due to safety reasons.',
|
|
350
|
+
[FinishReason.RECITATION]: 'Response stopped due to recitation policy.',
|
|
351
|
+
[FinishReason.LANGUAGE]: 'Response stopped due to unsupported language.',
|
|
352
|
+
[FinishReason.BLOCKLIST]: 'Response stopped due to forbidden terms.',
|
|
353
|
+
[FinishReason.PROHIBITED_CONTENT]: 'Response stopped due to prohibited content.',
|
|
354
|
+
[FinishReason.SPII]: 'Response stopped due to sensitive personally identifiable information.',
|
|
355
|
+
[FinishReason.OTHER]: 'Response stopped for other reasons.',
|
|
356
|
+
[FinishReason.MALFORMED_FUNCTION_CALL]: 'Response stopped due to malformed function call.',
|
|
357
|
+
[FinishReason.IMAGE_SAFETY]: 'Response stopped due to image safety violations.',
|
|
358
|
+
[FinishReason.UNEXPECTED_TOOL_CALL]: 'Response stopped due to unexpected tool call.',
|
|
359
|
+
};
|
|
360
|
+
const message = finishReasonMessages[finishReason];
|
|
361
|
+
if (message) {
|
|
362
|
+
addItem({
|
|
363
|
+
type: 'info',
|
|
364
|
+
text: `⚠️ ${message}`,
|
|
365
|
+
}, userMessageTimestamp);
|
|
366
|
+
}
|
|
367
|
+
}, [addItem]);
|
|
368
|
+
const handleChatCompressionEvent = useCallback((eventValue, userMessageTimestamp) => {
|
|
369
|
+
if (pendingHistoryItemRef.current) {
|
|
370
|
+
addItem(pendingHistoryItemRef.current, userMessageTimestamp);
|
|
371
|
+
setPendingHistoryItem(null);
|
|
372
|
+
}
|
|
373
|
+
return addItem({
|
|
374
|
+
type: 'info',
|
|
375
|
+
text: `IMPORTANT: This conversation approached the input token limit for ${config.getModel()}. ` +
|
|
376
|
+
`A compressed context will be sent for future messages (compressed from: ` +
|
|
377
|
+
`${eventValue?.originalTokenCount ?? 'unknown'} to ` +
|
|
378
|
+
`${eventValue?.newTokenCount ?? 'unknown'} tokens).`,
|
|
379
|
+
}, Date.now());
|
|
380
|
+
}, [addItem, config, pendingHistoryItemRef, setPendingHistoryItem]);
|
|
381
|
+
const handleMaxSessionTurnsEvent = useCallback(() => addItem({
|
|
382
|
+
type: 'info',
|
|
383
|
+
text: `The session has reached the maximum number of turns: ${config.getMaxSessionTurns()}. ` +
|
|
384
|
+
`Please update this limit in your setting.json file.`,
|
|
385
|
+
}, Date.now()), [addItem, config]);
|
|
386
|
+
const handleSessionTokenLimitExceededEvent = useCallback((value) => addItem({
|
|
387
|
+
type: 'error',
|
|
388
|
+
text: `🚫 Session token limit exceeded: ${value.currentTokens.toLocaleString()} tokens > ${value.limit.toLocaleString()} limit.\n\n` +
|
|
389
|
+
`💡 Solutions:\n` +
|
|
390
|
+
` • Start a new session: Use /clear command\n` +
|
|
391
|
+
` • Increase limit: Add "sessionTokenLimit": (e.g., 128000) to your settings.json\n` +
|
|
392
|
+
` • Compress history: Use /compress command to compress history`,
|
|
393
|
+
}, Date.now()), [addItem]);
|
|
394
|
+
const handleLoopDetectionConfirmation = useCallback((result) => {
|
|
395
|
+
setLoopDetectionConfirmationRequest(null);
|
|
396
|
+
if (result.userSelection === 'disable') {
|
|
397
|
+
config.getGeminiClient().getLoopDetectionService().disableForSession();
|
|
398
|
+
addItem({
|
|
399
|
+
type: 'info',
|
|
400
|
+
text: `Loop detection has been disabled for this session. Please try your request again.`,
|
|
401
|
+
}, Date.now());
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
addItem({
|
|
405
|
+
type: 'info',
|
|
406
|
+
text: `A potential loop was detected. This can happen due to repetitive tool calls or other model behavior. The request has been halted.`,
|
|
407
|
+
}, Date.now());
|
|
408
|
+
}
|
|
409
|
+
}, [config, addItem]);
|
|
410
|
+
const handleLoopDetectedEvent = useCallback(() => {
|
|
411
|
+
// Show the confirmation dialog to choose whether to disable loop detection
|
|
412
|
+
setLoopDetectionConfirmationRequest({
|
|
413
|
+
onComplete: handleLoopDetectionConfirmation,
|
|
414
|
+
});
|
|
415
|
+
}, [handleLoopDetectionConfirmation]);
|
|
416
|
+
const processGeminiStreamEvents = useCallback(async (stream, userMessageTimestamp, signal) => {
|
|
417
|
+
let geminiMessageBuffer = '';
|
|
418
|
+
const toolCallRequests = [];
|
|
419
|
+
for await (const event of stream) {
|
|
420
|
+
switch (event.type) {
|
|
421
|
+
case ServerGeminiEventType.Thought:
|
|
422
|
+
setThought(event.value);
|
|
423
|
+
break;
|
|
424
|
+
case ServerGeminiEventType.Content:
|
|
425
|
+
geminiMessageBuffer = handleContentEvent(event.value, geminiMessageBuffer, userMessageTimestamp);
|
|
426
|
+
break;
|
|
427
|
+
case ServerGeminiEventType.ToolCallRequest:
|
|
428
|
+
toolCallRequests.push(event.value);
|
|
429
|
+
break;
|
|
430
|
+
case ServerGeminiEventType.UserCancelled:
|
|
431
|
+
handleUserCancelledEvent(userMessageTimestamp);
|
|
432
|
+
break;
|
|
433
|
+
case ServerGeminiEventType.Error:
|
|
434
|
+
handleErrorEvent(event.value, userMessageTimestamp);
|
|
435
|
+
break;
|
|
436
|
+
case ServerGeminiEventType.ChatCompressed:
|
|
437
|
+
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
438
|
+
break;
|
|
439
|
+
case ServerGeminiEventType.ToolCallConfirmation:
|
|
440
|
+
case ServerGeminiEventType.ToolCallResponse:
|
|
441
|
+
// do nothing
|
|
442
|
+
break;
|
|
443
|
+
case ServerGeminiEventType.MaxSessionTurns:
|
|
444
|
+
handleMaxSessionTurnsEvent();
|
|
445
|
+
break;
|
|
446
|
+
case ServerGeminiEventType.SessionTokenLimitExceeded:
|
|
447
|
+
handleSessionTokenLimitExceededEvent(event.value);
|
|
448
|
+
break;
|
|
449
|
+
case ServerGeminiEventType.Finished:
|
|
450
|
+
handleFinishedEvent(event, userMessageTimestamp);
|
|
451
|
+
break;
|
|
452
|
+
case ServerGeminiEventType.Citation:
|
|
453
|
+
handleCitationEvent(event.value, userMessageTimestamp);
|
|
454
|
+
break;
|
|
455
|
+
case ServerGeminiEventType.LoopDetected:
|
|
456
|
+
// handle later because we want to move pending history to history
|
|
457
|
+
// before we add loop detected message to history
|
|
458
|
+
loopDetectedRef.current = true;
|
|
459
|
+
break;
|
|
460
|
+
case ServerGeminiEventType.Retry:
|
|
461
|
+
// Will add the missing logic later
|
|
462
|
+
break;
|
|
463
|
+
default: {
|
|
464
|
+
// enforces exhaustive switch-case
|
|
465
|
+
const unreachable = event;
|
|
466
|
+
return unreachable;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
if (toolCallRequests.length > 0) {
|
|
471
|
+
scheduleToolCalls(toolCallRequests, signal);
|
|
472
|
+
}
|
|
473
|
+
return StreamProcessingStatus.Completed;
|
|
474
|
+
}, [
|
|
475
|
+
handleContentEvent,
|
|
476
|
+
handleUserCancelledEvent,
|
|
477
|
+
handleErrorEvent,
|
|
478
|
+
scheduleToolCalls,
|
|
479
|
+
handleChatCompressionEvent,
|
|
480
|
+
handleFinishedEvent,
|
|
481
|
+
handleMaxSessionTurnsEvent,
|
|
482
|
+
handleSessionTokenLimitExceededEvent,
|
|
483
|
+
handleCitationEvent,
|
|
484
|
+
]);
|
|
485
|
+
const submitQuery = useCallback(async (query, options, prompt_id) => {
|
|
486
|
+
// Prevent concurrent executions of submitQuery, but allow continuations
|
|
487
|
+
// which are part of the same logical flow (tool responses)
|
|
488
|
+
if (isSubmittingQueryRef.current && !options?.isContinuation) {
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
if ((streamingState === StreamingState.Responding ||
|
|
492
|
+
streamingState === StreamingState.WaitingForConfirmation) &&
|
|
493
|
+
!options?.isContinuation)
|
|
494
|
+
return;
|
|
495
|
+
// Set the flag to indicate we're now executing
|
|
496
|
+
isSubmittingQueryRef.current = true;
|
|
497
|
+
const userMessageTimestamp = Date.now();
|
|
498
|
+
// Reset quota error flag when starting a new query (not a continuation)
|
|
499
|
+
if (!options?.isContinuation) {
|
|
500
|
+
setModelSwitchedFromQuotaError(false);
|
|
501
|
+
config.setQuotaErrorOccurred(false);
|
|
502
|
+
}
|
|
503
|
+
abortControllerRef.current = new AbortController();
|
|
504
|
+
const abortSignal = abortControllerRef.current.signal;
|
|
505
|
+
turnCancelledRef.current = false;
|
|
506
|
+
if (!prompt_id) {
|
|
507
|
+
prompt_id = config.getSessionId() + '########' + getPromptCount();
|
|
508
|
+
}
|
|
509
|
+
return promptIdContext.run(prompt_id, async () => {
|
|
510
|
+
const { queryToSend, shouldProceed } = await prepareQueryForGemini(query, userMessageTimestamp, abortSignal, prompt_id);
|
|
511
|
+
if (!shouldProceed || queryToSend === null) {
|
|
512
|
+
isSubmittingQueryRef.current = false;
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
// Handle vision switch requirement
|
|
516
|
+
const visionSwitchResult = await handleVisionSwitch(queryToSend, userMessageTimestamp, options?.isContinuation || false);
|
|
517
|
+
if (!visionSwitchResult.shouldProceed) {
|
|
518
|
+
isSubmittingQueryRef.current = false;
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
const finalQueryToSend = queryToSend;
|
|
522
|
+
if (!options?.isContinuation) {
|
|
523
|
+
if (typeof queryToSend === 'string') {
|
|
524
|
+
// logging the text prompts only for now
|
|
525
|
+
const promptText = queryToSend;
|
|
526
|
+
logUserPrompt(config, new UserPromptEvent(promptText.length, prompt_id, config.getContentGeneratorConfig()?.authType, promptText));
|
|
527
|
+
}
|
|
528
|
+
startNewPrompt();
|
|
529
|
+
setThought(null); // Reset thought when starting a new prompt
|
|
530
|
+
}
|
|
531
|
+
setIsResponding(true);
|
|
532
|
+
setInitError(null);
|
|
533
|
+
try {
|
|
534
|
+
const stream = geminiClient.sendMessageStream(finalQueryToSend, abortSignal, prompt_id);
|
|
535
|
+
const processingStatus = await processGeminiStreamEvents(stream, userMessageTimestamp, abortSignal);
|
|
536
|
+
if (processingStatus === StreamProcessingStatus.UserCancelled) {
|
|
537
|
+
// Restore original model if it was temporarily overridden
|
|
538
|
+
restoreOriginalModel().catch((error) => {
|
|
539
|
+
console.error('Failed to restore original model:', error);
|
|
540
|
+
});
|
|
541
|
+
isSubmittingQueryRef.current = false;
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
if (pendingHistoryItemRef.current) {
|
|
545
|
+
addItem(pendingHistoryItemRef.current, userMessageTimestamp);
|
|
546
|
+
setPendingHistoryItem(null);
|
|
547
|
+
}
|
|
548
|
+
if (loopDetectedRef.current) {
|
|
549
|
+
loopDetectedRef.current = false;
|
|
550
|
+
handleLoopDetectedEvent();
|
|
551
|
+
}
|
|
552
|
+
// Restore original model if it was temporarily overridden
|
|
553
|
+
restoreOriginalModel().catch((error) => {
|
|
554
|
+
console.error('Failed to restore original model:', error);
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
catch (error) {
|
|
558
|
+
// Restore original model if it was temporarily overridden
|
|
559
|
+
restoreOriginalModel().catch((error) => {
|
|
560
|
+
console.error('Failed to restore original model:', error);
|
|
561
|
+
});
|
|
562
|
+
if (error instanceof UnauthorizedError) {
|
|
563
|
+
onAuthError('Session expired or is unauthorized.');
|
|
564
|
+
}
|
|
565
|
+
else if (!isNodeError(error) || error.name !== 'AbortError') {
|
|
566
|
+
addItem({
|
|
567
|
+
type: MessageType.ERROR,
|
|
568
|
+
text: parseAndFormatApiError(getErrorMessage(error) || 'Unknown error', config.getContentGeneratorConfig()?.authType, undefined, config.getModel(), DEFAULT_GEMINI_FLASH_MODEL),
|
|
569
|
+
}, userMessageTimestamp);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
finally {
|
|
573
|
+
setIsResponding(false);
|
|
574
|
+
isSubmittingQueryRef.current = false;
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
}, [
|
|
578
|
+
streamingState,
|
|
579
|
+
setModelSwitchedFromQuotaError,
|
|
580
|
+
prepareQueryForGemini,
|
|
581
|
+
processGeminiStreamEvents,
|
|
582
|
+
pendingHistoryItemRef,
|
|
583
|
+
addItem,
|
|
584
|
+
setPendingHistoryItem,
|
|
585
|
+
setInitError,
|
|
586
|
+
geminiClient,
|
|
587
|
+
onAuthError,
|
|
588
|
+
config,
|
|
589
|
+
startNewPrompt,
|
|
590
|
+
getPromptCount,
|
|
591
|
+
handleLoopDetectedEvent,
|
|
592
|
+
handleVisionSwitch,
|
|
593
|
+
restoreOriginalModel,
|
|
594
|
+
]);
|
|
595
|
+
const handleApprovalModeChange = useCallback(async (newApprovalMode) => {
|
|
596
|
+
// Auto-approve pending tool calls when switching to auto-approval modes
|
|
597
|
+
if (newApprovalMode === ApprovalMode.YOLO ||
|
|
598
|
+
newApprovalMode === ApprovalMode.AUTO_EDIT) {
|
|
599
|
+
let awaitingApprovalCalls = toolCalls.filter((call) => call.status === 'awaiting_approval');
|
|
600
|
+
// For AUTO_EDIT mode, only approve edit tools (replace, write_file)
|
|
601
|
+
if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
|
|
602
|
+
awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => EDIT_TOOL_NAMES.has(call.request.name));
|
|
603
|
+
}
|
|
604
|
+
// Process pending tool calls sequentially to reduce UI chaos
|
|
605
|
+
for (const call of awaitingApprovalCalls) {
|
|
606
|
+
if (call.confirmationDetails?.onConfirm) {
|
|
607
|
+
try {
|
|
608
|
+
await call.confirmationDetails.onConfirm(ToolConfirmationOutcome.ProceedOnce);
|
|
609
|
+
}
|
|
610
|
+
catch (error) {
|
|
611
|
+
console.error(`Failed to auto-approve tool call ${call.request.callId}:`, error);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}, [toolCalls]);
|
|
617
|
+
const handleCompletedTools = useCallback(async (completedToolCallsFromScheduler) => {
|
|
618
|
+
if (isResponding) {
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
const completedAndReadyToSubmitTools = completedToolCallsFromScheduler.filter((tc) => {
|
|
622
|
+
const isTerminalState = tc.status === 'success' ||
|
|
623
|
+
tc.status === 'error' ||
|
|
624
|
+
tc.status === 'cancelled';
|
|
625
|
+
if (isTerminalState) {
|
|
626
|
+
const completedOrCancelledCall = tc;
|
|
627
|
+
return (completedOrCancelledCall.response?.responseParts !== undefined);
|
|
628
|
+
}
|
|
629
|
+
return false;
|
|
630
|
+
});
|
|
631
|
+
// Finalize any client-initiated tools as soon as they are done.
|
|
632
|
+
const clientTools = completedAndReadyToSubmitTools.filter((t) => t.request.isClientInitiated);
|
|
633
|
+
if (clientTools.length > 0) {
|
|
634
|
+
markToolsAsSubmitted(clientTools.map((t) => t.request.callId));
|
|
635
|
+
}
|
|
636
|
+
// Identify new, successful save_memory calls that we haven't processed yet.
|
|
637
|
+
const newSuccessfulMemorySaves = completedAndReadyToSubmitTools.filter((t) => t.request.name === 'save_memory' &&
|
|
638
|
+
t.status === 'success' &&
|
|
639
|
+
!processedMemoryToolsRef.current.has(t.request.callId));
|
|
640
|
+
if (newSuccessfulMemorySaves.length > 0) {
|
|
641
|
+
// Perform the refresh only if there are new ones.
|
|
642
|
+
void performMemoryRefresh();
|
|
643
|
+
// Mark them as processed so we don't do this again on the next render.
|
|
644
|
+
newSuccessfulMemorySaves.forEach((t) => processedMemoryToolsRef.current.add(t.request.callId));
|
|
645
|
+
}
|
|
646
|
+
const geminiTools = completedAndReadyToSubmitTools.filter((t) => !t.request.isClientInitiated);
|
|
647
|
+
if (geminiTools.length === 0) {
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
// If all the tools were cancelled, don't submit a response to Gemini.
|
|
651
|
+
const allToolsCancelled = geminiTools.every((tc) => tc.status === 'cancelled');
|
|
652
|
+
if (allToolsCancelled) {
|
|
653
|
+
if (geminiClient) {
|
|
654
|
+
// We need to manually add the function responses to the history
|
|
655
|
+
// so the model knows the tools were cancelled.
|
|
656
|
+
const combinedParts = geminiTools.flatMap((toolCall) => toolCall.response.responseParts);
|
|
657
|
+
geminiClient.addHistory({
|
|
658
|
+
role: 'user',
|
|
659
|
+
parts: combinedParts,
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
const callIdsToMarkAsSubmitted = geminiTools.map((toolCall) => toolCall.request.callId);
|
|
663
|
+
markToolsAsSubmitted(callIdsToMarkAsSubmitted);
|
|
664
|
+
return;
|
|
665
|
+
}
|
|
666
|
+
const responsesToSend = geminiTools.flatMap((toolCall) => toolCall.response.responseParts);
|
|
667
|
+
const callIdsToMarkAsSubmitted = geminiTools.map((toolCall) => toolCall.request.callId);
|
|
668
|
+
const prompt_ids = geminiTools.map((toolCall) => toolCall.request.prompt_id);
|
|
669
|
+
markToolsAsSubmitted(callIdsToMarkAsSubmitted);
|
|
670
|
+
// Don't continue if model was switched due to quota error
|
|
671
|
+
if (modelSwitchedFromQuotaError) {
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
submitQuery(responsesToSend, {
|
|
675
|
+
isContinuation: true,
|
|
676
|
+
}, prompt_ids[0]);
|
|
677
|
+
}, [
|
|
678
|
+
isResponding,
|
|
679
|
+
submitQuery,
|
|
680
|
+
markToolsAsSubmitted,
|
|
681
|
+
geminiClient,
|
|
682
|
+
performMemoryRefresh,
|
|
683
|
+
modelSwitchedFromQuotaError,
|
|
684
|
+
]);
|
|
685
|
+
const pendingHistoryItems = useMemo(() => [pendingHistoryItem, pendingToolCallGroupDisplay].filter((i) => i !== undefined && i !== null), [pendingHistoryItem, pendingToolCallGroupDisplay]);
|
|
686
|
+
useEffect(() => {
|
|
687
|
+
const saveRestorableToolCalls = async () => {
|
|
688
|
+
if (!config.getCheckpointingEnabled()) {
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
const restorableToolCalls = toolCalls.filter((toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) &&
|
|
692
|
+
toolCall.status === 'awaiting_approval');
|
|
693
|
+
if (restorableToolCalls.length > 0) {
|
|
694
|
+
const checkpointDir = storage.getProjectTempCheckpointsDir();
|
|
695
|
+
if (!checkpointDir) {
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
try {
|
|
699
|
+
await fs.mkdir(checkpointDir, { recursive: true });
|
|
700
|
+
}
|
|
701
|
+
catch (error) {
|
|
702
|
+
if (!isNodeError(error) || error.code !== 'EEXIST') {
|
|
703
|
+
onDebugMessage(`Failed to create checkpoint directory: ${getErrorMessage(error)}`);
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
for (const toolCall of restorableToolCalls) {
|
|
708
|
+
const filePath = toolCall.request.args['file_path'];
|
|
709
|
+
if (!filePath) {
|
|
710
|
+
onDebugMessage(`Skipping restorable tool call due to missing file_path: ${toolCall.request.name}`);
|
|
711
|
+
continue;
|
|
712
|
+
}
|
|
713
|
+
try {
|
|
714
|
+
if (!gitService) {
|
|
715
|
+
onDebugMessage(`Checkpointing is enabled but Git service is not available. Failed to create snapshot for ${filePath}. Ensure Git is installed and working properly.`);
|
|
716
|
+
continue;
|
|
717
|
+
}
|
|
718
|
+
let commitHash;
|
|
719
|
+
try {
|
|
720
|
+
commitHash = await gitService.createFileSnapshot(`Snapshot for ${toolCall.request.name}`);
|
|
721
|
+
}
|
|
722
|
+
catch (error) {
|
|
723
|
+
onDebugMessage(`Failed to create new snapshot: ${getErrorMessage(error)}. Attempting to use current commit.`);
|
|
724
|
+
}
|
|
725
|
+
if (!commitHash) {
|
|
726
|
+
commitHash = await gitService.getCurrentCommitHash();
|
|
727
|
+
}
|
|
728
|
+
if (!commitHash) {
|
|
729
|
+
onDebugMessage(`Failed to create snapshot for ${filePath}. Checkpointing may not be working properly. Ensure Git is installed and the project directory is accessible.`);
|
|
730
|
+
continue;
|
|
731
|
+
}
|
|
732
|
+
const timestamp = new Date()
|
|
733
|
+
.toISOString()
|
|
734
|
+
.replace(/:/g, '-')
|
|
735
|
+
.replace(/\./g, '_');
|
|
736
|
+
const toolName = toolCall.request.name;
|
|
737
|
+
const fileName = path.basename(filePath);
|
|
738
|
+
const toolCallWithSnapshotFileName = `${timestamp}-${fileName}-${toolName}.json`;
|
|
739
|
+
const clientHistory = await geminiClient?.getHistory();
|
|
740
|
+
const toolCallWithSnapshotFilePath = path.join(checkpointDir, toolCallWithSnapshotFileName);
|
|
741
|
+
await fs.writeFile(toolCallWithSnapshotFilePath, JSON.stringify({
|
|
742
|
+
history,
|
|
743
|
+
clientHistory,
|
|
744
|
+
toolCall: {
|
|
745
|
+
name: toolCall.request.name,
|
|
746
|
+
args: toolCall.request.args,
|
|
747
|
+
},
|
|
748
|
+
commitHash,
|
|
749
|
+
filePath,
|
|
750
|
+
}, null, 2));
|
|
751
|
+
}
|
|
752
|
+
catch (error) {
|
|
753
|
+
onDebugMessage(`Failed to create checkpoint for ${filePath}: ${getErrorMessage(error)}. This may indicate a problem with Git or file system permissions.`);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
};
|
|
758
|
+
saveRestorableToolCalls();
|
|
759
|
+
}, [
|
|
760
|
+
toolCalls,
|
|
761
|
+
config,
|
|
762
|
+
onDebugMessage,
|
|
763
|
+
gitService,
|
|
764
|
+
history,
|
|
765
|
+
geminiClient,
|
|
766
|
+
storage,
|
|
767
|
+
]);
|
|
768
|
+
return {
|
|
769
|
+
streamingState,
|
|
770
|
+
submitQuery,
|
|
771
|
+
initError,
|
|
772
|
+
pendingHistoryItems,
|
|
773
|
+
thought,
|
|
774
|
+
cancelOngoingRequest,
|
|
775
|
+
pendingToolCalls: toolCalls,
|
|
776
|
+
handleApprovalModeChange,
|
|
777
|
+
activePtyId,
|
|
778
|
+
loopDetectionConfirmationRequest,
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
//# sourceMappingURL=useGeminiStream.js.map
|