agentmain: auto-switch cn schema for glm/minimax/kimi; tools_schema: trim descriptions; hub: fix scroll position on refresh
This commit is contained in:
@@ -1,67 +1,67 @@
|
||||
[
|
||||
{"type": "function", "function": {
|
||||
"name": "code_run",
|
||||
"description": "Code executor. Prefer python. No concurrent calls. Put code in ```python/powershell blocks in reply body to avoid escaping. No hardcoding bulk data",
|
||||
"description": "Code executor. Prefer python. No concurrent calls. Prefer code in ```python/powershell blocks in reply body to avoid escaping. No hardcoding bulk data",
|
||||
"parameters": {"type": "object", "properties": {
|
||||
"script": {"type": "string", "description": "[Optional] NEVER use this param when code is in ```python/powershell blocks in reply body. Only use when no code block in reply. Mutually exclusive with reply code blocks"},
|
||||
"script": {"type": "string", "description": "[Mutually exclusive] NEVER use this param when use reply code block."},
|
||||
"type": {"type": "string", "enum": ["python", "powershell"], "description": "Code type", "default": "python"},
|
||||
"timeout": {"type": "integer", "description": "Timeout in seconds", "default": 60},
|
||||
"timeout": {"type": "integer", "description": "in seconds", "default": 60},
|
||||
"cwd": {"type": "string", "description": "Working directory, defaults to cwd"}}}
|
||||
}},
|
||||
{"type": "function", "function": {
|
||||
"name": "file_read",
|
||||
"description": "Read file content. Read before modifying to get latest context and line numbers. Supports pagination and keyword search",
|
||||
"description": "Read file. Read before modify for latest context and line numbers",
|
||||
"parameters": {"type": "object", "properties": {
|
||||
"path": {"type": "string", "description": "Relative or absolute file path"},
|
||||
"path": {"type": "string", "description": "Relative or absolute"},
|
||||
"start": {"type": "integer", "description": "Start line number (1-based)", "default": 1},
|
||||
"count": {"type": "integer", "description": "Number of lines to read", "default": 200},
|
||||
"keyword": {"type": "string", "description": "Optional search keyword. If provided, returns first match (case-insensitive) with surrounding context"},
|
||||
"show_linenos": {"type": "boolean", "description": "Show line numbers. Recommended on to help file_patch locate content", "default": true}}, "required": ["path"]}
|
||||
"keyword": {"type": "string", "description": "[Optional] If provided, returns first match (case-insensitive) with context"},
|
||||
"show_linenos": {"type": "boolean", "description": "Show line numbers", "default": true}}}
|
||||
}},
|
||||
{"type": "function", "function": {
|
||||
"name": "file_patch",
|
||||
"description": "Fine-grained local file edit. Finds unique old_content block and replaces with new_content. old_content must be unique in file with exact whitespace/indentation/newlines. On match failure, use file_read to re-check file content",
|
||||
"description": "Replace unique old_content with new_content. Exact match required (whitespace/indentation). On failure, file_read to recheck",
|
||||
"parameters": {"type": "object", "properties": {
|
||||
"path": {"type": "string", "description": "File path"},
|
||||
"old_content": {"type": "string", "description": "Original text block to replace (must be unique in file)"},
|
||||
"new_content": {"type": "string", "description": "New text content. Supports {{file:path:startLine:endLine}} syntax to reference file lines, auto-expanded before writing"}}, "required": ["path", "old_content", "new_content"]}
|
||||
"old_content": {"type": "string", "description": "Original text block to replace (must be unique)"},
|
||||
"new_content": {"type": "string", "description": "New content. Supports {{file:path:startLine:endLine}} to ref file lines, auto-expanded"}}}
|
||||
}},
|
||||
{"type": "function", "function": {
|
||||
"name": "file_write",
|
||||
"description": "Create, overwrite or append files. Use file_patch for fine-grained edits. Content must be in <file_content> tags or code blocks in reply body. Supports {{file:path:startLine:endLine}} to reference file lines, auto-expanded before writing",
|
||||
"description": "Create/overwrite/append files. ONLY for HUGE edits. Content in <file_content> tags or reply code blocks. Supports {{file:path:startLine:endLine}}, auto-expanded",
|
||||
"parameters": {"type": "object", "properties": {
|
||||
"path": {"type": "string", "description": "File path"},
|
||||
"mode": {"type": "string", "enum": ["overwrite", "append", "prepend"], "description": "Write mode", "default": "append"}}, "required": ["path"]}
|
||||
"mode": {"type": "string", "enum": ["overwrite", "append", "prepend"], "description": "Write mode", "default": "append"}}}
|
||||
}},
|
||||
{"type": "function", "function": {
|
||||
"name": "web_scan",
|
||||
"description": "Get simplified HTML and tab list of current page. Simplification filters sidebars/floating elements; use execute_js for filtered content. Call after switching pages",
|
||||
"description": "Get simplified HTML and tab list. Filters sidebars/floating elements; use execute_js for filtered content. Call after switching pages",
|
||||
"parameters": {"type": "object", "properties": {
|
||||
"tabs_only": {"type": "boolean", "description": "Return only tab list and current tab info, no HTML", "default": false},
|
||||
"switch_tab_id": {"type": "string", "description": "Optional tab ID. If provided, switches to that tab before scanning"},
|
||||
"tabs_only": {"type": "boolean", "description": "Show tab list only, no HTML", "default": false},
|
||||
"switch_tab_id": {"type": "string", "description": "[Optional] Tab ID to switch to"},
|
||||
"text_only": {"type": "boolean", "description": "Plain text only, no HTML", "default": false}}}
|
||||
}},
|
||||
{"type": "function", "function": {
|
||||
"name": "web_execute_js",
|
||||
"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": "[Optional] JS code or file path. NEVER use this param when code is in ```javascript blocks in reply body. Only use when no code block in reply. Mutually exclusive with reply code blocks"},
|
||||
"save_to_file": {"type": "string", "description": "Save result to file, for long return values", "default": ""},
|
||||
"no_monitor": {"type": "boolean", "description": "Skip page change monitoring, saves 2-3s. Only set for pure reads, not for page actions", "default": false}}}
|
||||
"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 to save 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": {
|
||||
"name": "update_working_checkpoint",
|
||||
"description": "Short-term working notepad, auto-injected each turn to prevent info loss in long tasks. Call during early/mid stages, not at end. When: (1) after reading SOP, store user needs & key constraints (skip for simple 1-2 step tasks); (2) before subtask switch or context flush; (3) after repeated failures, re-read SOP and must store new findings; (4) on new task, update content, clear old progress but keep valid constraints.\n\nDon't call: simple tasks (1-2 steps), task completed (use long-term memory tool)",
|
||||
"parameters": {"type": "object", "properties": {
|
||||
"key_info": {"type": "string", "description": "Replaces current notepad (<200 tokens). Incremental update: review existing, keep valid, add/remove/modify. Store: pitfalls, user requirements, key params/findings, file paths, progress, next steps. Don't store: ephemeral info, obvious context, old task info when user switched tasks. Prefer over-updating over losing key info"},
|
||||
"related_sop": {"type": "string", "description": "Related SOP name(s), re-read when needed"}}}
|
||||
"related_sop": {"type": "string", "description": "Related SOP names, tips for further re-read"}}}
|
||||
}},
|
||||
{"type": "function", "function": {
|
||||
"name": "ask_user",
|
||||
"description": "Interrupt task to ask user when needing decisions, extra info, or facing unresolvable blockers",
|
||||
"parameters": {"type": "object", "properties": {
|
||||
"question": {"type": "string", "description": "Question for the user"},
|
||||
"candidates": {"type": "array", "items": {"type": "string"}, "description": "Optional quick-select choices for the user"}}, "required": ["question"]}
|
||||
"candidates": {"type": "array", "items": {"type": "string"}, "description": "Optional quick-select choices for the user"}}}
|
||||
}},
|
||||
{"type": "function", "function": {
|
||||
"name": "start_long_term_update",
|
||||
|
||||
Reference in New Issue
Block a user