mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-18 13:23:33 +08:00
Desktop @-mentions were collapsing filesystem browse failures into an empty state, which made /private/tmp aliases on macOS look like real empty directories. The server now treats /private/tmp as the same temp root as /tmp on Darwin, and the menu surfaces explicit access/load errors instead of pretending the directory has no files. Constraint: Desktop browse/file APIs must stay restricted to approved roots Constraint: Native macOS pickers and realpath() may canonicalize /tmp to /private/tmp Rejected: Expanding filesystem access to arbitrary system paths | too broad for this targeted fix Rejected: Keeping silent empty-state fallback | hides permission and path bugs from users Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep filesystem error states visible in the composer; do not collapse API failures back into empty-directory messaging Tested: bun test src/server/__tests__/filesystem.test.ts Tested: cd desktop && bun run test -- FileSearchMenu.test.tsx Tested: cd desktop && bun run lint Not-tested: Manual desktop packaging or end-to-end Tauri app run after this patch
Claude Code Haha Desktop
基于 Tauri 2 + React 的桌面客户端。
开发
bun install
bun run tauri dev
构建
# macOS (Apple Silicon)
./scripts/build-macos-arm64.sh
# Windows (x64)
.\scripts\build-windows-x64.ps1
构建产物位于 build-artifacts/ 目录。
常见问题
macOS 提示"已损坏,无法打开"
xattr -cr /Applications/Claude\ Code\ Haha.app