bingocode 1.1.135 → 1.1.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -245,9 +245,13 @@ function closeAllToolBlocks(state: StreamState): void {
|
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
function closeAllOpenBlocks(state: StreamState): void {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
if (state.currentBlockType !== 'tool_use') {
|
|
249
|
+
// text/thinking block — close via state machine
|
|
250
|
+
closeCurrentBlock(state)
|
|
251
|
+
}
|
|
252
|
+
// Close all tool blocks via toolBlocks map
|
|
253
|
+
// (avoids double-stop: if we called closeCurrentBlock above for a tool_use,
|
|
254
|
+
// closeAllToolBlocks would re-stop the same index)
|
|
251
255
|
closeAllToolBlocks(state)
|
|
252
256
|
}
|
|
253
257
|
|
|
@@ -440,6 +444,7 @@ function handleToolCalls(delta: DeltaEx, state: StreamState): void {
|
|
|
440
444
|
block.started = true
|
|
441
445
|
block.anthropicIndex = state.nextContentIndex++
|
|
442
446
|
state.currentBlockType = 'tool_use'
|
|
447
|
+
state.currentBlockIndex = block.anthropicIndex
|
|
443
448
|
state.blockStartSent = true
|
|
444
449
|
state.blockStopSent = false
|
|
445
450
|
|