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:
@@ -1,4 +1,4 @@
|
||||
"""中控 AI 聊天附件解析。"""
|
||||
"""中控 AI 聊天附件解析."""
|
||||
from __future__ import annotations
|
||||
|
||||
import base64
|
||||
@@ -86,11 +86,11 @@ def parse_chat_attachments(raw_files: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
meta.append({"name": name, "kind": "text", "mime": mime, "size": size})
|
||||
notes.append(f"文档 {name}")
|
||||
continue
|
||||
errors.append(f"{name}: 不支持的类型(仅图片或 txt/md/json)")
|
||||
errors.append(f"{name}: 不支持的类型(仅图片或 txt/md/json)")
|
||||
|
||||
attachment_note = ";".join(notes) if notes else ""
|
||||
attachment_note = ";".join(notes) if notes else ""
|
||||
if errors:
|
||||
attachment_note = (attachment_note + ";" if attachment_note else "") + ";".join(errors)
|
||||
attachment_note = (attachment_note + ";" if attachment_note else "") + ";".join(errors)
|
||||
text_append = "\n\n".join(text_blocks)
|
||||
return {
|
||||
"images_b64": images_b64,
|
||||
|
||||
Reference in New Issue
Block a user