chore: generate
This commit is contained in:
@@ -6,7 +6,13 @@ export function collapseToolOutput(output: string, maxLines: number, maxChars: n
|
|||||||
|
|
||||||
const preview = lines.slice(0, maxLines).join("\n")
|
const preview = lines.slice(0, maxLines).join("\n")
|
||||||
if (Array.from(preview).length > maxChars) {
|
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 }
|
return { output: [...lines.slice(0, maxLines), "…"].join("\n"), overflow: true }
|
||||||
|
|||||||
Reference in New Issue
Block a user