fix: allow agent workspace directories in media local roots (#17136)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 7545ef1e19
Co-authored-by: MisterGuy420 <255743668+MisterGuy420@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
Mr. Guy
2026-02-15 10:53:45 -05:00
committed by GitHub
parent 0c57f5e62e
commit e927fd1e35
38 changed files with 388 additions and 35 deletions

View File

@@ -12,6 +12,7 @@ export type SignalSendOpts = {
account?: string;
accountId?: string;
mediaUrl?: string;
mediaLocalRoots?: readonly string[];
maxBytes?: number;
timeoutMs?: number;
textMode?: "markdown" | "plain";
@@ -125,7 +126,9 @@ export async function sendMessageSignal(
let attachments: string[] | undefined;
if (opts.mediaUrl?.trim()) {
const resolved = await resolveOutboundAttachmentFromUrl(opts.mediaUrl.trim(), maxBytes);
const resolved = await resolveOutboundAttachmentFromUrl(opts.mediaUrl.trim(), maxBytes, {
localRoots: opts.mediaLocalRoots,
});
attachments = [resolved.path];
const kind = mediaKindFromMime(resolved.contentType ?? undefined);
if (!message && kind) {