<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dev/gemini-cli/packages/server/src/utils, branch main</title>
<subtitle>[no description]</subtitle>
<id>http://cgit.wit.com/dev/gemini-cli/atom?h=main</id>
<link rel='self' href='http://cgit.wit.com/dev/gemini-cli/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/'/>
<updated>2025-05-31T01:25:47Z</updated>
<entry>
<title>Rename server-&gt;core (#638)</title>
<updated>2025-05-31T01:25:47Z</updated>
<author>
<name>Tommaso Sciortino</name>
<email>sciortino@gmail.com</email>
</author>
<published>2025-05-31T01:25:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/commit/?id=21fba832d1b4ea7af43fb887d9b2b38fcf8210d0'/>
<id>urn:sha1:21fba832d1b4ea7af43fb887d9b2b38fcf8210d0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: Implement retry with backoff for API calls (#613)</title>
<updated>2025-05-30T17:57:00Z</updated>
<author>
<name>N. Taylor Mullen</name>
<email>ntaylormullen@google.com</email>
</author>
<published>2025-05-30T17:57:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/commit/?id=8c46108a852128d1d0792c149746631d83fc58cf'/>
<id>urn:sha1:8c46108a852128d1d0792c149746631d83fc58cf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change ReadFile to not have a result display.</title>
<updated>2025-05-30T17:48:10Z</updated>
<author>
<name>Taylor Mullen</name>
<email>ntaylormullen@google.com</email>
</author>
<published>2025-05-30T04:57:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/commit/?id=c5608869c00c433a468fe5e88bcbafd83f6599a1'/>
<id>urn:sha1:c5608869c00c433a468fe5e88bcbafd83f6599a1</id>
<content type='text'>
- It's verbose on its own; however, if file content is truncated we'll indicate that in the result display.
</content>
</entry>
<entry>
<title>Refactor read-file and support images. (#480)</title>
<updated>2025-05-29T22:30:18Z</updated>
<author>
<name>Jacob Richman</name>
<email>jacob314@gmail.com</email>
</author>
<published>2025-05-29T22:30:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/commit/?id=dab7517622527a70bf2f36a9d7a9fa5e1a3b56e0'/>
<id>urn:sha1:dab7517622527a70bf2f36a9d7a9fa5e1a3b56e0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: Allow cancellation of in-progress Gemini requests and pre-execution checks</title>
<updated>2025-05-28T06:46:37Z</updated>
<author>
<name>Taylor Mullen</name>
<email>ntaylormullen@google.com</email>
</author>
<published>2025-05-28T06:40:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/commit/?id=f2f2ecf9d83224778e5fc38cfcc4a1edddf9f7d4'/>
<id>urn:sha1:f2f2ecf9d83224778e5fc38cfcc4a1edddf9f7d4</id>
<content type='text'>
- Implements cancellation for Gemini requests while they are actively being processed by the model.
- Extends cancellation support to the  logic within tools. This allows users to cancel operations during the phase where the system is determining if a tool execution requires user confirmation, which can include potentially long-running pre-flight checks or LLM-based corrections.
- Underlying LLM calls for edit corrections (within  and ) and next speaker checks can now also be cancelled.
- Previously, cancellation of the main request was not possible until text started streaming, and pre-execution checks were not cancellable.
- This change leverages the updated SDK's ability to accept an abort token and threads s throughout the request, tool execution, and pre-execution check lifecycle.

Fixes https://github.com/google-gemini/gemini-cli/issues/531
</content>
</entry>
<entry>
<title>Fix(chat): Finalize next speaker detection logic</title>
<updated>2025-05-26T22:21:45Z</updated>
<author>
<name>Taylor Mullen</name>
<email>ntaylormullen@google.com</email>
</author>
<published>2025-05-26T21:39:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/commit/?id=9e1cfca53f4e71697f883c17d71bfcae86f01408'/>
<id>urn:sha1:9e1cfca53f4e71697f883c17d71bfcae86f01408</id>
<content type='text'>
- Enhance `checkNextSpeaker` to handle cases where the last message is a function response or an empty model message.
- If the last message is a function response, the model should speak next.
- If the last message is an empty model message, the model should speak next.
- This ensures more robust and accurate determination of the next speaker in the conversation, completing the fix for the issue.
- Updated tests.

Fixes https://github.com/google-gemini/gemini-cli/issues/551
</content>
</entry>
<entry>
<title>Fix(chat): Prevent empty model response after function call</title>
<updated>2025-05-26T21:29:24Z</updated>
<author>
<name>Taylor Mullen</name>
<email>ntaylormullen@google.com</email>
</author>
<published>2025-05-26T21:25:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/commit/?id=597dc86a9c7011b7f3288445b14abb11817424da'/>
<id>urn:sha1:597dc86a9c7011b7f3288445b14abb11817424da</id>
<content type='text'>
- Addresses a Gemini model bug where it may return an empty content object after a function response.
- Previously, the SDK attempted to inject an empty model message, which could disrupt curated history.
- This change modifies our custom  class to detect this scenario using an  utility and avoid pushing an unnecessary empty model message, thus preserving history integrity.

Workaround for https://b.corp.google.com/issues/420354090
Part of https://github.com/google-gemini/gemini-cli/issues/551
</content>
</entry>
<entry>
<title>Refactor(chat): Introduce custom Chat class for future modifications</title>
<updated>2025-05-26T21:20:28Z</updated>
<author>
<name>Taylor Mullen</name>
<email>ntaylormullen@google.com</email>
</author>
<published>2025-05-26T21:17:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/commit/?id=480549e02ed4ae01c7df2abbd98bb0eb5b23bdd5'/>
<id>urn:sha1:480549e02ed4ae01c7df2abbd98bb0eb5b23bdd5</id>
<content type='text'>
- Copied the `Chat` class from `@google/genai` into `packages/server/src/core/geminiChat.ts`.
- This change is in preparation for future modifications to the chat handling logic.
- Updated relevant files to use the new `GeminiChat` class.

Part of https://github.com/google-gemini/gemini-cli/issues/551
</content>
</entry>
<entry>
<title>Fix(test): Improve write-file and editCorrector test suites</title>
<updated>2025-05-25T22:02:08Z</updated>
<author>
<name>Taylor Mullen</name>
<email>ntaylormullen@google.com</email>
</author>
<published>2025-05-25T21:59:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/commit/?id=3281cbc835ae77d0c33662485505651d01a984cc'/>
<id>urn:sha1:3281cbc835ae77d0c33662485505651d01a984cc</id>
<content type='text'>
- Enhanced  by:
  - Mocking  and  utilities (, ) to allow for more focused unit testing of .
  - Adding comprehensive tests for the private  method, covering new and existing file scenarios, as well as error handling.
  - Expanding tests for  and  to verify behavior with the new content correction logic, including diff generation and directory creation.
- Refined  by:
  - Introducing robust mocking for  and its methods (, , ) to simulate LLM interactions accurately.
  - Adding extensive test scenarios for , categorized by how  matches and how  is processed, including direct matches, unescaping, and LLM-based corrections.
  - Including tests for edge cases like no matches or multiple matches.
  - Adding a  utility for better test isolation.

Final fix for https://github.com/google-gemini/gemini-cli/issues/484
</content>
</entry>
<entry>
<title>Fix(write-file): Correct over-escaping and improve content generation</title>
<updated>2025-05-25T21:45:47Z</updated>
<author>
<name>Taylor Mullen</name>
<email>ntaylormullen@google.com</email>
</author>
<published>2025-05-25T21:41:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.wit.com/dev/gemini-cli/commit/?id=5097b5a6563a4d514242580495c5974b7e665c3f'/>
<id>urn:sha1:5097b5a6563a4d514242580495c5974b7e665c3f</id>
<content type='text'>
- Leveraged existing edit correction technology from `edit.ts` to address over-escaping issues in `write-file.ts`.
- Introduced `ensureCorrectFileContent` for correcting content in new files, where a simple "replace" isnt applicable. This uses a new LLM prompt tailored for correcting potentially problematic string escaping.
- Added caching for `ensureCorrectFileContent` to optimize performance.
- Refactored `write-file.ts` to integrate these corrections, improving the reliability of file content generation and modification.

Part of https://github.com/google-gemini/gemini-cli/issues/484
</content>
</entry>
</feed>
