fix(webui): fix missing imports and create toml_utils module

- Create src/common/toml_utils.py with TOML utility functions
- Fix APIAdapterConfig → ModelConfig in config.py (4 locations)
- Fix git_mirror_service import path in plugin.py
- Fix emoji.py type annotations and unused imports
- Fix jargon.py comment (ChatStreams → ChatSession)
- All routers now import successfully
- Zero Peewee remnants verified across src/webui/
This commit is contained in:
DrSmoothl
2026-02-17 20:19:37 +08:00
parent f97c24bf9e
commit f66e25b1a7
5 changed files with 101 additions and 12 deletions

View File

@@ -49,7 +49,7 @@ def parse_chat_id_to_stream_ids(chat_id_str: str) -> List[str]:
def get_display_name_for_chat_id(chat_id_str: str, session: Session) -> str:
"""
获取 chat_id 的显示名称
尝试解析 JSON 并查询 ChatStreams 表获取群聊名称
尝试解析 JSON 并查询 ChatSession 表获取群聊名称
"""
stream_ids = parse_chat_id_to_stream_ids(chat_id_str)