File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ const handleWithResponsesApi = async (
181181
182182 if ( ! streamState . messageCompleted ) {
183183 logger . warn (
184- "Responses stream ended without completion; sending erorr event" ,
184+ "Responses stream ended without completion; sending error event" ,
185185 )
186186 const errorEvent = buildErrorEvent (
187187 "Responses stream ended without completion" ,
Original file line number Diff line number Diff line change @@ -38,15 +38,17 @@ const updateWhitespaceRunState = (
3838 let count = previousCount
3939
4040 for ( const char of chunk ) {
41- if ( char === " " || char === " \r" || char === "\n" ) {
41+ if ( char === "\r" || char === "\n" ) {
4242 count += 1
4343 if ( count > MAX_CONSECUTIVE_FUNCTION_CALL_WHITESPACE ) {
4444 return { nextCount : count , exceeded : true }
4545 }
4646 continue
4747 }
4848
49- count = 0
49+ if ( char !== " " ) {
50+ count = 0
51+ }
5052 }
5153
5254 return { nextCount : count , exceeded : false }
You can’t perform that action at this time.
0 commit comments