@punkcode/cli 0.1.22 → 0.1.23

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.
@@ -10,7 +10,7 @@ import {
10
10
  signIn,
11
11
  usePunkStore,
12
12
  version
13
- } from "./chunk-4FFAG2HK.js";
13
+ } from "./chunk-2M6GXAAB.js";
14
14
 
15
15
  // src/ui/App.tsx
16
16
  import { useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/version.ts
4
- var version = "0.1.22";
4
+ var version = "0.1.23";
5
5
 
6
6
  // src/lib/auth.ts
7
7
  import fs from "fs";
@@ -643,6 +643,13 @@ async function listSessions(workingDirectory) {
643
643
  return [];
644
644
  }
645
645
  }
646
+ async function listRecentSessions(limit = 200) {
647
+ try {
648
+ return await sdkListSessions({ limit });
649
+ } catch {
650
+ return [];
651
+ }
652
+ }
646
653
  var TOOL_RESULT_PREVIEW_BYTES = 2048;
647
654
  var ANSI_RE = /\u001b\[\d*m/g;
648
655
  function stripAnsi(text) {
@@ -1241,6 +1248,9 @@ var PunkConnection = class {
1241
1248
  socket.on("list-sessions", (msg) => {
1242
1249
  if (msg.type === "list-sessions") this.handleListSessions(msg);
1243
1250
  });
1251
+ socket.on("session:list-recent", (msg) => {
1252
+ if (msg.type === "session:list-recent") void this.handleListRecentSessions(msg);
1253
+ });
1244
1254
  socket.on("get-context", (msg) => {
1245
1255
  if (msg.type === "get-context") this.handleGetContext(msg);
1246
1256
  });
@@ -1372,6 +1382,10 @@ var PunkConnection = class {
1372
1382
  this.store.getState().addActivity({ icon: "\u2717", message: "Session cancelled", sessionId: id });
1373
1383
  }
1374
1384
  }
1385
+ async handleListRecentSessions(msg) {
1386
+ const sessions = await listRecentSessions(msg.limit);
1387
+ this.send("response", { type: "session:recent", sessions, requestId: msg.id });
1388
+ }
1375
1389
  async handleListSessions(msg) {
1376
1390
  const workingDirectory = msg.workingDirectory ?? this.defaultCwd;
1377
1391
  const sessions = await listSessions(workingDirectory);
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  refreshIdToken,
9
9
  signIn,
10
10
  version
11
- } from "./chunk-4FFAG2HK.js";
11
+ } from "./chunk-2M6GXAAB.js";
12
12
 
13
13
  // src/cli.ts
14
14
  import { program } from "commander";
@@ -141,7 +141,7 @@ async function runHeadless(server, idToken, options) {
141
141
  async function runTui(server, options) {
142
142
  const { render } = await import("ink");
143
143
  const { createElement } = await import("react");
144
- const { App } = await import("./App-RF23NIE6.js");
144
+ const { App } = await import("./App-5XKHGVXM.js");
145
145
  const idToken = options.token ? options.token : void 0;
146
146
  process.stdout.write("\x1B[?1049h");
147
147
  process.stdout.write("\x1B[H");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punkcode/cli",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Control Claude Code from your phone",
5
5
  "type": "module",
6
6
  "bin": {