fix(copilot): 调高无限空白检测阈值 20 → 500#2647
Conversation
The previous threshold of 20 falsely aborted legitimate tool calls whose arguments contain indented code (write_file / edit_file with 4-8 levels of indentation in Python / YAML / Rust / Markdown easily exceed 20 consecutive whitespace chars, especially when newlines are counted). The real infinite-whitespace bug emits hundreds to thousands of consecutive whitespace characters, so 500 keeps the safety net while drastically reducing false positives. Refs farion1231#2646 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
deepseekv4 pro调用工具时候也遇到这个问题了,很有用的fix! |
|
@farion1231 Hi, Could you help to review this pr? |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Claude finished @farion1231's task in 42s —— View job Review
LGTM. One-line change at No correctness, cross-platform, or security concerns introduced by this change. |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@farion1231 Hi, Is there anything that I need to change? Hope the fix can be merged. |
Summary
INFINITE_WHITESPACE_THRESHOLD从20调高到500,避免误伤包含缩进代码的合法 tool call。\n\t)轻松超过 20,导致整个 tool call 被静默丢弃。详见 #2646。
Test plan
检测到无限空白 bug。🤖 Generated with Claude Code