- Plumbed abort signals through to tools
- Updated the shell tool to properly cancel active requests by killing the entire child process tree of the underlying shell process and then report that the shell itself was canceled.
Fixes https://b.corp.google.com/issues/416829935
- We were console.erroring, throwing and early aborting. Instead we now treat cancels like a normal user message and show an indicator in the UI
Fixes https://b.corp.google.com/issues/416515841
- Prior to this change, the model would often escape parameters when requesting edits, leading to failures in matching the original content. This update clarifies the expected format for `old_string` and `new_string` to prevent such issues.
- Update `EditTool` description to provide clearer instructions.
- Clarify expectations for `old_string` and `new_string` parameters, emphasizing the need for exact, unescaped text.
- Aim to reduce user errors by setting better expectations for tool usage.
Fixes: https://b.corp.google.com/issues/413088274
— Your friendly neighborhood Gemini
- Prior to this GC would attempt to utilize React components as game assets (instead of using canvas) + would fail to deal with placeholder assets effectively.
Part of https://b.corp.google.com/issues/413718497
- Refine agent persona from 'assistant' to 'agent'.
- Restructure prompt into distinct 'Software Engineering Tasks' and 'New Application' workflows.
- Add detailed steps and tool usage guidance for creating new applications.
- Improve clarity and formatting of prompt instructions.
Part of https://b.corp.google.com/issues/413718497
Signed-off-by: Gemini, your friendly neighborhood code agent.
- Motivation of this upgrade is to enable us to get convenient access to the thinking budget config changes for 2.5 thinking models. This will be key to getting our model to take a bit more time for various requests.
* shell bones
* Merge remote-tracking branch 'origin/main' into shell_bones
* add line break
* another line break
* drop the log to avoid breaking terminals
* rename tool to be consistent with terminal
* fix build
* Adding a full_context command line argument.
* Update packages/cli/src/config/config.ts
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
* lint fix.
---------
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
* Adding a tool inspired by files-to-prompt that will recursivly read through all the files in a directory (guarded by targetDir) and concatenate those files for the model. Ignores common build artifacts and non-text files.
* Migraded glob logic to fast-glob. Buffed the tool description to give more guidance to the model. Incorporated reveiw feedback.
* lint and error checking.
- Updates CONTRIBUTING.md and Tips.tsx to remove references to GEMINI.md and the /init command, and renumbers tips.
- Fixes a typo in Tips.tsx ("information.s" -> "information.").
- Refactors the core system prompt in prompts.ts from a constant string to a function .
- Updates client.ts to call the function.
- Updates tool name references within the system prompt to use template literals for dynamic naming.
Fixes bug: https://buganizer.corp.google.com/issues/413061073
---
Generated by yours truly __Gemini Code__
Else branches are an anti pattern especially if you can easily return from the previous branch. Over time, else branches cause deep nesting and make code unreadable and unmaintainable. Remove elses where possible.
- This fixes what it means to get confirmations in GC. Prior to this they had just been accidentally unwired as part of all of the refactorings to turns + to server/core.
- The key piece of this is that we wrap the onConfirm in the gemini stream hook in order to resubmit function responses. This isn't 100% ideal but gets the job done for now.
- Fixed history not updating properly with confirmations.
Fixes https://b.corp.google.com/issues/412323656
- 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
- There were a few hiccups here. Somehow 2.5-flash wasn't actually abiding by our tool schema. Instead it was inferring `path`. To semi-combat this I've renamed `file_path` -> `path`.
- We weren't elevating errors that were created via schema validation. Instead both the `glob` and `read-file.ts` now surface this.
- In error scenarios (like failing schema) we were improperly surfacing these as success cases because we were overriding tool status.
* Starting to move a lot of code into packages/server
* More of the massive refactor, builds and runs, some issues though.
* Fixing outstanding issue with double messages.
* Fixing a minor UI issue.
* Fixing the build post-merge.
* Running formatting.
* Addressing comments.