统一:DSH 智能分析、Top100 与图表静默恢复

接入 DSH 专用运行时和对话界面,保留模型原始回答,支持会话分页、连续追问与显式报告。
补齐组合筛选、各维度 Top100、分组查询到排名图的转换,图表故障静默省略并基于保存数据自动恢复。
优化报告风格、图表顺序和表格换行,更新接入说明及构建输入。

验证:独立目录前后端构建通过;118 项 Java、102 项前端、102 项图表、14 项 DSH 应用和 13 项组合筛选检查通过。
仅提交相关源码、锁定依赖与测试;不包含凭据、会话、业务数据或本地产物。
This commit is contained in:
2026-11-12 11:57:41 +08:00
parent cc8832c8e5
commit f1a2fbd494
166 changed files with 26281 additions and 2248 deletions
@@ -83,20 +83,18 @@ test('a refreshed question clears prior selections; disabled views cannot submit
ui.choose('18X15X4+T'); ui.props.disabled = true; ui.render(); ui.confirm(); assert.deepEqual(calls, []);
});
test('current page wires clarification only to the latest editable turn through normal submission', () => {
const source = fs.readFileSync(new URL('../src/ManagementPages.tsx', import.meta.url), 'utf8');
const historical = source.slice(source.indexOf('{turns.map((turn, index)'), source.indexOf('{lastTurn && <AnalysisTurn'));
assert.doesNotMatch(historical, /onClarify=/);
assert.match(source, /onClarify=\{sessionReadOnly \? undefined : question => submit\(question\)\}/);
test('the DSH workspace wires clarification only for the latest turn and editable sessions', () => {
const workspace = fs.readFileSync(new URL('../src/agent/AgentWorkspace.tsx', import.meta.url), 'utf8');
const conversation = fs.readFileSync(new URL('../src/agent/AgentConversation.tsx', import.meta.url), 'utf8');
assert.match(workspace, /canAct=\{!state\.readOnly && !state\.busy && !state\.historyLoading\} latest=\{turn === lastTurn\}/);
assert.match(workspace, /onPrompt=\{prompt\}/);
assert.match(conversation, /status === 'NEEDS_CLARIFICATION' && latest && <AnalysisClarification turn=\{turn\} disabled=\{!canAct\} onContinue=\{onPrompt\}/);
});
test('reopened conversations restore only the newest unanswered clarification to the current turn', () => {
test('reopened conversations can identify the newest unanswered clarification', () => {
const waiting = turn();
assert.equal(pendingClarificationTurnId([]), '');
assert.equal(pendingClarificationTurnId([{id:'old', status:'COMPLETED'}, waiting]), waiting.id);
assert.equal(pendingClarificationTurnId([waiting, {id:'answered',status:'COMPLETED'}]), '');
assert.equal(pendingClarificationTurnId([{id:'failed', status:'FAILED'}]), '');
const source = fs.readFileSync(new URL('../src/ManagementPages.tsx', import.meta.url), 'utf8');
assert.match(source, /focusTurnId \|\| \(active \? String\(active.id \|\| ''\) : pendingClarificationTurnId\(historyTurns\)\)/);
});