mirror of
https://github.com/tiennm99/ccstatusline.git
synced 2026-09-06 06:17:08 +00:00
Modify to use @latest
This commit is contained in:
@@ -16,7 +16,7 @@ No installation needed! Use directly with npx:
|
||||
|
||||
```bash
|
||||
# Run the configuration TUI
|
||||
npx ccstatusline
|
||||
npx ccstatusline@latest
|
||||
```
|
||||
|
||||
## Setup
|
||||
@@ -26,7 +26,7 @@ npx ccstatusline
|
||||
Run the interactive configuration tool:
|
||||
|
||||
```bash
|
||||
npx ccstatusline
|
||||
npx ccstatusline@latest
|
||||
```
|
||||
|
||||
This launches a TUI where you can:
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ccstatusline",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "A customizable status line formatter for Claude Code CLI",
|
||||
"module": "src/ccstatusline.ts",
|
||||
"type": "module",
|
||||
|
||||
@@ -43,25 +43,25 @@ export async function saveClaudeSettings(settings: ClaudeSettings): Promise<void
|
||||
|
||||
export async function isInstalled(): Promise<boolean> {
|
||||
const settings = await loadClaudeSettings();
|
||||
return settings.statusLine?.command === 'npx -y ccstatusline';
|
||||
return settings.statusLine?.command === 'npx -y ccstatusline@latest';
|
||||
}
|
||||
|
||||
export async function installStatusLine(): Promise<void> {
|
||||
const settings = await loadClaudeSettings();
|
||||
|
||||
|
||||
// Update settings with our status line (confirmation already handled in TUI)
|
||||
settings.statusLine = {
|
||||
type: 'command',
|
||||
command: 'npx -y ccstatusline',
|
||||
command: 'npx -y ccstatusline@latest',
|
||||
padding: 1
|
||||
};
|
||||
|
||||
|
||||
await saveClaudeSettings(settings);
|
||||
}
|
||||
|
||||
export async function uninstallStatusLine(): Promise<void> {
|
||||
const settings = await loadClaudeSettings();
|
||||
|
||||
|
||||
if (settings.statusLine) {
|
||||
delete settings.statusLine;
|
||||
await saveClaudeSettings(settings);
|
||||
|
||||
+3
-3
@@ -527,9 +527,9 @@ const App: React.FC = () => {
|
||||
const existing = await getExistingStatusLine();
|
||||
let message: string;
|
||||
|
||||
if (existing && existing !== 'npx -y ccstatusline') {
|
||||
message = `This will modify ~/.claude/settings.json\n\nA status line is already configured: "${existing}"\nReplace it with npx -y ccstatusline?`;
|
||||
} else if (existing === 'npx -y ccstatusline') {
|
||||
if (existing && existing !== 'npx -y ccstatusline@latest') {
|
||||
message = `This will modify ~/.claude/settings.json\n\nA status line is already configured: "${existing}"\nReplace it with npx -y ccstatusline@latest?`;
|
||||
} else if (existing === 'npx -y ccstatusline@latest') {
|
||||
message = 'ccstatusline is already installed in ~/.claude/settings.json\nReinstall it?';
|
||||
} else {
|
||||
message = 'This will modify ~/.claude/settings.json to add ccstatusline.\nContinue?';
|
||||
|
||||
Reference in New Issue
Block a user