Merge f2358a9f662fea3efd9000aad113ffc14977e39d into 5e417b44e1540f528d2ae63e3e20229a902d1db2

This commit is contained in:
lumenclaw-cloud 2026-03-21 02:54:03 +00:00 committed by GitHub
commit d3f8ec3514
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -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 {

View File

@ -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<AcpTurnAttachment[]> {
const mediaAttachments = normalizeAttachments(ctx);