deerflow2/backend/src/agents
JeffJiang e3c920fdf0 fix(chat): handle empty uploaded files case and improve artifact selection logic (#979)
* fix(chat): handle empty uploaded files case and improve artifact selection logic

* Update frontend/src/components/workspace/chats/chat-box.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: address code review suggestions from PR #979 (#3)

* Initial plan

* fix: address PR #979 review suggestions

- utils.ts: scope (empty) check inside <uploaded_files> tag content
- chat-box.tsx: remove stale `artifacts` from useEffect deps
- context.tsx: wrap select/deselect with useCallback for stable refs
- test: add test_empty_new_files_produces_empty_marker

Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com>
2026-03-05 17:45:25 +08:00
..
lead_agent refactor: reduce repeated configurable dict lookups (#970) 2026-03-04 20:06:28 +08:00
memory fix(memory): prevent file upload events from persisting in long-term memory (#971) 2026-03-05 11:14:34 +08:00
middlewares fix(chat): handle empty uploaded files case and improve artifact selection logic (#979) 2026-03-05 17:45:25 +08:00
__init__.py feat: support function factory (#4) 2026-01-15 22:05:54 +08:00
thread_state.py feat: add view_image tool and optimize web fetch tools 2026-01-29 13:44:39 +08:00