Normalize fullwidth punctuation to ASCII across codebase.

Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 23:42:26 +08:00
parent aaa72c7961
commit b733e551a0
392 changed files with 71522 additions and 71369 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# PM2 子代理入口在策略目录cwd加载 .env 后启动 agent.py
# PM2 子代理入口:在策略目录(cwd)加载 .env 后启动 agent.py
set -e
set -o pipefail
@@ -17,20 +17,20 @@ _PM2_PORT="${PORT:-}"
_PM2_HOST="${HOST:-}"
if [[ ! -x "${VENV_PY}" ]]; then
echo "未找到 ${VENV_PY}请先在 manual_trading_hub: python3 -m venv .venv && pip install -r requirements.txt" >&2
echo "未找到 ${VENV_PY},请先在 manual_trading_hub: python3 -m venv .venv && pip install -r requirements.txt" >&2
exit 1
fi
if [[ -f .env ]]; then
if grep -q $'\r' .env 2>/dev/null; then
echo "警告: $(pwd)/.env 含 Windows 换行(CRLF)请在仓库根执行: bash manual_trading_hub/scripts/fix_env_crlf.sh" >&2
echo "警告: $(pwd)/.env 含 Windows 换行(CRLF),请在仓库根执行: bash manual_trading_hub/scripts/fix_env_crlf.sh" >&2
fi
if ! load_dotenv_file ".env"; then
echo "错误: $(pwd)/.env 加载失败" >&2
exit 1
fi
else
echo "警告: $(pwd) 下无 .envagent 可能缺少 API 密钥" >&2
echo "警告: $(pwd) 下无 .env,agent 可能缺少 API 密钥" >&2
fi
[[ -n "${_PM2_EXCHANGE}" ]] && export EXCHANGE="${_PM2_EXCHANGE}"
@@ -39,7 +39,7 @@ fi
if command -v ss >/dev/null 2>&1 && [[ -n "${PORT:-}" ]]; then
if ss -tln 2>/dev/null | grep -q ":${PORT} "; then
echo "错误: 端口 ${PORT} 已被占用agent 无法监听exchange=${EXCHANGE:-?}" >&2
echo "错误: 端口 ${PORT} 已被占用,agent 无法监听(exchange=${EXCHANGE:-?})" >&2
exit 1
fi
fi