summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/messages
AgeCommit message (Collapse)Author
2025-06-09Add Windsurf in edit tool to modify changes, if installed (#853)Eddie Santos
2025-06-09Windows: Refactor Shell Scripts to Node.js for Cross-Platform Compatibility ↵matt korwel
(#784)
2025-06-08enforce minimum lines shown/hidden (#860)Olcan
2025-06-08feat: Add flow to allow modifying edits during edit tool call (#808)Leo
2025-06-07refactor: rename gemini-code to gemini-cli (#822)cperry-goog
2025-06-05Allow themes to theme the UI (#769)Miguel Solorio
2025-06-02Color enhancements (#680)Miguel Solorio
2025-05-30Rename server->core (#638)Tommaso Sciortino
2025-05-30confirm mcp tool executions from untrusted servers (per "trust" setting) (#631)Olcan
2025-05-30disable markdown rendering of shell tool output (#625)Olcan
2025-05-30truncate (hide) tool output at the top, add some spacing, also fix shell ↵Olcan
output interval change accidentally undone in a previous commit (#619)
2025-05-28Cleanup: Remove low value StreamingContextType interface. (#585)Jacob Richman
2025-05-28Refactor: Add GeminiRespondingSpinner to make use of streamingState ↵Jacob Richman
idiomatic (#583)
2025-05-25Change tool call spinner to be different.Taylor Mullen
- This differentiates the tool calling spinner from one that matches the normal loading indiator to somethign a little more seamless.
2025-05-25Reduce excessive diff separators in CLI. (#535)DeWitt Clinton
Increases the threshold for rendering diff separators in the CLI's diff display. Previously, a separator was shown for gaps of more than one context line, leading to excessive separators in diffs with many small changes close together (Issue #534). By increasing `MAX_CONTEXT_LINES_WITHOUT_GAP` to 5, we allow for more context lines before a separator is added, significantly reducing visual clutter in such diffs. Added a test case to `DiffRenderer.test.tsx` to verify that separators are not rendered for small gaps within the new threshold.
2025-05-24Code review comment fixes and some refactors. (#525)Jacob Richman
No intentional different behavior aside for tweaks suggested from the code review of #506 Refactor: Extract console message logic to custom hook This commit refactors the console message handling from App.tsx into a new custom hook useConsoleMessages. This change improves the testability of the console message logic and declutters the main App component. Created useConsoleMessages.ts to encapsulate console message state and update logic. Updated App.tsx to utilize the new useConsoleMessages hook. Added unit tests for useConsoleMessages.ts to ensure its functionality. I deleted and started over on LoadingIndicator.test.tsx as I spent way too much time trying to fix it before just regenerating the tests as the code was easier to write tests for from scratch and the existing tests were not that good (I added them in the previous pull request).
2025-05-23feat: Modify loading indicator to support a paused state (#506)Jacob Richman
2025-05-23feat: add emphasis to tool confirmations (#502)Brandon Keiji
2025-05-22fix: forward entire tool call confirmation object through useToolScheduler ↵Brandon Keiji
(#481)
2025-05-21feat: useToolScheduler hook to manage parallel tool calls (#448)Brandon Keiji
2025-05-20feat: Improve diff rendering with gap indicatorsTaylor Mullen
- Adds a visual indicator for skipped lines in the diff view. - Updates tests to verify gap indicator rendering. - Adjusts line number padding for better alignment. Fixes https://b.corp.google.com/issues/414453107
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-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-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-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-02Cleanup low value comments. (#248)Jacob Richman
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-22Refactor tool confirmation radio buttons to own component.Taylor Mullen
- I plan to utilize these radio buttons for theme selection in the future. Refactoring them into their own component. Part of https://b.corp.google.com/issues/412797985
2025-04-22Update confirmation dialog UITaylor Mullen
- This chaneset aligns our confirmation dialog with: https://screenshot.googleplex.com/9yZCX636LzpMrgc - Primary changes include having custom indicators for confirmation options that align with our coloring / scheme Fixes https://b.corp.google.com/issues/412607128
2025-04-22Update UI of tool messagesTaylor Mullen
- Bring tool messages in line with original envisioned UI of: https://screenshot.googleplex.com/9yZCX636LzpMrgc - In particular this represents more descriptive names. FWIW we already had this tech we just weren't passing around information correctly (`displayName` vs. `name`) - Add gray to our list of color pallete's and removed Background (unused) - Re-enabled representing canceled messages - Migrated back towards a cleaner tool message design of status symbols & border colors vs. overly verbose text. - Removed border from confirmation diffs. Fixes https://b.corp.google.com/issues/412598909
2025-04-21Remove duplicate CLI tools module, remove the global tool registry (#89)Jaana Dogan
2025-04-21Fix confirmations.Taylor Mullen
- This fixes what it means to get confirmations in GC. Prior to this they had just been accidentally unwired as part of all of the refactorings to turns + to server/core. - The key piece of this is that we wrap the onConfirm in the gemini stream hook in order to resubmit function responses. This isn't 100% ideal but gets the job done for now. - Fixed history not updating properly with confirmations. Fixes https://b.corp.google.com/issues/412323656
2025-04-21Fix Gemini Code's (GC) smarts.Taylor Mullen
- The tl;dr; is that GC couldn't see what the user was saying when tool call events happened in response. The rason why this was happening was because we were instantly invoking tools that the model told us to invoke and then instantly re-requesting. This resulted in the bug because the genai APIs can't update the chat history before a full response has been completed (doesn't know how to update if it's incomplete). - To address the above issue I had to do quite the large refactor. The gist is that now turns truly drive everything on the server (vs. a server client split). This ensured that when we got tool invocations we could control when/how re-requesting would happen and then also ensure that history was updated. This change also meant that the server would act as an event publisher to enable the client to react to events rather than try and weave in complex logic between the events. - A BIG change that this changeset incudes is the removal of all of the CLI tools in favor of the server tools. - Removed some dead code as part of this - **NOTE: Confirmations are still broken (they were broken prior to this); however, I've set them up to be able to work in the future, I'll dot hat in a follow up to be less breaking to others.** Fixes https://b.corp.google.com/issues/412320087
2025-04-20Make model-generated code copyable (#70)Juliette Love
2025-04-19Give Gemini Code a face lift.Taylor Mullen
- This utilizes `ink-gradient` to render GEMINI CODE in amazing colors. - Added a shared color configuration for UX (should this be in config?). It's very possible that we shouldn't be talking about the specific colors and instead be mentioning "foreground"/"background"/inlineCode etc. type colors. - Updated existing color usages to utilize `Colors.*` Fixes https://b.corp.google.com/issues/411385593
2025-04-19Starting to modularize into separate cli / server packages. (#55)Evan Senter
* Starting to move a lot of code into packages/server * More of the massive refactor, builds and runs, some issues though. * Fixing outstanding issue with double messages. * Fixing a minor UI issue. * Fixing the build post-merge. * Running formatting. * Addressing comments.
2025-04-18Add apache2 SPDX headers to all source files (#48)Tyler
2025-04-18Fix remaining tslint errors (YAY).Taylor Mullen
- Also updated ci.yml to ensure that linting failures will break the build. Fully fixes https://b.corp.google.com/issues/411384603
2025-04-18Run `npm run format`Taylor Mullen
- This has the entirety of the changes. Part of https://b.corp.google.com/issues/411720532