Browse Source

tweak: add newline between <content> and first line of read tool output to prevent confusion (#21070)

Aiden Cline 1 week ago
parent
commit
3a0e00dd7f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/opencode/src/tool/read.ts

+ 1 - 1
packages/opencode/src/tool/read.ts

@@ -185,7 +185,7 @@ export const ReadTool = Tool.defineEffect(
         )
       }
 
-      let output = [`<path>${filepath}</path>`, `<type>file</type>`, "<content>"].join("\n")
+      let output = [`<path>${filepath}</path>`, `<type>file</type>`, "<content>" + "\n"].join("\n")
       output += file.raw.map((line, i) => `${i + file.offset}: ${line}`).join("\n")
 
       const last = file.offset + file.raw.length - 1