From 9a0efd7baba458f43b532714746d8fdcec0460e8 Mon Sep 17 00:00:00 2001 From: Yue_chen <1737456545@qq.com> Date: Tue, 7 Jul 2026 21:04:16 +0800 Subject: [PATCH] style(tools): wrap write_file guidance Sprintf for golines --- pkg/tools/fs/filesystem.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/tools/fs/filesystem.go b/pkg/tools/fs/filesystem.go index bf35eb47..a23cc9b2 100644 --- a/pkg/tools/fs/filesystem.go +++ b/pkg/tools/fs/filesystem.go @@ -910,7 +910,10 @@ func (t *WriteFileTool) Name() string { func (t *WriteFileTool) Description() string { desc := "Write content to a file, replacing any existing content. Content is written byte-for-byte after argument decoding. Standard JSON escaping applies: \\n for newline and \\\\n for a literal backslash-n sequence. If the file already exists you must set overwrite=true, which replaces the ENTIRE file." if phrase := t.altToolsPhrase(); phrase != "" { - desc += fmt.Sprintf(" To add to or change part of an existing file without losing its current contents, use %s instead.", phrase) + desc += fmt.Sprintf( + " To add to or change part of an existing file without losing its current contents, use %s instead.", + phrase, + ) } return desc }