mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-17 13:13:35 +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
Claude Code Haha Desktop
基于 Tauri 2 + React 的桌面客户端。
开发
bun install
bun run tauri dev
构建
# macOS (Apple Silicon)
./scripts/build-macos-arm64.sh
# Windows (x64, MSI only)
.\scripts\build-windows-x64.ps1
构建产物位于 build-artifacts/ 目录,文件名会显式包含平台、架构和包类型。
常见问题
macOS 提示"已损坏,无法打开"
xattr -cr /Applications/Claude\ Code\ Haha.app