feat(web): add list-operator node & support file type variables

This commit is contained in:
zhaoying
2026-04-03 18:52:06 +08:00
parent 1732fc7af5
commit b20a65ce29
27 changed files with 1347 additions and 350 deletions

View File

@@ -149,23 +149,8 @@ const Chat = forwardRef<ChatRef, { appId: string; graphRef: GraphRef; data: Work
return
}
setLoading(true)
const message = msg
const files = (toolbarRef.current?.getFiles() || []).filter(item => !['uploading', 'error'].includes(item.status))
setChatList(prev => [...prev, {
role: 'user',
content: message,
created_at: Date.now(),
meta_data: {
files
},
}])
setChatList(prev => [...prev, {
role: 'assistant',
content: '',
created_at: Date.now(),
subContent: [],
}])
/**
* Handles SSE stream messages from workflow execution
@@ -362,6 +347,24 @@ const Chat = forwardRef<ChatRef, { appId: string; graphRef: GraphRef; data: Work
}
})
}
setChatList(prev => [
...prev,
{
role: 'user',
content: message,
created_at: Date.now(),
meta_data: {
files
},
},
{
role: 'assistant',
content: '',
created_at: Date.now(),
subContent: [],
}
])
setLoading(true)
setStreamLoading(true)
draftRun(appId, data, handleStreamMessage)
.catch((error) => {