From dfb41cbee93d882bd2c09bee41a870a1fa1ba559 Mon Sep 17 00:00:00 2001 From: JunghwanNA <70629228+shaun0927@users.noreply.github.com> Date: Fri, 17 Apr 2026 16:41:20 +0900 Subject: [PATCH] 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'. --- assets/tools_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/tools_schema.json b/assets/tools_schema.json index 989ade33..67218037 100644 --- a/assets/tools_schema.json +++ b/assets/tools_schema.json @@ -32,7 +32,7 @@ "description": "Create/overwrite/append files. ONLY for HUGE edits. Place ... 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",