mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-15 00:21:58 +00:00
问数据时间线的分析一步、协作成员的分析:编号照实说是哪一层。Agent 工具那一步标题写「变化拆解(可加) · 本节点 A1」——编号是这份 Agent 自己的分析容器里的(交回模型的「【分析 A1】」),报告目录里的 A1 按整次运行的台账编,图里还有分析卡时就不是同一个,不再冒充报告里的编号;分析卡的一项照旧写这一项的标识。协作成员的分析不带编号(成员的结论还进不了台账,照它写「· A1」会和报告里点名的结论对不上),event_view 交回 alias=None。check-decode、check-stream、协作成员那条测试照新写法改
This commit is contained in:
@@ -222,8 +222,11 @@ export const ANALYSIS_TEXT = {
|
||||
step: {
|
||||
/** 运行中的状态字(store/chat) */
|
||||
running: (label: string) => `正在执行分析:${label}…`,
|
||||
/** 一步的标题:「变化拆解(可加)· A1」;分析卡的一项:「变化拆解(可加)· where」 */
|
||||
title: (method: string, alias?: string | null) => (alias ? `${method} · ${alias}` : method),
|
||||
/** 分析卡的一项:「变化拆解(可加)· where」。标识是这一项在分析卡里的 id,不是报告目录里的编号 */
|
||||
title: (method: string, item?: string | null) => (item ? `${method} · ${item}` : method),
|
||||
/** Agent 工具那一步:「变化拆解(可加)· 本节点 A1」。编号是这份 Agent 自己的分析容器里的(交回模型的「【分析 A1】」),
|
||||
* 报告目录里的 A1 按整次运行的台账编,两者不一定是同一个(图里还有分析卡时就不是) */
|
||||
nodeTitle: (method: string, alias?: string | null) => (alias ? `${method} · 本节点 ${alias}` : method),
|
||||
callError: '调用有误,没有记成结论',
|
||||
callErrorNext: '这次调用没有记成结论,Agent 会按这条说明改正参数后重新调用',
|
||||
refused: '没有做成',
|
||||
|
||||
@@ -739,13 +739,13 @@ export function analysisTeamRun(): RunEvent[] {
|
||||
ev('tool.end', 'team', { tool: 'analysis_decompose', agent: '分析员', call_id: 'm2', duration_ms: 8,
|
||||
preview: '{\n "analysis_artifact": "a1f0", \n "result": {\n "op": "decompose",\n "mode": "additive",\n "method": "decompose.additive@1",',
|
||||
analysis_artifact: 'a1f0c3d2b4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9',
|
||||
analysis: { alias: 'A1', op: 'decompose', mode: 'additive', status: 'ok', verdict: 'driver', direction: 'down', phrase: TEAM_PHRASE,
|
||||
analysis: { alias: null, op: 'decompose', mode: 'additive', status: 'ok', verdict: 'driver', direction: 'down', phrase: TEAM_PHRASE,
|
||||
reason_code: null } }, 0.01)
|
||||
ev('tool.start', 'team', { tool: 'analysis_baseline', agent: '分析员', call_id: 'm3', args: { query: 'Q1', period: 'week', measure: 'gmv' } }, 0.1)
|
||||
ev('tool.end', 'team', { tool: 'analysis_baseline', agent: '分析员', call_id: 'm3', duration_ms: 4,
|
||||
preview: '{\n "analysis_artifact": "b2e1",',
|
||||
analysis_artifact: 'b2e1d4c3a5f6e70819203b4c5d6e7f8091a2b3c4d5e6f70819203b4c5d6e7f80',
|
||||
analysis: { alias: 'A2', op: 'baseline', mode: null, status: 'refused', verdict: null, direction: null,
|
||||
analysis: { alias: null, op: 'baseline', mode: null, status: 'refused', verdict: null, direction: null,
|
||||
phrase: '波动基线没有做成:只有 0 期历史,至少要 8 期', reason_code: 'history_short' } }, 0.01)
|
||||
ev('log', 'team', { level: 'warn', code: 'analysis_refused', agent: '分析员', call_id: 'm3', tool: 'analysis_baseline',
|
||||
reason_code: 'history_short', reason: '只有 0 期历史,至少要 8 期', message: '分析员 的 analysis_baseline 没有做成:只有 0 期历史,至少要 8 期' })
|
||||
|
||||
@@ -1387,8 +1387,9 @@ function toolStep(seq: number, tool: string, args: Record<string, any>): Step {
|
||||
}
|
||||
|
||||
/**
|
||||
* tool.end 的 analysis(tools/analysis.event_view)折进分析那一行:标题接上编号,副标题是判定语(算不了的就是「…没有做成:原因」,
|
||||
* 服务端写好的);算不了的用提醒色。老服务端没有这一段:preview 只是结论的前一截,判定语多半被截掉,只照参数写叫法,不从里面拼
|
||||
* tool.end 的 analysis(tools/analysis.event_view)折进分析那一行:标题接上这份 Agent 自己的编号(「本节点 A1」),副标题是
|
||||
* 判定语(算不了的就是「…没有做成:原因」,服务端写好的);算不了的用提醒色。老服务端没有这一段:preview 只是结论的前一截,
|
||||
* 判定语多半被截掉,只照参数写叫法,不从里面拼
|
||||
*/
|
||||
function settleAnalysis(step: Step, d: Record<string, any>): void {
|
||||
const view = d.analysis && typeof d.analysis === 'object' ? d.analysis as Record<string, any> : null
|
||||
@@ -1403,7 +1404,9 @@ function settleAnalysis(step: Step, d: Record<string, any>): void {
|
||||
if (typeof view.reason_code === 'string') info.reasonCode = view.reason_code
|
||||
}
|
||||
step.analysis = info
|
||||
step.title = ANALYSIS_TEXT.step.title(analysisMethodLabel(info.op, info.mode), info.alias)
|
||||
// Agent 工具那一步的编号是这份 Agent 自己的分析容器里的(交回模型的「【分析 A1】」),报告目录里的 A1 按整次运行的台账编,
|
||||
// 两者不一定相同(图里还有分析卡时就不是):标题写「本节点 A1」,不冒充报告里的编号
|
||||
step.title = ANALYSIS_TEXT.step.nodeTitle(analysisMethodLabel(info.op, info.mode), info.alias)
|
||||
if (info.phrase) step.sub = step.sub ? `${info.phrase} · ${step.sub}` : info.phrase
|
||||
if (info.status === 'refused') {
|
||||
step.level = 'warn'
|
||||
|
||||
Reference in New Issue
Block a user