Commit Graph

24 Commits

Author SHA1 Message Date
Brandon Keiji f6c36f75e3
fix: prepublish changes to package names (#1420) 2025-06-25 12:41:11 +00: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
Allen Hutchison 31b28ade01
Improvements to web-fetch tool (#1030) 2025-06-13 17:44:14 -07:00
Leo ad2e47dc20
remove enable editor flag (#984) 2025-06-12 17:28:20 +00:00
Leo 1ef68e0612
feat: External editor settings (#882) 2025-06-11 18:21:54 -07:00
Eddie Santos 6484dc9008
Add Windsurf in edit tool to modify changes, if installed (#853) 2025-06-09 16:01:06 -07:00
Leo 9efca40dae
feat: Add flow to allow modifying edits during edit tool call (#808) 2025-06-08 10:56:58 -07:00
cperry-goog 18d6a11c04
refactor: rename gemini-code to gemini-cli (#822) 2025-06-07 14:27:22 -07:00
Tommaso Sciortino 21fba832d1
Rename server->core (#638) 2025-05-30 18:25:47 -07:00
Olcan 2e57989aec
confirm mcp tool executions from untrusted servers (per "trust" setting) (#631) 2025-05-30 15:32:21 -07:00
Brandon Keiji 4e3ba687a6
fix: forward entire tool call confirmation object through useToolScheduler (#481) 2025-05-22 06:00:36 +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
Brandon Keiji c6bca64499
refactor: remove unused props clearItems, openThemeDialog, onSubmit (#357) 2025-05-15 09:12:15 -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
Olcan 34f100d6ff
drop todo about qualified writes, turns out others don't do it either so nbd (#177) 2025-04-25 14:16:24 -07:00
Olcan 7087c0508e
more consistent confirmations, TODO to improve write confirmations, drop "description" from execution confirmation, add confirmation to new (still dummy) shell tool (#176) 2025-04-25 14:05:58 -07:00
Taylor Mullen ffe368afed Refactor tool confirmation radio buttons to own component.
- 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-22 18:33:36 -07:00
Taylor Mullen 5c5c470671 Update confirmation dialog UI
- 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-22 10:33:06 -04:00
Taylor Mullen 81f0f618f7 Fix Gemini Code's (GC) smarts.
- 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-21 11:07:09 -04:00
Taylor Mullen f7edf71190 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
Tyler 4354458cad
Add apache2 SPDX headers to all source files (#48) 2025-04-18 17:44:24 -07:00
Taylor Mullen 40e11e053c Fix remaining tslint errors (YAY).
- Also updated ci.yml to ensure that linting failures will break the build.

Fully fixes https://b.corp.google.com/issues/411384603
2025-04-18 19:14:36 -04:00
Taylor Mullen cfc697a96d Run `npm run format`
- Also updated README.md accordingly.

Part of https://b.corp.google.com/issues/411384603
2025-04-17 15:29:34 -07:00
Taylor Mullen add233c504 Initial commit of Gemini Code CLI
This commit introduces the initial codebase for the Gemini Code CLI, a command-line interface designed to facilitate interaction with the Gemini API for software engineering tasks.

The code was migrated from a previous git repository as a single squashed commit.

Core Features & Components:

*   **Gemini Integration:** Leverages the `@google/genai` SDK to interact with the Gemini models, supporting chat history, streaming responses, and function calling (tools).
*   **Terminal UI:** Built with Ink (React for CLIs) providing an interactive chat interface within the terminal, including input prompts, message display, loading indicators, and tool interaction elements.
*   **Tooling Framework:** Implements a robust tool system allowing Gemini to interact with the local environment. Includes tools for:
    *   File system listing (`ls`)
    *   File reading (`read-file`)
    *   Content searching (`grep`)
    *   File globbing (`glob`)
    *   File editing (`edit`)
    *   File writing (`write-file`)
    *   Executing bash commands (`terminal`)
*   **State Management:** Handles the streaming state of Gemini responses and manages the conversation history.
*   **Configuration:** Parses command-line arguments (`yargs`) and loads environment variables (`dotenv`) for setup.
*   **Project Structure:** Organized into `core`, `ui`, `tools`, `config`, and `utils` directories using TypeScript. Includes basic build (`tsc`) and start scripts.

This initial version establishes the foundation for a powerful CLI tool enabling developers to use Gemini for coding assistance directly in their terminal environment.

---
Created by yours truly: __Gemini Code__
2025-04-17 13:19:55 -04:00