fix: Update type hints to use newer Python syntax

- Replace Dict, List, Optional with dict, list,  < /dev/null |  None syntax
- Fix abstract method implementation in message.py
- Improve type annotations and function return types
- Remove unreachable code in get_current_task_tool.py
- Refactor HTML elements to use style attributes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
晴猫
2025-05-01 06:55:05 +09:00
parent 3d001da30e
commit 263e8d196a
29 changed files with 125 additions and 143 deletions

View File

@@ -23,6 +23,7 @@ class ChatObserver:
Args:
stream_id: 聊天流ID
private_name: 私聊名称
Returns:
ChatObserver: 观察器实例

View File

@@ -33,6 +33,7 @@ class PFCManager:
Args:
stream_id: 聊天流ID
private_name: 私聊名称
Returns:
Optional[Conversation]: 对话实例创建失败则返回None

View File

@@ -18,6 +18,7 @@ def get_items_from_json(
Args:
content: 包含JSON的文本
private_name: 私聊名称
*items: 要提取的字段名
default_values: 字段的默认值,格式为 {字段名: 默认值}
required_types: 字段的必需类型,格式为 {字段名: 类型}

View File

@@ -29,6 +29,8 @@ class ReplyChecker:
Args:
reply: 生成的回复
goal: 对话目标
chat_history: 对话历史记录
chat_history_text: 对话历史记录文本
retry_count: 当前重试次数
Returns: