fix: enforce Rule 1 JSON wrappers across 80+ files, fix 6 bugs

- Replace all encoding/json direct calls with common.Marshal/Unmarshal/DecodeJson per Rule 1
- Fix Dify nil pointer dereference on remote image upload (relay-dify.go)
- Fix Claude relay file content type detection for text/* and PDF (relay-claude.go)
- Fix unsafe type assertions in Claude relay and Vertex GetModelRegion
- Fix StreamScanner unconditionally resetting pre-existing StreamStatus
- Add inferMimeTypeFromFilename() for proper MIME type handling in DTO
- Fix Mac build script hardcoded DMG version (now reads from tauri.conf.json)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 12:39:02 +08:00
co-authored by Claude Opus 4.6
parent 16410270a1
commit f43aa269d6
82 changed files with 340 additions and 324 deletions
+2 -1
View File
@@ -12,7 +12,8 @@ CANONICAL_OUTPUT_DIR="${DESKTOP_DIR}/build-artifacts/macos-arm64"
APP_BUNDLE_NAME="HeiCode.app"
APP_BUNDLE_ID="com.heicode.desktop"
DMG_VOLUME_NAME="Heicode"
DEFAULT_DMG_BASENAME="Heicode_0.1.0_aarch64.dmg"
APP_VERSION="$(bun -e "console.log(require('${DESKTOP_DIR}/src-tauri/tauri.conf.json').version)" 2>/dev/null || echo "0.0.0")"
DEFAULT_DMG_BASENAME="Heicode_${APP_VERSION}_aarch64.dmg"
usage() {
cat <<'EOF'