diff --git a/desktop/package.json b/desktop/package.json index 78e14c03..abe5b388 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -1,11 +1,11 @@ { "name": "claude-code-desktop", "private": true, - "version": "0.3.1", + "version": "0.3.2", "type": "module", "scripts": { "dev": "vite", - "build": "bun run build:preview-agent && tsc -b && vite build", + "build": "bun run build:preview-agent && node ./node_modules/typescript/bin/tsc -b && node ./node_modules/vite/bin/vite.js build", "build:preview-agent": "bun run ./scripts/build-preview-agent.ts", "build:sidecars": "bun run ./scripts/build-sidecars.ts", "build:macos-arm64": "bash ./scripts/build-macos-arm64.sh", @@ -14,7 +14,7 @@ "tauri": "tauri", "test": "vitest", "test:ui": "vitest --ui", - "lint": "tsc --noEmit" + "lint": "node ./node_modules/typescript/bin/tsc --noEmit" }, "dependencies": { "@tailwindcss/typography": "^0.5.19", diff --git a/desktop/scripts/build-macos-arm64.sh b/desktop/scripts/build-macos-arm64.sh index 2a0062de..f5dabada 100755 --- a/desktop/scripts/build-macos-arm64.sh +++ b/desktop/scripts/build-macos-arm64.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash set -euo pipefail @@ -115,8 +115,8 @@ echo "[build-macos-arm64] Rebuilding sidecar for ${TARGET_TRIPLE}..." (cd "${DESKTOP_DIR}" && TAURI_ENV_TARGET_TRIPLE="${TARGET_TRIPLE}" bun run build:sidecars) TAURI_ARGS=( - bunx - tauri + node + ./node_modules/@tauri-apps/cli/tauri.js build --target "${TARGET_TRIPLE}" diff --git a/desktop/scripts/build-preview-agent.ts b/desktop/scripts/build-preview-agent.ts index 2240f5c5..8df49cea 100644 --- a/desktop/scripts/build-preview-agent.ts +++ b/desktop/scripts/build-preview-agent.ts @@ -1,3 +1,27 @@ import { $ } from 'bun' -await $`bun build ./src/preview-agent/index.ts --outfile=./src-tauri/resources/preview-agent.js --format=iife --minify` +import { readFile, rename, rm } from 'node:fs/promises' + +const outfile = './src-tauri/resources/preview-agent.js' +const tmpfile = `${outfile}.${process.pid}.tmp` + +await $`bun build ./src/preview-agent/index.ts --outfile=${tmpfile} --format=iife --minify` + +try { + const [current, next] = await Promise.all([ + readFile(outfile), + readFile(tmpfile), + ]) + if (current.equals(next)) { + await rm(tmpfile, { force: true }) + console.log('preview-agent.js unchanged') + process.exit(0) + } +} catch (error) { + if ((error as NodeJS.ErrnoException).code !== 'ENOENT') { + await rm(tmpfile, { force: true }) + throw error + } +} + +await rename(tmpfile, outfile) console.log('preview-agent.js built') diff --git a/desktop/src-tauri/Cargo.lock b/desktop/src-tauri/Cargo.lock index b586c6ae..c944f4dd 100644 --- a/desktop/src-tauri/Cargo.lock +++ b/desktop/src-tauri/Cargo.lock @@ -297,9 +297,9 @@ dependencies = [ [[package]] name = "brotli" -version = "8.0.2" +version = "8.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" +checksum = "8119e4516436f5708bbc474a9d395bf12f1b5395e93a92a56e647ac3388c8610" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -308,9 +308,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "5.0.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +checksum = "5962523e1b92ce1b5e793d9169b9943eece10d39f62550bc04bb605d75b94924" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -421,9 +421,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.62" +version = "1.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" +checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f" dependencies = [ "find-msvc-tools", "shlex", @@ -482,7 +482,7 @@ dependencies = [ [[package]] name = "claude-code-desktop" -version = "0.3.1" +version = "0.3.2" dependencies = [ "anyhow", "portable-pty", @@ -819,9 +819,9 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", @@ -1619,9 +1619,9 @@ dependencies = [ [[package]] name = "http" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "8be7462df143984c4598a256ef469b251d7d7f9e271135073e78fc535414f3d0" dependencies = [ "bytes", "itoa", @@ -1658,9 +1658,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" dependencies = [ "atomic-waker", "bytes", @@ -2136,9 +2136,9 @@ dependencies = [ [[package]] name = "libredox" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" +checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3" dependencies = [ "libc", ] @@ -2166,9 +2166,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5" [[package]] name = "mac" @@ -2232,9 +2232,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" [[package]] name = "memoffset" @@ -2269,9 +2269,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" dependencies = [ "libc", "wasi 0.11.1+wasi-snapshot-preview1", @@ -2993,7 +2993,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.11+spec-1.1.0", + "toml_edit 0.25.12+spec-1.1.0", ] [[package]] @@ -3261,9 +3261,9 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "reqwest" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ "base64 0.22.1", "bytes", @@ -3807,9 +3807,9 @@ checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "sigchld" @@ -3890,9 +3890,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", "windows-sys 0.61.2", @@ -4812,9 +4812,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.11+spec-1.1.0" +version = "0.25.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" +checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" dependencies = [ "indexmap 2.14.0", "toml_datetime 1.1.1+spec-1.1.0", @@ -4949,9 +4949,9 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" -version = "1.20.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "uds_windows" @@ -5068,9 +5068,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.23.1" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" +checksum = "d258b83ceec21034727ecee8c382cfa6c3e133699b0742c64571814fb420c9f7" dependencies = [ "getrandom 0.4.2", "js-sys", @@ -6060,9 +6060,9 @@ dependencies = [ [[package]] name = "zbus" -version = "5.15.0" +version = "5.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bcbf15c8708d7fc1be0c993622e0a5cbd5e8b52bfa40afa4c3e0cd8d724ac1" +checksum = "eee682d202a77e4a9f3b2c2bdf48a7b28af5c08c34ddf66f98c93e5e39464285" dependencies = [ "async-broadcast", "async-executor", @@ -6095,9 +6095,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.15.0" +version = "5.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51fa5406ad9175a8c825a931f8cf347116b531b3634fcb0b627c290f1f2516ff" +checksum = "adf1bd45a81a103745b1757754762a26e8cd01e4532e4d6c8ec431624b80d1d6" dependencies = [ "proc-macro-crate 3.5.0", "proc-macro2", @@ -6121,18 +6121,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639" dependencies = [ "proc-macro2", "quote", @@ -6219,9 +6219,9 @@ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" [[package]] name = "zvariant" -version = "5.11.0" +version = "5.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c1567a6ec68df868cbbfde844cfc6d81649fe5109a62b116b19fabd53e618ee" +checksum = "a192a0bde63360d77a7523c833d4b4ce6070a927e2c53246e4c540b1a3e27be0" dependencies = [ "endi", "enumflags2", @@ -6233,9 +6233,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "5.11.0" +version = "5.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d5b780599bbde114e39d9a0799577fad1ced5105d38515745f7b3099d8ceda" +checksum = "90bc6cde9c01c511074be97f7ccb6c19d0da89e3f8662e812e999dcfd4638737" dependencies = [ "proc-macro-crate 3.5.0", "proc-macro2", @@ -6246,9 +6246,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "3.3.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d464f5733ffa07a3164d656f18533caace9d0638596721355d73256a410d691" +checksum = "1e8535915cfa75547e559d8c68e8139909a4aeee076831e4ef7fc59d8172c4d6" dependencies = [ "proc-macro2", "quote", diff --git a/desktop/src-tauri/Cargo.toml b/desktop/src-tauri/Cargo.toml index 6bd767ff..a04855c5 100644 --- a/desktop/src-tauri/Cargo.toml +++ b/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "claude-code-desktop" -version = "0.3.1" +version = "0.3.2" edition = "2021" [lib] diff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.json index 4e6bb22d..7fde82d1 100644 --- a/desktop/src-tauri/tauri.conf.json +++ b/desktop/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/nicegui/nicegui/main/nicegui/static/tauri-schema-v2.json", "productName": "Claude Code Haha", - "version": "0.3.1", + "version": "0.3.2", "identifier": "com.claude-code-haha.desktop", "build": { "frontendDist": "../dist", diff --git a/release-notes/v0.3.2.md b/release-notes/v0.3.2.md new file mode 100644 index 00000000..7bd317d5 --- /dev/null +++ b/release-notes/v0.3.2.md @@ -0,0 +1,39 @@ +# Claude Code Haha v0.3.2 + +这是一个围绕**桌面 Workbench、内置浏览器预览、网页圈选编辑、富媒体上下文和长会话可读性**的版本。 + +相比 `v0.3.1`,本次把右侧区域升级为 Workbench,并打通链接、本地文件、变更文件、图片视频和网页元素选择的预览/打开链路;同时继续修复桌面会话权限、发送快捷键、provider 图片兼容、Mermaid、消息操作条和长会话性能问题。 + +## Highlights + +- **右侧 Workbench + 内置浏览器**:右侧面板支持 Files / Browser 切换,带地址栏、加载状态、child webview 生命周期和窗口边界同步。 +- **预览与 Open With 更完整**:助手输出、变更文件、workspace 文件、localhost、本地绝对路径和 `/preview-fs` / `/local-file` 都能走统一预览或 Open With 动作。 +- **网页圈选编辑链路**:Browser 页面支持元素选择、截图、编辑气泡、标注区域和干净的 composer 回填,适合把网页局部修改请求直接交给 Agent。 +- **图片、视频和本地文件上下文更稳**:图片附件避免被当成普通路径 Read;助手输出的视频可内联播放;OpenAI / DeepSeek 对图片 schema 的兼容恢复更完整。 +- **Activity 与会话级设置**:新增 Activity profile 和用量热力图;reasoning effort、permission mode、定时任务 bypass 权限都按会话或任务语义收敛。 +- **长会话和 Markdown 可读性继续打磨**:Mermaid 大图可读性、消息 hover 区域、任务进度隐藏、session list 内存压力和 WebKit 离屏绘制都有针对性修复。 + +## Fixes + +- 修复桌面 provider 流可能永久卡在 running、确认弹窗被权限阻塞、Enter 误发送、图片附件触发 Read 失败等问题。 +- 修复 MCP 设置和历史会话导航中 spinner、旧请求覆盖、空白历史、长会话列表扫描和缓存失效导致的响应性问题。 +- 修复 Markdown / diff / Mermaid 在深色主题、流式输出和大图场景下的可读性问题。 +- 修复消息操作条 hover 命中区过大、点击后不收起、inline 图片 gallery hover 互相干扰等细节。 +- 修复 Open With 菜单在变更文件、workspace 文件和完成消息中的入口过重、菜单不翻转或未真正打开编辑器的问题。 +- 修复 OpenAI 文本模型拒绝图片、DeepSeek 不接受 `image_url`、synthetic business error 未本地化等 provider 兼容问题。 +- 修复 preview selection 截图标记跑出视口、小目标被 badge 遮挡、Activity profile 编辑按钮进入截图等问题。 +- 修复桌面更新检查阻塞 UI、空 `agentTaskNotifications` 导致滚动重渲染、已隐藏任务进度重新出现等稳定性问题。 + +## Notes + +- GitHub Release 正文继续以 `release-notes/v0.3.2.md` 作为来源。 +- 本版本包含 Tauri multi-webview、preview bridge、local file serving、Open With 和 provider 图片转换相关变化;发布前建议重点 smoke 一次 Workbench Browser、网页圈选、图片/视频预览、Open With、Activity 和长会话滚动。 +- 发布前可先运行 `bun run scripts/release.ts 0.3.2 --dry` 检查版本和 release note 对齐,再跑 `bun run verify`。 + +## macOS + +首次打开如果提示"已损坏"或"无法验证开发者",请执行: + +```bash +xattr -cr /Applications/Claude\ Code\ Haha.app +``` diff --git a/scripts/quality-gate/persistence-upgrade.ts b/scripts/quality-gate/persistence-upgrade.ts index 9057917b..f91cafcf 100644 --- a/scripts/quality-gate/persistence-upgrade.ts +++ b/scripts/quality-gate/persistence-upgrade.ts @@ -14,7 +14,7 @@ const checks: Check[] = [ }, { title: 'Desktop localStorage migrations', - command: ['bun', 'run', 'test', '--', 'src/lib/persistenceMigrations.test.ts'], + command: ['bun', 'run', 'test', '--', '--run', 'src/lib/persistenceMigrations.test.ts'], cwd: 'desktop', }, ]