diff --git a/extensions/acpx/src/runtime.ts b/extensions/acpx/src/runtime.ts index e1f0024c699..28a6668c117 100644 --- a/extensions/acpx/src/runtime.ts +++ b/extensions/acpx/src/runtime.ts @@ -581,6 +581,8 @@ export class AcpxRuntime implements AcpRuntime { if (attachment.mediaType.startsWith("image/")) { blocks.push({ type: "image", mimeType: attachment.mediaType, data: attachment.data }); } + // Non-image attachments (documents, PDFs, audio, video) are not supported + // as binary content blocks in the ACP protocol — skip silently. } child.stdin.end(blocks.length > 0 ? JSON.stringify(blocks) : input.text); } else { diff --git a/src/auto-reply/reply/dispatch-acp.ts b/src/auto-reply/reply/dispatch-acp.ts index 8fc7110fc4c..db290c1ea9d 100644 --- a/src/auto-reply/reply/dispatch-acp.ts +++ b/src/auto-reply/reply/dispatch-acp.ts @@ -64,7 +64,7 @@ function resolveAcpPromptText(ctx: FinalizedMsgContext): string { ]).trim(); } -const ACP_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024; +const ACP_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024; // 10 MB — consistent with Telegram mediaMaxMb default async function resolveAcpAttachments(ctx: FinalizedMsgContext): Promise { const mediaAttachments = normalizeAttachments(ctx);