Repository navigation
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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 addresses an issue where citations were being incorrectly placed in web-fetch responses containing non-ASCII characters. By transitioning from character-based splitting to byte-level manipulation using TextEncoder and TextDecoder, the tool now correctly aligns with the grounding metadata's UTF-8 byte indices, consistent with existing web-search implementation. Highlights
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 the 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 counterproductive. 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. Footnotes
|
|
📊 PR Size: size/M
|
🛑 Action Required: Evaluation ApprovalSteering changes have been detected in this PR. To prevent regressions, a maintainer must approve the evaluation run before this PR can be merged. Maintainers:
Once approved, the evaluation results will be posted here automatically. |
There was a problem hiding this comment.
Code Review
This pull request updates the citation insertion logic in WebFetchTool to handle UTF-8 byte offsets correctly. Instead of splitting the response text by characters, it now uses TextEncoder and TextDecoder to manipulate the raw byte array, ensuring accurate placement of citation markers for multi-byte characters like Chinese, Japanese, and emojis. Additionally, comprehensive unit tests have been added to verify this behavior across various text encodings. There are no review comments, and I have no additional feedback to provide.
|
Hi there! Thank you for your interest in contributing to Gemini CLI. To ensure we maintain high code quality and focus on our prioritized roadmap, we only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. This PR will be closed in 7 days if it remains without that designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding. |
|
This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding. |
Summary
Fix misplaced citations in
web-fetchfor non-ASCII responses by handling UTF-8 byte offsets properly (matching the existingweb-searchlogic). Added regression tests for multibyte text, emoji, and out-of-order citations.Related Issues
Fixes #29039
How to Validate
npm run generate npm exec --workspace @google/gemini-cli-core -- vitest run src/tools/web-fetch.test.ts src/tools/web-search.test.ts --coverage.enabled=false npm run build npm run typecheck npm run lintTool tests, workspace build, typecheck, and lint pass locally.
Pre-Merge Checklist