mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
e1c801313b
agno and mastra were the only 2 of 20 integrations with no
`public/demo-files/` directory ever committed. Their Attachments demo
fetches `/demo-files/sample.png` before building the message, so the
demo failed at the fetch with:
[multimodal-demo] sample-attachment send failed Error: Could not
fetch sample "sample.png" — HTTP 404. Is the file bundled under
public/demo-files/sample.png?
Nothing was ever sent to the agent — `userMsgCount: 0` — so the D5
probe timed out on turn 1. Both integrations already have working
vision-capable multimodal agents and correct aimock fixtures; this was
purely a missing-asset/packaging bug.
Copies sample.png / sample.pdf / README.md byte-for-byte from
langgraph-python (the canonical source) into each integration's own
`public/demo-files/` — a per-integration duplicated directory, not part
of the `shared/` symlink mechanism, which is exactly how two
integrations came to be missing it.
The assets are committed as plain Git LFS pointers, governed by the
repo-root `*.png` / `*.pdf` LFS rules, with no per-integration
`.gitattributes` override. LFS tracking stays uniform across the
fleet; the deploy-time problem (integration image builds do not fetch
LFS) is fixed in the build, not by carving these files out of LFS.
The pointer OIDs are the ones already stored for the identical assets
in the other integrations, so the backing LFS objects exist server-side
and are not dangling:
sample.png sha256:01aa5681de99461247543e9215c1e4da3242e26b2bee11593fcdbe209672d973 10083
sample.pdf sha256:3da2afae36a1a81fd2c02f15e54bfc38b6c22e41655c31a5b54ff1e0e3daab41 2486
NOTE: this change does not make agno/mastra pass on its own. It
requires the build-side LFS fetch fix to land first or together.
Demo Files — Multimodal Demo
This directory bundles sample files referenced by the /demos/multimodal page.
Required files (must be committed as binaries; see .gitattributes at repo root):
sample.png— a small (< 50 KB) PNG that the "Try with sample image" button injects into the chat. A CopilotKit logo or other recognizable brand mark works well so the vision-capable agent has something to describe.sample.pdf— a small (< 50 KB) one-page PDF that the "Try with sample PDF" button injects. The content must mention "CopilotKit" so E2E soft assertions hold (e.g. a one-page export of the CopilotKit quickstart).
The page at src/app/demos/multimodal/page.tsx fetches these via the public
path (/demo-files/sample.png, /demo-files/sample.pdf), wraps the fetched
blob in a File, and routes it through the same AttachmentsConfig.onUpload
callback the paperclip button uses — so the sample path exercises the exact
same queueing code as a real user upload.
If these files are missing, the demo page still renders but the sample buttons will surface a fetch error. The paperclip / drag-and-drop paths continue to work without them.