Commit Graph

60 Commits

Author SHA1 Message Date
Jacob Richman a1f5d39029 Fix issue #17080 (#17100)
Co-authored-by: Gal Zahavi <38544478+galz10@users.noreply.github.com>
2026-01-23 00:02:14 +00:00
Jacob Richman 63c918fe7d fix(ui): resolve sticky header regression in tool messages (#16514) 2026-01-13 22:17:05 +00:00
Jacob Richman ca6786a28b feat(ui): use Tab to switch focus between shell and input (#14332) 2026-01-12 23:30:12 +00:00
Jack Wotherspoon d351f07758 feat: custom loading phrase when interactive shell requires input (#12535) 2025-11-21 17:19:34 +00:00
Gal Zahavi 2231497b1f feat: add click-to-focus support for interactive shell (#13341) 2025-11-19 23:49:39 +00:00
Jacob Richman fb99b95372 Switch back to truncating headers. Unfortunately we have too many headers that are 10+ lines for no good reason so we need to add back this truncation until we fix them. (#13018) 2025-11-13 19:38:19 +00:00
Jacob Richman ee7065f665 Sticky headers where the top rounded border is sticky. (#12971) 2025-11-13 01:01:16 +00:00
Jacob Richman cbbf565121 Support ink scrolling final pr (#12567) 2025-11-11 15:50:11 +00:00
Tommaso Sciortino 35afab31e1 Don't display todo in history (#11516) 2025-10-20 17:36:55 +00:00
Tommaso Sciortino cd76b0b22d Create Todo List Tab (#11430) 2025-10-18 04:10:57 +00:00
Tommaso Sciortino 9a4211b610 Improve rendering of ToDo lists. (#11315) 2025-10-16 23:06:43 +00:00
Srivats Jayaram 6ded45e5d2 feat: Add markdown toggle (alt+m) to switch between rendered and raw… (#10383)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
2025-10-16 18:23:36 +00:00
Jacob Richman 558be87311 Re-land bbiggs changes to reduce margin on narrow screens with fixes + full width setting (#10522) 2025-10-10 02:27:20 +00:00
Gal Zahavi 467a305f26 chore(shell): Enable interactive shell by default (#10661) 2025-10-08 20:28:19 +00:00
Gal Zahavi 6695c32aa2 fix(shell): improve shell output presentation and usability (#8837) 2025-09-30 20:44:58 +00:00
Jacob Richman 375b8522fc Fix bug where users are unable to re-enter disconnected terminals. (#8765) 2025-09-20 17:59:37 +00:00
Gal Zahavi ec0acc486e fix(cli) : fix shell colors to match new coloring (#8747)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-09-18 20:35:55 +00:00
Gal Zahavi a34e375193 refactor(shell): Send AnsiOutput when ShowColor is false (#8647) 2025-09-18 20:04:46 +00:00
Miguel Solorio 67f7dae4e3 Update default text styles (#8291) 2025-09-11 21:22:16 +00:00
Gal Zahavi 181898cb5d feat(shell): enable interactive commands with virtual terminal (#6694) 2025-09-11 20:27:27 +00:00
Miguel Solorio b9b6fe1f73 feat(ui): Semantic tokens refactor (#8087) 2025-09-10 17:57:07 +00:00
christine betts fe5bb6694e Screen reader updates (#7307) 2025-08-28 20:52:14 +00:00
Arya Gummadi 4c3ec1f0cc refactor: centralize tool status symbols in constants (#7054) 2025-08-27 14:54:32 +00:00
Pascal Birchler 0f031a7f89 Explict imports & exports with type modifier (#3774) 2025-08-25 22:04:53 +00:00
Arya Gummadi 71c090c696 feat: add golden snapshot test for ToolGroupMessage and improve success symbol (#7037) 2025-08-25 21:42:18 +00:00
Arya Gummadi 4170dbdac3 fix: misaligned right border on tool calls ui and spacing in multiple tool calls ui (#6941) 2025-08-25 18:26:06 +00:00
Jacob Richman 6c1373c332 Revert "Update semantic color tokens" (#6365) 2025-08-16 03:18:31 +00:00
Miguel Solorio 3c0af3654a Update semantic color tokens (#6253)
Co-authored-by: jacob314 <jacob314@gmail.com>
2025-08-15 22:39:54 +00:00
Noritaka Kobayashi dbe217828d chore: fix typos in comment-out (#1540)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
2025-06-26 04:34:53 +00:00
Jacob Richman 8bd5645dd4 Truncate all strings before displaying in a tool messages to avoid stack overflows (#1395) 2025-06-24 22:31:55 +00:00
Sandy Tao a411c415a8 Do not render mcp responses as markdown (#1388) 2025-06-24 14:10:41 -07:00
Jacob Richman b0bc7c3d99 Fix flicker issues by ensuring all actively changing content fits in the viewport (#1217) 2025-06-19 13:17:23 -07:00
Olcan d061419452 enforce minimum lines shown/hidden (#860) 2025-06-08 17:11:16 -07:00
Miguel Solorio 8a0a2523ca Allow themes to theme the UI (#769) 2025-06-05 14:35:47 -07:00
Olcan a0ba65944f disable markdown rendering of shell tool output (#625) 2025-05-30 12:43:59 -07:00
Olcan 7c4a5464f6 truncate (hide) tool output at the top, add some spacing, also fix shell output interval change accidentally undone in a previous commit (#619) 2025-05-30 01:58:09 -07:00
Jacob Richman 05a49702d8 Refactor: Add GeminiRespondingSpinner to make use of streamingState idiomatic (#583) 2025-05-28 11:17:19 -07:00
Taylor Mullen 7408c78dbb Change tool call spinner to be different.
- This differentiates the tool calling spinner from one that matches the normal loading indiator to somethign a little more seamless.
2025-05-25 16:05:22 -07:00
Jacob Richman b4c16d1f56 Code review comment fixes and some refactors. (#525)
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-24 00:44:17 -07:00
Jacob Richman 91ee02898a feat: Modify loading indicator to support a paused state (#506) 2025-05-23 10:25:17 -07:00
Brandon Keiji 01971741e0 feat: add emphasis to tool confirmations (#502) 2025-05-23 05:28:31 +00:00
Taylor Mullen 968e09f0b5 fix: Ensure filename is available for diff rendering in write-file
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-16 10:13:13 -07:00
Taylor Mullen 9c46acc793 Refactor: Improve UI rendering and address code review comments
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-15 22:57:28 -07:00
Taylor Mullen 33743d347b Fix: Prevent UI tearing and improve display of long content
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-15 22:57:28 -07:00
Taylor Mullen 6cb6f47b56 Refactor: Replace MarkdownRenderer with MarkdownDisplay component
- 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-15 21:57:10 -07:00
Miguel Solorio 9efcb7741b Update color styles for yes/no questions (#369) 2025-05-15 14:36:34 -07:00
Taylor Mullen a588d5cd10 Prevent UI hang on long tool confirmations.
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-06 22:38:30 -07:00
Taylor Mullen 5be89befef feat: Fix flickering in iTerm + scrolling + performance issues.
- 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-26 16:08:05 -07:00
Taylor Mullen 80b04dc505 Update UI of tool messages
- 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-22 08:05:30 -04:00
Jaana Dogan baf39042c8 Remove duplicate CLI tools module, remove the global tool registry (#89) 2025-04-21 12:59:31 -07:00