mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-30 16:23:35 +08:00
Two additions to the provider settings page, both modelled on cc-switch. One-click import from cc-switch: - Reads the local cc-switch installation and offers its Claude Code providers for bulk import. SQLite (cc-switch v3.8.0+) is the primary store, with the legacy v2 config.json as a fallback used only when no database exists — once cc-switch migrates it archives that file, so reading it alongside a database would surface pre-migration data. - Supports cc-switch v3.1.0 and newer. Older installs wrote a config format cc-switch itself dropped in v3.6.0; those are refused explicitly rather than reported as an empty scan. - Degrades honestly when cc-switch's storage moves: a structure we cannot read reports why, distinguishing "cc-switch too old" from "cc-haha does not recognise this layout" from "the file could not be read at all". Only id/app_type/settings_config are required; other columns are optional and unknown ones are ignored. - Full credentials are resolved server-side during import and never appear in the scan payload. Fetch model lists: - Probes the provider's Base URL for an OpenAI-compatible /models endpoint, walking cc-switch's candidate ladder (version segments and nine vendor compat suffixes) and falling through on 404/405. - Only http(s) endpoints are fetched; a 2xx that carries no model list is reported as a failure with the upstream's own message rather than as an empty catalog, so a key rejected behind a 200 is not read as "this provider has no models".
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