pennyrouter 0.1.19 โ†’ 0.1.20

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/statusline.js +13 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pennyrouter",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Install and manage PennyRouter local coding-agent integrations.",
5
5
  "homepage": "https://pennyrouter.com",
6
6
  "bugs": {
package/src/statusline.js CHANGED
@@ -153,13 +153,25 @@ function authSuffix(mode) {
153
153
  return mode === "sub" || mode === "byok" ? " (" + mode + ")" : "";
154
154
  }
155
155
 
156
+ // Teammate badges (@penny ask). Rendered from the STRUCTURED fields, not the gateway's
157
+ // prebuilt \`label\` โ€” this line is composed here (and may be appended to a wrap_command's
158
+ // output), so the client owns the layout. ๐Ÿ“จ = questions waiting on you; ๐Ÿ“ฌ = an answer came
159
+ // back to you. Both absent on an older gateway, which renders nothing.
160
+ function askBadges(c) {
161
+ if (!c) return "";
162
+ let out = "";
163
+ if (c.asks_open > 0) out += " ยท ๐Ÿ“จ " + c.asks_open;
164
+ if (c.answers_fresh > 0) out += " ยท ๐Ÿ“ฌ " + c.answers_fresh;
165
+ return out;
166
+ }
167
+
156
168
  let penny;
157
169
  if (!pennyInstalled) {
158
170
  penny = "๐Ÿช™ penny off";
159
171
  } else if (cache && cache.known && cache.bypass) {
160
172
  penny = "๐Ÿช™ penny off";
161
173
  } else {
162
- penny = "๐Ÿช™ penny" + authSuffix(cache && cache.auth_mode);
174
+ penny = "๐Ÿช™ penny" + authSuffix(cache && cache.auth_mode) + askBadges(cache);
163
175
  }
164
176
 
165
177
  let lines;