chore: continue chat even with incomplete tools#407
Conversation
commit: |
There was a problem hiding this comment.
Pull request overview
This PR updates the SEO AI “writer” and “strategist” chat agents to keep conversations running even when prior chat history contains incomplete tool-call messages.
Changes:
- Pass
ignoreIncompleteToolCalls: truetoconvertToModelMessagesin the writer agent. - Pass
ignoreIncompleteToolCalls: truetoconvertToModelMessagesin the strategist agent.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/api-seo/src/lib/ai/writer-agent.ts | Enables ignoring incomplete tool-call message parts during message conversion for the writer chat agent. |
| packages/api-seo/src/lib/ai/strategist-agent.ts | Enables ignoring incomplete tool-call message parts during message conversion for the strategist chat agent. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the stability and flow of AI agent conversations by introducing a mechanism to gracefully handle incomplete tool calls. By configuring the message conversion process to ignore such incomplete calls, the system ensures that AI agents can maintain continuous dialogue, thereby enhancing the overall reliability of AI-driven interactions. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Cloudflare Preview URL for WWW 🎈 : https://pr-407.rectangularlabs.com (custom domain) |
There was a problem hiding this comment.
Code Review
This pull request introduces ignoreIncompleteToolCalls: true to handle incomplete tool calls and allow chats to continue. While this improves robustness, it might also hide underlying issues that cause these incomplete calls. Consider adding logging to track how often this occurs to help identify and fix root causes without impacting the user experience. Additionally, I've noted some code duplication between strategist-agent.ts and writer-agent.ts that could be refactored for better maintainability.
| messages: await convertToModelMessages(messages, { | ||
| ignoreIncompleteToolCalls: true, | ||
| }), |
There was a problem hiding this comment.
No description provided.