@google/gemini-cli 0.1.0-development.2 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +16 -38
- package/bundle/gemini.js +257368 -0
- package/{dist/src/utils → bundle}/sandbox-macos-permissive-proxied.sb +1 -1
- package/{dist/src/utils → bundle}/sandbox-macos-restrictive-proxied.sb +1 -1
- package/bundle/shell.json +18 -0
- package/bundle/shell.md +16 -0
- package/package.json +72 -67
- package/dist/.last_build +0 -0
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -20
- package/dist/index.js.map +0 -1
- package/dist/package.json +0 -80
- package/dist/src/config/auth.d.ts +0 -6
- package/dist/src/config/auth.js +0 -33
- package/dist/src/config/auth.js.map +0 -1
- package/dist/src/config/config.d.ts +0 -13
- package/dist/src/config/config.js +0 -211
- package/dist/src/config/config.js.map +0 -1
- package/dist/src/config/extension.d.ts +0 -20
- package/dist/src/config/extension.js +0 -81
- package/dist/src/config/extension.js.map +0 -1
- package/dist/src/config/sandboxConfig.d.ts +0 -13
- package/dist/src/config/sandboxConfig.js +0 -75
- package/dist/src/config/sandboxConfig.js.map +0 -1
- package/dist/src/config/settings.d.ts +0 -72
- package/dist/src/config/settings.js +0 -227
- package/dist/src/config/settings.js.map +0 -1
- package/dist/src/gemini.d.ts +0 -6
- package/dist/src/gemini.js +0 -216
- package/dist/src/gemini.js.map +0 -1
- package/dist/src/generated/git-commit.d.ts +0 -6
- package/dist/src/generated/git-commit.js +0 -9
- package/dist/src/generated/git-commit.js.map +0 -1
- package/dist/src/nonInteractiveCli.d.ts +0 -7
- package/dist/src/nonInteractiveCli.js +0 -115
- package/dist/src/nonInteractiveCli.js.map +0 -1
- package/dist/src/services/CommandService.d.ts +0 -13
- package/dist/src/services/CommandService.js +0 -30
- package/dist/src/services/CommandService.js.map +0 -1
- package/dist/src/ui/App.d.ts +0 -14
- package/dist/src/ui/App.js +0 -391
- package/dist/src/ui/App.js.map +0 -1
- package/dist/src/ui/colors.d.ts +0 -7
- package/dist/src/ui/colors.js +0 -48
- package/dist/src/ui/colors.js.map +0 -1
- package/dist/src/ui/commands/clearCommand.d.ts +0 -7
- package/dist/src/ui/commands/clearCommand.js +0 -15
- package/dist/src/ui/commands/clearCommand.js.map +0 -1
- package/dist/src/ui/commands/helpCommand.d.ts +0 -7
- package/dist/src/ui/commands/helpCommand.js +0 -18
- package/dist/src/ui/commands/helpCommand.js.map +0 -1
- package/dist/src/ui/commands/memoryCommand.d.ts +0 -7
- package/dist/src/ui/commands/memoryCommand.js +0 -81
- package/dist/src/ui/commands/memoryCommand.js.map +0 -1
- package/dist/src/ui/commands/types.d.ts +0 -63
- package/dist/src/ui/commands/types.js +0 -7
- package/dist/src/ui/commands/types.js.map +0 -1
- package/dist/src/ui/components/AboutBox.d.ts +0 -16
- package/dist/src/ui/components/AboutBox.js +0 -6
- package/dist/src/ui/components/AboutBox.js.map +0 -1
- package/dist/src/ui/components/AsciiArt.d.ts +0 -7
- package/dist/src/ui/components/AsciiArt.js +0 -26
- package/dist/src/ui/components/AsciiArt.js.map +0 -1
- package/dist/src/ui/components/AuthDialog.d.ts +0 -15
- package/dist/src/ui/components/AuthDialog.js +0 -66
- package/dist/src/ui/components/AuthDialog.js.map +0 -1
- package/dist/src/ui/components/AuthInProgress.d.ts +0 -11
- package/dist/src/ui/components/AuthInProgress.js +0 -27
- package/dist/src/ui/components/AuthInProgress.js.map +0 -1
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +0 -12
- package/dist/src/ui/components/AutoAcceptIndicator.js +0 -26
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +0 -1
- package/dist/src/ui/components/ConsolePatcher.d.ts +0 -12
- package/dist/src/ui/components/ConsolePatcher.js +0 -40
- package/dist/src/ui/components/ConsolePatcher.js.map +0 -1
- package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +0 -11
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +0 -11
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +0 -1
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +0 -15
- package/dist/src/ui/components/ContextSummaryDisplay.js +0 -41
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +0 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +0 -14
- package/dist/src/ui/components/DetailedMessagesDisplay.js +0 -34
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +0 -1
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +0 -15
- package/dist/src/ui/components/EditorSettingsDialog.js +0 -73
- package/dist/src/ui/components/EditorSettingsDialog.js.map +0 -1
- package/dist/src/ui/components/Footer.d.ts +0 -20
- package/dist/src/ui/components/Footer.js +0 -13
- package/dist/src/ui/components/Footer.js.map +0 -1
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +0 -17
- package/dist/src/ui/components/GeminiRespondingSpinner.js +0 -16
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +0 -1
- package/dist/src/ui/components/Header.d.ts +0 -12
- package/dist/src/ui/components/Header.js +0 -20
- package/dist/src/ui/components/Header.js.map +0 -1
- package/dist/src/ui/components/Help.d.ts +0 -12
- package/dist/src/ui/components/Help.js +0 -10
- package/dist/src/ui/components/Help.js.map +0 -1
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +0 -18
- package/dist/src/ui/components/HistoryItemDisplay.js +0 -17
- package/dist/src/ui/components/HistoryItemDisplay.js.map +0 -1
- package/dist/src/ui/components/InputPrompt.d.ts +0 -25
- package/dist/src/ui/components/InputPrompt.js +0 -280
- package/dist/src/ui/components/InputPrompt.js.map +0 -1
- package/dist/src/ui/components/LoadingIndicator.d.ts +0 -15
- package/dist/src/ui/components/LoadingIndicator.js +0 -19
- package/dist/src/ui/components/LoadingIndicator.js.map +0 -1
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +0 -7
- package/dist/src/ui/components/MemoryUsageDisplay.js +0 -27
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +0 -1
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +0 -7
- package/dist/src/ui/components/ModelStatsDisplay.js +0 -33
- package/dist/src/ui/components/ModelStatsDisplay.js.map +0 -1
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +0 -11
- package/dist/src/ui/components/SessionSummaryDisplay.js +0 -4
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +0 -1
- package/dist/src/ui/components/ShellModeIndicator.d.ts +0 -7
- package/dist/src/ui/components/ShellModeIndicator.js +0 -5
- package/dist/src/ui/components/ShellModeIndicator.js.map +0 -1
- package/dist/src/ui/components/ShowMoreLines.d.ts +0 -10
- package/dist/src/ui/components/ShowMoreLines.js +0 -24
- package/dist/src/ui/components/ShowMoreLines.js.map +0 -1
- package/dist/src/ui/components/StatsDisplay.d.ts +0 -12
- package/dist/src/ui/components/StatsDisplay.js +0 -42
- package/dist/src/ui/components/StatsDisplay.js.map +0 -1
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +0 -21
- package/dist/src/ui/components/SuggestionsDisplay.js +0 -32
- package/dist/src/ui/components/SuggestionsDisplay.js.map +0 -1
- package/dist/src/ui/components/ThemeDialog.d.ts +0 -19
- package/dist/src/ui/components/ThemeDialog.js +0 -126
- package/dist/src/ui/components/ThemeDialog.js.map +0 -1
- package/dist/src/ui/components/Tips.d.ts +0 -12
- package/dist/src/ui/components/Tips.js +0 -8
- package/dist/src/ui/components/Tips.js.map +0 -1
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +0 -7
- package/dist/src/ui/components/ToolStatsDisplay.js +0 -41
- package/dist/src/ui/components/ToolStatsDisplay.js.map +0 -1
- package/dist/src/ui/components/UpdateNotification.d.ts +0 -10
- package/dist/src/ui/components/UpdateNotification.js +0 -10
- package/dist/src/ui/components/UpdateNotification.js.map +0 -1
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +0 -11
- package/dist/src/ui/components/messages/CompressionMessage.js +0 -16
- package/dist/src/ui/components/messages/CompressionMessage.js.map +0 -1
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +0 -15
- package/dist/src/ui/components/messages/DiffRenderer.js +0 -212
- package/dist/src/ui/components/messages/DiffRenderer.js.map +0 -1
- package/dist/src/ui/components/messages/ErrorMessage.d.ts +0 -11
- package/dist/src/ui/components/messages/ErrorMessage.js +0 -9
- package/dist/src/ui/components/messages/ErrorMessage.js.map +0 -1
- package/dist/src/ui/components/messages/GeminiMessage.d.ts +0 -14
- package/dist/src/ui/components/messages/GeminiMessage.js +0 -10
- package/dist/src/ui/components/messages/GeminiMessage.js.map +0 -1
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +0 -14
- package/dist/src/ui/components/messages/GeminiMessageContent.js +0 -15
- package/dist/src/ui/components/messages/GeminiMessageContent.js.map +0 -1
- package/dist/src/ui/components/messages/InfoMessage.d.ts +0 -11
- package/dist/src/ui/components/messages/InfoMessage.js +0 -9
- package/dist/src/ui/components/messages/InfoMessage.js.map +0 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +0 -15
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +0 -111
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +0 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +0 -18
- package/dist/src/ui/components/messages/ToolGroupMessage.js +0 -53
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +0 -1
- package/dist/src/ui/components/messages/ToolMessage.d.ts +0 -15
- package/dist/src/ui/components/messages/ToolMessage.js +0 -61
- package/dist/src/ui/components/messages/ToolMessage.js.map +0 -1
- package/dist/src/ui/components/messages/UserMessage.d.ts +0 -11
- package/dist/src/ui/components/messages/UserMessage.js +0 -9
- package/dist/src/ui/components/messages/UserMessage.js.map +0 -1
- package/dist/src/ui/components/messages/UserShellMessage.d.ts +0 -11
- package/dist/src/ui/components/messages/UserShellMessage.js +0 -9
- package/dist/src/ui/components/messages/UserShellMessage.js.map +0 -1
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +0 -61
- package/dist/src/ui/components/shared/MaxSizedBox.js +0 -384
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +0 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +0 -41
- package/dist/src/ui/components/shared/RadioButtonSelect.js +0 -52
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +0 -1
- package/dist/src/ui/components/shared/text-buffer.d.ts +0 -184
- package/dist/src/ui/components/shared/text-buffer.js +0 -1010
- package/dist/src/ui/components/shared/text-buffer.js.map +0 -1
- package/dist/src/ui/constants.d.ts +0 -8
- package/dist/src/ui/constants.js +0 -12
- package/dist/src/ui/constants.js.map +0 -1
- package/dist/src/ui/contexts/OverflowContext.d.ts +0 -19
- package/dist/src/ui/contexts/OverflowContext.js +0 -43
- package/dist/src/ui/contexts/OverflowContext.js.map +0 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +0 -33
- package/dist/src/ui/contexts/SessionContext.js +0 -49
- package/dist/src/ui/contexts/SessionContext.js.map +0 -1
- package/dist/src/ui/contexts/StreamingContext.d.ts +0 -9
- package/dist/src/ui/contexts/StreamingContext.js +0 -15
- package/dist/src/ui/contexts/StreamingContext.js.map +0 -1
- package/dist/src/ui/editors/editorSettingsManager.d.ts +0 -19
- package/dist/src/ui/editors/editorSettingsManager.js +0 -54
- package/dist/src/ui/editors/editorSettingsManager.js.map +0 -1
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +0 -31
- package/dist/src/ui/hooks/atCommandProcessor.js +0 -310
- package/dist/src/ui/hooks/atCommandProcessor.js.map +0 -1
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +0 -16
- package/dist/src/ui/hooks/shellCommandProcessor.js +0 -261
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +0 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +0 -27
- package/dist/src/ui/hooks/slashCommandProcessor.js +0 -1050
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +0 -1
- package/dist/src/ui/hooks/useAuthCommand.d.ts +0 -14
- package/dist/src/ui/hooks/useAuthCommand.js +0 -54
- package/dist/src/ui/hooks/useAuthCommand.js.map +0 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +0 -10
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +0 -37
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +0 -1
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +0 -12
- package/dist/src/ui/hooks/useBracketedPaste.js +0 -32
- package/dist/src/ui/hooks/useBracketedPaste.js.map +0 -1
- package/dist/src/ui/hooks/useCompletion.d.ts +0 -21
- package/dist/src/ui/hooks/useCompletion.js +0 -372
- package/dist/src/ui/hooks/useCompletion.js.map +0 -1
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +0 -12
- package/dist/src/ui/hooks/useConsoleMessages.js +0 -60
- package/dist/src/ui/hooks/useConsoleMessages.js.map +0 -1
- package/dist/src/ui/hooks/useEditorSettings.d.ts +0 -16
- package/dist/src/ui/hooks/useEditorSettings.js +0 -43
- package/dist/src/ui/hooks/useEditorSettings.js.map +0 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +0 -23
- package/dist/src/ui/hooks/useGeminiStream.js +0 -518
- package/dist/src/ui/hooks/useGeminiStream.js.map +0 -1
- package/dist/src/ui/hooks/useGitBranchName.d.ts +0 -6
- package/dist/src/ui/hooks/useGitBranchName.js +0 -61
- package/dist/src/ui/hooks/useGitBranchName.js.map +0 -1
- package/dist/src/ui/hooks/useHistoryManager.d.ts +0 -22
- package/dist/src/ui/hooks/useHistoryManager.js +0 -72
- package/dist/src/ui/hooks/useHistoryManager.js.map +0 -1
- package/dist/src/ui/hooks/useInputHistory.d.ts +0 -19
- package/dist/src/ui/hooks/useInputHistory.js +0 -84
- package/dist/src/ui/hooks/useInputHistory.js.map +0 -1
- package/dist/src/ui/hooks/useKeypress.d.ts +0 -29
- package/dist/src/ui/hooks/useKeypress.js +0 -86
- package/dist/src/ui/hooks/useKeypress.js.map +0 -1
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +0 -10
- package/dist/src/ui/hooks/useLoadingIndicator.js +0 -44
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +0 -1
- package/dist/src/ui/hooks/useLogger.d.ts +0 -10
- package/dist/src/ui/hooks/useLogger.js +0 -29
- package/dist/src/ui/hooks/useLogger.js.map +0 -1
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +0 -14
- package/dist/src/ui/hooks/usePhraseCycler.js +0 -189
- package/dist/src/ui/hooks/usePhraseCycler.js.map +0 -1
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +0 -16
- package/dist/src/ui/hooks/usePrivacySettings.js +0 -115
- package/dist/src/ui/hooks/usePrivacySettings.js.map +0 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +0 -33
- package/dist/src/ui/hooks/useReactToolScheduler.js +0 -186
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +0 -1
- package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +0 -6
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js +0 -7
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +0 -1
- package/dist/src/ui/hooks/useShellHistory.d.ts +0 -11
- package/dist/src/ui/hooks/useShellHistory.js +0 -89
- package/dist/src/ui/hooks/useShellHistory.js.map +0 -1
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +0 -9
- package/dist/src/ui/hooks/useShowMemoryCommand.js +0 -58
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +0 -1
- package/dist/src/ui/hooks/useStateAndRef.d.ts +0 -7
- package/dist/src/ui/hooks/useStateAndRef.js +0 -26
- package/dist/src/ui/hooks/useStateAndRef.js.map +0 -1
- package/dist/src/ui/hooks/useTerminalSize.d.ts +0 -9
- package/dist/src/ui/hooks/useTerminalSize.js +0 -27
- package/dist/src/ui/hooks/useTerminalSize.js.map +0 -1
- package/dist/src/ui/hooks/useThemeCommand.d.ts +0 -15
- package/dist/src/ui/hooks/useThemeCommand.js +0 -78
- package/dist/src/ui/hooks/useThemeCommand.js.map +0 -1
- package/dist/src/ui/hooks/useTimer.d.ts +0 -12
- package/dist/src/ui/hooks/useTimer.js +0 -58
- package/dist/src/ui/hooks/useTimer.js.map +0 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +0 -12
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +0 -40
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +0 -1
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +0 -10
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +0 -17
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +0 -1
- package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +0 -10
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js +0 -17
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +0 -1
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +0 -12
- package/dist/src/ui/privacy/PrivacyNotice.js +0 -25
- package/dist/src/ui/privacy/PrivacyNotice.js.map +0 -1
- package/dist/src/ui/themes/ansi-light.d.ts +0 -7
- package/dist/src/ui/themes/ansi-light.js +0 -139
- package/dist/src/ui/themes/ansi-light.js.map +0 -1
- package/dist/src/ui/themes/ansi.d.ts +0 -7
- package/dist/src/ui/themes/ansi.js +0 -149
- package/dist/src/ui/themes/ansi.js.map +0 -1
- package/dist/src/ui/themes/atom-one-dark.d.ts +0 -7
- package/dist/src/ui/themes/atom-one-dark.js +0 -136
- package/dist/src/ui/themes/atom-one-dark.js.map +0 -1
- package/dist/src/ui/themes/ayu-light.d.ts +0 -7
- package/dist/src/ui/themes/ayu-light.js +0 -128
- package/dist/src/ui/themes/ayu-light.js.map +0 -1
- package/dist/src/ui/themes/ayu.d.ts +0 -7
- package/dist/src/ui/themes/ayu.js +0 -102
- package/dist/src/ui/themes/ayu.js.map +0 -1
- package/dist/src/ui/themes/default-light.d.ts +0 -7
- package/dist/src/ui/themes/default-light.js +0 -100
- package/dist/src/ui/themes/default-light.js.map +0 -1
- package/dist/src/ui/themes/default.d.ts +0 -7
- package/dist/src/ui/themes/default.js +0 -143
- package/dist/src/ui/themes/default.js.map +0 -1
- package/dist/src/ui/themes/dracula.d.ts +0 -7
- package/dist/src/ui/themes/dracula.js +0 -113
- package/dist/src/ui/themes/dracula.js.map +0 -1
- package/dist/src/ui/themes/github-dark.d.ts +0 -7
- package/dist/src/ui/themes/github-dark.js +0 -136
- package/dist/src/ui/themes/github-dark.js.map +0 -1
- package/dist/src/ui/themes/github-light.d.ts +0 -7
- package/dist/src/ui/themes/github-light.js +0 -138
- package/dist/src/ui/themes/github-light.js.map +0 -1
- package/dist/src/ui/themes/googlecode.d.ts +0 -7
- package/dist/src/ui/themes/googlecode.js +0 -135
- package/dist/src/ui/themes/googlecode.js.map +0 -1
- package/dist/src/ui/themes/no-color.d.ts +0 -7
- package/dist/src/ui/themes/no-color.js +0 -84
- package/dist/src/ui/themes/no-color.js.map +0 -1
- package/dist/src/ui/themes/shades-of-purple.d.ts +0 -11
- package/dist/src/ui/themes/shades-of-purple.js +0 -302
- package/dist/src/ui/themes/shades-of-purple.js.map +0 -1
- package/dist/src/ui/themes/theme-manager.d.ts +0 -33
- package/dist/src/ui/themes/theme-manager.js +0 -109
- package/dist/src/ui/themes/theme-manager.js.map +0 -1
- package/dist/src/ui/themes/theme.d.ts +0 -67
- package/dist/src/ui/themes/theme.js +0 -304
- package/dist/src/ui/themes/theme.js.map +0 -1
- package/dist/src/ui/themes/xcode.d.ts +0 -7
- package/dist/src/ui/themes/xcode.js +0 -143
- package/dist/src/ui/themes/xcode.js.map +0 -1
- package/dist/src/ui/types.d.ts +0 -172
- package/dist/src/ui/types.js +0 -43
- package/dist/src/ui/types.js.map +0 -1
- package/dist/src/ui/utils/CodeColorizer.d.ts +0 -14
- package/dist/src/ui/utils/CodeColorizer.js +0 -97
- package/dist/src/ui/utils/CodeColorizer.js.map +0 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +0 -16
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +0 -104
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +0 -1
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +0 -14
- package/dist/src/ui/utils/MarkdownDisplay.js +0 -197
- package/dist/src/ui/utils/MarkdownDisplay.js.map +0 -1
- package/dist/src/ui/utils/TableRenderer.d.ts +0 -17
- package/dist/src/ui/utils/TableRenderer.js +0 -84
- package/dist/src/ui/utils/TableRenderer.js.map +0 -1
- package/dist/src/ui/utils/commandUtils.d.ts +0 -22
- package/dist/src/ui/utils/commandUtils.js +0 -25
- package/dist/src/ui/utils/commandUtils.js.map +0 -1
- package/dist/src/ui/utils/computeStats.d.ts +0 -10
- package/dist/src/ui/utils/computeStats.js +0 -55
- package/dist/src/ui/utils/computeStats.js.map +0 -1
- package/dist/src/ui/utils/displayUtils.d.ts +0 -17
- package/dist/src/ui/utils/displayUtils.js +0 -24
- package/dist/src/ui/utils/displayUtils.js.map +0 -1
- package/dist/src/ui/utils/errorParsing.d.ts +0 -15
- package/dist/src/ui/utils/errorParsing.js +0 -79
- package/dist/src/ui/utils/errorParsing.js.map +0 -1
- package/dist/src/ui/utils/formatters.d.ts +0 -13
- package/dist/src/ui/utils/formatters.js +0 -56
- package/dist/src/ui/utils/formatters.js.map +0 -1
- package/dist/src/ui/utils/markdownUtilities.d.ts +0 -6
- package/dist/src/ui/utils/markdownUtilities.js +0 -110
- package/dist/src/ui/utils/markdownUtilities.js.map +0 -1
- package/dist/src/ui/utils/textUtils.d.ts +0 -22
- package/dist/src/ui/utils/textUtils.js +0 -58
- package/dist/src/ui/utils/textUtils.js.map +0 -1
- package/dist/src/ui/utils/updateCheck.d.ts +0 -6
- package/dist/src/ui/utils/updateCheck.js +0 -36
- package/dist/src/ui/utils/updateCheck.js.map +0 -1
- package/dist/src/utils/cleanup.d.ts +0 -6
- package/dist/src/utils/cleanup.js +0 -19
- package/dist/src/utils/cleanup.js.map +0 -1
- package/dist/src/utils/package.d.ts +0 -12
- package/dist/src/utils/package.js +0 -24
- package/dist/src/utils/package.js.map +0 -1
- package/dist/src/utils/readStdin.d.ts +0 -6
- package/dist/src/utils/readStdin.js +0 -34
- package/dist/src/utils/readStdin.js.map +0 -1
- package/dist/src/utils/sandbox.d.ts +0 -7
- package/dist/src/utils/sandbox.js +0 -680
- package/dist/src/utils/sandbox.js.map +0 -1
- package/dist/src/utils/startupWarnings.d.ts +0 -6
- package/dist/src/utils/startupWarnings.js +0 -40
- package/dist/src/utils/startupWarnings.js.map +0 -1
- package/dist/src/utils/userStartupWarnings.d.ts +0 -6
- package/dist/src/utils/userStartupWarnings.js +0 -33
- package/dist/src/utils/userStartupWarnings.js.map +0 -1
- package/dist/src/utils/version.d.ts +0 -6
- package/dist/src/utils/version.js +0 -11
- package/dist/src/utils/version.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- /package/{dist/src/utils → bundle}/sandbox-macos-permissive-closed.sb +0 -0
- /package/{dist/src/utils → bundle}/sandbox-macos-permissive-open.sb +0 -0
- /package/{dist/src/utils → bundle}/sandbox-macos-restrictive-closed.sb +0 -0
- /package/{dist/src/utils → bundle}/sandbox-macos-restrictive-open.sb +0 -0
package/dist/src/ui/types.d.ts
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { ToolCallConfirmationDetails, ToolResultDisplay } from '@google/gemini-cli-core';
|
|
7
|
-
export declare enum StreamingState {
|
|
8
|
-
Idle = "idle",
|
|
9
|
-
Responding = "responding",
|
|
10
|
-
WaitingForConfirmation = "waiting_for_confirmation"
|
|
11
|
-
}
|
|
12
|
-
export declare enum GeminiEventType {
|
|
13
|
-
Content = "content",
|
|
14
|
-
ToolCallRequest = "tool_call_request"
|
|
15
|
-
}
|
|
16
|
-
export declare enum ToolCallStatus {
|
|
17
|
-
Pending = "Pending",
|
|
18
|
-
Canceled = "Canceled",
|
|
19
|
-
Confirming = "Confirming",
|
|
20
|
-
Executing = "Executing",
|
|
21
|
-
Success = "Success",
|
|
22
|
-
Error = "Error"
|
|
23
|
-
}
|
|
24
|
-
export interface ToolCallEvent {
|
|
25
|
-
type: 'tool_call';
|
|
26
|
-
status: ToolCallStatus;
|
|
27
|
-
callId: string;
|
|
28
|
-
name: string;
|
|
29
|
-
args: Record<string, never>;
|
|
30
|
-
resultDisplay: ToolResultDisplay | undefined;
|
|
31
|
-
confirmationDetails: ToolCallConfirmationDetails | undefined;
|
|
32
|
-
}
|
|
33
|
-
export interface IndividualToolCallDisplay {
|
|
34
|
-
callId: string;
|
|
35
|
-
name: string;
|
|
36
|
-
description: string;
|
|
37
|
-
resultDisplay: ToolResultDisplay | undefined;
|
|
38
|
-
status: ToolCallStatus;
|
|
39
|
-
confirmationDetails: ToolCallConfirmationDetails | undefined;
|
|
40
|
-
renderOutputAsMarkdown?: boolean;
|
|
41
|
-
}
|
|
42
|
-
export interface CompressionProps {
|
|
43
|
-
isPending: boolean;
|
|
44
|
-
originalTokenCount: number | null;
|
|
45
|
-
newTokenCount: number | null;
|
|
46
|
-
}
|
|
47
|
-
export interface HistoryItemBase {
|
|
48
|
-
text?: string;
|
|
49
|
-
}
|
|
50
|
-
export type HistoryItemUser = HistoryItemBase & {
|
|
51
|
-
type: 'user';
|
|
52
|
-
text: string;
|
|
53
|
-
};
|
|
54
|
-
export type HistoryItemGemini = HistoryItemBase & {
|
|
55
|
-
type: 'gemini';
|
|
56
|
-
text: string;
|
|
57
|
-
};
|
|
58
|
-
export type HistoryItemGeminiContent = HistoryItemBase & {
|
|
59
|
-
type: 'gemini_content';
|
|
60
|
-
text: string;
|
|
61
|
-
};
|
|
62
|
-
export type HistoryItemInfo = HistoryItemBase & {
|
|
63
|
-
type: 'info';
|
|
64
|
-
text: string;
|
|
65
|
-
};
|
|
66
|
-
export type HistoryItemError = HistoryItemBase & {
|
|
67
|
-
type: 'error';
|
|
68
|
-
text: string;
|
|
69
|
-
};
|
|
70
|
-
export type HistoryItemAbout = HistoryItemBase & {
|
|
71
|
-
type: 'about';
|
|
72
|
-
cliVersion: string;
|
|
73
|
-
osVersion: string;
|
|
74
|
-
sandboxEnv: string;
|
|
75
|
-
modelVersion: string;
|
|
76
|
-
selectedAuthType: string;
|
|
77
|
-
gcpProject: string;
|
|
78
|
-
};
|
|
79
|
-
export type HistoryItemStats = HistoryItemBase & {
|
|
80
|
-
type: 'stats';
|
|
81
|
-
duration: string;
|
|
82
|
-
};
|
|
83
|
-
export type HistoryItemModelStats = HistoryItemBase & {
|
|
84
|
-
type: 'model_stats';
|
|
85
|
-
};
|
|
86
|
-
export type HistoryItemToolStats = HistoryItemBase & {
|
|
87
|
-
type: 'tool_stats';
|
|
88
|
-
};
|
|
89
|
-
export type HistoryItemQuit = HistoryItemBase & {
|
|
90
|
-
type: 'quit';
|
|
91
|
-
duration: string;
|
|
92
|
-
};
|
|
93
|
-
export type HistoryItemToolGroup = HistoryItemBase & {
|
|
94
|
-
type: 'tool_group';
|
|
95
|
-
tools: IndividualToolCallDisplay[];
|
|
96
|
-
};
|
|
97
|
-
export type HistoryItemUserShell = HistoryItemBase & {
|
|
98
|
-
type: 'user_shell';
|
|
99
|
-
text: string;
|
|
100
|
-
};
|
|
101
|
-
export type HistoryItemCompression = HistoryItemBase & {
|
|
102
|
-
type: 'compression';
|
|
103
|
-
compression: CompressionProps;
|
|
104
|
-
};
|
|
105
|
-
export type HistoryItemWithoutId = HistoryItemUser | HistoryItemUserShell | HistoryItemGemini | HistoryItemGeminiContent | HistoryItemInfo | HistoryItemError | HistoryItemAbout | HistoryItemToolGroup | HistoryItemStats | HistoryItemModelStats | HistoryItemToolStats | HistoryItemQuit | HistoryItemCompression;
|
|
106
|
-
export type HistoryItem = HistoryItemWithoutId & {
|
|
107
|
-
id: number;
|
|
108
|
-
};
|
|
109
|
-
export declare enum MessageType {
|
|
110
|
-
INFO = "info",
|
|
111
|
-
ERROR = "error",
|
|
112
|
-
USER = "user",
|
|
113
|
-
ABOUT = "about",
|
|
114
|
-
STATS = "stats",
|
|
115
|
-
MODEL_STATS = "model_stats",
|
|
116
|
-
TOOL_STATS = "tool_stats",
|
|
117
|
-
QUIT = "quit",
|
|
118
|
-
GEMINI = "gemini",
|
|
119
|
-
COMPRESSION = "compression"
|
|
120
|
-
}
|
|
121
|
-
export type Message = {
|
|
122
|
-
type: MessageType.INFO | MessageType.ERROR | MessageType.USER;
|
|
123
|
-
content: string;
|
|
124
|
-
timestamp: Date;
|
|
125
|
-
} | {
|
|
126
|
-
type: MessageType.ABOUT;
|
|
127
|
-
timestamp: Date;
|
|
128
|
-
cliVersion: string;
|
|
129
|
-
osVersion: string;
|
|
130
|
-
sandboxEnv: string;
|
|
131
|
-
modelVersion: string;
|
|
132
|
-
selectedAuthType: string;
|
|
133
|
-
gcpProject: string;
|
|
134
|
-
content?: string;
|
|
135
|
-
} | {
|
|
136
|
-
type: MessageType.STATS;
|
|
137
|
-
timestamp: Date;
|
|
138
|
-
duration: string;
|
|
139
|
-
content?: string;
|
|
140
|
-
} | {
|
|
141
|
-
type: MessageType.MODEL_STATS;
|
|
142
|
-
timestamp: Date;
|
|
143
|
-
content?: string;
|
|
144
|
-
} | {
|
|
145
|
-
type: MessageType.TOOL_STATS;
|
|
146
|
-
timestamp: Date;
|
|
147
|
-
content?: string;
|
|
148
|
-
} | {
|
|
149
|
-
type: MessageType.QUIT;
|
|
150
|
-
timestamp: Date;
|
|
151
|
-
duration: string;
|
|
152
|
-
content?: string;
|
|
153
|
-
} | {
|
|
154
|
-
type: MessageType.COMPRESSION;
|
|
155
|
-
compression: CompressionProps;
|
|
156
|
-
timestamp: Date;
|
|
157
|
-
};
|
|
158
|
-
export interface ConsoleMessageItem {
|
|
159
|
-
type: 'log' | 'warn' | 'error' | 'debug';
|
|
160
|
-
content: string;
|
|
161
|
-
count: number;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Defines the result of the slash command processor for its consumer (useGeminiStream).
|
|
165
|
-
*/
|
|
166
|
-
export type SlashCommandProcessorResult = {
|
|
167
|
-
type: 'schedule_tool';
|
|
168
|
-
toolName: string;
|
|
169
|
-
toolArgs: Record<string, unknown>;
|
|
170
|
-
} | {
|
|
171
|
-
type: 'handled';
|
|
172
|
-
};
|
package/dist/src/ui/types.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
// Only defining the state enum needed by the UI
|
|
7
|
-
export var StreamingState;
|
|
8
|
-
(function (StreamingState) {
|
|
9
|
-
StreamingState["Idle"] = "idle";
|
|
10
|
-
StreamingState["Responding"] = "responding";
|
|
11
|
-
StreamingState["WaitingForConfirmation"] = "waiting_for_confirmation";
|
|
12
|
-
})(StreamingState || (StreamingState = {}));
|
|
13
|
-
// Copied from server/src/core/turn.ts for CLI usage
|
|
14
|
-
export var GeminiEventType;
|
|
15
|
-
(function (GeminiEventType) {
|
|
16
|
-
GeminiEventType["Content"] = "content";
|
|
17
|
-
GeminiEventType["ToolCallRequest"] = "tool_call_request";
|
|
18
|
-
// Add other event types if the UI hook needs to handle them
|
|
19
|
-
})(GeminiEventType || (GeminiEventType = {}));
|
|
20
|
-
export var ToolCallStatus;
|
|
21
|
-
(function (ToolCallStatus) {
|
|
22
|
-
ToolCallStatus["Pending"] = "Pending";
|
|
23
|
-
ToolCallStatus["Canceled"] = "Canceled";
|
|
24
|
-
ToolCallStatus["Confirming"] = "Confirming";
|
|
25
|
-
ToolCallStatus["Executing"] = "Executing";
|
|
26
|
-
ToolCallStatus["Success"] = "Success";
|
|
27
|
-
ToolCallStatus["Error"] = "Error";
|
|
28
|
-
})(ToolCallStatus || (ToolCallStatus = {}));
|
|
29
|
-
// Message types used by internal command feedback (subset of HistoryItem types)
|
|
30
|
-
export var MessageType;
|
|
31
|
-
(function (MessageType) {
|
|
32
|
-
MessageType["INFO"] = "info";
|
|
33
|
-
MessageType["ERROR"] = "error";
|
|
34
|
-
MessageType["USER"] = "user";
|
|
35
|
-
MessageType["ABOUT"] = "about";
|
|
36
|
-
MessageType["STATS"] = "stats";
|
|
37
|
-
MessageType["MODEL_STATS"] = "model_stats";
|
|
38
|
-
MessageType["TOOL_STATS"] = "tool_stats";
|
|
39
|
-
MessageType["QUIT"] = "quit";
|
|
40
|
-
MessageType["GEMINI"] = "gemini";
|
|
41
|
-
MessageType["COMPRESSION"] = "compression";
|
|
42
|
-
})(MessageType || (MessageType = {}));
|
|
43
|
-
//# sourceMappingURL=types.js.map
|
package/dist/src/ui/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ui/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,gDAAgD;AAChD,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,2CAAyB,CAAA;IACzB,qEAAmD,CAAA;AACrD,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,oDAAoD;AACpD,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,wDAAqC,CAAA;IACrC,4DAA4D;AAC9D,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;IACrB,2CAAyB,CAAA;IACzB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;AACjB,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB;AAyHD,gFAAgF;AAChF,MAAM,CAAN,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,0CAA2B,CAAA;IAC3B,wCAAyB,CAAA;IACzB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,0CAA2B,CAAA;AAC7B,CAAC,EAXW,WAAW,KAAX,WAAW,QAWtB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
/**
|
|
8
|
-
* Renders syntax-highlighted code for Ink applications using a selected theme.
|
|
9
|
-
*
|
|
10
|
-
* @param code The code string to highlight.
|
|
11
|
-
* @param language The language identifier (e.g., 'javascript', 'css', 'html')
|
|
12
|
-
* @returns A React.ReactNode containing Ink <Text> elements for the highlighted code.
|
|
13
|
-
*/
|
|
14
|
-
export declare function colorizeCode(code: string, language: string | null, availableHeight?: number, maxWidth?: number): React.ReactNode;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2025 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
-
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { Text, Box } from 'ink';
|
|
9
|
-
import { common, createLowlight } from 'lowlight';
|
|
10
|
-
import { themeManager } from '../themes/theme-manager.js';
|
|
11
|
-
import { MaxSizedBox, MINIMUM_MAX_HEIGHT, } from '../components/shared/MaxSizedBox.js';
|
|
12
|
-
// Configure theming and parsing utilities.
|
|
13
|
-
const lowlight = createLowlight(common);
|
|
14
|
-
function renderHastNode(node, theme, inheritedColor) {
|
|
15
|
-
if (node.type === 'text') {
|
|
16
|
-
// Use the color passed down from parent element, if any
|
|
17
|
-
return _jsx(Text, { color: inheritedColor, children: node.value });
|
|
18
|
-
}
|
|
19
|
-
// Handle Element Nodes: Determine color and pass it down, don't wrap
|
|
20
|
-
if (node.type === 'element') {
|
|
21
|
-
const nodeClasses = node.properties?.className || [];
|
|
22
|
-
let elementColor = undefined;
|
|
23
|
-
// Find color defined specifically for this element's class
|
|
24
|
-
for (let i = nodeClasses.length - 1; i >= 0; i--) {
|
|
25
|
-
const color = theme.getInkColor(nodeClasses[i]);
|
|
26
|
-
if (color) {
|
|
27
|
-
elementColor = color;
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
// Determine the color to pass down: Use this element's specific color
|
|
32
|
-
// if found, otherwise, continue passing down the already inherited color.
|
|
33
|
-
const colorToPassDown = elementColor || inheritedColor;
|
|
34
|
-
// Recursively render children, passing the determined color down
|
|
35
|
-
// Ensure child type matches expected HAST structure (ElementContent is common)
|
|
36
|
-
const children = node.children?.map((child, index) => (_jsx(React.Fragment, { children: renderHastNode(child, theme, colorToPassDown) }, index)));
|
|
37
|
-
// Element nodes now only group children; color is applied by Text nodes.
|
|
38
|
-
// Use a React Fragment to avoid adding unnecessary elements.
|
|
39
|
-
return _jsx(React.Fragment, { children: children });
|
|
40
|
-
}
|
|
41
|
-
// Handle Root Node: Start recursion with initial inherited color
|
|
42
|
-
if (node.type === 'root') {
|
|
43
|
-
// Check if children array is empty - this happens when lowlight can't detect language – fallback to plain text
|
|
44
|
-
if (!node.children || node.children.length === 0) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
// Pass down the initial inheritedColor (likely undefined from the top call)
|
|
48
|
-
// Ensure child type matches expected HAST structure (RootContent is common)
|
|
49
|
-
return node.children?.map((child, index) => (_jsx(React.Fragment, { children: renderHastNode(child, theme, inheritedColor) }, index)));
|
|
50
|
-
}
|
|
51
|
-
// Handle unknown or unsupported node types
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Renders syntax-highlighted code for Ink applications using a selected theme.
|
|
56
|
-
*
|
|
57
|
-
* @param code The code string to highlight.
|
|
58
|
-
* @param language The language identifier (e.g., 'javascript', 'css', 'html')
|
|
59
|
-
* @returns A React.ReactNode containing Ink <Text> elements for the highlighted code.
|
|
60
|
-
*/
|
|
61
|
-
export function colorizeCode(code, language, availableHeight, maxWidth) {
|
|
62
|
-
const codeToHighlight = code.replace(/\n$/, '');
|
|
63
|
-
const activeTheme = themeManager.getActiveTheme();
|
|
64
|
-
try {
|
|
65
|
-
// Render the HAST tree using the adapted theme
|
|
66
|
-
// Apply the theme's default foreground color to the top-level Text element
|
|
67
|
-
let lines = codeToHighlight.split('\n');
|
|
68
|
-
const padWidth = String(lines.length).length; // Calculate padding width based on number of lines
|
|
69
|
-
let hiddenLinesCount = 0;
|
|
70
|
-
// Optimization to avoid highlighting lines that cannot possibly be displayed.
|
|
71
|
-
if (availableHeight !== undefined) {
|
|
72
|
-
availableHeight = Math.max(availableHeight, MINIMUM_MAX_HEIGHT);
|
|
73
|
-
if (lines.length > availableHeight) {
|
|
74
|
-
const sliceIndex = lines.length - availableHeight;
|
|
75
|
-
hiddenLinesCount = sliceIndex;
|
|
76
|
-
lines = lines.slice(sliceIndex);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
const getHighlightedLines = (line) => !language || !lowlight.registered(language)
|
|
80
|
-
? lowlight.highlightAuto(line)
|
|
81
|
-
: lowlight.highlight(language, line);
|
|
82
|
-
return (_jsx(MaxSizedBox, { maxHeight: availableHeight, maxWidth: maxWidth, additionalHiddenLinesCount: hiddenLinesCount, overflowDirection: "top", children: lines.map((line, index) => {
|
|
83
|
-
const renderedNode = renderHastNode(getHighlightedLines(line), activeTheme, undefined);
|
|
84
|
-
const contentToRender = renderedNode !== null ? renderedNode : line;
|
|
85
|
-
return (_jsxs(Box, { children: [_jsx(Text, { color: activeTheme.colors.Gray, children: `${String(index + 1 + hiddenLinesCount).padStart(padWidth, ' ')} ` }), _jsx(Text, { color: activeTheme.defaultColor, wrap: "wrap", children: contentToRender })] }, index));
|
|
86
|
-
}) }));
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
console.error(`[colorizeCode] Error highlighting code for language "${language}":`, error);
|
|
90
|
-
// Fallback to plain text with default color on error
|
|
91
|
-
// Also display line numbers in fallback
|
|
92
|
-
const lines = codeToHighlight.split('\n');
|
|
93
|
-
const padWidth = String(lines.length).length; // Calculate padding width based on number of lines
|
|
94
|
-
return (_jsx(MaxSizedBox, { maxHeight: availableHeight, maxWidth: maxWidth, overflowDirection: "top", children: lines.map((line, index) => (_jsxs(Box, { children: [_jsx(Text, { color: activeTheme.defaultColor, children: `${String(index + 1).padStart(padWidth, ' ')} ` }), _jsx(Text, { color: activeTheme.colors.Gray, children: line })] }, index))) }));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=CodeColorizer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CodeColorizer.js","sourceRoot":"","sources":["../../../../src/ui/utils/CodeColorizer.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAQlD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EACL,WAAW,EACX,kBAAkB,GACnB,MAAM,qCAAqC,CAAC;AAE7C,2CAA2C;AAC3C,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAExC,SAAS,cAAc,CACrB,IAA6C,EAC7C,KAAY,EACZ,cAAkC;IAElC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACzB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AAC,MAAM,CAAC,CAAC,mDAAmD;QACjG,OAAO,CACL,KAAC,WAAW,IACV,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAC,KAAK,YAEtB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,YAAY,YAClC,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,GAC3C,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,YAAG,IAAI,GAAQ,KAJ3C,KAAK,CAKT,CACP,CAAC,GACU,CACf,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
interface RenderInlineProps {
|
|
8
|
-
text: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const RenderInline: React.NamedExoticComponent<RenderInlineProps>;
|
|
11
|
-
/**
|
|
12
|
-
* Utility function to get the plain text length of a string with markdown formatting
|
|
13
|
-
* This is useful for calculating column widths in tables
|
|
14
|
-
*/
|
|
15
|
-
export declare const getPlainTextLength: (text: string) => number;
|
|
16
|
-
export {};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2025 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
-
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { Text } from 'ink';
|
|
9
|
-
import { Colors } from '../colors.js';
|
|
10
|
-
import stringWidth from 'string-width';
|
|
11
|
-
// Constants for Markdown parsing
|
|
12
|
-
const BOLD_MARKER_LENGTH = 2; // For "**"
|
|
13
|
-
const ITALIC_MARKER_LENGTH = 1; // For "*" or "_"
|
|
14
|
-
const STRIKETHROUGH_MARKER_LENGTH = 2; // For "~~"
|
|
15
|
-
const INLINE_CODE_MARKER_LENGTH = 1; // For "`"
|
|
16
|
-
const UNDERLINE_TAG_START_LENGTH = 3; // For "<u>"
|
|
17
|
-
const UNDERLINE_TAG_END_LENGTH = 4; // For "</u>"
|
|
18
|
-
const RenderInlineInternal = ({ text }) => {
|
|
19
|
-
const nodes = [];
|
|
20
|
-
let lastIndex = 0;
|
|
21
|
-
const inlineRegex = /(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|\[.*?\]\(.*?\)|`+.+?`+|<u>.*?<\/u>)/g;
|
|
22
|
-
let match;
|
|
23
|
-
while ((match = inlineRegex.exec(text)) !== null) {
|
|
24
|
-
if (match.index > lastIndex) {
|
|
25
|
-
nodes.push(_jsx(Text, { children: text.slice(lastIndex, match.index) }, `t-${lastIndex}`));
|
|
26
|
-
}
|
|
27
|
-
const fullMatch = match[0];
|
|
28
|
-
let renderedNode = null;
|
|
29
|
-
const key = `m-${match.index}`;
|
|
30
|
-
try {
|
|
31
|
-
if (fullMatch.startsWith('**') &&
|
|
32
|
-
fullMatch.endsWith('**') &&
|
|
33
|
-
fullMatch.length > BOLD_MARKER_LENGTH * 2) {
|
|
34
|
-
renderedNode = (_jsx(Text, { bold: true, children: fullMatch.slice(BOLD_MARKER_LENGTH, -BOLD_MARKER_LENGTH) }, key));
|
|
35
|
-
}
|
|
36
|
-
else if (fullMatch.length > ITALIC_MARKER_LENGTH * 2 &&
|
|
37
|
-
((fullMatch.startsWith('*') && fullMatch.endsWith('*')) ||
|
|
38
|
-
(fullMatch.startsWith('_') && fullMatch.endsWith('_'))) &&
|
|
39
|
-
!/\w/.test(text.substring(match.index - 1, match.index)) &&
|
|
40
|
-
!/\w/.test(text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 1)) &&
|
|
41
|
-
!/\S[./\\]/.test(text.substring(match.index - 2, match.index)) &&
|
|
42
|
-
!/[./\\]\S/.test(text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 2))) {
|
|
43
|
-
renderedNode = (_jsx(Text, { italic: true, children: fullMatch.slice(ITALIC_MARKER_LENGTH, -ITALIC_MARKER_LENGTH) }, key));
|
|
44
|
-
}
|
|
45
|
-
else if (fullMatch.startsWith('~~') &&
|
|
46
|
-
fullMatch.endsWith('~~') &&
|
|
47
|
-
fullMatch.length > STRIKETHROUGH_MARKER_LENGTH * 2) {
|
|
48
|
-
renderedNode = (_jsx(Text, { strikethrough: true, children: fullMatch.slice(STRIKETHROUGH_MARKER_LENGTH, -STRIKETHROUGH_MARKER_LENGTH) }, key));
|
|
49
|
-
}
|
|
50
|
-
else if (fullMatch.startsWith('`') &&
|
|
51
|
-
fullMatch.endsWith('`') &&
|
|
52
|
-
fullMatch.length > INLINE_CODE_MARKER_LENGTH) {
|
|
53
|
-
const codeMatch = fullMatch.match(/^(`+)(.+?)\1$/s);
|
|
54
|
-
if (codeMatch && codeMatch[2]) {
|
|
55
|
-
renderedNode = (_jsx(Text, { color: Colors.AccentPurple, children: codeMatch[2] }, key));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else if (fullMatch.startsWith('[') &&
|
|
59
|
-
fullMatch.includes('](') &&
|
|
60
|
-
fullMatch.endsWith(')')) {
|
|
61
|
-
const linkMatch = fullMatch.match(/\[(.*?)\]\((.*?)\)/);
|
|
62
|
-
if (linkMatch) {
|
|
63
|
-
const linkText = linkMatch[1];
|
|
64
|
-
const url = linkMatch[2];
|
|
65
|
-
renderedNode = (_jsxs(Text, { children: [linkText, _jsxs(Text, { color: Colors.AccentBlue, children: [" (", url, ")"] })] }, key));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
else if (fullMatch.startsWith('<u>') &&
|
|
69
|
-
fullMatch.endsWith('</u>') &&
|
|
70
|
-
fullMatch.length >
|
|
71
|
-
UNDERLINE_TAG_START_LENGTH + UNDERLINE_TAG_END_LENGTH - 1 // -1 because length is compared to combined length of start and end tags
|
|
72
|
-
) {
|
|
73
|
-
renderedNode = (_jsx(Text, { underline: true, children: fullMatch.slice(UNDERLINE_TAG_START_LENGTH, -UNDERLINE_TAG_END_LENGTH) }, key));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
catch (e) {
|
|
77
|
-
console.error('Error parsing inline markdown part:', fullMatch, e);
|
|
78
|
-
renderedNode = null;
|
|
79
|
-
}
|
|
80
|
-
nodes.push(renderedNode ?? _jsx(Text, { children: fullMatch }, key));
|
|
81
|
-
lastIndex = inlineRegex.lastIndex;
|
|
82
|
-
}
|
|
83
|
-
if (lastIndex < text.length) {
|
|
84
|
-
nodes.push(_jsx(Text, { children: text.slice(lastIndex) }, `t-${lastIndex}`));
|
|
85
|
-
}
|
|
86
|
-
return _jsx(_Fragment, { children: nodes.filter((node) => node !== null) });
|
|
87
|
-
};
|
|
88
|
-
export const RenderInline = React.memo(RenderInlineInternal);
|
|
89
|
-
/**
|
|
90
|
-
* Utility function to get the plain text length of a string with markdown formatting
|
|
91
|
-
* This is useful for calculating column widths in tables
|
|
92
|
-
*/
|
|
93
|
-
export const getPlainTextLength = (text) => {
|
|
94
|
-
const cleanText = text
|
|
95
|
-
.replace(/\*\*(.*?)\*\*/g, '$1')
|
|
96
|
-
.replace(/\*(.*?)\*/g, '$1')
|
|
97
|
-
.replace(/_(.*?)_/g, '$1')
|
|
98
|
-
.replace(/~~(.*?)~~/g, '$1')
|
|
99
|
-
.replace(/`(.*?)`/g, '$1')
|
|
100
|
-
.replace(/<u>(.*?)<\/u>/g, '$1')
|
|
101
|
-
.replace(/\[(.*?)\]\(.*?\)/g, '$1');
|
|
102
|
-
return stringWidth(cleanText);
|
|
103
|
-
};
|
|
104
|
-
//# sourceMappingURL=InlineMarkdownRenderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InlineMarkdownRenderer.js","sourceRoot":"","sources":["../../../../src/ui/utils/InlineMarkdownRenderer.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,iCAAiC;AACjC,MAAM,kBAAkB,GAAG,CAAC,CAAC,CAAC,WAAW;AACzC,MAAM,oBAAoB,GAAG,CAAC,CAAC,CAAC,iBAAiB;AACjD,MAAM,2BAA2B,GAAG,CAAC,CAAC,CAAC,WAAW;AAClD,MAAM,yBAAyB,GAAG,CAAC,CAAC,CAAC,UAAU;AAC/C,MAAM,0BAA0B,GAAG,CAAC,CAAC,CAAC,YAAY;AAClD,MAAM,wBAAwB,GAAG,CAAC,CAAC,CAAC,aAAa;AAMjD,MAAM,oBAAoB,GAAgC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACrE,MAAM,KAAK,GAAsB,EAAE,CAAC;IACpC,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,MAAM,WAAW,GACf,yEAAyE,CAAC;IAC5E,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACjD,IAAI,KAAK,CAAC,KAAK,GAAG,SAAS,EAAE,CAAC;YAC5B,KAAK,CAAC,IAAI,CACR,KAAC,IAAI,cACF,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,IAD1B,KAAK,SAAS,EAAE,CAEpB,CACR,CAAC;QACJ,CAAC;QAED,MAAM,SAAS,GAAG,KAAK,C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IAAI,CAAC,oBAAoB,CAAC,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAU,EAAE;IACzD,MAAM,SAAS,GAAG,IAAI;SACnB,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;SAC/B,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC;SACzB,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC;SACzB,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;SAC/B,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;IACtC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC;AAChC,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
interface MarkdownDisplayProps {
|
|
8
|
-
text: string;
|
|
9
|
-
isPending: boolean;
|
|
10
|
-
availableTerminalHeight?: number;
|
|
11
|
-
terminalWidth: number;
|
|
12
|
-
}
|
|
13
|
-
export declare const MarkdownDisplay: React.NamedExoticComponent<MarkdownDisplayProps>;
|
|
14
|
-
export {};
|