diff --git a/clis/chatgpt/utils.js b/clis/chatgpt/utils.js index ec6da342f..46475ef3a 100644 --- a/clis/chatgpt/utils.js +++ b/clis/chatgpt/utils.js @@ -2565,10 +2565,10 @@ export async function getChatGPTVisibleImageUrls(page) { const heading = (turn?.querySelector('h4')?.innerText || '').toLowerCase(); if (/you said|你说/.test(heading)) return true; if (/chatgpt|assistant|助手/.test(heading)) return false; - const openButtonLabel = (img.closest('button[aria-label^="Open image:"]')?.getAttribute('aria-label') || '').toLowerCase(); + const openButtonLabel = (img.closest('button[aria-label^="Open image:"], button[aria-label^="打开图片:"]')?.getAttribute('aria-label') || '').toLowerCase(); const previewText = [alt, openButtonLabel].join(' '); return /\.(png|jpe?g|webp|gif|heic|heif)(?:\b|$)/i.test(previewText) - || /ref-|reference|参考|upload|uploaded|attachment/.test(previewText); + || /ref-|reference|参考|上传|upload|uploaded|attachment/.test(previewText); }; const imgs = Array.from(document.querySelectorAll('img')).filter(img => diff --git a/src/daemon.ts b/src/daemon.ts index d68bdd0c7..867128f99 100644 --- a/src/daemon.ts +++ b/src/daemon.ts @@ -217,7 +217,7 @@ function unregisterExtensionConnection(ws: WebSocket): void { // ─── HTTP Server ───────────────────────────────────────────────────── -const MAX_BODY = 1024 * 1024; // 1 MB — commands are tiny; this prevents OOM +const MAX_BODY = 32 * 1024 * 1024; // 32 MB — allows base64 image payloads (chatgpt image upload fallback); prevents OOM function readBody(req: IncomingMessage): Promise { return new Promise((resolve, reject) => {