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:
co-authored by
Claude Sonnet 5.5
parent
ddcc633d93
commit
369c6ab7e4
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc-statusbar",
|
"name": "jsc-statusbar",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"description": "輸入框上方的單行狀態列:模型、目錄、分支、5h/7d 額度與重置、context、CPU/記憶體/磁碟",
|
"description": "輸入框上方的單行狀態列:模型、目錄、分支、5h/7d 額度與重置、context、CPU/記憶體/磁碟",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"types": "./types/index.d.ts",
|
"types": "./types/index.d.ts",
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ describe('band', () => {
|
|||||||
view: {},
|
view: {},
|
||||||
}
|
}
|
||||||
for (const surface of ['terminal', 'desktop'] as const) {
|
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: /◆ Opus 5\.5/ })).toBeDefined()
|
||||||
expect(await ui.find({ type: 'Text', text: /5h —/ })).toBeDefined()
|
expect(await ui.find({ type: 'Text', text: /5h —/ })).toBeDefined()
|
||||||
await ui.unmount()
|
await ui.unmount()
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import type { Mode, Sys, Usage } from '../types'
|
|||||||
import { fit, cpuPercent, parseCpu, parseDf, parseGit, parseMem, parseOffset } from './format'
|
import { fit, cpuPercent, parseCpu, parseDf, parseGit, parseMem, parseOffset } from './format'
|
||||||
import type { CpuSample } from './format'
|
import type { CpuSample } from './format'
|
||||||
|
|
||||||
const usageAtom = atom({ plugin: 'statusbar', key: 'usage' } as const, {})
|
const usageAtom = atom({ plugin: 'jsc-statusbar', key: 'usage' } as const, {})
|
||||||
const gitAtom = atom({ plugin: 'statusbar', key: 'git' } as const, null)
|
const gitAtom = atom({ plugin: 'jsc-statusbar', key: 'git' } as const, null)
|
||||||
const sysAtom = atom({ plugin: 'statusbar', key: 'sys' } as const, {})
|
const sysAtom = atom({ plugin: 'jsc-statusbar', key: 'sys' } as const, {})
|
||||||
const modeAtom = atom({ plugin: 'statusbar', key: 'mode' } as const, 'auto')
|
const modeAtom = atom({ plugin: 'jsc-statusbar', key: 'mode' } as const, 'auto')
|
||||||
const alertedAtom = atom({ plugin: 'statusbar', key: 'alerted' } as const, [])
|
const alertedAtom = atom({ plugin: 'jsc-statusbar', key: 'alerted' } as const, [])
|
||||||
const effortAtom = atom({ plugin: 'statusbar', key: 'effort' } as const, null)
|
const effortAtom = atom({ plugin: 'jsc-statusbar', key: 'effort' } as const, null)
|
||||||
|
|
||||||
const SYS_MS = 3000
|
const SYS_MS = 3000
|
||||||
const GIT_MS = 15_000
|
const GIT_MS = 15_000
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ export type Mode = 'auto' | 'compact' | 'off'
|
|||||||
|
|
||||||
declare module 'claude-code' {
|
declare module 'claude-code' {
|
||||||
interface PluginState {
|
interface PluginState {
|
||||||
statusbar: {
|
'jsc-statusbar': {
|
||||||
usage: Usage
|
usage: Usage
|
||||||
git: Git | null
|
git: Git | null
|
||||||
sys: Sys
|
sys: Sys
|
||||||
|
|||||||
Reference in New Issue
Block a user