Skip to content

Commit 116a4e3

Browse files
chore: generate
1 parent 611e48c commit 116a4e3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/opencode/src/cli/cmd/tui/util/collapse-tool-output.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ export function collapseToolOutput(output: string, maxLines: number, maxChars: n
66

77
const preview = lines.slice(0, maxLines).join("\n")
88
if (Array.from(preview).length > maxChars) {
9-
return { output: Array.from(preview).slice(0, Math.max(0, maxChars - 1)).join("") + "…", overflow: true }
9+
return {
10+
output:
11+
Array.from(preview)
12+
.slice(0, Math.max(0, maxChars - 1))
13+
.join("") + "…",
14+
overflow: true,
15+
}
1016
}
1117

1218
return { output: [...lines.slice(0, maxLines), "…"].join("\n"), overflow: true }

0 commit comments

Comments
 (0)