同步:完善质量分析工作台并更新主题字体
同步已上线的智能分析执行协议、来源查询、图表报告与管理页面配套代码。 补齐数据库迁移、运行依赖和回归测试,保留原有指标计算口径。 统一午夜黑及其他主题的控件细节、中文和业务数字字体。 排除本地业务数据、凭据、预览、发布与验收产物。 验证:生产构建通过,320项前端回归通过;本轮仅同步Git,不再次部署。
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { settledAnalysisTurn } from '../web/src/analysisConversationState.ts';
|
||||
|
||||
test('a stream closing mid-sentence cannot replace the completed saved answer', () => {
|
||||
const full = '小结:新能源汽车磁钢下降。完整的后续分析与关注方向。';
|
||||
const partial = '小结:新能源汽车磁钢下';
|
||||
const turn = settledAnalysisTurn('t', '问题', { status: 'COMPLETED', answer: full, steps: [1, 2] }, { answer: partial, steps: [1] }, '');
|
||||
assert.equal(turn.answer, full);
|
||||
assert.equal(turn.result.answer, full);
|
||||
assert.deepEqual(turn.steps, [1, 2]);
|
||||
});
|
||||
|
||||
test('a nested final result and an intentionally empty final answer remain authoritative', () => {
|
||||
for (const answer of ['完整最终回答', '']) {
|
||||
const turn = settledAnalysisTurn('t', '问题', { status: 'COMPLETED', result: { answer } }, { answer: '过时的中间内容' }, 'COMPLETED');
|
||||
assert.equal(turn.result.answer, answer);
|
||||
}
|
||||
});
|
||||
|
||||
test('a terminal event supplies the answer if the final detail read is unavailable', () => {
|
||||
const turn = settledAnalysisTurn('t', '问题', {}, { answer: '完成事件的完整回答' }, 'COMPLETED');
|
||||
assert.equal(turn.status, 'COMPLETED');
|
||||
assert.equal(turn.result.answer, '完成事件的完整回答');
|
||||
});
|
||||
Reference in New Issue
Block a user