free-pi-cli 0.4.1 → 0.4.2

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/dist/index.js CHANGED
@@ -27,4 +27,4 @@ if (err) {
27
27
  console.error(err);
28
28
  process.exit(1);
29
29
  }
30
- await import("./main-r8jqgh5n.js");
30
+ await import("./main-37kszx0y.js");
@@ -44,7 +44,7 @@ function openBrowser(url, platform = process.platform, spawnImpl = spawn) {
44
44
  // package.json
45
45
  var package_default = {
46
46
  name: "free-pi-cli",
47
- version: "0.4.1",
47
+ version: "0.4.2",
48
48
  description: "Free, ad-supported distribution of the pi coding agent. Inference paid for by ads.",
49
49
  license: "MIT",
50
50
  type: "module",
@@ -6351,8 +6351,30 @@ function registerBugAutocomplete(pi) {
6351
6351
  });
6352
6352
  }
6353
6353
 
6354
+ // src/footer-align.ts
6355
+ var ANSI = /\x1b\[[0-9;]*m/g;
6356
+ var SIMPLE = /^[\x20-\x7e\xa0-\xff]*$/;
6357
+ function installFooterRightAlign(mode) {
6358
+ const footer = mode.footer;
6359
+ const render = footer.render.bind(footer);
6360
+ footer.render = (w) => {
6361
+ const lines = render(w);
6362
+ if (lines.length <= 2)
6363
+ return lines;
6364
+ const last = lines[lines.length - 1];
6365
+ const text = last.replace(ANSI, "");
6366
+ if (!SIMPLE.test(text))
6367
+ return lines;
6368
+ return [...lines.slice(0, -1), " ".repeat(Math.max(0, w - text.length)) + last];
6369
+ };
6370
+ }
6371
+
6354
6372
  // src/changelog.ts
6355
6373
  var CHANGELOG_HIGHLIGHTS = [
6374
+ {
6375
+ version: "0.4.2",
6376
+ highlights: ["Credits now sit on the right of the footer, under the model name."]
6377
+ },
6356
6378
  {
6357
6379
  version: "0.4.1",
6358
6380
  highlights: [
@@ -6961,6 +6983,7 @@ async function launchPi(opts) {
6961
6983
  initialMessages: []
6962
6984
  });
6963
6985
  installBugHandler(mode, { baseUrl: opts.baseUrl, getToken: () => opts.jwt });
6986
+ installFooterRightAlign(mode);
6964
6987
  await mode.run();
6965
6988
  return sm.getSessionId();
6966
6989
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-pi-cli",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Free, ad-supported distribution of the pi coding agent. Inference paid for by ads.",
5
5
  "license": "MIT",
6
6
  "type": "module",