feat(chat): track context asset changes and update agent context

This commit is contained in:
yiling
2026-07-21 10:01:22 +08:00
parent 6d34b13266
commit e3352232fe
6 changed files with 107 additions and 4 deletions
@@ -165,6 +165,7 @@ export async function agentChat(task: WorkflowTask): Promise<void> {
const proxyType = (asset.media as PrismaJson.MediaInfo | null)?.proxyType
const instruction = new AgentChatPromptBuilder(asset.id)
.withContinuation(!isNewChat)
.withAssetChanged(payload.agent?.hasAssetChanged)
.withPathContext(pathContext)
.withAssetDetails(asset.name, asset.mediaType, duration, totalPages, proxyType)
.withCommentTimestamp(commentTimestamp)