pennyrouter 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/state.js +6 -1
- package/src/statusline.js +3 -2
package/package.json
CHANGED
package/src/state.js
CHANGED
|
@@ -8,7 +8,12 @@ export function homeDir() {
|
|
|
8
8
|
|
|
9
9
|
export function expandHome(path) {
|
|
10
10
|
if (path === "~") return homeDir();
|
|
11
|
-
|
|
11
|
+
// Accept both "~/..." and Windows "~\\..." — compactHome preserves whatever
|
|
12
|
+
// separator the platform's absolute path used, so a manifest written on Windows
|
|
13
|
+
// stores config paths as "~\\.claude\\settings.json". Matching only "~/" here
|
|
14
|
+
// let those fall through unexpanded, so read/write hit a literal "~" directory
|
|
15
|
+
// in the cwd instead of the real home. join() normalizes separators.
|
|
16
|
+
if (path.startsWith("~/") || path.startsWith("~\\")) return join(homeDir(), path.slice(2));
|
|
12
17
|
return path;
|
|
13
18
|
}
|
|
14
19
|
|
package/src/statusline.js
CHANGED
|
@@ -187,10 +187,11 @@ if (lines.length === 0) {
|
|
|
187
187
|
lines[0] = lines[0].trimEnd() + " | " + penny;
|
|
188
188
|
}
|
|
189
189
|
// Ambient tip: the gateway rotates cache.tip on a slow clock (see tips.statusline_tip).
|
|
190
|
-
// Rendered as its own
|
|
190
|
+
// Rendered as its own soft light-green line: visible without competing with the brighter
|
|
191
|
+
// model/context status above it. Absent field
|
|
191
192
|
// (tips off, old gateway, bypass) renders nothing.
|
|
192
193
|
if (pennyInstalled && cache && cache.tip && !cache.bypass) {
|
|
193
|
-
lines.push("\\x1b[
|
|
194
|
+
lines.push("\\x1b[38;5;114m" + cache.tip + "\\x1b[0m");
|
|
194
195
|
}
|
|
195
196
|
console.log(lines.join("\\n"));
|
|
196
197
|
`;
|