Skip to content

Commit 097b43d

Browse files
committed
fix: handle negative indentation levels in getIndent method
1 parent eb3adc7 commit 097b43d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

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

0 commit comments

Comments
 (0)