Skip to content

Commit c80a6d0

Browse files
chore: 切换到 bun publish,修复 husky 路径问题,调整 diff 折叠距离,导出 VoiceContext
- 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
1 parent a05242c commit c80a6d0

4 files changed

Lines changed: 8 additions & 11 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ jobs:
2424
with:
2525
ref: ${{ github.event.inputs.version || github.ref }}
2626

27-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6, 2026-04-25
28-
with:
29-
node-version: "24"
30-
registry-url: "https://registry.npmjs.org"
31-
3227
- name: Setup Bun
3328
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2, 2026-04-25
3429
with:
@@ -43,9 +38,9 @@ jobs:
4338
run: bun test
4439

4540
- name: Publish to npm
46-
run: npm publish --provenance --access public
41+
run: bun publish --access public
4742
env:
48-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
BUN_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
4944

5045
- name: Generate changelog
5146
id: changelog

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-code-best",
3-
"version": "2.4.4",
3+
"version": "2.4.5",
44
"description": "Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal",
55
"type": "module",
66
"author": "claude-code-best <claude-code-best@proton.me>",
@@ -53,7 +53,7 @@
5353
"format": "biome format --write .",
5454
"check": "biome check .",
5555
"check:fix": "biome check --fix .",
56-
"prepare": "husky",
56+
"prepare": "bunx husky",
5757
"test": "bun test",
5858
"test:production": "bun run scripts/production-test.ts",
5959
"test:production:offline": "bun run scripts/production-test.ts --offline",

src/components/Messages.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,9 @@ const MessagesImpl = ({
798798

799799
// Collapse diffs for messages beyond the latest N messages.
800800
// verbose (ctrl+o) overrides and always shows full diffs.
801-
const DIFF_COLLAPSE_DISTANCE = 0;
801+
// 0 was too aggressive — tool results are never the last message (assistant
802+
// text follows), so diffs were always collapsed. 3 keeps recent edits visible.
803+
const DIFF_COLLAPSE_DISTANCE = 3;
802804
const shouldCollapseDiffs = renderableMessages.length - 1 - index > DIFF_COLLAPSE_DISTANCE;
803805

804806
const k = messageKey(msg);

src/context/voice.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const DEFAULT_STATE: VoiceState = {
1919

2020
type VoiceStore = Store<VoiceState>;
2121

22-
const VoiceContext = createContext<VoiceStore | null>(null);
22+
export const VoiceContext = createContext<VoiceStore | null>(null);
2323

2424
type Props = {
2525
children: React.ReactNode;

0 commit comments

Comments
 (0)