Skip to content

Commit d1b09a2

Browse files
committed
comment on logic change
1 parent f2f074a commit d1b09a2

File tree

1 file changed

+4
-0
lines changed
  • refact-agent/gui/src/features/Chat/Thread

1 file changed

+4
-0
lines changed

refact-agent/gui/src/features/Chat/Thread/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ POINT2 FOR_FUTURE_FEREFENCE: ...
8282
function mergeToolCall(prev: ToolCall[], add: ToolCall): ToolCall[] {
8383
const calls = prev.slice();
8484

85+
// NOTE: we can't be sure that backend sends correct indexes for tool calls
86+
// in case of qwen3 with sglang I get 2 problems fixed here:
87+
// 1. index of first tool call delta == 2 next == 0 (huh?)
88+
// 2. second tool call in a row has id == null
8589
if (!calls.length || add.function.name) {
8690
add.index = calls.length;
8791
if (!add.id) {

0 commit comments

Comments
 (0)