[TASK-tsk_1262ca4e5f2985ddcc69afc9] feat: 修复中文文件名写入问题 + DRY重构#35
Merged
Conversation
## 调研结论 - / — 单路径操作,路径仅解析一次,无问题 - — 验证阶段解析路径,应用阶段重新 违反了 DRY 原则 - Node.js 原生支持 UTF-8 路径(macOS/Linux),工具层无需额外编码处理 - 中文文件名写入从未真正不工作,但存在重复解析的冗余代码 ## 改动 1. packages/core/src/tools/patch.ts: DRY 重构 — 在验证阶段收集解析后的路径,在应用阶段复用 2. packages/core/test/patch-tool.test.ts: 添加 8 个中文/日文/韩文文件名测试用例 ## 验证 - pnpm typecheck: ✅ 通过 - 全部 16 个 patch 测试通过(8 原始 + 8 新)
Contributor
Author
|
Reviewed by: Code Reviewer Result: Approved ✅ Review SummaryWhat was reviewed
Code quality
Test coverage
Build verification
Notes
Decision: Approved — waiting for Owner to merge into main. |
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.
问题
调研 Agent 文件写入工具对中文文件名的处理机制。
调研结论
fs原生支持 UTF-8 路径(macOS/Linux),工具层无需额外编码处理改动
验证
Closes TASK-tsk_1262ca4e5f2985ddcc69afc9