deerflow2/frontend/src/core/threads
yangzheli f88970985a
fix(frontend): replace invalid "context" select field with "metadata" in threads.search (#2053)
* fix(frontend): replace invalid "context" select field with "metadata" in threads.search

The LangGraph API server does not support "context" as a select field for
threads/search, causing a 422 Unprocessable Entity error introduced by
commit 60e0abf (#1771).

- Replace "context" with "metadata" in the default select list
- Persist agent_name into thread metadata on creation so search results
  carry the agent identity
- Update pathOfThread() to fall back to metadata.agent_name when
  context is unavailable from search results
- Add regression tests for metadata-based agent routing

Fixes #2037

Made-with: Cursor

* fix: apply Copilot suggestions

* style: fix the lint error
2026-04-10 08:35:07 +08:00
..
export.ts ci: enforce code formatting checks for backend and frontend (#1536) 2026-03-29 15:34:38 +08:00
hooks.ts fix(frontend): replace invalid "context" select field with "metadata" in threads.search (#2053) 2026-04-10 08:35:07 +08:00
index.ts refactor: refine folder structure and rename 2026-01-16 09:13:02 +08:00
types.ts fix(frontend): preserve agent context in thread history routes (#1771) 2026-04-09 15:11:57 +08:00
utils.test.ts fix(frontend): replace invalid "context" select field with "metadata" in threads.search (#2053) 2026-04-10 08:35:07 +08:00
utils.ts fix(frontend): replace invalid "context" select field with "metadata" in threads.search (#2053) 2026-04-10 08:35:07 +08:00