feat(ai): add expense application feedback ledger

This commit is contained in:
caoxiaozhu
2026-07-14 11:10:55 +08:00
parent 5ed34c2b8f
commit a662cfe6c3
24 changed files with 2159 additions and 34 deletions

View File

@@ -42,6 +42,16 @@ async function testSubmitActionUsesFastPreviewEndpoint() {
days: '3天',
transportMode: '火车',
amount: '1000元'
},
aiDecisionFeedback: {
schemaVersion: 1,
changedFields: [
{
fieldKey: 'transportMode',
suggestedValue: '飞机',
finalValue: '火车'
}
]
}
},
currentUser: { username: 'zhangsan@example.com', name: '张三' },
@@ -54,6 +64,13 @@ async function testSubmitActionUsesFastPreviewEndpoint() {
assert.equal(body.context_json.session_type, 'application')
assert.equal(body.context_json.application_stage, 'expense_application')
assert.equal(body.context_json.application_preview.fields.transportMode, '火车')
assert.deepEqual(body.context_json.application_preview.aiDecisionFeedback.changedFields, [
{
fieldKey: 'transportMode',
suggestedValue: '飞机',
finalValue: '火车'
}
])
}
async function testSaveDraftActionUsesFastPreviewEndpoint() {