feat: expand multimodal and knowledge workflows

This commit is contained in:
lofyer
2026-08-10 21:25:47 +08:00
parent 0fab985f28
commit ad79659308
38 changed files with 3036 additions and 2416 deletions
+3 -9
View File
@@ -257,15 +257,9 @@ export async function downloadWechatImage(
if (!item.media) {
throw new Error('微信图片缺少媒体引用')
}
const claimedCipherSize = item.hd_size ?? item.mid_size
if (
claimedCipherSize !== undefined &&
(!Number.isSafeInteger(claimedCipherSize) ||
claimedCipherSize < 1 ||
claimedCipherSize > MAX_ENCRYPTED_BYTES)
) {
throw new Error('微信图片超过 12MB 限制')
}
// The size hints can describe a different image variant, such as the
// undownloaded HD image. Enforce the limit on the fetched ciphertext and
// decrypted image instead.
const key = item.aeskey
? parseAesKey(item.aeskey, 'hex')
: item.media.aes_key