@google/gemini-cli 0.1.0-development.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +156 -0
- package/dist/.last_build +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +80 -0
- package/dist/src/config/auth.d.ts +6 -0
- package/dist/src/config/auth.js +33 -0
- package/dist/src/config/auth.js.map +1 -0
- package/dist/src/config/config.d.ts +13 -0
- package/dist/src/config/config.js +211 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/extension.d.ts +20 -0
- package/dist/src/config/extension.js +81 -0
- package/dist/src/config/extension.js.map +1 -0
- package/dist/src/config/sandboxConfig.d.ts +13 -0
- package/dist/src/config/sandboxConfig.js +75 -0
- package/dist/src/config/sandboxConfig.js.map +1 -0
- package/dist/src/config/settings.d.ts +72 -0
- package/dist/src/config/settings.js +227 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/gemini.d.ts +6 -0
- package/dist/src/gemini.js +216 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/generated/git-commit.d.ts +6 -0
- package/dist/src/generated/git-commit.js +9 -0
- package/dist/src/generated/git-commit.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +7 -0
- package/dist/src/nonInteractiveCli.js +115 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/services/CommandService.d.ts +13 -0
- package/dist/src/services/CommandService.js +30 -0
- package/dist/src/services/CommandService.js.map +1 -0
- package/dist/src/ui/App.d.ts +14 -0
- package/dist/src/ui/App.js +391 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/colors.d.ts +7 -0
- package/dist/src/ui/colors.js +48 -0
- package/dist/src/ui/colors.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.d.ts +7 -0
- package/dist/src/ui/commands/clearCommand.js +15 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.d.ts +7 -0
- package/dist/src/ui/commands/helpCommand.js +18 -0
- package/dist/src/ui/commands/helpCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/memoryCommand.js +81 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +63 -0
- package/dist/src/ui/commands/types.js +7 -0
- package/dist/src/ui/commands/types.js.map +1 -0
- package/dist/src/ui/components/AboutBox.d.ts +16 -0
- package/dist/src/ui/components/AboutBox.js +6 -0
- package/dist/src/ui/components/AboutBox.js.map +1 -0
- package/dist/src/ui/components/AsciiArt.d.ts +7 -0
- package/dist/src/ui/components/AsciiArt.js +26 -0
- package/dist/src/ui/components/AsciiArt.js.map +1 -0
- package/dist/src/ui/components/AuthDialog.d.ts +15 -0
- package/dist/src/ui/components/AuthDialog.js +66 -0
- package/dist/src/ui/components/AuthDialog.js.map +1 -0
- package/dist/src/ui/components/AuthInProgress.d.ts +11 -0
- package/dist/src/ui/components/AuthInProgress.js +27 -0
- package/dist/src/ui/components/AuthInProgress.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +12 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +26 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/components/ConsolePatcher.d.ts +12 -0
- package/dist/src/ui/components/ConsolePatcher.js +40 -0
- package/dist/src/ui/components/ConsolePatcher.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +15 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +41 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +14 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js +34 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +15 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +73 -0
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
- package/dist/src/ui/components/Footer.d.ts +20 -0
- package/dist/src/ui/components/Footer.js +13 -0
- package/dist/src/ui/components/Footer.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +17 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js +16 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
- package/dist/src/ui/components/Header.d.ts +12 -0
- package/dist/src/ui/components/Header.js +20 -0
- package/dist/src/ui/components/Header.js.map +1 -0
- package/dist/src/ui/components/Help.d.ts +12 -0
- package/dist/src/ui/components/Help.js +10 -0
- package/dist/src/ui/components/Help.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +18 -0
- package/dist/src/ui/components/HistoryItemDisplay.js +17 -0
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +25 -0
- package/dist/src/ui/components/InputPrompt.js +280 -0
- package/dist/src/ui/components/InputPrompt.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
- package/dist/src/ui/components/LoadingIndicator.js +19 -0
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +27 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +33 -0
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js +4 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
- package/dist/src/ui/components/ShellModeIndicator.js +5 -0
- package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
- package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
- package/dist/src/ui/components/ShowMoreLines.js +24 -0
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
- package/dist/src/ui/components/StatsDisplay.d.ts +12 -0
- package/dist/src/ui/components/StatsDisplay.js +42 -0
- package/dist/src/ui/components/StatsDisplay.js.map +1 -0
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +21 -0
- package/dist/src/ui/components/SuggestionsDisplay.js +32 -0
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.d.ts +19 -0
- package/dist/src/ui/components/ThemeDialog.js +126 -0
- package/dist/src/ui/components/ThemeDialog.js.map +1 -0
- package/dist/src/ui/components/Tips.d.ts +12 -0
- package/dist/src/ui/components/Tips.js +8 -0
- package/dist/src/ui/components/Tips.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ToolStatsDisplay.js +41 -0
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
- package/dist/src/ui/components/UpdateNotification.js +10 -0
- package/dist/src/ui/components/UpdateNotification.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/CompressionMessage.js +16 -0
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +15 -0
- package/dist/src/ui/components/messages/DiffRenderer.js +212 -0
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
- package/dist/src/ui/components/messages/ErrorMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
- package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessage.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessage.js +10 -0
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js +15 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
- package/dist/src/ui/components/messages/InfoMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/InfoMessage.js +9 -0
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +111 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +18 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +53 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/ToolMessage.js +61 -0
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
- package/dist/src/ui/components/messages/UserMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserMessage.js +9 -0
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
- package/dist/src/ui/components/messages/UserShellMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
- package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +61 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js +384 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +41 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js +52 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +184 -0
- package/dist/src/ui/components/shared/text-buffer.js +1010 -0
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
- package/dist/src/ui/constants.d.ts +8 -0
- package/dist/src/ui/constants.js +12 -0
- package/dist/src/ui/constants.js.map +1 -0
- package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
- package/dist/src/ui/contexts/OverflowContext.js +43 -0
- package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.d.ts +33 -0
- package/dist/src/ui/contexts/SessionContext.js +49 -0
- package/dist/src/ui/contexts/SessionContext.js.map +1 -0
- package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
- package/dist/src/ui/contexts/StreamingContext.js +15 -0
- package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
- package/dist/src/ui/editors/editorSettingsManager.d.ts +19 -0
- package/dist/src/ui/editors/editorSettingsManager.js +54 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +31 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +310 -0
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +16 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +261 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +27 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +1050 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/useAuthCommand.d.ts +14 -0
- package/dist/src/ui/hooks/useAuthCommand.js +54 -0
- package/dist/src/ui/hooks/useAuthCommand.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +37 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +12 -0
- package/dist/src/ui/hooks/useBracketedPaste.js +32 -0
- package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
- package/dist/src/ui/hooks/useCompletion.d.ts +21 -0
- package/dist/src/ui/hooks/useCompletion.js +372 -0
- package/dist/src/ui/hooks/useCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +12 -0
- package/dist/src/ui/hooks/useConsoleMessages.js +60 -0
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
- package/dist/src/ui/hooks/useEditorSettings.js +43 -0
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +23 -0
- package/dist/src/ui/hooks/useGeminiStream.js +518 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.js +61 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.d.ts +22 -0
- package/dist/src/ui/hooks/useHistoryManager.js +72 -0
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistory.js +84 -0
- package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/src/ui/hooks/useKeypress.d.ts +29 -0
- package/dist/src/ui/hooks/useKeypress.js +86 -0
- package/dist/src/ui/hooks/useKeypress.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js +44 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useLogger.d.ts +10 -0
- package/dist/src/ui/hooks/useLogger.js +29 -0
- package/dist/src/ui/hooks/useLogger.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +189 -0
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +16 -0
- package/dist/src/ui/hooks/usePrivacySettings.js +115 -0
- package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +33 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js +186 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.d.ts +11 -0
- package/dist/src/ui/hooks/useShellHistory.js +89 -0
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js +58 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
- package/dist/src/ui/hooks/useStateAndRef.js +26 -0
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
- package/dist/src/ui/hooks/useTerminalSize.js +27 -0
- package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.d.ts +15 -0
- package/dist/src/ui/hooks/useThemeCommand.js +78 -0
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.d.ts +12 -0
- package/dist/src/ui/hooks/useTimer.js +58 -0
- package/dist/src/ui/hooks/useTimer.js.map +1 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +12 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +40 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +10 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +17 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +10 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js +17 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +12 -0
- package/dist/src/ui/privacy/PrivacyNotice.js +25 -0
- package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.d.ts +7 -0
- package/dist/src/ui/themes/ansi-light.js +139 -0
- package/dist/src/ui/themes/ansi-light.js.map +1 -0
- package/dist/src/ui/themes/ansi.d.ts +7 -0
- package/dist/src/ui/themes/ansi.js +149 -0
- package/dist/src/ui/themes/ansi.js.map +1 -0
- package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
- package/dist/src/ui/themes/atom-one-dark.js +136 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
- package/dist/src/ui/themes/ayu-light.d.ts +7 -0
- package/dist/src/ui/themes/ayu-light.js +128 -0
- package/dist/src/ui/themes/ayu-light.js.map +1 -0
- package/dist/src/ui/themes/ayu.d.ts +7 -0
- package/dist/src/ui/themes/ayu.js +102 -0
- package/dist/src/ui/themes/ayu.js.map +1 -0
- package/dist/src/ui/themes/default-light.d.ts +7 -0
- package/dist/src/ui/themes/default-light.js +100 -0
- package/dist/src/ui/themes/default-light.js.map +1 -0
- package/dist/src/ui/themes/default.d.ts +7 -0
- package/dist/src/ui/themes/default.js +143 -0
- package/dist/src/ui/themes/default.js.map +1 -0
- package/dist/src/ui/themes/dracula.d.ts +7 -0
- package/dist/src/ui/themes/dracula.js +113 -0
- package/dist/src/ui/themes/dracula.js.map +1 -0
- package/dist/src/ui/themes/github-dark.d.ts +7 -0
- package/dist/src/ui/themes/github-dark.js +136 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -0
- package/dist/src/ui/themes/github-light.d.ts +7 -0
- package/dist/src/ui/themes/github-light.js +138 -0
- package/dist/src/ui/themes/github-light.js.map +1 -0
- package/dist/src/ui/themes/googlecode.d.ts +7 -0
- package/dist/src/ui/themes/googlecode.js +135 -0
- package/dist/src/ui/themes/googlecode.js.map +1 -0
- package/dist/src/ui/themes/no-color.d.ts +7 -0
- package/dist/src/ui/themes/no-color.js +84 -0
- package/dist/src/ui/themes/no-color.js.map +1 -0
- package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
- package/dist/src/ui/themes/shades-of-purple.js +302 -0
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.d.ts +33 -0
- package/dist/src/ui/themes/theme-manager.js +109 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -0
- package/dist/src/ui/themes/theme.d.ts +67 -0
- package/dist/src/ui/themes/theme.js +304 -0
- package/dist/src/ui/themes/theme.js.map +1 -0
- package/dist/src/ui/themes/xcode.d.ts +7 -0
- package/dist/src/ui/themes/xcode.js +143 -0
- package/dist/src/ui/themes/xcode.js.map +1 -0
- package/dist/src/ui/types.d.ts +172 -0
- package/dist/src/ui/types.js +43 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/utils/CodeColorizer.d.ts +14 -0
- package/dist/src/ui/utils/CodeColorizer.js +97 -0
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +16 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +104 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +14 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +197 -0
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
- package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
- package/dist/src/ui/utils/TableRenderer.js +84 -0
- package/dist/src/ui/utils/TableRenderer.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +22 -0
- package/dist/src/ui/utils/commandUtils.js +25 -0
- package/dist/src/ui/utils/commandUtils.js.map +1 -0
- package/dist/src/ui/utils/computeStats.d.ts +10 -0
- package/dist/src/ui/utils/computeStats.js +55 -0
- package/dist/src/ui/utils/computeStats.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.d.ts +17 -0
- package/dist/src/ui/utils/displayUtils.js +24 -0
- package/dist/src/ui/utils/displayUtils.js.map +1 -0
- package/dist/src/ui/utils/errorParsing.d.ts +15 -0
- package/dist/src/ui/utils/errorParsing.js +79 -0
- package/dist/src/ui/utils/errorParsing.js.map +1 -0
- package/dist/src/ui/utils/formatters.d.ts +13 -0
- package/dist/src/ui/utils/formatters.js +56 -0
- package/dist/src/ui/utils/formatters.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.js +110 -0
- package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +22 -0
- package/dist/src/ui/utils/textUtils.js +58 -0
- package/dist/src/ui/utils/textUtils.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +6 -0
- package/dist/src/ui/utils/updateCheck.js +36 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +6 -0
- package/dist/src/utils/cleanup.js +19 -0
- package/dist/src/utils/cleanup.js.map +1 -0
- package/dist/src/utils/package.d.ts +12 -0
- package/dist/src/utils/package.js +24 -0
- package/dist/src/utils/package.js.map +1 -0
- package/dist/src/utils/readStdin.d.ts +6 -0
- package/dist/src/utils/readStdin.js +34 -0
- package/dist/src/utils/readStdin.js.map +1 -0
- package/dist/src/utils/sandbox-macos-permissive-closed.sb +26 -0
- package/dist/src/utils/sandbox-macos-permissive-open.sb +19 -0
- package/dist/src/utils/sandbox-macos-permissive-proxied.sb +31 -0
- package/dist/src/utils/sandbox-macos-restrictive-closed.sb +87 -0
- package/dist/src/utils/sandbox-macos-restrictive-open.sb +90 -0
- package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +92 -0
- package/dist/src/utils/sandbox.d.ts +7 -0
- package/dist/src/utils/sandbox.js +680 -0
- package/dist/src/utils/sandbox.js.map +1 -0
- package/dist/src/utils/startupWarnings.d.ts +6 -0
- package/dist/src/utils/startupWarnings.js +40 -0
- package/dist/src/utils/startupWarnings.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.js +33 -0
- package/dist/src/utils/userStartupWarnings.js.map +1 -0
- package/dist/src/utils/version.d.ts +6 -0
- package/dist/src/utils/version.js +11 -0
- package/dist/src/utils/version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export type Direction = 'left' | 'right' | 'up' | 'down' | 'wordLeft' | 'wordRight' | 'home' | 'end';
|
|
7
|
+
export interface Viewport {
|
|
8
|
+
height: number;
|
|
9
|
+
width: number;
|
|
10
|
+
}
|
|
11
|
+
interface UseTextBufferProps {
|
|
12
|
+
initialText?: string;
|
|
13
|
+
initialCursorOffset?: number;
|
|
14
|
+
viewport: Viewport;
|
|
15
|
+
stdin?: NodeJS.ReadStream | null;
|
|
16
|
+
setRawMode?: (mode: boolean) => void;
|
|
17
|
+
onChange?: (text: string) => void;
|
|
18
|
+
isValidPath: (path: string) => boolean;
|
|
19
|
+
shellModeActive?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface UndoHistoryEntry {
|
|
22
|
+
lines: string[];
|
|
23
|
+
cursorRow: number;
|
|
24
|
+
cursorCol: number;
|
|
25
|
+
}
|
|
26
|
+
export declare function offsetToLogicalPos(text: string, offset: number): [number, number];
|
|
27
|
+
interface TextBufferState {
|
|
28
|
+
lines: string[];
|
|
29
|
+
cursorRow: number;
|
|
30
|
+
cursorCol: number;
|
|
31
|
+
preferredCol: number | null;
|
|
32
|
+
undoStack: UndoHistoryEntry[];
|
|
33
|
+
redoStack: UndoHistoryEntry[];
|
|
34
|
+
clipboard: string | null;
|
|
35
|
+
selectionAnchor: [number, number] | null;
|
|
36
|
+
viewportWidth: number;
|
|
37
|
+
}
|
|
38
|
+
type TextBufferAction = {
|
|
39
|
+
type: 'set_text';
|
|
40
|
+
payload: string;
|
|
41
|
+
pushToUndo?: boolean;
|
|
42
|
+
} | {
|
|
43
|
+
type: 'insert';
|
|
44
|
+
payload: string;
|
|
45
|
+
} | {
|
|
46
|
+
type: 'backspace';
|
|
47
|
+
} | {
|
|
48
|
+
type: 'move';
|
|
49
|
+
payload: {
|
|
50
|
+
dir: Direction;
|
|
51
|
+
};
|
|
52
|
+
} | {
|
|
53
|
+
type: 'delete';
|
|
54
|
+
} | {
|
|
55
|
+
type: 'delete_word_left';
|
|
56
|
+
} | {
|
|
57
|
+
type: 'delete_word_right';
|
|
58
|
+
} | {
|
|
59
|
+
type: 'kill_line_right';
|
|
60
|
+
} | {
|
|
61
|
+
type: 'kill_line_left';
|
|
62
|
+
} | {
|
|
63
|
+
type: 'undo';
|
|
64
|
+
} | {
|
|
65
|
+
type: 'redo';
|
|
66
|
+
} | {
|
|
67
|
+
type: 'replace_range';
|
|
68
|
+
payload: {
|
|
69
|
+
startRow: number;
|
|
70
|
+
startCol: number;
|
|
71
|
+
endRow: number;
|
|
72
|
+
endCol: number;
|
|
73
|
+
text: string;
|
|
74
|
+
};
|
|
75
|
+
} | {
|
|
76
|
+
type: 'move_to_offset';
|
|
77
|
+
payload: {
|
|
78
|
+
offset: number;
|
|
79
|
+
};
|
|
80
|
+
} | {
|
|
81
|
+
type: 'create_undo_snapshot';
|
|
82
|
+
} | {
|
|
83
|
+
type: 'set_viewport_width';
|
|
84
|
+
payload: number;
|
|
85
|
+
};
|
|
86
|
+
export declare function textBufferReducer(state: TextBufferState, action: TextBufferAction): TextBufferState;
|
|
87
|
+
export declare function useTextBuffer({ initialText, initialCursorOffset, viewport, stdin, setRawMode, onChange, isValidPath, shellModeActive, }: UseTextBufferProps): TextBuffer;
|
|
88
|
+
export interface TextBuffer {
|
|
89
|
+
lines: string[];
|
|
90
|
+
text: string;
|
|
91
|
+
cursor: [number, number];
|
|
92
|
+
/**
|
|
93
|
+
* When the user moves the caret vertically we try to keep their original
|
|
94
|
+
* horizontal column even when passing through shorter lines. We remember
|
|
95
|
+
* that *preferred* column in this field while the user is still travelling
|
|
96
|
+
* vertically. Any explicit horizontal movement resets the preference.
|
|
97
|
+
*/
|
|
98
|
+
preferredCol: number | null;
|
|
99
|
+
selectionAnchor: [number, number] | null;
|
|
100
|
+
allVisualLines: string[];
|
|
101
|
+
viewportVisualLines: string[];
|
|
102
|
+
visualCursor: [number, number];
|
|
103
|
+
visualScrollRow: number;
|
|
104
|
+
/**
|
|
105
|
+
* Replaces the entire buffer content with the provided text.
|
|
106
|
+
* The operation is undoable.
|
|
107
|
+
*/
|
|
108
|
+
setText: (text: string) => void;
|
|
109
|
+
/**
|
|
110
|
+
* Insert a single character or string without newlines.
|
|
111
|
+
*/
|
|
112
|
+
insert: (ch: string) => void;
|
|
113
|
+
newline: () => void;
|
|
114
|
+
backspace: () => void;
|
|
115
|
+
del: () => void;
|
|
116
|
+
move: (dir: Direction) => void;
|
|
117
|
+
undo: () => void;
|
|
118
|
+
redo: () => void;
|
|
119
|
+
/**
|
|
120
|
+
* Replaces the text within the specified range with new text.
|
|
121
|
+
* Handles both single-line and multi-line ranges.
|
|
122
|
+
*
|
|
123
|
+
* @param startRow The starting row index (inclusive).
|
|
124
|
+
* @param startCol The starting column index (inclusive, code-point based).
|
|
125
|
+
* @param endRow The ending row index (inclusive).
|
|
126
|
+
* @param endCol The ending column index (exclusive, code-point based).
|
|
127
|
+
* @param text The new text to insert.
|
|
128
|
+
* @returns True if the buffer was modified, false otherwise.
|
|
129
|
+
*/
|
|
130
|
+
replaceRange: (startRow: number, startCol: number, endRow: number, endCol: number, text: string) => void;
|
|
131
|
+
/**
|
|
132
|
+
* Delete the word to the *left* of the caret, mirroring common
|
|
133
|
+
* Ctrl/Alt+Backspace behaviour in editors & terminals. Both the adjacent
|
|
134
|
+
* whitespace *and* the word characters immediately preceding the caret are
|
|
135
|
+
* removed. If the caret is already at column‑0 this becomes a no-op.
|
|
136
|
+
*/
|
|
137
|
+
deleteWordLeft: () => void;
|
|
138
|
+
/**
|
|
139
|
+
* Delete the word to the *right* of the caret, akin to many editors'
|
|
140
|
+
* Ctrl/Alt+Delete shortcut. Removes any whitespace/punctuation that
|
|
141
|
+
* follows the caret and the next contiguous run of word characters.
|
|
142
|
+
*/
|
|
143
|
+
deleteWordRight: () => void;
|
|
144
|
+
/**
|
|
145
|
+
* Deletes text from the cursor to the end of the current line.
|
|
146
|
+
*/
|
|
147
|
+
killLineRight: () => void;
|
|
148
|
+
/**
|
|
149
|
+
* Deletes text from the start of the current line to the cursor.
|
|
150
|
+
*/
|
|
151
|
+
killLineLeft: () => void;
|
|
152
|
+
/**
|
|
153
|
+
* High level "handleInput" – receives what Ink gives us.
|
|
154
|
+
*/
|
|
155
|
+
handleInput: (key: {
|
|
156
|
+
name: string;
|
|
157
|
+
ctrl: boolean;
|
|
158
|
+
meta: boolean;
|
|
159
|
+
shift: boolean;
|
|
160
|
+
paste: boolean;
|
|
161
|
+
sequence: string;
|
|
162
|
+
}) => void;
|
|
163
|
+
/**
|
|
164
|
+
* Opens the current buffer contents in the user's preferred terminal text
|
|
165
|
+
* editor ($VISUAL or $EDITOR, falling back to "vi"). The method blocks
|
|
166
|
+
* until the editor exits, then reloads the file and replaces the in‑memory
|
|
167
|
+
* buffer with whatever the user saved.
|
|
168
|
+
*
|
|
169
|
+
* The operation is treated as a single undoable edit – we snapshot the
|
|
170
|
+
* previous state *once* before launching the editor so one `undo()` will
|
|
171
|
+
* revert the entire change set.
|
|
172
|
+
*
|
|
173
|
+
* Note: We purposefully rely on the *synchronous* spawn API so that the
|
|
174
|
+
* calling process genuinely waits for the editor to close before
|
|
175
|
+
* continuing. This mirrors Git's behaviour and simplifies downstream
|
|
176
|
+
* control‑flow (callers can simply `await` the Promise).
|
|
177
|
+
*/
|
|
178
|
+
openInExternalEditor: (opts?: {
|
|
179
|
+
editor?: string;
|
|
180
|
+
}) => Promise<void>;
|
|
181
|
+
replaceRangeByOffset: (startOffset: number, endOffset: number, replacementText: string) => void;
|
|
182
|
+
moveToOffset(offset: number): void;
|
|
183
|
+
}
|
|
184
|
+
export {};
|