Repository navigation
fix: 移除不必要的 unescapeMapOrSlice 调用,修复 Windows 路径转义问题 - #2814
Merged
Calcium-Ion merged 1 commit intoFeb 3, 2026
Merged
Conversation
The JSON serialization/deserialization already handles escape characters correctly, so the unescapeMapOrSlice function is redundant.
Contributor
WalkthroughThis change removes special unescaping logic from the Gemini relay's function argument marshalling, simplifying it to directly serialize arguments via Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ennnnny
pushed a commit
to ennnnny/new-api
that referenced
this pull request
Mar 17, 2026
…-function fix: 移除不必要的 unescapeMapOrSlice 调用,修复 Windows 路径转义问题
salem-2007
added a commit
to salem-2007/new-api
that referenced
this pull request
Sep 10, 2026
…-function fix: 移除不必要的 unescapeMapOrSlice 调用,修复 Windows 路径转义问题
junjundesk
pushed a commit
to junjundesk/new-api
that referenced
this pull request
Oct 3, 2026
…-function fix: 移除不必要的 unescapeMapOrSlice 调用,修复 Windows 路径转义问题
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
修复 Windows 路径中包含转义字符(如 "\t", "\n", "\b", "\f" 等)时被错误转义的问题。
当使用 Gemini 模型时,如果用户发送的消息包含 Windows 路径如
路径中的 "\t" 会被错误地转换为制表符,导致 AI 处理错误。
修复内容
测试验证
已本地测试验证:路径中的转义字符现在能正确保持为字面量,不会被错误转义。
关联 Issue
fixes #1620