fix(schema): align file_write mode default with implementation

assets/tools_schema.json declares file_write.mode default as 'append',
but assets/tools_schema_cn.json and ga.py both default to 'overwrite':

    # ga.py:369
    mode = args.get("mode", "overwrite")

Since the i18n switch in 7cadbd7 loads the English schema for en_*
locales, an LLM that trusts the schema default and omits the mode
parameter will silently overwrite instead of append. Align the English
schema with the Chinese schema and the Python handler so all three
agree on 'overwrite'.
This commit is contained in:
Junghwan authored and GitHub committed 2026-04-27 10:06:15 +08:00
1 parent 8e7cb8f559
commit 15112bccf1
1 file changed
+1 -1
+1 -1
View File
@@ -32,7 +32,7 @@
"description": "Create/overwrite/append files. ONLY for HUGE edits. Place <file_content>...</file_content> in reply body BEFORE the file_write call. 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"}}}
"mode": {"type": "string", "enum": ["overwrite", "append", "prepend"], "description": "Write mode", "default": "overwrite"}}}
}},
{"type": "function", "function": {
"name": "web_scan",