mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
6a1fceb979
sample.png and sample.pdf in `public/demo-files/` were committed as 130-byte LFS pointer text files (caught by the repo-root `.gitattributes` `*.png filter=lfs`). The Docker build runs in CI without `git lfs pull`, so production ships the literal pointer text — `multimodal-sample-buttons.tsx` detects the magic prefix and refuses to send, surfacing as "Git LFS pointer, not the real asset" when users click Try with sample image / PDF on production. langgraph-python committed the raw binaries (different blob SHAs). Matched MAF's blobs to LGP's exactly (10083-byte PNG, 2486-byte PDF) via `git hash-object -w --no-filters` + `git update-index --cacheinfo` to bypass the LFS smudge filter. Added a per-directory `.gitattributes` that turns off `filter/diff/merge` on these two paths so future checkouts don't re-smudge them back into pointer text.
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.