@umsai/ums-code 0.0.11-post6 → 0.0.14-v1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +5 -5
- package/dist/src/acp/acp.d.ts +208 -0
- package/dist/src/{zed-integration → acp}/acp.js +44 -76
- package/dist/src/acp/acp.js.map +1 -0
- package/dist/src/acp/acpPeer.d.ts +8 -0
- package/dist/src/acp/acpPeer.js +537 -0
- package/dist/src/acp/acpPeer.js.map +1 -0
- package/dist/src/config/auth.js +11 -12
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/config.d.ts +3 -3
- package/dist/src/config/config.js +86 -164
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/extension.d.ts +1 -2
- package/dist/src/config/extension.js +4 -9
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/config/sandboxConfig.js +3 -3
- package/dist/src/config/sandboxConfig.js.map +1 -1
- package/dist/src/config/settings.d.ts +64 -3
- package/dist/src/config/settings.js +38 -58
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/gemini.js +41 -37
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +1 -2
- package/dist/src/generated/git-commit.js +1 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/nonInteractiveCli.js +8 -3
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.d.ts +1 -0
- package/dist/src/services/BuiltinCommandLoader.js +4 -11
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/FileCommandLoader.js +8 -10
- package/dist/src/services/FileCommandLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.js +3 -3
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/services/prompt-processors/argumentProcessor.d.ts +7 -2
- package/dist/src/services/prompt-processors/argumentProcessor.js +10 -2
- package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.d.ts +13 -16
- package/dist/src/services/prompt-processors/shellProcessor.js +40 -125
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
- package/dist/src/services/prompt-processors/types.d.ts +0 -2
- package/dist/src/services/prompt-processors/types.js +0 -2
- package/dist/src/services/prompt-processors/types.js.map +1 -1
- package/dist/src/ui/App.js +46 -224
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.js +5 -9
- package/dist/src/ui/commands/aboutCommand.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.js +5 -13
- package/dist/src/ui/commands/bugCommand.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.js +6 -23
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.js +1 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.js +21 -18
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/docsCommand.js +1 -1
- package/dist/src/ui/commands/docsCommand.js.map +1 -1
- package/dist/src/ui/commands/ideCommand.js +18 -90
- package/dist/src/ui/commands/ideCommand.js.map +1 -1
- package/dist/src/ui/commands/initCommand.d.ts +1 -1
- package/dist/src/ui/commands/initCommand.js +7 -17
- package/dist/src/ui/commands/initCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js +7 -11
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.js +6 -139
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/quitCommand.d.ts +0 -1
- package/dist/src/ui/commands/quitCommand.js +0 -25
- package/dist/src/ui/commands/quitCommand.js.map +1 -1
- package/dist/src/ui/commands/setupGithubCommand.d.ts +0 -2
- package/dist/src/ui/commands/setupGithubCommand.js +26 -132
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.js +2 -2
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +3 -19
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/commands/ums/umsInitCommand.js +21 -55
- package/dist/src/ui/commands/ums/umsInitCommand.js.map +1 -1
- package/dist/src/ui/components/AboutBox.d.ts +0 -1
- package/dist/src/ui/components/AboutBox.js +1 -1
- package/dist/src/ui/components/AboutBox.js.map +1 -1
- package/dist/src/ui/components/AsciiArt.d.ts +0 -1
- package/dist/src/ui/components/AsciiArt.js +0 -8
- package/dist/src/ui/components/AsciiArt.js.map +1 -1
- package/dist/src/ui/components/AuthDialog.d.ts +1 -1
- package/dist/src/ui/components/AuthDialog.js +15 -17
- package/dist/src/ui/components/AuthDialog.js.map +1 -1
- package/dist/src/ui/components/AuthInProgress.js +5 -6
- package/dist/src/ui/components/AuthInProgress.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js +25 -22
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/DebugProfiler.js +4 -5
- package/dist/src/ui/components/DebugProfiler.js.map +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.js +5 -6
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/Footer.d.ts +0 -1
- package/dist/src/ui/components/Footer.js +6 -16
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/Header.d.ts +1 -0
- package/dist/src/ui/components/Header.js +5 -13
- package/dist/src/ui/components/Header.js.map +1 -1
- package/dist/src/ui/components/Help.js +1 -1
- package/dist/src/ui/components/Help.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +1 -2
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/IDEContextDetailDisplay.d.ts +12 -0
- package/dist/src/ui/components/IDEContextDetailDisplay.js +12 -0
- package/dist/src/ui/components/IDEContextDetailDisplay.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +0 -1
- package/dist/src/ui/components/InputPrompt.js +35 -98
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.js +5 -10
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +5 -7
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.js +7 -8
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.js +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.js +20 -10
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.js +1 -10
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
- package/dist/src/ui/components/messages/InfoMessage.js +1 -6
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +14 -36
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.js +10 -75
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.js +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.js +9 -11
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.d.ts +4 -17
- package/dist/src/ui/components/shared/text-buffer.js +80 -262
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.js +152 -139
- package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -1
- package/dist/src/ui/components/ums/UMSKeyPrompt.js +3 -3
- package/dist/src/ui/components/ums/UMSKeyPrompt.js.map +1 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +1 -3
- package/dist/src/ui/contexts/SessionContext.js +11 -3
- package/dist/src/ui/contexts/SessionContext.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.js +16 -17
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +13 -8
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +2 -9
- package/dist/src/ui/hooks/slashCommandProcessor.js +62 -234
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js +3 -4
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useAuthCommand.js +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +6 -6
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useFocus.d.ts +0 -4
- package/dist/src/ui/hooks/useFocus.js +4 -4
- package/dist/src/ui/hooks/useFocus.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +3 -4
- package/dist/src/ui/hooks/useGeminiStream.js +33 -50
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useKeypress.d.ts +16 -4
- package/dist/src/ui/hooks/useKeypress.js +140 -8
- package/dist/src/ui/hooks/useKeypress.js.map +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.js +2 -2
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.js +2 -6
- package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +15 -15
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useThemeCommand.js +1 -1
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +4 -5
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +4 -5
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -1
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js +4 -5
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -1
- package/dist/src/ui/themes/ansi-light.js +1 -2
- package/dist/src/ui/themes/ansi-light.js.map +1 -1
- package/dist/src/ui/themes/ansi.js +1 -2
- package/dist/src/ui/themes/ansi.js.map +1 -1
- package/dist/src/ui/themes/atom-one-dark.js +1 -2
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -1
- package/dist/src/ui/themes/ayu-light.js +1 -2
- package/dist/src/ui/themes/ayu-light.js.map +1 -1
- package/dist/src/ui/themes/ayu.js +1 -2
- package/dist/src/ui/themes/ayu.js.map +1 -1
- package/dist/src/ui/themes/default-light.js +1 -2
- package/dist/src/ui/themes/default-light.js.map +1 -1
- package/dist/src/ui/themes/default.js +1 -2
- package/dist/src/ui/themes/default.js.map +1 -1
- package/dist/src/ui/themes/dracula.js +1 -2
- package/dist/src/ui/themes/dracula.js.map +1 -1
- package/dist/src/ui/themes/github-dark.js +1 -2
- package/dist/src/ui/themes/github-dark.js.map +1 -1
- package/dist/src/ui/themes/github-light.js +1 -2
- package/dist/src/ui/themes/github-light.js.map +1 -1
- package/dist/src/ui/themes/googlecode.js +1 -2
- package/dist/src/ui/themes/googlecode.js.map +1 -1
- package/dist/src/ui/themes/no-color.js +1 -30
- package/dist/src/ui/themes/no-color.js.map +1 -1
- package/dist/src/ui/themes/qwen-dark.js +1 -2
- package/dist/src/ui/themes/qwen-dark.js.map +1 -1
- package/dist/src/ui/themes/qwen-light.js +1 -2
- package/dist/src/ui/themes/qwen-light.js.map +1 -1
- package/dist/src/ui/themes/shades-of-purple.js +1 -2
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.d.ts +0 -6
- package/dist/src/ui/themes/theme-manager.js +1 -8
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/themes/theme.d.ts +2 -45
- package/dist/src/ui/themes/theme.js +107 -92
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/themes/xcode.js +1 -2
- package/dist/src/ui/themes/xcode.js.map +1 -1
- package/dist/src/ui/types.d.ts +4 -30
- package/dist/src/ui/types.js +0 -2
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.d.ts +1 -2
- package/dist/src/ui/utils/CodeColorizer.js +4 -5
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/ConsolePatcher.d.ts +0 -1
- package/dist/src/ui/utils/ConsolePatcher.js +0 -3
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +1 -8
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +2 -4
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.d.ts +0 -1
- package/dist/src/ui/utils/commandUtils.js +1 -22
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/computeStats.js +1 -3
- package/dist/src/ui/utils/computeStats.js.map +1 -1
- package/dist/src/ui/utils/errorParsing.d.ts +7 -0
- package/dist/src/ui/utils/errorParsing.js +90 -0
- package/dist/src/ui/utils/errorParsing.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +1 -1
- package/dist/src/ui/utils/updateCheck.js +10 -4
- package/dist/src/ui/utils/updateCheck.js.map +1 -1
- package/dist/src/utils/cleanup.d.ts +2 -2
- package/dist/src/utils/cleanup.js +2 -2
- package/dist/src/utils/cleanup.js.map +1 -1
- package/dist/src/utils/gitUtils.d.ts +1 -21
- package/dist/src/utils/gitUtils.js +3 -68
- package/dist/src/utils/gitUtils.js.map +1 -1
- package/dist/src/utils/installationInfo.js +5 -5
- package/dist/src/utils/installationInfo.js.map +1 -1
- package/dist/src/utils/readStdin.js +0 -10
- package/dist/src/utils/readStdin.js.map +1 -1
- package/dist/src/utils/sandbox.js +434 -457
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/version.js +1 -1
- package/dist/src/utils/version.js.map +1 -1
- package/dist/src/validateNonInterActiveAuth.js +7 -4
- package/dist/src/validateNonInterActiveAuth.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/dist/src/commands/mcp/add.d.ts +0 -7
- package/dist/src/commands/mcp/add.js +0 -166
- package/dist/src/commands/mcp/add.js.map +0 -1
- package/dist/src/commands/mcp/list.d.ts +0 -8
- package/dist/src/commands/mcp/list.js +0 -110
- package/dist/src/commands/mcp/list.js.map +0 -1
- package/dist/src/commands/mcp/remove.d.ts +0 -7
- package/dist/src/commands/mcp/remove.js +0 -44
- package/dist/src/commands/mcp/remove.js.map +0 -1
- package/dist/src/commands/mcp.d.ts +0 -7
- package/dist/src/commands/mcp.js +0 -23
- package/dist/src/commands/mcp.js.map +0 -1
- package/dist/src/config/auth.test.d.ts +0 -6
- package/dist/src/config/auth.test.js +0 -57
- package/dist/src/config/auth.test.js.map +0 -1
- package/dist/src/config/keyBindings.d.ts +0 -66
- package/dist/src/config/keyBindings.js +0 -141
- package/dist/src/config/keyBindings.js.map +0 -1
- package/dist/src/config/keyBindings.test.d.ts +0 -6
- package/dist/src/config/keyBindings.test.js +0 -51
- package/dist/src/config/keyBindings.test.js.map +0 -1
- package/dist/src/config/settingsSchema.d.ts +0 -613
- package/dist/src/config/settingsSchema.js +0 -586
- package/dist/src/config/settingsSchema.js.map +0 -1
- package/dist/src/config/settingsSchema.test.d.ts +0 -6
- package/dist/src/config/settingsSchema.test.js +0 -196
- package/dist/src/config/settingsSchema.test.js.map +0 -1
- package/dist/src/config/trustedFolders.d.ts +0 -37
- package/dist/src/config/trustedFolders.js +0 -118
- package/dist/src/config/trustedFolders.js.map +0 -1
- package/dist/src/config/trustedFolders.test.d.ts +0 -6
- package/dist/src/config/trustedFolders.test.js +0 -160
- package/dist/src/config/trustedFolders.test.js.map +0 -1
- package/dist/src/gemini.test.d.ts +0 -6
- package/dist/src/gemini.test.js +0 -193
- package/dist/src/gemini.test.js.map +0 -1
- package/dist/src/services/BuiltinCommandLoader.test.d.ts +0 -6
- package/dist/src/services/BuiltinCommandLoader.test.js +0 -111
- package/dist/src/services/BuiltinCommandLoader.test.js.map +0 -1
- package/dist/src/services/CommandService.test.d.ts +0 -6
- package/dist/src/services/CommandService.test.js +0 -232
- package/dist/src/services/CommandService.test.js.map +0 -1
- package/dist/src/test-utils/customMatchers.d.ts +0 -14
- package/dist/src/test-utils/customMatchers.js +0 -46
- package/dist/src/test-utils/customMatchers.js.map +0 -1
- package/dist/src/test-utils/mockCommandContext.d.ts +0 -18
- package/dist/src/test-utils/mockCommandContext.js +0 -87
- package/dist/src/test-utils/mockCommandContext.js.map +0 -1
- package/dist/src/test-utils/mockCommandContext.test.d.ts +0 -6
- package/dist/src/test-utils/mockCommandContext.test.js +0 -51
- package/dist/src/test-utils/mockCommandContext.test.js.map +0 -1
- package/dist/src/test-utils/render.d.ts +0 -8
- package/dist/src/test-utils/render.js +0 -10
- package/dist/src/test-utils/render.js.map +0 -1
- package/dist/src/ui/IdeIntegrationNudge.d.ts +0 -16
- package/dist/src/ui/IdeIntegrationNudge.js +0 -52
- package/dist/src/ui/IdeIntegrationNudge.js.map +0 -1
- package/dist/src/ui/commands/agentsCommand.d.ts +0 -7
- package/dist/src/ui/commands/agentsCommand.js +0 -32
- package/dist/src/ui/commands/agentsCommand.js.map +0 -1
- package/dist/src/ui/commands/settingsCommand.d.ts +0 -7
- package/dist/src/ui/commands/settingsCommand.js +0 -16
- package/dist/src/ui/commands/settingsCommand.js.map +0 -1
- package/dist/src/ui/commands/setupGithubCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/setupGithubCommand.test.js +0 -167
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +0 -1
- package/dist/src/ui/commands/summaryCommand.d.ts +0 -7
- package/dist/src/ui/commands/summaryCommand.js +0 -149
- package/dist/src/ui/commands/summaryCommand.js.map +0 -1
- package/dist/src/ui/commands/terminalSetupCommand.d.ts +0 -13
- package/dist/src/ui/commands/terminalSetupCommand.js +0 -41
- package/dist/src/ui/commands/terminalSetupCommand.js.map +0 -1
- package/dist/src/ui/components/AuthDialog.test.d.ts +0 -6
- package/dist/src/ui/components/AuthDialog.test.js +0 -220
- package/dist/src/ui/components/AuthDialog.test.js.map +0 -1
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +0 -9
- package/dist/src/ui/components/ContextUsageDisplay.js +0 -14
- package/dist/src/ui/components/ContextUsageDisplay.js.map +0 -1
- package/dist/src/ui/components/FolderTrustDialog.d.ts +0 -16
- package/dist/src/ui/components/FolderTrustDialog.js +0 -39
- package/dist/src/ui/components/FolderTrustDialog.js.map +0 -1
- package/dist/src/ui/components/FolderTrustDialog.test.d.ts +0 -6
- package/dist/src/ui/components/FolderTrustDialog.test.js +0 -26
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +0 -1
- package/dist/src/ui/components/Header.test.d.ts +0 -6
- package/dist/src/ui/components/Header.test.js +0 -37
- package/dist/src/ui/components/Header.test.js.map +0 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/HistoryItemDisplay.test.js +0 -91
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +0 -1
- package/dist/src/ui/components/LoadingIndicator.test.d.ts +0 -6
- package/dist/src/ui/components/LoadingIndicator.test.js +0 -190
- package/dist/src/ui/components/LoadingIndicator.test.js.map +0 -1
- package/dist/src/ui/components/OpenAIKeyPrompt.test.d.ts +0 -6
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js +0 -44
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js.map +0 -1
- package/dist/src/ui/components/QuitConfirmationDialog.d.ts +0 -17
- package/dist/src/ui/components/QuitConfirmationDialog.js +0 -44
- package/dist/src/ui/components/QuitConfirmationDialog.js.map +0 -1
- package/dist/src/ui/components/QwenOAuthProgress.test.d.ts +0 -6
- package/dist/src/ui/components/QwenOAuthProgress.test.js +0 -292
- package/dist/src/ui/components/QwenOAuthProgress.test.js.map +0 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +0 -14
- package/dist/src/ui/components/SettingsDialog.js +0 -519
- package/dist/src/ui/components/SettingsDialog.js.map +0 -1
- package/dist/src/ui/components/SettingsDialog.test.d.ts +0 -6
- package/dist/src/ui/components/SettingsDialog.test.js +0 -568
- package/dist/src/ui/components/SettingsDialog.test.js.map +0 -1
- package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +0 -6
- package/dist/src/ui/components/ShellConfirmationDialog.test.js +0 -40
- package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +0 -1
- package/dist/src/ui/components/TodoDisplay.d.ts +0 -16
- package/dist/src/ui/components/TodoDisplay.js +0 -27
- package/dist/src/ui/components/TodoDisplay.js.map +0 -1
- package/dist/src/ui/components/TodoDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/TodoDisplay.test.js +0 -77
- package/dist/src/ui/components/TodoDisplay.test.js.map +0 -1
- package/dist/src/ui/components/WelcomeBackDialog.d.ts +0 -13
- package/dist/src/ui/components/WelcomeBackDialog.js +0 -31
- package/dist/src/ui/components/WelcomeBackDialog.js.map +0 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +0 -6
- package/dist/src/ui/components/messages/DiffRenderer.test.js +0 -239
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +0 -1
- package/dist/src/ui/components/messages/SummaryMessage.d.ts +0 -11
- package/dist/src/ui/components/messages/SummaryMessage.js +0 -35
- package/dist/src/ui/components/messages/SummaryMessage.js.map +0 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -37
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolMessage.test.js +0 -146
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +0 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +0 -6
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +0 -154
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +0 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +0 -6
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +0 -111
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +0 -1
- package/dist/src/ui/components/shared/TextInput.d.ts +0 -16
- package/dist/src/ui/components/shared/TextInput.js +0 -127
- package/dist/src/ui/components/shared/TextInput.js.map +0 -1
- package/dist/src/ui/components/subagents/constants.d.ts +0 -23
- package/dist/src/ui/components/subagents/constants.js +0 -67
- package/dist/src/ui/components/subagents/constants.js.map +0 -1
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.d.ts +0 -15
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +0 -171
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +0 -1
- package/dist/src/ui/components/subagents/create/ColorSelector.d.ts +0 -15
- package/dist/src/ui/components/subagents/create/ColorSelector.js +0 -41
- package/dist/src/ui/components/subagents/create/ColorSelector.js.map +0 -1
- package/dist/src/ui/components/subagents/create/CreationSummary.d.ts +0 -10
- package/dist/src/ui/components/subagents/create/CreationSummary.js +0 -163
- package/dist/src/ui/components/subagents/create/CreationSummary.js.map +0 -1
- package/dist/src/ui/components/subagents/create/DescriptionInput.d.ts +0 -10
- package/dist/src/ui/components/subagents/create/DescriptionInput.js +0 -105
- package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +0 -1
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.d.ts +0 -10
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +0 -33
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +0 -1
- package/dist/src/ui/components/subagents/create/LocationSelector.d.ts +0 -10
- package/dist/src/ui/components/subagents/create/LocationSelector.js +0 -33
- package/dist/src/ui/components/subagents/create/LocationSelector.js.map +0 -1
- package/dist/src/ui/components/subagents/create/TextEntryStep.d.ts +0 -26
- package/dist/src/ui/components/subagents/create/TextEntryStep.js +0 -28
- package/dist/src/ui/components/subagents/create/TextEntryStep.js.map +0 -1
- package/dist/src/ui/components/subagents/create/ToolSelector.d.ts +0 -16
- package/dist/src/ui/components/subagents/create/ToolSelector.js +0 -143
- package/dist/src/ui/components/subagents/create/ToolSelector.js.map +0 -1
- package/dist/src/ui/components/subagents/index.d.ts +0 -8
- package/dist/src/ui/components/subagents/index.js +0 -12
- package/dist/src/ui/components/subagents/index.js.map +0 -1
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.d.ts +0 -13
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +0 -45
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +0 -1
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.d.ts +0 -13
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +0 -32
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +0 -1
- package/dist/src/ui/components/subagents/manage/AgentEditStep.d.ts +0 -15
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js +0 -62
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +0 -1
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.d.ts +0 -12
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +0 -224
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +0 -1
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.d.ts +0 -11
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js +0 -18
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js.map +0 -1
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.d.ts +0 -15
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +0 -220
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +0 -1
- package/dist/src/ui/components/subagents/reducers.d.ts +0 -14
- package/dist/src/ui/components/subagents/reducers.js +0 -161
- package/dist/src/ui/components/subagents/reducers.js.map +0 -1
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.d.ts +0 -19
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +0 -184
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js.map +0 -1
- package/dist/src/ui/components/subagents/types.d.ts +0 -137
- package/dist/src/ui/components/subagents/types.js +0 -15
- package/dist/src/ui/components/subagents/types.js.map +0 -1
- package/dist/src/ui/components/subagents/utils.d.ts +0 -15
- package/dist/src/ui/components/subagents/utils.js +0 -79
- package/dist/src/ui/components/subagents/utils.js.map +0 -1
- package/dist/src/ui/contexts/KeypressContext.d.ts +0 -31
- package/dist/src/ui/contexts/KeypressContext.js +0 -388
- package/dist/src/ui/contexts/KeypressContext.js.map +0 -1
- package/dist/src/ui/contexts/KeypressContext.test.d.ts +0 -6
- package/dist/src/ui/contexts/KeypressContext.test.js +0 -754
- package/dist/src/ui/contexts/KeypressContext.test.js.map +0 -1
- package/dist/src/ui/contexts/SettingsContext.d.ts +0 -9
- package/dist/src/ui/contexts/SettingsContext.js +0 -15
- package/dist/src/ui/contexts/SettingsContext.js.map +0 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +0 -6
- package/dist/src/ui/hooks/atCommandProcessor.test.js +0 -824
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +0 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +0 -6
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +0 -328
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +0 -1
- package/dist/src/ui/hooks/useAgentsManagerDialog.d.ts +0 -11
- package/dist/src/ui/hooks/useAgentsManagerDialog.js +0 -21
- package/dist/src/ui/hooks/useAgentsManagerDialog.js.map +0 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +0 -6
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +0 -191
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +0 -1
- package/dist/src/ui/hooks/useDialogClose.d.ts +0 -34
- package/dist/src/ui/hooks/useDialogClose.js +0 -62
- package/dist/src/ui/hooks/useDialogClose.js.map +0 -1
- package/dist/src/ui/hooks/useEditorSettings.test.d.ts +0 -6
- package/dist/src/ui/hooks/useEditorSettings.test.js +0 -164
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +0 -1
- package/dist/src/ui/hooks/useFolderTrust.d.ts +0 -12
- package/dist/src/ui/hooks/useFolderTrust.js +0 -55
- package/dist/src/ui/hooks/useFolderTrust.js.map +0 -1
- package/dist/src/ui/hooks/useGitBranchName.test.d.ts +0 -6
- package/dist/src/ui/hooks/useGitBranchName.test.js +0 -239
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +0 -1
- package/dist/src/ui/hooks/useHistoryManager.test.d.ts +0 -6
- package/dist/src/ui/hooks/useHistoryManager.test.js +0 -171
- package/dist/src/ui/hooks/useHistoryManager.test.js.map +0 -1
- package/dist/src/ui/hooks/useInputHistory.test.d.ts +0 -6
- package/dist/src/ui/hooks/useInputHistory.test.js +0 -207
- package/dist/src/ui/hooks/useInputHistory.test.js.map +0 -1
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +0 -15
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +0 -20
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +0 -1
- package/dist/src/ui/hooks/useLaunchEditor.d.ts +0 -10
- package/dist/src/ui/hooks/useLaunchEditor.js +0 -70
- package/dist/src/ui/hooks/useLaunchEditor.js.map +0 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +0 -6
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +0 -91
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +0 -1
- package/dist/src/ui/hooks/useMessageQueue.d.ts +0 -22
- package/dist/src/ui/hooks/useMessageQueue.js +0 -49
- package/dist/src/ui/hooks/useMessageQueue.js.map +0 -1
- package/dist/src/ui/hooks/useMessageQueue.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMessageQueue.test.js +0 -158
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +0 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +0 -6
- package/dist/src/ui/hooks/usePrivacySettings.test.js +0 -154
- package/dist/src/ui/hooks/usePrivacySettings.test.js.map +0 -1
- package/dist/src/ui/hooks/useQuitConfirmation.d.ts +0 -14
- package/dist/src/ui/hooks/useQuitConfirmation.js +0 -36
- package/dist/src/ui/hooks/useQuitConfirmation.js.map +0 -1
- package/dist/src/ui/hooks/useQwenAuth.test.d.ts +0 -6
- package/dist/src/ui/hooks/useQwenAuth.test.js +0 -288
- package/dist/src/ui/hooks/useQwenAuth.test.js.map +0 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +0 -6
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +0 -163
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +0 -1
- package/dist/src/ui/hooks/useSettingsCommand.d.ts +0 -10
- package/dist/src/ui/hooks/useSettingsCommand.js +0 -21
- package/dist/src/ui/hooks/useSettingsCommand.js.map +0 -1
- package/dist/src/ui/hooks/useShellHistory.test.d.ts +0 -6
- package/dist/src/ui/hooks/useShellHistory.test.js +0 -162
- package/dist/src/ui/hooks/useShellHistory.test.js.map +0 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +0 -6
- package/dist/src/ui/hooks/useSlashCompletion.test.js +0 -272
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +0 -1
- package/dist/src/ui/hooks/useSubagentCreateDialog.d.ts +0 -10
- package/dist/src/ui/hooks/useSubagentCreateDialog.js +0 -21
- package/dist/src/ui/hooks/useSubagentCreateDialog.js.map +0 -1
- package/dist/src/ui/hooks/useTimer.test.d.ts +0 -6
- package/dist/src/ui/hooks/useTimer.test.js +0 -90
- package/dist/src/ui/hooks/useTimer.test.js.map +0 -1
- package/dist/src/ui/hooks/useToolScheduler.test.d.ts +0 -6
- package/dist/src/ui/hooks/useToolScheduler.test.js +0 -846
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +0 -1
- package/dist/src/ui/hooks/useWelcomeBack.d.ts +0 -23
- package/dist/src/ui/hooks/useWelcomeBack.js +0 -78
- package/dist/src/ui/hooks/useWelcomeBack.js.map +0 -1
- package/dist/src/ui/keyMatchers.d.ts +0 -26
- package/dist/src/ui/keyMatchers.js +0 -68
- package/dist/src/ui/keyMatchers.js.map +0 -1
- package/dist/src/ui/keyMatchers.test.d.ts +0 -6
- package/dist/src/ui/keyMatchers.test.js +0 -276
- package/dist/src/ui/keyMatchers.test.js.map +0 -1
- package/dist/src/ui/semantic-colors.d.ts +0 -7
- package/dist/src/ui/semantic-colors.js +0 -24
- package/dist/src/ui/semantic-colors.js.map +0 -1
- package/dist/src/ui/themes/color-utils.test.d.ts +0 -6
- package/dist/src/ui/themes/color-utils.test.js +0 -197
- package/dist/src/ui/themes/color-utils.test.js.map +0 -1
- package/dist/src/ui/themes/semantic-tokens.d.ts +0 -37
- package/dist/src/ui/themes/semantic-tokens.js +0 -94
- package/dist/src/ui/themes/semantic-tokens.js.map +0 -1
- package/dist/src/ui/themes/theme-manager.test.d.ts +0 -6
- package/dist/src/ui/themes/theme-manager.test.js +0 -83
- package/dist/src/ui/themes/theme-manager.test.js.map +0 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +0 -6
- package/dist/src/ui/utils/MarkdownDisplay.test.js +0 -151
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +0 -1
- package/dist/src/ui/utils/clipboardUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/clipboardUtils.test.js +0 -65
- package/dist/src/ui/utils/clipboardUtils.test.js.map +0 -1
- package/dist/src/ui/utils/commandUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/commandUtils.test.js +0 -294
- package/dist/src/ui/utils/commandUtils.test.js.map +0 -1
- package/dist/src/ui/utils/displayUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/displayUtils.test.js +0 -42
- package/dist/src/ui/utils/displayUtils.test.js.map +0 -1
- package/dist/src/ui/utils/formatters.test.d.ts +0 -6
- package/dist/src/ui/utils/formatters.test.js +0 -56
- package/dist/src/ui/utils/formatters.test.js.map +0 -1
- package/dist/src/ui/utils/isNarrowWidth.d.ts +0 -6
- package/dist/src/ui/utils/isNarrowWidth.js +0 -9
- package/dist/src/ui/utils/isNarrowWidth.js.map +0 -1
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +0 -13
- package/dist/src/ui/utils/kittyProtocolDetector.js +0 -88
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +0 -1
- package/dist/src/ui/utils/markdownUtilities.test.d.ts +0 -6
- package/dist/src/ui/utils/markdownUtilities.test.js +0 -42
- package/dist/src/ui/utils/markdownUtilities.test.js.map +0 -1
- package/dist/src/ui/utils/platformConstants.d.ts +0 -45
- package/dist/src/ui/utils/platformConstants.js +0 -46
- package/dist/src/ui/utils/platformConstants.js.map +0 -1
- package/dist/src/ui/utils/terminalSetup.d.ts +0 -30
- package/dist/src/ui/utils/terminalSetup.js +0 -281
- package/dist/src/ui/utils/terminalSetup.js.map +0 -1
- package/dist/src/ui/utils/updateCheck.test.d.ts +0 -6
- package/dist/src/ui/utils/updateCheck.test.js +0 -145
- package/dist/src/ui/utils/updateCheck.test.js.map +0 -1
- package/dist/src/utils/checks.d.ts +0 -19
- package/dist/src/utils/checks.js +0 -24
- package/dist/src/utils/checks.js.map +0 -1
- package/dist/src/utils/dialogScopeUtils.d.ts +0 -31
- package/dist/src/utils/dialogScopeUtils.js +0 -48
- package/dist/src/utils/dialogScopeUtils.js.map +0 -1
- package/dist/src/utils/gitUtils.test.d.ts +0 -6
- package/dist/src/utils/gitUtils.test.js +0 -113
- package/dist/src/utils/gitUtils.test.js.map +0 -1
- package/dist/src/utils/installationInfo.test.d.ts +0 -6
- package/dist/src/utils/installationInfo.test.js +0 -242
- package/dist/src/utils/installationInfo.test.js.map +0 -1
- package/dist/src/utils/settingsUtils.d.ts +0 -134
- package/dist/src/utils/settingsUtils.js +0 -336
- package/dist/src/utils/settingsUtils.js.map +0 -1
- package/dist/src/utils/settingsUtils.test.d.ts +0 -6
- package/dist/src/utils/settingsUtils.test.js +0 -514
- package/dist/src/utils/settingsUtils.test.js.map +0 -1
- package/dist/src/utils/userStartupWarnings.test.d.ts +0 -6
- package/dist/src/utils/userStartupWarnings.test.js +0 -67
- package/dist/src/utils/userStartupWarnings.test.js.map +0 -1
- package/dist/src/zed-integration/acp.d.ts +0 -63
- package/dist/src/zed-integration/acp.js.map +0 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +0 -19
- package/dist/src/zed-integration/fileSystemService.js +0 -43
- package/dist/src/zed-integration/fileSystemService.js.map +0 -1
- package/dist/src/zed-integration/schema.d.ts +0 -11782
- package/dist/src/zed-integration/schema.js +0 -311
- package/dist/src/zed-integration/schema.js.map +0 -1
- package/dist/src/zed-integration/zedIntegration.d.ts +0 -10
- package/dist/src/zed-integration/zedIntegration.js +0 -765
- package/dist/src/zed-integration/zedIntegration.js.map +0 -1
package/dist/src/ui/App.js
CHANGED
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
7
|
import { useCallback, useEffect, useMemo, useState, useRef } from 'react';
|
|
8
|
-
import { Box, measureElement, Static, Text, useStdin, useStdout, } from 'ink';
|
|
8
|
+
import { Box, measureElement, Static, Text, useStdin, useStdout, useInput, } from 'ink';
|
|
9
9
|
import { StreamingState, MessageType } from './types.js';
|
|
10
10
|
import { useTerminalSize } from './hooks/useTerminalSize.js';
|
|
11
11
|
import { useGeminiStream } from './hooks/useGeminiStream.js';
|
|
@@ -13,16 +13,9 @@ import { useLoadingIndicator } from './hooks/useLoadingIndicator.js';
|
|
|
13
13
|
import { useThemeCommand } from './hooks/useThemeCommand.js';
|
|
14
14
|
import { useAuthCommand } from './hooks/useAuthCommand.js';
|
|
15
15
|
import { useQwenAuth } from './hooks/useQwenAuth.js';
|
|
16
|
-
import { useFolderTrust } from './hooks/useFolderTrust.js';
|
|
17
16
|
import { useEditorSettings } from './hooks/useEditorSettings.js';
|
|
18
|
-
import { useQuitConfirmation } from './hooks/useQuitConfirmation.js';
|
|
19
|
-
import { useWelcomeBack } from './hooks/useWelcomeBack.js';
|
|
20
|
-
import { useDialogClose } from './hooks/useDialogClose.js';
|
|
21
17
|
import { useSlashCommandProcessor } from './hooks/slashCommandProcessor.js';
|
|
22
|
-
import { useSubagentCreateDialog } from './hooks/useSubagentCreateDialog.js';
|
|
23
|
-
import { useAgentsManagerDialog } from './hooks/useAgentsManagerDialog.js';
|
|
24
18
|
import { useAutoAcceptIndicator } from './hooks/useAutoAcceptIndicator.js';
|
|
25
|
-
import { useMessageQueue } from './hooks/useMessageQueue.js';
|
|
26
19
|
import { useConsoleMessages } from './hooks/useConsoleMessages.js';
|
|
27
20
|
import { Header } from './components/Header.js';
|
|
28
21
|
import { LoadingIndicator } from './components/LoadingIndicator.js';
|
|
@@ -35,24 +28,19 @@ import { AuthDialog } from './components/AuthDialog.js';
|
|
|
35
28
|
import { AuthInProgress } from './components/AuthInProgress.js';
|
|
36
29
|
import { QwenOAuthProgress } from './components/QwenOAuthProgress.js';
|
|
37
30
|
import { EditorSettingsDialog } from './components/EditorSettingsDialog.js';
|
|
38
|
-
import { FolderTrustDialog } from './components/FolderTrustDialog.js';
|
|
39
31
|
import { ShellConfirmationDialog } from './components/ShellConfirmationDialog.js';
|
|
40
|
-
import { QuitConfirmationDialog } from './components/QuitConfirmationDialog.js';
|
|
41
|
-
import { RadioButtonSelect } from './components/shared/RadioButtonSelect.js';
|
|
42
|
-
import { AgentCreationWizard, AgentsManagerDialog, } from './components/subagents/index.js';
|
|
43
32
|
import { Colors } from './colors.js';
|
|
44
33
|
import { loadHierarchicalGeminiMemory } from '../config/config.js';
|
|
45
|
-
import { SettingScope } from '../config/settings.js';
|
|
46
34
|
import { Tips } from './components/Tips.js';
|
|
47
35
|
import { ConsolePatcher } from './utils/ConsolePatcher.js';
|
|
48
36
|
import { registerCleanup } from '../utils/cleanup.js';
|
|
49
37
|
import { DetailedMessagesDisplay } from './components/DetailedMessagesDisplay.js';
|
|
50
38
|
import { HistoryItemDisplay } from './components/HistoryItemDisplay.js';
|
|
51
39
|
import { ContextSummaryDisplay } from './components/ContextSummaryDisplay.js';
|
|
40
|
+
import { IDEContextDetailDisplay } from './components/IDEContextDetailDisplay.js';
|
|
52
41
|
import { useHistory } from './hooks/useHistoryManager.js';
|
|
53
42
|
import process from 'node:process';
|
|
54
43
|
import { getErrorMessage, getAllGeminiMdFilenames, ApprovalMode, isEditorAvailable, FlashFallbackEvent, logFlashFallback, AuthType, ideContext, } from '@umsai/ums-code-core';
|
|
55
|
-
import { IdeIntegrationNudge, } from './IdeIntegrationNudge.js';
|
|
56
44
|
import { validateAuthMethod } from '../config/auth.js';
|
|
57
45
|
import { useLogger } from './hooks/useLogger.js';
|
|
58
46
|
import { StreamingContext } from './contexts/StreamingContext.js';
|
|
@@ -63,10 +51,6 @@ import { useBracketedPaste } from './hooks/useBracketedPaste.js';
|
|
|
63
51
|
import { useTextBuffer } from './components/shared/text-buffer.js';
|
|
64
52
|
import { useVimMode, VimModeProvider } from './contexts/VimModeContext.js';
|
|
65
53
|
import { useVim } from './hooks/vim.js';
|
|
66
|
-
import { useKeypress } from './hooks/useKeypress.js';
|
|
67
|
-
import { KeypressProvider } from './contexts/KeypressContext.js';
|
|
68
|
-
import { useKittyKeyboardProtocol } from './hooks/useKittyKeyboardProtocol.js';
|
|
69
|
-
import { keyMatchers, Command } from './keyMatchers.js';
|
|
70
54
|
import * as fs from 'fs';
|
|
71
55
|
import { UpdateNotification } from './components/UpdateNotification.js';
|
|
72
56
|
import { isProQuotaExceededError, isGenericQuotaExceededError, UserTierId, } from '@umsai/ums-code-core';
|
|
@@ -74,22 +58,10 @@ import ansiEscapes from 'ansi-escapes';
|
|
|
74
58
|
import { OverflowProvider } from './contexts/OverflowContext.js';
|
|
75
59
|
import { ShowMoreLines } from './components/ShowMoreLines.js';
|
|
76
60
|
import { PrivacyNotice } from './privacy/PrivacyNotice.js';
|
|
77
|
-
import { useSettingsCommand } from './hooks/useSettingsCommand.js';
|
|
78
|
-
import { SettingsDialog } from './components/SettingsDialog.js';
|
|
79
61
|
import { setUpdateHandler } from '../utils/handleAutoUpdate.js';
|
|
80
62
|
import { appEvents, AppEvent } from '../utils/events.js';
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
// Maximum number of queued messages to display in UI to prevent performance issues
|
|
84
|
-
const MAX_DISPLAYED_QUEUED_MESSAGES = 3;
|
|
85
|
-
export const AppWrapper = (props) => {
|
|
86
|
-
const kittyProtocolStatus = useKittyKeyboardProtocol();
|
|
87
|
-
const nodeMajorVersion = parseInt(process.versions.node.split('.')[0], 10);
|
|
88
|
-
// TODO 解决上下按键无响应问题
|
|
89
|
-
let pasteWorkaround = process.platform === 'win32' || nodeMajorVersion < 20;
|
|
90
|
-
pasteWorkaround = false;
|
|
91
|
-
return (_jsx(KeypressProvider, { kittyProtocolEnabled: kittyProtocolStatus.enabled, pasteWorkaround: pasteWorkaround, config: props.config, children: _jsx(SessionStatsProvider, { children: _jsx(VimModeProvider, { settings: props.settings, children: _jsx(App, { ...props }) }) }) }));
|
|
92
|
-
};
|
|
63
|
+
const CTRL_EXIT_PROMPT_DURATION_MS = 1000;
|
|
64
|
+
export const AppWrapper = (props) => (_jsx(SessionStatsProvider, { children: _jsx(VimModeProvider, { settings: props.settings, children: _jsx(App, { ...props }) }) }));
|
|
93
65
|
const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
94
66
|
const isFocused = useFocus();
|
|
95
67
|
useBracketedPaste();
|
|
@@ -97,15 +69,6 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
97
69
|
const { stdout } = useStdout();
|
|
98
70
|
const nightly = version.includes('nightly');
|
|
99
71
|
const { history, addItem, clearItems, loadHistory } = useHistory();
|
|
100
|
-
const [idePromptAnswered, setIdePromptAnswered] = useState(false);
|
|
101
|
-
const currentIDE = config.getIdeClient().getCurrentIde();
|
|
102
|
-
useEffect(() => {
|
|
103
|
-
registerCleanup(() => config.getIdeClient().disconnect());
|
|
104
|
-
}, [config]);
|
|
105
|
-
const shouldShowIdePrompt = currentIDE &&
|
|
106
|
-
!config.getIdeMode() &&
|
|
107
|
-
!settings.merged.hasSeenIdeIntegrationNudge &&
|
|
108
|
-
!idePromptAnswered;
|
|
109
72
|
useEffect(() => {
|
|
110
73
|
const cleanup = setUpdateHandler(addItem, setUpdateInfo);
|
|
111
74
|
return cleanup;
|
|
@@ -133,11 +96,11 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
133
96
|
const [editorError, setEditorError] = useState(null);
|
|
134
97
|
const [footerHeight, setFooterHeight] = useState(0);
|
|
135
98
|
const [corgiMode, setCorgiMode] = useState(false);
|
|
136
|
-
const [isTrustedFolderState, setIsTrustedFolder] = useState(config.isTrustedFolder());
|
|
137
99
|
const [currentModel, setCurrentModel] = useState(config.getModel());
|
|
138
100
|
const [shellModeActive, setShellModeActive] = useState(false);
|
|
139
101
|
const [showErrorDetails, setShowErrorDetails] = useState(false);
|
|
140
102
|
const [showToolDescriptions, setShowToolDescriptions] = useState(false);
|
|
103
|
+
const [showIDEContextDetail, setShowIDEContextDetail] = useState(false);
|
|
141
104
|
const [ctrlCPressedOnce, setCtrlCPressedOnce] = useState(false);
|
|
142
105
|
const [quittingMessages, setQuittingMessages] = useState(null);
|
|
143
106
|
const ctrlCTimerRef = useRef(null);
|
|
@@ -148,7 +111,6 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
148
111
|
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = useState(false);
|
|
149
112
|
const [userTier, setUserTier] = useState(undefined);
|
|
150
113
|
const [ideContextState, setIdeContextState] = useState();
|
|
151
|
-
const [showEscapePrompt, setShowEscapePrompt] = useState(false);
|
|
152
114
|
const [isProcessing, setIsProcessing] = useState(false);
|
|
153
115
|
useEffect(() => {
|
|
154
116
|
const unsubscribe = ideContext.subscribeToIdeContext(setIdeContextState);
|
|
@@ -178,19 +140,11 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
178
140
|
const openPrivacyNotice = useCallback(() => {
|
|
179
141
|
setShowPrivacyNotice(true);
|
|
180
142
|
}, []);
|
|
181
|
-
const handleEscapePromptChange = useCallback((showPrompt) => {
|
|
182
|
-
setShowEscapePrompt(showPrompt);
|
|
183
|
-
}, []);
|
|
184
143
|
const initialPromptSubmitted = useRef(false);
|
|
185
144
|
const errorCount = useMemo(() => consoleMessages
|
|
186
145
|
.filter((msg) => msg.type === 'error')
|
|
187
146
|
.reduce((total, msg) => total + msg.count, 0), [consoleMessages]);
|
|
188
147
|
const { isThemeDialogOpen, openThemeDialog, handleThemeSelect, handleThemeHighlight, } = useThemeCommand(settings, setThemeError, addItem);
|
|
189
|
-
const { isSettingsDialogOpen, openSettingsDialog, closeSettingsDialog } = useSettingsCommand();
|
|
190
|
-
const { isSubagentCreateDialogOpen, openSubagentCreateDialog, closeSubagentCreateDialog, } = useSubagentCreateDialog();
|
|
191
|
-
const { isAgentsManagerDialogOpen, openAgentsManagerDialog, closeAgentsManagerDialog, } = useAgentsManagerDialog();
|
|
192
|
-
const { isFolderTrustDialogOpen, handleFolderTrustSelect } = useFolderTrust(settings, setIsTrustedFolder);
|
|
193
|
-
const { showQuitConfirmation, handleQuitConfirmationSelect } = useQuitConfirmation();
|
|
194
148
|
const { isAuthDialogOpen, openAuthDialog, handleAuthSelect, isAuthenticating, cancelAuthentication, } = useAuthCommand(settings, setAuthError, config);
|
|
195
149
|
const { isQwenAuthenticating, deviceAuth, isQwenAuth, cancelQwenAuth, authStatus, authMessage, } = useQwenAuth(settings, isAuthenticating);
|
|
196
150
|
useEffect(() => {
|
|
@@ -352,12 +306,11 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
352
306
|
}, [config, addItem, userTier]);
|
|
353
307
|
// Terminal and UI setup
|
|
354
308
|
const { rows: terminalHeight, columns: terminalWidth } = useTerminalSize();
|
|
355
|
-
const isNarrow = isNarrowWidth(terminalWidth);
|
|
356
309
|
const { stdin, setRawMode } = useStdin();
|
|
357
310
|
const isInitialMount = useRef(true);
|
|
358
311
|
const widthFraction = 0.9;
|
|
359
312
|
const inputWidth = Math.max(20, Math.floor(terminalWidth * widthFraction) - 3);
|
|
360
|
-
const suggestionsWidth = Math.max(
|
|
313
|
+
const suggestionsWidth = Math.max(60, Math.floor(terminalWidth * 0.8));
|
|
361
314
|
// Utility callbacks
|
|
362
315
|
const isValidPath = useCallback((filePath) => {
|
|
363
316
|
try {
|
|
@@ -382,7 +335,15 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
382
335
|
}, [openAuthDialog, setAuthError]);
|
|
383
336
|
// Core hooks and processors
|
|
384
337
|
const { vimEnabled: vimModeEnabled, vimMode, toggleVimEnabled, } = useVimMode();
|
|
385
|
-
const { handleSlashCommand, slashCommands, pendingHistoryItems: pendingSlashCommandHistoryItems, commandContext, shellConfirmationRequest,
|
|
338
|
+
const { handleSlashCommand, slashCommands, pendingHistoryItems: pendingSlashCommandHistoryItems, commandContext, shellConfirmationRequest, } = useSlashCommandProcessor(config, settings, addItem, clearItems, loadHistory, refreshStatic, setDebugMessage, openThemeDialog, openAuthDialog, openEditorDialog, toggleCorgiMode, setQuittingMessages, openPrivacyNotice, toggleVimEnabled, setIsProcessing, setGeminiMdFileCount);
|
|
339
|
+
const { streamingState, submitQuery, initError, pendingHistoryItems: pendingGeminiHistoryItems, thought, } = useGeminiStream(config.getGeminiClient(), history, addItem, config, setDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, refreshStatic);
|
|
340
|
+
// Input handling
|
|
341
|
+
const handleFinalSubmit = useCallback((submittedValue) => {
|
|
342
|
+
const trimmedValue = submittedValue.trim();
|
|
343
|
+
if (trimmedValue.length > 0) {
|
|
344
|
+
submitQuery(trimmedValue);
|
|
345
|
+
}
|
|
346
|
+
}, [submitQuery]);
|
|
386
347
|
const buffer = useTextBuffer({
|
|
387
348
|
initialText: '',
|
|
388
349
|
viewport: { height: 10, width: inputWidth },
|
|
@@ -391,123 +352,41 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
391
352
|
isValidPath,
|
|
392
353
|
shellModeActive,
|
|
393
354
|
});
|
|
394
|
-
const [userMessages, setUserMessages] = useState([]);
|
|
395
|
-
// Stable reference for cancel handler to avoid circular dependency
|
|
396
|
-
const cancelHandlerRef = useRef(() => { });
|
|
397
|
-
const { streamingState, submitQuery, initError, pendingHistoryItems: pendingGeminiHistoryItems, thought, cancelOngoingRequest, } = useGeminiStream(config.getGeminiClient(), history, addItem, config, setDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, refreshStatic, () => cancelHandlerRef.current());
|
|
398
|
-
// Welcome back functionality
|
|
399
|
-
const { welcomeBackInfo, showWelcomeBackDialog, welcomeBackChoice, handleWelcomeBackSelection, handleWelcomeBackClose, } = useWelcomeBack(config, submitQuery, buffer, settings.merged);
|
|
400
|
-
// Dialog close functionality
|
|
401
|
-
const { closeAnyOpenDialog } = useDialogClose({
|
|
402
|
-
isThemeDialogOpen,
|
|
403
|
-
handleThemeSelect,
|
|
404
|
-
isAuthDialogOpen,
|
|
405
|
-
handleAuthSelect,
|
|
406
|
-
selectedAuthType: settings.merged.selectedAuthType,
|
|
407
|
-
isEditorDialogOpen,
|
|
408
|
-
exitEditorDialog,
|
|
409
|
-
isSettingsDialogOpen,
|
|
410
|
-
closeSettingsDialog,
|
|
411
|
-
isFolderTrustDialogOpen,
|
|
412
|
-
showPrivacyNotice,
|
|
413
|
-
setShowPrivacyNotice,
|
|
414
|
-
showWelcomeBackDialog,
|
|
415
|
-
handleWelcomeBackClose,
|
|
416
|
-
quitConfirmationRequest,
|
|
417
|
-
});
|
|
418
|
-
// Message queue for handling input during streaming
|
|
419
|
-
const { messageQueue, addMessage, clearQueue, getQueuedMessagesText } = useMessageQueue({
|
|
420
|
-
streamingState,
|
|
421
|
-
submitQuery,
|
|
422
|
-
});
|
|
423
|
-
// Update the cancel handler with message queue support
|
|
424
|
-
cancelHandlerRef.current = useCallback(() => {
|
|
425
|
-
const lastUserMessage = userMessages.at(-1);
|
|
426
|
-
let textToSet = lastUserMessage || '';
|
|
427
|
-
// Append queued messages if any exist
|
|
428
|
-
const queuedText = getQueuedMessagesText();
|
|
429
|
-
if (queuedText) {
|
|
430
|
-
textToSet = textToSet ? `${textToSet}\n\n${queuedText}` : queuedText;
|
|
431
|
-
clearQueue();
|
|
432
|
-
}
|
|
433
|
-
if (textToSet) {
|
|
434
|
-
buffer.setText(textToSet);
|
|
435
|
-
}
|
|
436
|
-
}, [buffer, userMessages, getQueuedMessagesText, clearQueue]);
|
|
437
|
-
// Input handling - queue messages for processing
|
|
438
|
-
const handleFinalSubmit = useCallback((submittedValue) => {
|
|
439
|
-
addMessage(submittedValue);
|
|
440
|
-
}, [addMessage]);
|
|
441
|
-
const handleIdePromptComplete = useCallback((result) => {
|
|
442
|
-
if (result.userSelection === 'yes') {
|
|
443
|
-
if (result.isExtensionPreInstalled) {
|
|
444
|
-
handleSlashCommand('/ide enable');
|
|
445
|
-
}
|
|
446
|
-
else {
|
|
447
|
-
handleSlashCommand('/ide install');
|
|
448
|
-
}
|
|
449
|
-
settings.setValue(SettingScope.User, 'hasSeenIdeIntegrationNudge', true);
|
|
450
|
-
}
|
|
451
|
-
else if (result.userSelection === 'dismiss') {
|
|
452
|
-
settings.setValue(SettingScope.User, 'hasSeenIdeIntegrationNudge', true);
|
|
453
|
-
}
|
|
454
|
-
setIdePromptAnswered(true);
|
|
455
|
-
}, [handleSlashCommand, settings]);
|
|
456
355
|
const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
|
|
457
356
|
const pendingHistoryItems = [...pendingSlashCommandHistoryItems];
|
|
458
357
|
pendingHistoryItems.push(...pendingGeminiHistoryItems);
|
|
459
358
|
const { elapsedTime, currentLoadingPhrase } = useLoadingIndicator(streamingState);
|
|
460
359
|
const showAutoAcceptIndicator = useAutoAcceptIndicator({ config });
|
|
461
360
|
const handleExit = useCallback((pressedOnce, setPressedOnce, timerRef) => {
|
|
462
|
-
// Fast double-press: Direct quit (preserve user habit)
|
|
463
361
|
if (pressedOnce) {
|
|
464
362
|
if (timerRef.current) {
|
|
465
363
|
clearTimeout(timerRef.current);
|
|
466
364
|
}
|
|
467
|
-
//
|
|
365
|
+
// Directly invoke the central command handler.
|
|
468
366
|
handleSlashCommand('/quit');
|
|
469
|
-
return;
|
|
470
|
-
}
|
|
471
|
-
// First press: Prioritize cleanup tasks
|
|
472
|
-
// Special case: If quit-confirm dialog is open, Ctrl+C means "quit immediately"
|
|
473
|
-
if (quitConfirmationRequest) {
|
|
474
|
-
handleSlashCommand('/quit');
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
// 1. Close other dialogs (highest priority)
|
|
478
|
-
if (closeAnyOpenDialog()) {
|
|
479
|
-
return; // Dialog closed, end processing
|
|
480
|
-
}
|
|
481
|
-
// 2. Cancel ongoing requests
|
|
482
|
-
if (streamingState === StreamingState.Responding) {
|
|
483
|
-
cancelOngoingRequest?.();
|
|
484
|
-
return; // Request cancelled, end processing
|
|
485
367
|
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
368
|
+
else {
|
|
369
|
+
setPressedOnce(true);
|
|
370
|
+
timerRef.current = setTimeout(() => {
|
|
371
|
+
setPressedOnce(false);
|
|
372
|
+
timerRef.current = null;
|
|
373
|
+
}, CTRL_EXIT_PROMPT_DURATION_MS);
|
|
490
374
|
}
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}, [
|
|
494
|
-
handleSlashCommand,
|
|
495
|
-
quitConfirmationRequest,
|
|
496
|
-
closeAnyOpenDialog,
|
|
497
|
-
streamingState,
|
|
498
|
-
cancelOngoingRequest,
|
|
499
|
-
buffer,
|
|
500
|
-
]);
|
|
501
|
-
const handleGlobalKeypress = useCallback((key) => {
|
|
375
|
+
}, [handleSlashCommand]);
|
|
376
|
+
useInput((input, key) => {
|
|
502
377
|
let enteringConstrainHeightMode = false;
|
|
503
378
|
if (!constrainHeight) {
|
|
379
|
+
// Automatically re-enter constrain height mode if the user types
|
|
380
|
+
// anything. When constrainHeight==false, the user will experience
|
|
381
|
+
// significant flickering so it is best to disable it immediately when
|
|
382
|
+
// the user starts interacting with the app.
|
|
504
383
|
enteringConstrainHeightMode = true;
|
|
505
384
|
setConstrainHeight(true);
|
|
506
385
|
}
|
|
507
|
-
if (
|
|
386
|
+
if (key.ctrl && input === 'o') {
|
|
508
387
|
setShowErrorDetails((prev) => !prev);
|
|
509
388
|
}
|
|
510
|
-
else if (
|
|
389
|
+
else if (key.ctrl && input === 't') {
|
|
511
390
|
const newValue = !showToolDescriptions;
|
|
512
391
|
setShowToolDescriptions(newValue);
|
|
513
392
|
const mcpServers = config.getMcpServers();
|
|
@@ -515,50 +394,25 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
515
394
|
handleSlashCommand(newValue ? '/mcp desc' : '/mcp nodesc');
|
|
516
395
|
}
|
|
517
396
|
}
|
|
518
|
-
else if (
|
|
397
|
+
else if (key.ctrl &&
|
|
398
|
+
input === 'e' &&
|
|
519
399
|
config.getIdeMode() &&
|
|
520
400
|
ideContextState) {
|
|
521
|
-
|
|
522
|
-
handleSlashCommand('/ide status');
|
|
401
|
+
setShowIDEContextDetail((prev) => !prev);
|
|
523
402
|
}
|
|
524
|
-
else if (
|
|
525
|
-
// When authenticating, let AuthInProgress component handle Ctrl+C.
|
|
526
|
-
if (isAuthenticating) {
|
|
527
|
-
return;
|
|
528
|
-
}
|
|
403
|
+
else if (key.ctrl && (input === 'c' || input === 'C')) {
|
|
529
404
|
handleExit(ctrlCPressedOnce, setCtrlCPressedOnce, ctrlCTimerRef);
|
|
530
405
|
}
|
|
531
|
-
else if (
|
|
406
|
+
else if (key.ctrl && (input === 'd' || input === 'D')) {
|
|
532
407
|
if (buffer.text.length > 0) {
|
|
408
|
+
// Do nothing if there is text in the input.
|
|
533
409
|
return;
|
|
534
410
|
}
|
|
535
411
|
handleExit(ctrlDPressedOnce, setCtrlDPressedOnce, ctrlDTimerRef);
|
|
536
412
|
}
|
|
537
|
-
else if (
|
|
538
|
-
!enteringConstrainHeightMode) {
|
|
413
|
+
else if (key.ctrl && input === 's' && !enteringConstrainHeightMode) {
|
|
539
414
|
setConstrainHeight(false);
|
|
540
415
|
}
|
|
541
|
-
}, [
|
|
542
|
-
constrainHeight,
|
|
543
|
-
setConstrainHeight,
|
|
544
|
-
setShowErrorDetails,
|
|
545
|
-
showToolDescriptions,
|
|
546
|
-
setShowToolDescriptions,
|
|
547
|
-
config,
|
|
548
|
-
ideContextState,
|
|
549
|
-
handleExit,
|
|
550
|
-
ctrlCPressedOnce,
|
|
551
|
-
setCtrlCPressedOnce,
|
|
552
|
-
ctrlCTimerRef,
|
|
553
|
-
buffer.text.length,
|
|
554
|
-
ctrlDPressedOnce,
|
|
555
|
-
setCtrlDPressedOnce,
|
|
556
|
-
ctrlDTimerRef,
|
|
557
|
-
handleSlashCommand,
|
|
558
|
-
isAuthenticating,
|
|
559
|
-
]);
|
|
560
|
-
useKeypress(handleGlobalKeypress, {
|
|
561
|
-
isActive: true,
|
|
562
416
|
});
|
|
563
417
|
useEffect(() => {
|
|
564
418
|
if (config) {
|
|
@@ -566,6 +420,7 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
566
420
|
}
|
|
567
421
|
}, [config, config.getGeminiMdFileCount]);
|
|
568
422
|
const logger = useLogger();
|
|
423
|
+
const [userMessages, setUserMessages] = useState([]);
|
|
569
424
|
useEffect(() => {
|
|
570
425
|
const fetchUserMessages = async () => {
|
|
571
426
|
const pastMessagesRaw = (await logger?.getPreviousUserMessages()) || []; // Newest first
|
|
@@ -595,11 +450,7 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
595
450
|
};
|
|
596
451
|
fetchUserMessages();
|
|
597
452
|
}, [history, logger]);
|
|
598
|
-
const isInputActive =
|
|
599
|
-
streamingState === StreamingState.Responding) &&
|
|
600
|
-
!initError &&
|
|
601
|
-
!isProcessing &&
|
|
602
|
-
!showWelcomeBackDialog;
|
|
453
|
+
const isInputActive = streamingState === StreamingState.Idle && !initError && !isProcessing;
|
|
603
454
|
const handleClearScreen = useCallback(() => {
|
|
604
455
|
clearItems();
|
|
605
456
|
clearConsoleMessagesState();
|
|
@@ -660,10 +511,7 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
660
511
|
!isAuthDialogOpen &&
|
|
661
512
|
!isThemeDialogOpen &&
|
|
662
513
|
!isEditorDialogOpen &&
|
|
663
|
-
!isSubagentCreateDialogOpen &&
|
|
664
514
|
!showPrivacyNotice &&
|
|
665
|
-
!showWelcomeBackDialog &&
|
|
666
|
-
welcomeBackChoice !== 'restart' &&
|
|
667
515
|
geminiClient?.isInitialized?.()) {
|
|
668
516
|
submitQuery(initialPrompt);
|
|
669
517
|
initialPromptSubmitted.current = true;
|
|
@@ -675,10 +523,7 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
675
523
|
isAuthDialogOpen,
|
|
676
524
|
isThemeDialogOpen,
|
|
677
525
|
isEditorDialogOpen,
|
|
678
|
-
isSubagentCreateDialogOpen,
|
|
679
526
|
showPrivacyNotice,
|
|
680
|
-
showWelcomeBackDialog,
|
|
681
|
-
welcomeBackChoice,
|
|
682
527
|
geminiClient,
|
|
683
528
|
]);
|
|
684
529
|
if (quittingMessages) {
|
|
@@ -693,27 +538,14 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
693
538
|
? " Press 'i' for INSERT mode and 'Esc' for NORMAL mode."
|
|
694
539
|
: ' Type your message or @path/to/file';
|
|
695
540
|
return (_jsx(StreamingContext.Provider, { value: streamingState, children: _jsxs(Box, { flexDirection: "column", width: "90%", children: [_jsx(Static, { items: [
|
|
696
|
-
_jsxs(Box, { flexDirection: "column", children: [!settings.merged.hideBanner && (_jsx(Header, { version: version, nightly: nightly })), !settings.merged.hideTips && _jsx(Tips, { config: config })] }, "header"),
|
|
541
|
+
_jsxs(Box, { flexDirection: "column", children: [!settings.merged.hideBanner && (_jsx(Header, { terminalWidth: terminalWidth, version: version, nightly: nightly })), !settings.merged.hideTips && _jsx(Tips, { config: config })] }, "header"),
|
|
697
542
|
...history.map((h) => (_jsx(HistoryItemDisplay, { terminalWidth: mainAreaWidth, availableTerminalHeight: staticAreaMaxItemHeight, item: h, isPending: false, config: config, commands: slashCommands }, h.id))),
|
|
698
543
|
], children: (item) => item }, staticKey), _jsx(OverflowProvider, { children: _jsxs(Box, { ref: pendingHistoryItemRef, flexDirection: "column", children: [pendingHistoryItems.map((item, i) => (_jsx(HistoryItemDisplay, { availableTerminalHeight: constrainHeight ? availableTerminalHeight : undefined, terminalWidth: mainAreaWidth,
|
|
699
544
|
// TODO(taehykim): It seems like references to ids aren't necessary in
|
|
700
545
|
// HistoryItemDisplay. Refactor later. Use a fake id for now.
|
|
701
|
-
item: { ...item, id: 0 }, isPending: true, config: config, isFocused: !isEditorDialogOpen }, i))), _jsx(ShowMoreLines, { constrainHeight: constrainHeight })] }) }), _jsxs(Box, { flexDirection: "column", ref: mainControlsRef, children: [updateInfo && _jsx(UpdateNotification, { message: updateInfo.message }), startupWarnings.length > 0 && (_jsx(Box, { borderStyle: "round", borderColor: Colors.AccentYellow, paddingX: 1, marginY: 1, flexDirection: "column", children: startupWarnings.map((warning, index) => (_jsx(Text, { color: Colors.AccentYellow, children: warning }, index))) })),
|
|
702
|
-
const result = handleQuitConfirmationSelect(choice);
|
|
703
|
-
if (result?.shouldQuit) {
|
|
704
|
-
quitConfirmationRequest.onConfirm(true, result.action);
|
|
705
|
-
}
|
|
706
|
-
else {
|
|
707
|
-
quitConfirmationRequest.onConfirm(false);
|
|
708
|
-
}
|
|
709
|
-
} })) : shellConfirmationRequest ? (_jsx(ShellConfirmationDialog, { request: shellConfirmationRequest })) : confirmationRequest ? (_jsxs(Box, { flexDirection: "column", children: [confirmationRequest.prompt, _jsx(Box, { paddingY: 1, children: _jsx(RadioButtonSelect, { isFocused: !!confirmationRequest, items: [
|
|
710
|
-
{ label: 'Yes', value: true },
|
|
711
|
-
{ label: 'No', value: false },
|
|
712
|
-
], onSelect: (value) => {
|
|
713
|
-
confirmationRequest.onConfirm(value);
|
|
714
|
-
} }) })] })) : isThemeDialogOpen ? (_jsxs(Box, { flexDirection: "column", children: [themeError && (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: Colors.AccentRed, children: themeError }) })), _jsx(ThemeDialog, { onSelect: handleThemeSelect, onHighlight: handleThemeHighlight, settings: settings, availableTerminalHeight: constrainHeight
|
|
546
|
+
item: { ...item, id: 0 }, isPending: true, config: config, isFocused: !isEditorDialogOpen }, i))), _jsx(ShowMoreLines, { constrainHeight: constrainHeight })] }) }), _jsxs(Box, { flexDirection: "column", ref: mainControlsRef, children: [updateInfo && _jsx(UpdateNotification, { message: updateInfo.message }), startupWarnings.length > 0 && (_jsx(Box, { borderStyle: "round", borderColor: Colors.AccentYellow, paddingX: 1, marginY: 1, flexDirection: "column", children: startupWarnings.map((warning, index) => (_jsx(Text, { color: Colors.AccentYellow, children: warning }, index))) })), shellConfirmationRequest ? (_jsx(ShellConfirmationDialog, { request: shellConfirmationRequest })) : isThemeDialogOpen ? (_jsxs(Box, { flexDirection: "column", children: [themeError && (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: Colors.AccentRed, children: themeError }) })), _jsx(ThemeDialog, { onSelect: handleThemeSelect, onHighlight: handleThemeHighlight, settings: settings, availableTerminalHeight: constrainHeight
|
|
715
547
|
? terminalHeight - staticExtraHeight
|
|
716
|
-
: undefined, terminalWidth: mainAreaWidth })] })) :
|
|
548
|
+
: undefined, terminalWidth: mainAreaWidth })] })) : isAuthenticating ? (_jsxs(_Fragment, { children: [isQwenAuth && isQwenAuthenticating ? (_jsx(QwenOAuthProgress, { deviceAuth: deviceAuth || undefined, authStatus: authStatus, authMessage: authMessage, onTimeout: () => {
|
|
717
549
|
setAuthError('Qwen OAuth authentication timed out. Please try again.');
|
|
718
550
|
cancelQwenAuth();
|
|
719
551
|
cancelAuthentication();
|
|
@@ -732,19 +564,9 @@ const App = ({ config, settings, startupWarnings = [], version }) => {
|
|
|
732
564
|
? undefined
|
|
733
565
|
: thought, currentLoadingPhrase: config.getAccessibility()?.disableLoadingPhrases
|
|
734
566
|
? undefined
|
|
735
|
-
: currentLoadingPhrase, elapsedTime: elapsedTime }),
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
// Replace all whitespace (including newlines) with a single space.
|
|
740
|
-
const preview = message.replace(/\s+/g, ' ');
|
|
741
|
-
return (
|
|
742
|
-
// Ensure the Box takes full width so truncation calculates correctly
|
|
743
|
-
_jsx(Box, { paddingLeft: 2, width: "100%", children: _jsx(Text, { dimColor: true, wrap: "truncate", children: preview }) }, index));
|
|
744
|
-
}), messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { dimColor: true, children: ["... (+", messageQueue.length -
|
|
745
|
-
MAX_DISPLAYED_QUEUED_MESSAGES, ' ', "more)"] }) }))] })), _jsxs(Box, { marginTop: 1, justifyContent: "space-between", width: "100%", flexDirection: isNarrow ? 'column' : 'row', alignItems: isNarrow ? 'flex-start' : 'center', children: [_jsxs(Box, { children: [process.env['GEMINI_SYSTEM_MD'] && (_jsx(Text, { color: Colors.AccentRed, children: "|\u2310\u25A0_\u25A0| " })), ctrlCPressedOnce ? (_jsx(Text, { color: Colors.AccentYellow, children: "Press Ctrl+C again to confirm exit." })) : ctrlDPressedOnce ? (_jsx(Text, { color: Colors.AccentYellow, children: "Press Ctrl+D again to exit." })) : showEscapePrompt ? (_jsx(Text, { color: Colors.Gray, children: "Press Esc again to clear." })) : (_jsx(ContextSummaryDisplay, { ideContext: ideContextState, geminiMdFileCount: geminiMdFileCount, contextFileNames: contextFileNames, mcpServers: config.getMcpServers(), blockedMcpServers: config.getBlockedMcpServers(), showToolDescriptions: showToolDescriptions }))] }), _jsxs(Box, { paddingTop: isNarrow ? 1 : 0, children: [showAutoAcceptIndicator !== ApprovalMode.DEFAULT &&
|
|
746
|
-
!shellModeActive && (_jsx(AutoAcceptIndicator, { approvalMode: showAutoAcceptIndicator })), shellModeActive && _jsx(ShellModeIndicator, {})] })] }), showErrorDetails && (_jsx(OverflowProvider, { children: _jsxs(Box, { flexDirection: "column", children: [_jsx(DetailedMessagesDisplay, { messages: filteredConsoleMessages, maxHeight: constrainHeight ? debugConsoleMaxHeight : undefined, width: inputWidth }), _jsx(ShowMoreLines, { constrainHeight: constrainHeight })] }) })), isInputActive && (_jsx(InputPrompt, { buffer: buffer, inputWidth: inputWidth, suggestionsWidth: suggestionsWidth, onSubmit: handleFinalSubmit, userMessages: userMessages, onClearScreen: handleClearScreen, config: config, slashCommands: slashCommands, commandContext: commandContext, shellModeActive: shellModeActive, setShellModeActive: setShellModeActive, onEscapePromptChange: handleEscapePromptChange, focus: isFocused, vimHandleInput: vimHandleInput, placeholder: placeholder }))] })), initError && streamingState !== StreamingState.Responding && (_jsx(Box, { borderStyle: "round", borderColor: Colors.AccentRed, paddingX: 1, marginBottom: 1, children: history.find((item) => item.type === 'error' && item.text?.includes(initError))?.text ? (_jsx(Text, { color: Colors.AccentRed, children: history.find((item) => item.type === 'error' && item.text?.includes(initError))?.text })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { color: Colors.AccentRed, children: ["Initialization Error: ", initError] }), _jsxs(Text, { color: Colors.AccentRed, children: [' ', "Please check API key and configuration."] })] })) })), !settings.merged.hideFooter && (_jsx(Footer, { model: currentModel, targetDir: config.getTargetDir(), debugMode: config.getDebugMode(), branchName: branchName, debugMessage: debugMessage, corgiMode: corgiMode, errorCount: errorCount, showErrorDetails: showErrorDetails, showMemoryUsage: config.getDebugMode() ||
|
|
747
|
-
settings.merged.showMemoryUsage ||
|
|
748
|
-
false, promptTokenCount: sessionStats.lastPromptTokenCount, nightly: nightly, vimMode: vimModeEnabled ? vimMode : undefined, isTrustedFolder: isTrustedFolderState }))] })] }) }));
|
|
567
|
+
: currentLoadingPhrase, elapsedTime: elapsedTime }), _jsxs(Box, { marginTop: 1, display: "flex", justifyContent: "space-between", width: "100%", children: [_jsxs(Box, { children: [process.env.GEMINI_SYSTEM_MD && (_jsx(Text, { color: Colors.AccentRed, children: "|\u2310\u25A0_\u25A0| " })), ctrlCPressedOnce ? (_jsx(Text, { color: Colors.AccentYellow, children: "Press Ctrl+C again to exit." })) : ctrlDPressedOnce ? (_jsx(Text, { color: Colors.AccentYellow, children: "Press Ctrl+D again to exit." })) : (_jsx(ContextSummaryDisplay, { ideContext: ideContextState, geminiMdFileCount: geminiMdFileCount, contextFileNames: contextFileNames, mcpServers: config.getMcpServers(), blockedMcpServers: config.getBlockedMcpServers(), showToolDescriptions: showToolDescriptions }))] }), _jsxs(Box, { children: [showAutoAcceptIndicator !== ApprovalMode.DEFAULT &&
|
|
568
|
+
!shellModeActive && (_jsx(AutoAcceptIndicator, { approvalMode: showAutoAcceptIndicator })), shellModeActive && _jsx(ShellModeIndicator, {})] })] }), showIDEContextDetail && (_jsx(IDEContextDetailDisplay, { ideContext: ideContextState, detectedIdeDisplay: config
|
|
569
|
+
.getIdeClient()
|
|
570
|
+
.getDetectedIdeDisplayName() })), showErrorDetails && (_jsx(OverflowProvider, { children: _jsxs(Box, { flexDirection: "column", children: [_jsx(DetailedMessagesDisplay, { messages: filteredConsoleMessages, maxHeight: constrainHeight ? debugConsoleMaxHeight : undefined, width: inputWidth }), _jsx(ShowMoreLines, { constrainHeight: constrainHeight })] }) })), isInputActive && (_jsx(InputPrompt, { buffer: buffer, inputWidth: inputWidth, suggestionsWidth: suggestionsWidth, onSubmit: handleFinalSubmit, userMessages: userMessages, onClearScreen: handleClearScreen, config: config, slashCommands: slashCommands, commandContext: commandContext, shellModeActive: shellModeActive, setShellModeActive: setShellModeActive, focus: isFocused, vimHandleInput: vimHandleInput, placeholder: placeholder }))] })), initError && streamingState !== StreamingState.Responding && (_jsx(Box, { borderStyle: "round", borderColor: Colors.AccentRed, paddingX: 1, marginBottom: 1, children: history.find((item) => item.type === 'error' && item.text?.includes(initError))?.text ? (_jsx(Text, { color: Colors.AccentRed, children: history.find((item) => item.type === 'error' && item.text?.includes(initError))?.text })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { color: Colors.AccentRed, children: ["Initialization Error: ", initError] }), _jsxs(Text, { color: Colors.AccentRed, children: [' ', "Please check API key and configuration."] })] })) })), _jsx(Footer, { model: currentModel, targetDir: config.getTargetDir(), debugMode: config.getDebugMode(), branchName: branchName, debugMessage: debugMessage, corgiMode: corgiMode, errorCount: errorCount, showErrorDetails: showErrorDetails, showMemoryUsage: config.getDebugMode() || config.getShowMemoryUsage(), promptTokenCount: sessionStats.lastPromptTokenCount, nightly: nightly, vimMode: vimModeEnabled ? vimMode : undefined })] })] }) }));
|
|
749
571
|
};
|
|
750
572
|
//# sourceMappingURL=App.js.map
|