mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-01 14:28:28 +00:00
fix(frontend): create thread on first submit in new-agent page (#2656)
The new-agent page pre-generates a thread UUID and passed it directly
to useThreadStream, which made the LangGraph SDK POST to
/threads/{uuid}/runs/stream against a thread the backend had never
created. After PR #2566 introduced multi-tenant owner checks on the
runs endpoints, that request now 404s with "Thread not found".
Pass threadId: undefined to useThreadStream so the SDK takes the
create-then-run path. The pre-generated UUID is still forwarded via
SubmitOptions.threadId in sendMessage, so the new thread is created
with that exact id and onCreated rebinds the hook to it.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
4a9f1d547b
commit
f7b10d42e4
@ -102,7 +102,7 @@ export default function NewAgentPage() {
|
||||
const threadId = useMemo(() => uuid(), []);
|
||||
|
||||
const { thread, sendMessage } = useThreadStream({
|
||||
threadId: step === "chat" ? threadId : undefined,
|
||||
threadId: undefined,
|
||||
context: {
|
||||
mode: "flash",
|
||||
is_bootstrap: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user