Aiden Cline 3 месяцев назад
Родитель
Сommit
8c076ef959

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

@@ -81,7 +81,7 @@ export namespace Truncate {
     }
 
     const removed = hitBytes ? totalBytes - bytes : lines.length - out.length
-    const unit = hitBytes ? "chars" : "lines"
+    const unit = hitBytes ? "bytes" : "lines"
     const preview = out.join("\n")
 
     await init()

+ 1 - 1
packages/opencode/test/tool/truncation.test.ts

@@ -73,7 +73,7 @@ describe("Truncate", () => {
       const result = await Truncate.output(content)
 
       expect(result.truncated).toBe(true)
-      expect(result.content).toContain("chars truncated...")
+      expect(result.content).toContain("bytes truncated...")
       expect(Buffer.byteLength(content, "utf-8")).toBeGreaterThan(Truncate.MAX_BYTES)
     })