mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 23:24:21 +00:00
refactor(metadata): rename field_id to field_key in AssetMetadataValue
Rename the database column from field_id to field_key and the Prisma property from fieldId to fieldKey to better reflect that the column stores human-readable metadata field keys, not internal database IDs. This fixes a bug where AI autofill wrote internal DB IDs instead of field keys, causing metadata values to not display in the UI. - Add SQL migration to rename the column - Update metadata, search, and asset services - Fix agent-autofill workflow to map fields by key - Update all related test suites
This commit is contained in:
@@ -68,7 +68,7 @@ describe('Agent Autofill Workflow', () => {
|
||||
})
|
||||
mockActivities.extractAiMetadataActivity.mockResolvedValue(['/tmp/1.webp'])
|
||||
mockActivities.getProjectAutofillFieldsActivity.mockResolvedValue([
|
||||
{ id: 'f1', config: { name: 'F1', type: 'text' } },
|
||||
{ id: 'f1', key: 'f1', config: { name: 'F1', type: 'text' } },
|
||||
])
|
||||
mockActivities.getAgentAutofillContextActivity.mockResolvedValue({ agent: { id: 'b1' } })
|
||||
mockActivities.getAgentWorkerQueueActivity.mockResolvedValue('agent_queue')
|
||||
|
||||
Reference in New Issue
Block a user