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
+4 -4
View File
@@ -1,4 +1,4 @@
"""聊天滚动摘要每轮后压缩历史续聊只带摘要 + 当前消息"""
"""聊天滚动摘要:每轮后压缩历史,续聊只带摘要 + 当前消息."""
from __future__ import annotations
from hub_ai.text_util import clip_text, is_ai_error_reply
@@ -24,7 +24,7 @@ def refresh_session_rolling_summary(
assistant_text: str,
bot_mode: str,
) -> str:
"""合并旧摘要与本轮对话生成新的短摘要并写入会话"""
"""合并旧摘要与本轮对话,生成新的短摘要并写入会话."""
user_clip = clip_text(user_text, 1200)
assistant_clip = clip_text(assistant_text, 1800)
if not user_clip and not assistant_clip:
@@ -63,7 +63,7 @@ def _fallback_summary(prior: str, user_text: str, assistant_text: str) -> str:
if prior.strip():
parts.append(prior.strip())
if user_text.strip():
parts.append(f"用户{clip_text(user_text, 200)}")
parts.append(f"用户:{clip_text(user_text, 200)}")
if assistant_text.strip():
parts.append(f"教练{clip_text(assistant_text, 280)}")
parts.append(f"教练:{clip_text(assistant_text, 280)}")
return clip_text("\n".join(parts), CHAT_ROLLING_SUMMARY_MAX_CHARS)