Skip to content

Commit 6ede6b9

Browse files
committed
fix: handle negative indentation levels in getIndent method
1 parent 51419e5 commit 6ede6b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/task/tool-call-helper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ export class StreamingToolCallProcessor {
223223
* @returns A string of tabs.
224224
*/
225225
private getIndent(level: number): string {
226-
return "\t".repeat(level)
226+
if (level >= 0) {
227+
return "\t".repeat(level)
228+
}
229+
return ""
227230
}
228231

229232
/**

0 commit comments

Comments
 (0)