fix: remove emojis from CLI output + fix Windows GBK crash (#95)#101
Merged
Panniantong merged 1 commit intomainfrom Mar 7, 2026
Merged
fix: remove emojis from CLI output + fix Windows GBK crash (#95)#101Panniantong merged 1 commit intomainfrom
Panniantong merged 1 commit intomainfrom
Conversation
Closed
The isatty() check skipped UTF-8 wrapping when agent-reach was called as a subprocess by AI agents (non-TTY). On Windows with GBK encoding, any remaining non-ASCII chars would crash with UnicodeEncodeError. Now UTF-8 wrapping applies in all environments on Windows. Closes #95
4f1d1f3 to
205f8a3
Compare
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.
两个改动:
删除所有装饰性 emoji — install/doctor/config 输出里的 📦🔧📥🤖👁️🔍 等全部替换为纯文本。只保留 ✅(成功勾)和最后的 ⭐🙏(star 提示)。减少 Windows 编码问题,输出更稳定。
修复 Windows GBK 崩溃 (这个Agent-Reach是只支持苹果系统吗? #95) —
_ensure_utf8_console()里的isatty()守卫导致 AI agent 以 subprocess 调用时跳过 UTF-8 包装,emoji 字符在 GBK 编码下触发UnicodeEncodeError。删除该守卫,始终应用 UTF-8 wrapping。改动文件:
cli.py(164行变动) +doctor.py(18行变动)测试:31 passed
Closes #95