feat(roundtable): xdfx 行动名喂入 summary/抽取 + 第三步意图理解增强
- xdfx:把本次「行动名称」喂进 summary 材料(buildMaterials 加 actionName) 与结构化抽取 材料(flow_extract._material 加【本次行动】抬头),让报告/流程图都贴着该行动展开 - 第三步意图识别(classify_flow_intent)增强:新增 can_ingest 上下文 + ingest 意图;重写 _INTENT_SYS 走语义理解——「介绍/解释/为什么/总结一下」等对内容的提问→qa(文字答); 「帮我入库」(可入库时)→ingest→直接入库;能判断就给具体意图不轻易 unclear; 不可入库时误判 ingest 自动降级 qa。前端 classifyFlowIntent 传 canIngest,ask 新增 ingest 分支 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
fba417918f
commit
ae2706dad3
3 files changed
+73
-21
No files matched your search
@@ -12,7 +12,7 @@ import { getBackendBaseURL } from "@/core/config";
|
||||
import type { FlowGraphData } from "@/roundtable-planning/lib/flow-graph";
|
||||
|
||||
/** 第三步输入框意图分类结果(与后端 /intent 对应)。 */
|
||||
export type FlowIntent = "regenerate_report" | "modify_flow" | "regenerate_flow" | "qa" | "unclear";
|
||||
export type FlowIntent = "regenerate_report" | "modify_flow" | "regenerate_flow" | "ingest" | "qa" | "unclear";
|
||||
|
||||
/**
|
||||
* 识别第三步输入框消息的意图(一次模型调用)。失败回退 "unclear"(前端发起澄清)。
|
||||
@@ -22,6 +22,8 @@ export async function classifyFlowIntent(req: {
|
||||
message: string;
|
||||
hasReport: boolean;
|
||||
hasFlow: boolean;
|
||||
/** 当前是否可入库(入库按钮已出现、未入库);为真才允许识别出 ingest 意图。 */
|
||||
canIngest?: boolean;
|
||||
model?: string;
|
||||
signal?: AbortSignal;
|
||||
}): Promise<{ intent: FlowIntent; reason: string }> {
|
||||
@@ -33,6 +35,7 @@ export async function classifyFlowIntent(req: {
|
||||
message: req.message,
|
||||
has_report: req.hasReport,
|
||||
has_flow: req.hasFlow,
|
||||
can_ingest: req.canIngest ?? false,
|
||||
model: req.model,
|
||||
}),
|
||||
signal: req.signal,
|
||||
|
||||
Reference in new issue
Block a user