Skip to content

fix: remove emojis from CLI output + fix Windows GBK crash (#95)#101

Merged
Panniantong merged 1 commit intomainfrom
fix/remove-emoji-windows-compat
Mar 7, 2026
Merged

fix: remove emojis from CLI output + fix Windows GBK crash (#95)#101
Panniantong merged 1 commit intomainfrom
fix/remove-emoji-windows-compat

Conversation

@Panniantong
Copy link
Owner

两个改动:

  1. 删除所有装饰性 emoji — install/doctor/config 输出里的 📦🔧📥🤖👁️🔍 等全部替换为纯文本。只保留 ✅(成功勾)和最后的 ⭐🙏(star 提示)。减少 Windows 编码问题,输出更稳定。

  2. 修复 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

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
@Panniantong Panniantong force-pushed the fix/remove-emoji-windows-compat branch from 4f1d1f3 to 205f8a3 Compare March 7, 2026 04:58
@Panniantong Panniantong merged commit 75a2213 into main Mar 7, 2026
8 checks passed
@Panniantong Panniantong deleted the fix/remove-emoji-windows-compat branch March 7, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

这个Agent-Reach是只支持苹果系统吗?

1 participant