fix(windows): resolve silent failures caused by CRLF line endings (#1868)#1890
Merged
DennisYu07 merged 4 commits intoQwenLM:mainfrom Mar 6, 2026
Merged
Conversation
This was referenced Mar 3, 2026
…rsing # Conflicts: # packages/core/src/utils/textUtils.test.ts # packages/core/src/utils/textUtils.ts
Contributor
Author
|
Hi! I noticed that #2078 was recently merged, which addresses a similar CRLF issue for markdown commands. I've just updated this PR with main to resolve the resulting merge conflicts. This PR provides the comprehensive, centralized |
DennisYu07
approved these changes
Mar 6, 2026
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.
TLDR
Fixes a critical bug on Windows where subagents, skills, and Claude-converted plugins were silently ignored due to CRLF (
\r\n) line endings. Standardizes text normalization across all core managers.Crucially, this fix also resolves issues where agents downloaded from the Claude marketplace (e.g., via
qwen extensions install) were not being detected after installation inside Windows.Dive Deeper
The root cause was that several key parsers used strict regex patterns expecting only
\nnewlines, causing files saved with CRLF (common in Windows editors like Notepad or VS Code or any other external editor with CRLF enabled) to fail to load silently.Solution: Unified Normalization Layer
Moved from a fragmented approach with duplicate logic and unprotected entry points to a unified, "Normalize-First" architecture. Inspired from original Skill Manager & Skill Load pre-normalization solution.
Logic Flow: Before vs After
Changes Made:
normalizeContentinpackages/core/src/utils/textUtils.ts(strips BOM, converts CRLF/CR to LF).parseSubagentContent(subagent-manager.ts).src-agents) to avoid resource collection conflicts.subagent-manager.test.ts,textUtils.test.ts, andclaude-converter.test.ts.Reviewer Test Plan
qwen-code.should successfully convert agent files with Windows CRLF endings.npm run testto ensure no regressions in the 3680+ existing tests.Testing Matrix
Tested on Windows 11.
Visual Proof
Before Fix: Marketplace agents missing on Windows
After Fix: Marketplace agents successfully detected
Linked issues / bugs
Fixes #1868