feat(agent): support dynamic annotationId resolution across chat and comments (#375)

* feat(agent): improve timestamp precision and proxy selection for video screenshots

* feat(agent): support dynamic annotationId resolution across chat and comments

* fix(agent): scope annotation resolution to asset and format has_markup consistently
This commit is contained in:
Yiling-J
2026-09-02 15:17:56 +08:00
committed by GitHub
parent 5a754bcb94
commit 35b57cc0ab
19 changed files with 869 additions and 133 deletions
+1
View File
@@ -87,6 +87,7 @@ export const shumaiThreadContextSchema = z.object({
export type ShumaiThreadContext = z.infer<typeof shumaiThreadContextSchema>
export const shumaiMessageContextSchema = z.object({
id: z.string().optional(),
user: z
.object({
id: z.string(),
+6 -2
View File
@@ -107,9 +107,13 @@ export function serializeContextToXml(context?: ShumaiMessageContext | null): st
}
}
// 4. <annotation />
// 4. <annotation ... />
if (context.annotation) {
lines.push(' <annotation />')
if (context.id !== undefined) {
lines.push(` <annotation id="${escapeXmlAttr(context.id)}" />`)
} else {
lines.push(' <annotation />')
}
}
// 5. <attached_files> ... </attached_files>