Commit Graph

57 Commits

Author SHA1 Message Date
Bryan Morgan 33a1a0d54d Improve quota- and resource-related 429 error handling, also taking Code Assist customer tiers into consideration (#3609) 2025-07-09 14:18:15 +00:00
zfflxx f2d0ea8324 Fix nested markdown Rendering for table headers and rows #3331 (#3362)
Co-authored-by: Ryan Fang <ryan.fang@gllue.com>
2025-07-07 05:33:46 +00:00
Tian Jian Wang 5dbba0a59b feat: Add markdown table rendering support (#1955)
Co-authored-by: heartyguy <heartyguy@users.noreply.github.com>
Co-authored-by: Allen Hutchison <adh@google.com>
2025-07-01 03:25:19 +00:00
Eddie Santos 9954e5f968 update check + tests (#2772) 2025-07-01 03:03:16 +00:00
Tommaso Sciortino 1760779bab Rename AuthType LOGIN_WITH_GOOGLE_PERSONAL -> LOGIN_WITH_GOOGLE (#2769) 2025-07-01 00:11:54 +00:00
Abhi fc2ea1add3 feat: Change /stats to include more detailed breakdowns (#2615) 2025-06-30 00:44:33 +00:00
Noritaka Kobayashi c4ec04829d refactor: use for...of loop instead of traditional for loop (#1840) 2025-06-29 08:53:09 +00:00
Noritaka Kobayashi 8bd166f74b chore: fix typos in comment-out (#1540)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
2025-06-26 04:34:53 +00:00
Tommaso Sciortino f59a7d75a2 Merge "Login with Google Workspace" auth option into "Login with Google" (#1574)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
2025-06-25 22:38:18 +00:00
Brandon Keiji 5ad4a0a826 fix: prepublish changes to package names (#1420) 2025-06-25 12:41:11 +00:00
matt korwel f5294d3159 fix(update-notifier): resolve __dirname error on npx execution (#1406) 2025-06-25 00:26:50 +00:00
Marat Boshernitsan db3b3d6de0 fix: use correct directory for update checks (#1394) 2025-06-24 22:51:16 +00:00
Abhi b308e0eaef feat: add custom message for 429 errors (#1366) 2025-06-24 03:43:00 +00:00
Abhi 749de0662e Add error messaging for 429 errors (#1316) 2025-06-23 21:30:13 +00:00
Jacob Richman d2f3f69d03 Jacob314/overflow notification and one MaxSizedBox bug fix (#1288) 2025-06-22 00:54:10 +00:00
N. Taylor Mullen b0fa6c0813 Prevent hard crashing on update notifier fail. (#1254) 2025-06-20 07:30:30 +00:00
Jacob Richman c4e7c9f675 Fix flicker issues by ensuring all actively changing content fits in the viewport (#1217) 2025-06-19 13:17:23 -07:00
Eddie Santos d925aac735 Auto-update notifications (#1110) 2025-06-17 15:24:07 +00:00
Abhi 47c88dd25c feat: Adds shell command context to gemini history (#1076) 2025-06-15 22:09:30 -04:00
Leo 1aa98d48a3 bug: Fix code colorizer (#1046) 2025-06-14 21:27:53 +01:00
Miguel Solorio bd5f227055 Replace logo with custom ASCII (#958) 2025-06-13 07:59:45 +00:00
Abhi 41b82b00fa feat: Add UI for /stats slash command (#883) 2025-06-10 15:59:52 -04:00
Scott Densmore 8fc27f13c1 feat(cli): improve API error parsing and display (#829) 2025-06-07 22:04:57 -07:00
Miguel Solorio 3cdbeb879b Allow themes to theme the UI (#769) 2025-06-05 14:35:47 -07:00
Miguel Solorio 8b972ff351 Update light themes (#726) 2025-06-04 10:41:03 -07:00
Miguel Solorio be59580326 Color enhancements (#680) 2025-06-02 11:20:58 -07:00
Olcan 4ddeeb3eec more strict italics: delimiters cannot be preceded/followed by \w or [./\\]\S (#677) 2025-06-01 16:52:31 -07:00
Jacob Richman d695b90196 feat: add --show_memory_usage flag to display memory usage in status bar (#606) 2025-05-30 15:18:01 -07:00
Taylor Mullen d000067105 fix: Ensure user written ! is treated opaquely if not in shell mode\n\n- Addresses an issue where commands prefixed with ! (e.g., !ls) were incorrectly handled by the shell command processor if the ! was added after initially typing the command.\n- Ensures that such commands are correctly forwarded to the Gemini model.\n- Updates useGeminiStream to be aware of shell mode to properly manage streaming state.\n\nFixes https://buganizer.corp.google.com/issues/418761305 2025-05-19 16:16:47 -07:00
Taylor Mullen bc6ded6e06 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 f0ff90cacb Addressed code review comments 2025-05-15 21:57:10 -07:00
Taylor Mullen f76aff895a 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
Taylor Mullen de523f1688 Remove terminal tool and dependencies.
- We now solely use the shell tool. This deletes all content around the legacy terminal tool so we can focus on improving the new Shell tool.
- Remove instances from sandboxing, tests, utilities etc.
2025-05-11 12:35:55 -07:00
Taylor Mullen 09eb50a9d5 fix: Resolve infinite loop
- This change addresses and resolves an infinite loop. The patch ensures the loop condition is correctly handled, preventing its recurrence.
- Added tests for markdownUtilities.test.ts

Fixes: https://b.corp.google.com/issues/416795337

Signed-off-by: Gemini <My circuits hummed, and the loop was no more.>
2025-05-09 17:37:36 -07:00
Tae Hyung Kim ed3c9d5a9f Fix bugs from useGeminiStream refactor (#284) 2025-05-07 21:15:41 -07:00
Allen Hutchison 54d2c30602 Refactor: Enhance @-command, Autocomplete, and Input Stability (#279) 2025-05-07 12:30:32 -07:00
Taylor Mullen 631477b961 Fix rendering & indentation of bullets (numeric and *).
- Prior to this numeric bullets wouldn't have a period suffix and * bullets wouldn't be indented if they were nested.

Fixes https://b.corp.google.com/issues/414266756
2025-05-06 17:34:28 -07:00
Jacob Richman e87a6233ee Revert "Support syntax highlighting for more languages (#246)" (#264) 2025-05-06 08:16:32 -07:00
Jacob Richman 9e6a9c371e Support syntax highlighting for more languages (#246) 2025-05-04 07:57:55 -07:00
Jacob Richman 3f9c759932 Cleanup low value comments. (#248) 2025-05-02 14:39:39 -07:00
Seth Troisi d3255de6f9 Add autocomplete for slash commands 2025-05-02 20:58:53 +00:00
Seth Troisi b5a17c41bb Added bang(!) commands as a shell passthrough 2025-04-30 22:17:08 +00:00
Allen Hutchison 6e70ce2995 Add @ command handling to useGeminiStream (#217)
* First integration of at commands into useGeminiStream.ts

* feat: Integrate @ command for file/directory reading

   - Adds support for `@<path>` commands in the CLI UI to read file or directory contents using the `read_many_files` tool.
   - Refactors `useGeminiStream` hook to handle slash, passthrough, and @ commands before sending queries to the Gemini API.
   - Improves history item ID generation to prevent React duplicate key warnings.

* fix: Handle additional text after @ command path

   - Modifies the `@` command processor to parse text following the file/directory path (e.g., `@README.md explain this`).
   - Includes both the fetched file content and the subsequent text in the query sent to the Gemini API.
   - Resolves the TODO item in `atCommandProcessor.ts`.

* feat: Allow @ command anywhere in query and fix build

   - Update `atCommandProcessor` to correctly parse `@<path>` commands regardless of their position in the input string using regex. This enables queries like "Explain @README.md to me".
   - Fix build error in `useGeminiStream` by importing the missing `findSafeSplitPoint` function.

* rename isPotentiallyAtCommand to isAtCommand

* respond to review comments.
2025-04-29 15:39:36 -07:00
Allen Hutchison ce30f90be0 Refactor useGeminiStream to pull slash commands and passthrough comma… (#215)
* Refactor useGeminiStream to pull slash commands and passthrough commands into their own processors.

* whitespace lint errors.

* Add sugestions from code review.
2025-04-29 13:29:57 -07:00
Allen Hutchison 6097025c58 First four independent files for @ commands. (#205) 2025-04-29 08:29:09 -07:00
Taylor Mullen f9a9a20201 Follow up fixes from flickering PR.
- 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-26 19:32:56 -07:00
Taylor Mullen 9ad530c18b 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 c9a7714a84 Colorize code blocks.
- This changeset uses lowlight.js to parse the code in codeblocks to derive an AST, it then translates that into CSS themes that are widely known via highlight.js (things that GitHub use), finally I translate those css.color attributes into Ink colors and effectivel do <Text color={the color}>the text</Text>.
 - To do this I needed to build color mappings from css -> Ink
 - I introduced a new `Theme` type that will be used to represent many different color themes. It also enabled the color mappings to be seamless.
 - Added a theme manager that only has one theme for now (VS2015). The theme works very well with our colorization.
- Some other bits was removal of borders around our codeblocks since they now have richer rendering.
- Most complex bits of code in this PR is in the `CodeColorizer.tsx`

Fixes https://b.corp.google.com/issues/412433479
2025-04-22 18:57:27 -07:00
Juliette Love ef6aec032c Make model-generated code copyable (#70) 2025-04-20 21:48:30 +01:00
Taylor Mullen dbe94ad43c Give Gemini Code a face lift.
- 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-19 17:10:06 -04:00