Skip to content

fix(acp): retain embedded blobs without MIME types - #64690

Open
yang0228 wants to merge 1 commit into
anomalyco:devfrom
yang0228:acp-blob-mime
Open

yang0228 wants to merge 1 commit into
anomalyco:devfrom
yang0228:acp-blob-mime

Conversation

@yang0228

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #64687

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Keep ACP embedded blobs when their optional mimeType is omitted. Use application/octet-stream when constructing the data URL; Core already detects the actual MIME from the bytes. Existing data URLs and explicit MIME types are preserved.

This is a bug fix and needs no feature flag.

How did you verify your code works?

  • The new wire regression failed before the fix and passes after it. It checks missing MIME, an existing data URL, and explicit MIME.
  • From packages/cli: bun test test/acp/prompt.test.ts --timeout 30000 (14 pass), bun typecheck, and bun run typecheck:tsc pass. Root bun run check passes (35 typecheck tasks).
  • Full CLI suite: 408 pass, 9 skip, 1 fail. The failure is service.test.ts → unresponsive managed port occupancy reports a bounded conflict (expected a PID diagnostic, received “another process”). The identical test fails on unmodified a61f5ea834 on this macOS host. Tests were run with proxy variables unset.

Screenshots / recordings

ACP content conversion only; no visual change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct. I ran the #64687 ACP stdio reproduction from source against both the base and this branch, using a mock model endpoint. On the base, a blob without mimeType was silently dropped. With this change, the model receives data:application/pdf;base64,…: Core detects the type from the bytes, so the application/octet-stream placeholder never reaches the provider. test/acp/prompt.test.ts passes (14), the new test fails on the base, and tsc -b passes.

Public API is unchanged: this only changes the internal ACP content conversion.

No blocking concerns.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

acp: embedded blobs without optional mimeType are silently dropped

1 participant