gemini-cli/packages/server
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
..
src fix: Ensure filename is available for diff rendering in write-file 2025-05-16 10:13:13 -07:00
README.md infra: add multipackage support (#34) 2025-04-18 14:37:02 -07:00
index.ts refactor: clean up build output (#53) 2025-04-20 12:33:39 -07:00
package.json fix: Ensure filename is available for diff rendering in write-file 2025-05-16 10:13:13 -07:00
tsconfig.json enable json imports (#165) 2025-04-24 18:30:19 -07:00

README.md

Nested package template. Either fill this out with "backend" functionality or create similar packages that you want built separate from the CLI.

To use this package from another dependent package in this monorepo:

  1. add "@gemini-code/server" to the dependent package's package.json
  2. import in a dependenant by calling import { } from "@gemini-code/server"