summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components
AgeCommit message (Collapse)Author
2025-05-18feat(cli): Add ShellModeIndicator componentTaylor Mullen
This commit introduces a new ShellModeIndicator component to visually signify when shell mode is active. - Displays "shell mode enabled (! to toggle)" in the UI. - The AutoAcceptIndicator is now hidden when shell mode is active to prevent UI clutter.
2025-05-18feat(cli): Introduce toggleable shell mode with enhanced UITaylor Mullen
- Implements a toggleable shell mode, removing the need to prefix every command with `!`. - Users can now enter and exit shell mode by typing `!` as the first character in an empty input prompt. - The input prompt visually indicates active shell mode with a distinct color and `! ` prefix. - Shell command history items (`user_shell`) are now visually differentiated from regular user messages. - This provides a cleaner and more streamlined user experience for frequent shell interactions. Fixes https://b.corp.google.com/issues/418509745
2025-05-17feat: Add auto-accept indicator and toggleTaylor Mullen
- This commit introduces a visual indicator in the CLI to show when auto-accept for tool confirmations is enabled. Users can now also toggle this setting on/off using Shift + Tab. - This addresses user feedback for better visibility and control over the auto-accept feature, improving the overall user experience. - This behavior is similar to Claude Code, providing a familiar experience for users transitioning from that environment. - Added tests for the new auto indicator hook. Fixes https://b.corp.google.com/issues/413740468
2025-05-17Introduce a small easter egg. Woof. (#412)DeWitt Clinton
Also changes auto-completion and /help to skip over slash commands that don't contain a description to avoid spoiling the surprise.
2025-05-16feat: Patch console.debug and display only in debug modeTaylor Mullen
- Patches `console.debug` in `ConsolePatcher.tsx` to capture debug messages. - Updates `ConsoleOutput` to only display debug messages when `debugMode` is enabled. - Passes `debugMode` prop from `App.tsx` to `ConsoleOutput`. Fixes https://github.com/google-gemini/gemini-cli/issues/397
2025-05-16strip escape characters when pasting. (#386)Jacob Richman
2025-05-16Support auto wrapping of in the multiline editor. (#383)Jacob Richman
2025-05-16fix: Ensure filename is available for diff rendering in write-fileTaylor Mullen
This commit resolves a bug where the `write-file` operation could fail to render content due to a missing filename. The fix involves: - Ensuring `fileName` is consistently passed to `DiffRenderer.tsx` through `ToolConfirmationMessage.tsx`, `ToolMessage.tsx`, and `useGeminiStream.ts`. - Modifying `edit.ts` and `write-file.ts` to include `fileName` in the `FileDiff` object. - Expanding the `FileDiff` interface in `tools.ts` to include `fileName`. Additionally, this commit enhances the diff rendering by: - Adding syntax highlighting based on file extension in `DiffRenderer.tsx`. - Adding more language mappings to `getLanguageFromExtension` in `DiffRenderer.tsx`. - Added lots of tests for all the above. Fixes https://b.corp.google.com/issues/418125982
2025-05-15Refactor: Improve UI rendering and address code review commentsTaylor Mullen
This commit addresses several code review comments primarily focused on improving the rendering and stability of the CLI UI. Key changes include: - Passing `isPending` and `availableTerminalHeight` props to `MarkdownDisplay` to enable more intelligent rendering of content, especially for pending messages and code blocks. - Adjusting height calculations in `ToolGroupMessage` and `ToolMessage` to more accurately reflect available space. - Refining the logic in `App.tsx` for measuring and utilizing terminal height, including renaming `footerRef` to `mainControlsRef` for clarity. - Ensuring consistent prop drilling for `isPending` and `availableTerminalHeight` through `HistoryItemDisplay`, `GeminiMessage`, and `GeminiMessageContent`. - In `MarkdownDisplay`, when `isPending` is true and content exceeds `availableTerminalHeight`, the code block will now be truncated with a "... generating more ..." message. If there's insufficient space even for the message, a simpler "... code is being written ..." will be shown.
2025-05-15Fix: Prevent UI tearing and improve display of long contentTaylor Mullen
This commit introduces several changes to better manage terminal height and prevent UI tearing, especially when displaying long tool outputs or when the pending history item exceeds the available terminal height. - Calculate and utilize available terminal height in `App.tsx`, `HistoryItemDisplay.tsx`, `ToolGroupMessage.tsx`, and `ToolMessage.tsx`. - Refresh the static display area in `App.tsx` when a pending history item is too large, working around an Ink bug (see https://github.com/vadimdemedes/ink/pull/717). - Truncate long tool output in `ToolMessage.tsx` and indicate the number of hidden lines. - Refactor `App.tsx` to correctly measure and account for footer height. Fixes https://b.corp.google.com/issues/414196943
2025-05-15Refactor: Replace MarkdownRenderer with MarkdownDisplay componentTaylor Mullen
- This commit refactors the Markdown rendering logic within the CLI UI. The existing `MarkdownRenderer.tsx` class-based component has been replaced with a new functional component `MarkdownDisplay.tsx`. - The `MarkdownDisplay` component is a React.memoized component for improved performance and maintains the same core Markdown parsing and rendering capabilities.
2025-05-15UI improvements for suggestions & status (#373)Miguel Solorio
2025-05-15Update color styles for yes/no questions (#369)Miguel Solorio
2025-05-15refactor: remove unused props clearItems, openThemeDialog, onSubmit (#357)Brandon Keiji
2025-05-14Add readline-like keybindings to the input prompts. (#354)DeWitt Clinton
New keybindings in the main input prompt (when auto-suggestions are not active): - `Ctrl+L`: Clears the entire screen. - `Ctrl+A`: Moves the cursor to the beginning of the current input line. - `Ctrl+E`: Moves the cursor to the end of the current input line. - `Ctrl+P`: Navigates to the previous command in the input history. - `Ctrl+N`: Navigates to the next command in the input history. In the multiline text editor (e.g., when editing a previous message): - `Ctrl+K`: Deletes text from the current cursor position to the end of the line ("kill line right").
2025-05-14Refactor: Move GEMINI.md file count to Footer (#351)Allen Hutchison
2025-05-14Improvements to suggestions & slash commands (#344)Miguel Solorio
Co-authored-by: N. Taylor Mullen <[email protected]>
2025-05-14improve sandboxing status message, update README, remove dead code from a ↵Olcan
previous change to build_sandbox.sh (#346)
2025-05-13Refactor TextBuffer to be a React hook (#340)Jacob Richman
2025-05-13First step refactoring InputPrompt (#335)Jacob Richman
2025-05-13Use `Enter` on slash commands to execute (#334)Miguel Solorio
2025-05-13Multiline editor (#302)Jacob Richman
Co-authored-by: Taylor Mullen <[email protected]>
2025-05-13Allow users to cancel out of theme selector (#310)Miguel Solorio
2025-05-09Make cancel not explode.Taylor Mullen
- We were console.erroring, throwing and early aborting. Instead we now treat cancels like a normal user message and show an indicator in the UI Fixes https://b.corp.google.com/issues/416515841
2025-05-08UI Polish for theme selector (#294)Miguel Solorio
2025-05-08Make ascii logo simpler (#288)Miguel Solorio
2025-05-07rename SANDBOX_EXEC_PROFILE as SEATBELT_PROFILE, and fix another accidental ↵Olcan
rephrasing (#285)
2025-05-07use seatbelt on macos, with two profiles: minimal (default) which only ↵Olcan
restricts writes, and strict, which is deny-by-default and only allows specific operations (#283)
2025-05-07Refactor: Enhance @-command, Autocomplete, and Input Stability (#279)Allen Hutchison
2025-05-06Prevent UI hang on long tool confirmations.Taylor Mullen
Problem: When a tool confirmation dialog appeared for a potentially long-running operation (e.g., `npm install`), accepting the confirmation would cause the UI to appear to hang. The confirmation dialog would remain visible, and no further UI updates would occur until the long-running task completed. This provided a poor user experience as the application seemed unresponsive. Fix: This change addresses the issue by ensuring the UI is updated to remove the confirmation dialog *before* the long-running operation begins. It also marks the tool as executing so a spinner can be shown. Fixes https://b.corp.google.com/issues/415844994 Signed, sealed, delivered, it's yours! - Gemini, your friendly neighborhood code-slinger
2025-05-06fix: use flat config for react eslint plugin (#265)Brandon Keiji
2025-05-05Move Intro to Help and only display after help command.Seth Troisi
2025-05-02Cleanup low value comments. (#248)Jacob Richman
2025-05-02Add autocomplete for slash commandsSeth Troisi
2025-05-01Support escaping spaces in file paths. (#241)Jacob Richman
2025-05-01Save settings to ~/.gemini/settings.json and optionally ↵Jacob Richman
/your/workspace/.gemini/settings.json (#237)
2025-04-30Added bang(!) commands as a shell passthroughSeth Troisi
2025-04-30Add @ command suggestions in the UI. (#219)Allen Hutchison
2025-04-29Add Intro text with list of /commandsSeth Troisi
2025-04-29Add intro with some abilities and commandsSeth Troisi
2025-04-29First four independent files for @ commands. (#205)Allen Hutchison
2025-04-27feat(cli): Improve new file diff rendering with syntax highlightingTaylor Mullen
- Enhance the component to provide better readability for newly created files. - Instead of displaying a standard line-by-line diff for new files, extract the added content and render it with syntax highlighting based on the file extension. - Refactor the existing diff rendering logic into a separate function. - Add a helper function to map common file extensions to language names for syntax highlighting. Fixes: https://b.corp.google.com/issues/414279447 Signed-off-by: Gemini, your friendly neighborhood code agent.
2025-04-26Follow up fixes from flickering PR.Taylor Mullen
- The push for these changes didn't make it through.... Just doing a quick fix here which should have been in: https://github.com/google-gemini/gemini-code/pull/181
2025-04-26feat: Fix flickering in iTerm + scrolling + performance issues.Taylor Mullen
- Refactors history display using Ink's <Static> component to prevent flickering and improve performance by rendering completed items statically. - Introduces ConsolePatcher component to capture and display console.log, console.warn, and console.error output within the Ink UI, addressing native handling issues. - Introduce a new content splitting mechanism to work better for static items. Basically when content gets too long we will now split content into multiple blocks for Gemini messages to ensure that we can statically cache larger pieces of history. Fixes: - https://b.corp.google.com/issues/411450097 - https://b.corp.google.com/issues/412716309
2025-04-25drop todo about qualified writes, turns out others don't do it either so nbd ↵Olcan
(#177)
2025-04-25more consistent confirmations, TODO to improve write confirmations, drop ↵Olcan
"description" from execution confirmation, add confirmation to new (still dummy) shell tool (#176)
2025-04-25more compact cli version in footer (#168)Olcan
2025-04-24Add an ansi theme. (#152)Jacob Richman
Add the gradient used by the ascii art logo to theme.
2025-04-24Add a theme preview and update the theme when highlight changes. (#151)Jacob Richman
2025-04-23Make ui/colors refelect the current theme.jacob314