feat(roundtable): 会商前端调用报错收集 + 诊断页用户名/范围切换
- 前端调用报错收集(用户实际遇到的报错,服务端诊断看不到的也收):新增 POST /api/roundtable-diagnostics/report(非 admin,scope="client")+ 前端上报器 roundtable-planning/api/diagnostics-report.ts。streamMultiAgent(第二步席位 + 第三步报告/结构化/绘制/大屏)覆盖 HTTP 错误(502)、SSE error 帧、worker error 帧 (模型没调用成功)、fetch 网络不可达、流式中途中断,reported 去重;initMultiAgent / intent / recommend / 后台作业接口同步上报。 - 诊断页:每条报错显示上报用户名(👤,user_id→邮箱@前缀,后端 best-effort 解析); 第一个筛选改为「后台挂起 / 前台调用」切换(前台调用=foreground,client,后端 scope 支持逗号多值),阶段下拉随范围联动(后台→二三步;前台→一二三步)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
4a403c95c5
commit
762d3620c4
12 files changed
+433
-18
No files matched your search
@@ -1716,15 +1716,25 @@ function SeatStrip({
|
||||
{seat.description}
|
||||
</div>
|
||||
)}
|
||||
{/* 席位模型覆盖:空 = 跟随全局所选模型;选了则该席位作为子智能体执行时用此模型。
|
||||
技能重的席位配强模型、边角席位配快模型,配合技能白名单实现「强弱搭配」。 */}
|
||||
<div className="mt-1.5 flex items-center gap-1.5">
|
||||
</div>
|
||||
|
||||
{/* 席位模型覆盖(右侧操作区):空 = 跟随全局所选模型;选了则该席位作为子智能体
|
||||
执行时用此模型。技能重的席位配强模型、边角席位配快模型,配合技能白名单实现
|
||||
「强弱搭配」。放到右侧操作区,与名称/描述解耦,卡片更整洁。 */}
|
||||
<div className="flex shrink-0 items-center border-l border-border px-2.5">
|
||||
<div
|
||||
className={cn(
|
||||
"flex items-center gap-1.5 border border-border/70 bg-muted/40 py-1 pl-2 pr-1",
|
||||
R_CTRL,
|
||||
)}
|
||||
title="该席位作为子智能体执行时使用的模型;「跟随全局」= 用第二步顶部所选模型"
|
||||
>
|
||||
<span className="shrink-0 select-none text-[10px] font-medium text-muted-foreground">模型</span>
|
||||
<ModelNameSelect
|
||||
value={seat.model ?? null}
|
||||
onChange={onModelChange}
|
||||
defaultLabel="跟随全局"
|
||||
triggerClassName="h-6 max-w-[180px] text-[11px]"
|
||||
triggerClassName="h-6 max-w-[150px] border-none bg-transparent text-[11px] shadow-none hover:bg-background/60"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { getStoredAuth } from "@/core/auth";
|
||||
import { setRoundtableErrorContext } from "@/roundtable-planning/api/diagnostics-report";
|
||||
import {
|
||||
Activity,
|
||||
BookOpen,
|
||||
@@ -1131,6 +1132,14 @@ export default function RoundtablePlanningPage() {
|
||||
return emitWujieEvent("roundtable:consensus", buildWujieConsensusPayload());
|
||||
}, [buildWujieConsensusPayload, inWujieEmbed]);
|
||||
|
||||
// 让前端报错上报器能把每条报错归属到当前草稿 / 任务(无需穿进每个底层 api 调用)。
|
||||
useEffect(() => {
|
||||
setRoundtableErrorContext({
|
||||
draftId: drafts.currentDraftId ?? undefined,
|
||||
taskId: prefillRef.current?.taskId ?? undefined,
|
||||
});
|
||||
}, [drafts.currentDraftId]);
|
||||
|
||||
const handleSettingsClick = useCallback(() => {
|
||||
if (inWujieEmbed) {
|
||||
const deliverables = buildWujieConsensusPayload().deliverables;
|
||||
|
||||
Reference in new issue
Block a user