From c80a6d062be717213f7236b713577b3d23a5df19 Mon Sep 17 00:00:00 2001 From: claude-code-best Date: Wed, 20 May 2026 09:25:22 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=88=87=E6=8D=A2=E5=88=B0=20bun=20pu?= =?UTF-8?q?blish=EF=BC=8C=E4=BF=AE=E5=A4=8D=20husky=20=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E8=B0=83=E6=95=B4=20diff=20?= =?UTF-8?q?=E6=8A=98=E5=8F=A0=E8=B7=9D=E7=A6=BB=EF=BC=8C=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=20VoiceContext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - publish-npm.yml: npm publish → bun publish,移除 setup-node,使用 BUN_CONFIG_TOKEN - package.json: prepare 脚本 husky → bunx husky,版本 2.4.4 → 2.4.5 - Messages.tsx: DIFF_COLLAPSE_DISTANCE 从 0 改为 3,避免 diff 过度折叠 - voice.tsx: 导出 VoiceContext --- .github/workflows/publish-npm.yml | 9 ++------- package.json | 4 ++-- src/components/Messages.tsx | 4 +++- src/context/voice.tsx | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 351e107cf..42141a38e 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -24,11 +24,6 @@ jobs: with: ref: ${{ github.event.inputs.version || github.ref }} - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6, 2026-04-25 - with: - node-version: "24" - registry-url: "https://registry.npmjs.org" - - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2, 2026-04-25 with: @@ -43,9 +38,9 @@ jobs: run: bun test - name: Publish to npm - run: npm publish --provenance --access public + run: bun publish --access public env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + BUN_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Generate changelog id: changelog diff --git a/package.json b/package.json index fd8422e1b..3451012cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "claude-code-best", - "version": "2.4.4", + "version": "2.4.5", "description": "Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal", "type": "module", "author": "claude-code-best ", @@ -53,7 +53,7 @@ "format": "biome format --write .", "check": "biome check .", "check:fix": "biome check --fix .", - "prepare": "husky", + "prepare": "bunx husky", "test": "bun test", "test:production": "bun run scripts/production-test.ts", "test:production:offline": "bun run scripts/production-test.ts --offline", diff --git a/src/components/Messages.tsx b/src/components/Messages.tsx index c7d4eb671..53211d21f 100644 --- a/src/components/Messages.tsx +++ b/src/components/Messages.tsx @@ -798,7 +798,9 @@ const MessagesImpl = ({ // Collapse diffs for messages beyond the latest N messages. // verbose (ctrl+o) overrides and always shows full diffs. - const DIFF_COLLAPSE_DISTANCE = 0; + // 0 was too aggressive — tool results are never the last message (assistant + // text follows), so diffs were always collapsed. 3 keeps recent edits visible. + const DIFF_COLLAPSE_DISTANCE = 3; const shouldCollapseDiffs = renderableMessages.length - 1 - index > DIFF_COLLAPSE_DISTANCE; const k = messageKey(msg); diff --git a/src/context/voice.tsx b/src/context/voice.tsx index 3e2b38f40..5bb9debdf 100644 --- a/src/context/voice.tsx +++ b/src/context/voice.tsx @@ -19,7 +19,7 @@ const DEFAULT_STATE: VoiceState = { type VoiceStore = Store; -const VoiceContext = createContext(null); +export const VoiceContext = createContext(null); type Props = { children: React.ReactNode;