feat(agent): propagate autofill context from chat to autofill workflow

Add an optional 'context' parameter to the create_file and create_version
agent tools so the chat agent can pass generation/source context (e.g.
'Generated using gemini') to the AI metadata autofill workflow.

- Add Asset.autofillContext column, persisted in the same transaction as
  asset creation when context is provided
- Add new list_autofill_fields agent tool exposing autofillable metadata
  fields (name, type, description, options) per project
- Autofill workflow reads the stored context and includes it in the
  autofill AI prompt
- Add short chat system-prompt guidance to use list_autofill_fields and
  pass <=50 word context when creating files/versions
This commit is contained in:
yiling
2026-08-05 10:33:02 +08:00
parent 30021b07d0
commit 033652cde3
18 changed files with 905 additions and 7 deletions
@@ -3249,6 +3249,7 @@ export const AssetScalarFieldEnum = {
status: 'status',
transcodeTaskId: 'transcodeTaskId',
media: 'media',
autofillContext: 'autofillContext',
isDeleted: 'isDeleted',
deletedAt: 'deletedAt',
sortIndex: 'sortIndex',