fix: statusline setup nudge honors CLAUDE_CONFIG_DIR (#338)
The activation hook detects a missing statusline in getClaudeDir()/settings.json (CLAUDE_CONFIG_DIR-aware) but the nudge text told the user and the agent to add the statusLine config to ~/.claude/settings.json. With CLAUDE_CONFIG_DIR set, that is the wrong file: Claude Code never reads it and the badge never turns on. Point the nudge at the settingsPath the hook already computed, in both the shell-safe and manual branches. Fixes #250
This commit is contained in:
parent
988428d510
commit
f790cebb57
|
|
@ -66,7 +66,7 @@ if (!isCodex && !isCopilot) try {
|
|||
output += "\n\n" +
|
||||
"STATUSLINE SETUP NEEDED: The ponytail plugin includes a statusline badge showing active mode " +
|
||||
"(e.g. [PONYTAIL], [PONYTAIL:ULTRA]). It is not configured yet. " +
|
||||
"To enable, add this to ~/.claude/settings.json: " +
|
||||
"To enable, add this to " + settingsPath + ": " +
|
||||
statusLineSnippet + " " +
|
||||
"Proactively offer to set this up for the user on first interaction.";
|
||||
} else {
|
||||
|
|
@ -76,7 +76,7 @@ if (!isCodex && !isCopilot) try {
|
|||
"STATUSLINE SETUP NEEDED: The ponytail plugin includes a statusline badge showing active mode. " +
|
||||
"Its install path contains characters unsafe to embed in a shell command, so configure it manually: " +
|
||||
"add a statusLine command of type \"command\" that runs " + scriptName +
|
||||
" from the plugin's hooks directory to ~/.claude/settings.json, quoting/escaping the path for your shell. " +
|
||||
" from the plugin's hooks directory to " + settingsPath + ", quoting/escaping the path for your shell. " +
|
||||
"Proactively offer to set this up for the user on first interaction.";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,6 +133,12 @@ assert.equal(
|
|||
false,
|
||||
'flag must not land in ~/.claude when CLAUDE_CONFIG_DIR is set',
|
||||
);
|
||||
// The statusline setup nudge must point at the configured settings.json, not a
|
||||
// hardcoded ~/.claude (issue #250).
|
||||
assert.ok(
|
||||
result.stdout.includes(path.join(customConfigDir, 'settings.json')),
|
||||
'statusline nudge must reference the CLAUDE_CONFIG_DIR settings.json',
|
||||
);
|
||||
|
||||
const copilotData = path.join(temp, 'copilot-data');
|
||||
const codexData = path.join(temp, 'codex-data-shadow');
|
||||
|
|
|
|||
Loading…
Reference in New Issue