fix: statusbar 狀態 atom 的 plugin 名稱改為 jsc-statusbar,修正改名後寫入被拒、額度與 ctx 全部顯示破折號,版本升至 0.0.3

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
root
2026-10-13 14:06:18 +00:00
co-authored by Claude Sonnet 5.5
parent ddcc633d93
commit 369c6ab7e4
4 changed files with 9 additions and 9 deletions
@@ -1,6 +1,6 @@
{
"name": "jsc-statusbar",
"version": "0.0.2",
"version": "0.0.3",
"description": "輸入框上方的單行狀態列:模型、目錄、分支、5h/7d 額度與重置、context、CPU/記憶體/磁碟",
"license": "MIT",
"types": "./types/index.d.ts",
+1 -1
View File
@@ -103,7 +103,7 @@ describe('band', () => {
view: {},
}
for (const surface of ['terminal', 'desktop'] as const) {
const ui = await $.ui.mount({ plugin: 'statusbar', surface, component: 'AbovePrompt', props })
const ui = await $.ui.mount({ plugin: 'jsc-statusbar', surface, component: 'AbovePrompt', props })
expect(await ui.find({ type: 'Text', text: /◆ Opus 5\.5/ })).toBeDefined()
expect(await ui.find({ type: 'Text', text: /5h —/ })).toBeDefined()
await ui.unmount()
+6 -6
View File
@@ -5,12 +5,12 @@ import type { Mode, Sys, Usage } from '../types'
import { fit, cpuPercent, parseCpu, parseDf, parseGit, parseMem, parseOffset } from './format'
import type { CpuSample } from './format'
const usageAtom = atom({ plugin: 'statusbar', key: 'usage' } as const, {})
const gitAtom = atom({ plugin: 'statusbar', key: 'git' } as const, null)
const sysAtom = atom({ plugin: 'statusbar', key: 'sys' } as const, {})
const modeAtom = atom({ plugin: 'statusbar', key: 'mode' } as const, 'auto')
const alertedAtom = atom({ plugin: 'statusbar', key: 'alerted' } as const, [])
const effortAtom = atom({ plugin: 'statusbar', key: 'effort' } as const, null)
const usageAtom = atom({ plugin: 'jsc-statusbar', key: 'usage' } as const, {})
const gitAtom = atom({ plugin: 'jsc-statusbar', key: 'git' } as const, null)
const sysAtom = atom({ plugin: 'jsc-statusbar', key: 'sys' } as const, {})
const modeAtom = atom({ plugin: 'jsc-statusbar', key: 'mode' } as const, 'auto')
const alertedAtom = atom({ plugin: 'jsc-statusbar', key: 'alerted' } as const, [])
const effortAtom = atom({ plugin: 'jsc-statusbar', key: 'effort' } as const, null)
const SYS_MS = 3000
const GIT_MS = 15_000
+1 -1
View File
@@ -16,7 +16,7 @@ export type Mode = 'auto' | 'compact' | 'off'
declare module 'claude-code' {
interface PluginState {
statusbar: {
'jsc-statusbar': {
usage: Usage
git: Git | null
sys: Sys