Commit 0527333
fix: preserve sourceDocuments and metadata in ExecuteFlow node (#5972)
* fix: preserve sourceDocuments and metadata in ExecuteFlow node
The Execute Flow node in AgentFlow V2 was only extracting the text
content from chatflow responses, discarding sourceDocuments, usedTools,
artifacts, and fileAnnotations metadata. This fix preserves all metadata
fields in the return output and streams them via SSE when the node is
the last in the flow.
Fixes #5949
Signed-off-by: majiayu000 <1835304752@qq.com>
* fix: address review feedback on PR #5972
- Use object destructuring for response.data metadata extraction
- Extend SSE streaming test to cover artifacts and fileAnnotations
Signed-off-by: majiayu000 <1835304752@qq.com>
* Delete packages/components/nodes/agentflow/ExecuteFlow/ExecuteFlow.test.ts
* Update ExecuteFlow.ts
* Update ExecuteFlow.ts
---------
Signed-off-by: majiayu000 <1835304752@qq.com>
Co-authored-by: Henry Heng <henryheng@flowiseai.com>1 parent b93ccf3 commit 0527333
1 file changed
Lines changed: 32 additions & 2 deletions
Lines changed: 32 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
208 | 213 | | |
209 | 214 | | |
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
213 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
214 | 231 | | |
215 | 232 | | |
216 | 233 | | |
| |||
245 | 262 | | |
246 | 263 | | |
247 | 264 | | |
248 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
249 | 270 | | |
250 | 271 | | |
251 | 272 | | |
252 | 273 | | |
253 | 274 | | |
254 | 275 | | |
255 | 276 | | |
256 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
257 | 287 | | |
258 | 288 | | |
259 | 289 | | |
| |||
0 commit comments