Step3 总结报告与顶栏主题背景图

新增 roundtable-summary 智能体及前后端 Step3 Markdown 总结流程;顶栏在浅/深主题下分别使用红/深蓝横幅背景。
This commit is contained in:
fengxiangdebaozi committed 2026-06-11 21:51:59 +08:00
1 parent 10047de745
commit 2d74f8883e
14 files changed
+2060 -18

No files matched your search

@@ -818,3 +818,28 @@ export async function initReportThread(
const json = (await res.json()) as { agent_name: string; thread_id: string };
return { agentName: json.agent_name, threadId: json.thread_id };
}
/**
* Create a thread for the Step 3「总结报告」summary agent (`roundtable-summary`,
* a built-in singleton — distinct from `roundtable-report`; this only spins up a
* cheap thread, it never re-creates the agent). Run it afterwards with
* {@link streamMultiAgent} (`agentType: "special"`, `agentName: "roundtable-summary"`,
* `dAgentThreadId: { [agentName]: threadId }`). Follow-up Q&A / refinements reuse
* the SAME thread (do not re-init) so the agent keeps the report context.
*/
export async function initSummaryThread(
options: { signal?: AbortSignal } = {},
): Promise<ReportThreadResponse> {
const res = await apiFetch(`${getBackendBaseURL()}/api/multi-agent/summary/init`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: "{}",
signal: options.signal,
});
if (!res.ok) {
const text = await res.text().catch(() => "");
throw new Error(`init summary thread failed (${res.status}): ${text}`);
}
const json = (await res.json()) as { agent_name: string; thread_id: string };
return { agentName: json.agent_name, threadId: json.thread_id };
}