mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-18 15:02:31 +00:00
chore: generate
This commit is contained in:
parent
611e48c4ac
commit
116a4e33ba
1 changed files with 7 additions and 1 deletions
|
|
@ -6,7 +6,13 @@ export function collapseToolOutput(output: string, maxLines: number, maxChars: n
|
|||
|
||||
const preview = lines.slice(0, maxLines).join("\n")
|
||||
if (Array.from(preview).length > maxChars) {
|
||||
return { output: Array.from(preview).slice(0, Math.max(0, maxChars - 1)).join("") + "…", overflow: true }
|
||||
return {
|
||||
output:
|
||||
Array.from(preview)
|
||||
.slice(0, Math.max(0, maxChars - 1))
|
||||
.join("") + "…",
|
||||
overflow: true,
|
||||
}
|
||||
}
|
||||
|
||||
return { output: [...lines.slice(0, maxLines), "…"].join("\n"), overflow: true }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue