Refactor: 统一消息格式和Session架构重构

核心改动:
- 统一所有Session内部使用Claude content-block格式
- 引入BaseSession基类,简化代码结构
- tool_results从字符串改为结构化字典列表
- NativeClaudeSession增强:支持cr_token、metadata、thinking提取
- ToolClient简化:删除structured分支,统一使用protocol prompt
- MixinSession支持按名称选择session
- ljqCtrl_sop增加DPI坐标陷阱警告
This commit is contained in:
Liang Jiaqing
2026-04-01 22:20:18 +08:00
parent 368d68baa5
commit 629e57ad83
6 changed files with 211 additions and 287 deletions

View File

@@ -46,7 +46,7 @@
"description": "Execute JS to control browser. Use precisely to reduce web_scan calls. Put code in ```javascript blocks in reply body to avoid escaping",
"parameters": {"type": "object", "properties": {
"script": {"type": "string", "description": "[Mutually exclusive] JS code or script path. NEVER use this param when use reply code block"},
"save_to_file": {"type": "string", "description": "file path; only for long result", "default": ""},
"save_to_file": {"type": "string", "description": "file path; **only** for long result", "default": ""},
"no_monitor": {"type": "boolean", "description": "Skip page change monitoring, saves 2-3s. Only for reads, not for page actions", "default": false}}}
}},
{"type": "function", "function": {