修复(tools): 增强状态栏模型名称清理逻辑

使用 tr 移除所有控制字符(0x01-0x1f, 0x7f),再清理残留的 ANSI 模式
This commit is contained in:
arno
2026-05-02 15:20:37 +08:00
parent f86a5cbd9f
commit 1e0c83f268
+1 -1
View File
@@ -3,7 +3,7 @@
input=$(cat)
# Extract fields using jq
MODEL=$(echo "$input" | jq -r '.model.display_name' | sed $'s/\x1b\[[0-9;]*m//g')
MODEL=$(echo "$input" | jq -r '.model.display_name' | tr -d $'\x01'-$'\x1f'$'\x7f' | sed 's/\[[0-9;]*m\]//g; s/\[[0-9;]*m//g')
DIR=$(echo "$input" | jq -r '.workspace.current_dir')
V=$(echo "$input" | jq -r '.version')