mirror of
https://github.com/tiennm99/ccstatusline.git
synced 2026-10-14 16:17:01 +00:00
Change install to use padding: 0
This commit is contained in:
1 parent
a8fafafadb
commit
925c2d1858
2 files changed
+5
-3
No files matched your search
@@ -43,7 +43,9 @@ 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@latest';
|
||||
// Check if command is correct AND padding is 0 (or undefined for new installs)
|
||||
return settings.statusLine?.command === 'npx -y ccstatusline@latest' &&
|
||||
(settings.statusLine.padding === 0 || settings.statusLine.padding === undefined);
|
||||
}
|
||||
|
||||
export async function installStatusLine(): Promise<void> {
|
||||
@@ -53,7 +55,7 @@ export async function installStatusLine(): Promise<void> {
|
||||
settings.statusLine = {
|
||||
type: 'command',
|
||||
command: 'npx -y ccstatusline@latest',
|
||||
padding: 1
|
||||
padding: 0
|
||||
};
|
||||
|
||||
await saveClaudeSettings(settings);
|
||||
|
||||
+1
-1
@@ -530,7 +530,7 @@ const App: React.FC = () => {
|
||||
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?';
|
||||
message = 'ccstatusline is already installed in ~/.claude/settings.json\nUpdate it with the latest options?';
|
||||
} else {
|
||||
message = 'This will modify ~/.claude/settings.json to add ccstatusline.\nContinue?';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user