mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 05:54:44 +00:00
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:
@@ -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(),
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user