mirror of
https://github.com/open-webui/computer.git
synced 2026-12-02 17:57:59 -05:00
refac
This commit is contained in:
1 parent
07ab260ade
commit
9b168fba7b
2 files changed
+12
-13
No files matched your search
@@ -280,18 +280,6 @@
|
||||
return cleaned.replace(/\n{3,}/g, '\n\n').trim();
|
||||
}
|
||||
|
||||
function isPseudoAgentMessageTool(item: any): boolean {
|
||||
const title = String(item?.arguments?.title || item?.arguments?.item?.type || '').toLowerCase();
|
||||
return (
|
||||
item?.name === 'agent_tool' &&
|
||||
(title === 'usermessage' ||
|
||||
title === 'agentmessage' ||
|
||||
title === 'assistantmessage' ||
|
||||
title === 'assistant message' ||
|
||||
title === 'user message')
|
||||
);
|
||||
}
|
||||
|
||||
const displayItems = $derived.by((): DisplayItem[] => {
|
||||
if (!output?.length) return [];
|
||||
|
||||
@@ -327,7 +315,6 @@
|
||||
|
||||
for (const item of output) {
|
||||
if (item.type === 'function_call') {
|
||||
if (isPseudoAgentMessageTool(item)) continue;
|
||||
ensureGroup();
|
||||
currentGroup!.entries.push(item);
|
||||
currentGroup!.calls.push(item);
|
||||
|
||||
Reference in new issue
Block a user