sdk: prefer iframe over video when inferring goView widgets

This commit is contained in:
clawdbot 2026-01-28 04:55:51 +08:00
parent b30d0ff069
commit 4e479870a9

View File

@ -430,14 +430,14 @@ export function convertGoViewProjectToScreen(input: GoViewProjectLike | GoViewSt
const inferredType: 'text' | 'image' | 'iframe' | 'video' | undefined = const inferredType: 'text' | 'image' | 'iframe' | 'video' | undefined =
isImage(c) || looksLikeImageOption(option) isImage(c) || looksLikeImageOption(option)
? 'image' ? 'image'
: optionSaysVideo : optionSaysIframe
? 'video' ? 'iframe'
: optionSaysIframe : optionSaysVideo
? 'iframe' ? 'video'
: isVideo(c) : isIframe(c)
? 'video' ? 'iframe'
: isIframe(c) : isVideo(c)
? 'iframe' ? 'video'
: isTextCommon(c) : isTextCommon(c)
? 'text' ? 'text'
: undefined; : undefined;