mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
feat(core): add ai web-search and web-crawl tools ui components (#12854)
This commit is contained in:
@@ -539,6 +539,20 @@ export class StreamObjectParser {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'tool-result': {
|
||||
const index = acc.findIndex(
|
||||
item =>
|
||||
item.type === 'tool-call' &&
|
||||
item.toolCallId === curr.toolCallId &&
|
||||
item.toolName === curr.toolName
|
||||
);
|
||||
if (index !== -1) {
|
||||
acc[index] = curr;
|
||||
} else {
|
||||
acc.push(curr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
acc.push(curr);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user