mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-20 13:53:32 +08:00
A user-requested drag target should reuse the existing attachment pipeline instead of creating a second upload path. The composer now handles browser DataTransfer drops and Tauri native drag-drop events, while keeping desktop attachments path-only so large files are not serialized into chat payloads. The fallback /goal metadata is also aligned with the existing desktop command surface because the desktop gate exercises that menu while validating composer behavior. Constraint: Desktop attachments must remain path-only to avoid inflated websocket payloads Rejected: Read dropped desktop files with FileReader | would reintroduce large inline data payloads Confidence: high Scope-risk: moderate Directive: Do not replace the Tauri drag-drop path conversion with data URLs without rerunning payload-size regression coverage Tested: cd desktop && bun run test -- --run src/lib/composerAttachments.test.ts src/components/chat/ChatInput.test.tsx src/pages/EmptySession.test.tsx Tested: cd desktop && bun run lint Tested: cd desktop && bun run build Tested: bun run check:desktop Tested: agent-browser overlay and dropped-chip smoke at http://127.0.0.1:1421/?serverUrl=http%3A%2F%2F127.0.0.1%3A3456 Tested: bun run verify Not-tested: Finder-to-packaged-.app manual drag smoke