@staff0rd/assist 0.264.0 → 0.264.1

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/dist/index.js +26 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.264.0",
9
+ version: "0.264.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -17663,44 +17663,53 @@ function makeStatusChangeHandler(dismiss, notify2, spawnRun2) {
17663
17663
 
17664
17664
  // src/commands/sessions/daemon/restoreSession.ts
17665
17665
  function restoreSession(id, persisted) {
17666
+ const base = {
17667
+ id,
17668
+ name: persisted.name,
17669
+ commandType: persisted.commandType,
17670
+ scrollback: "",
17671
+ idleTimer: null,
17672
+ lastResizeAt: 0,
17673
+ cwd: persisted.cwd,
17674
+ assistArgs: persisted.assistArgs
17675
+ };
17676
+ if (isBacklogRun(persisted)) {
17677
+ return {
17678
+ ...base,
17679
+ status: "running",
17680
+ startedAt: Date.now(),
17681
+ pty: spawnPty(["assist", ...persisted.assistArgs], persisted.cwd, id),
17682
+ restored: true,
17683
+ activity: persisted.activity
17684
+ };
17685
+ }
17666
17686
  if (persisted.commandType !== "run" && persisted.claudeSessionId) {
17667
17687
  return {
17668
- id,
17669
- name: persisted.name,
17670
- commandType: persisted.commandType,
17688
+ ...base,
17671
17689
  status: "running",
17672
17690
  startedAt: Date.now(),
17673
17691
  pty: spawnClaude2({
17674
17692
  resumeSessionId: persisted.claudeSessionId,
17675
17693
  cwd: persisted.cwd
17676
17694
  }),
17677
- scrollback: "",
17678
- idleTimer: null,
17679
- lastResizeAt: 0,
17680
- assistArgs: persisted.assistArgs,
17681
- cwd: persisted.cwd,
17682
17695
  claudeSessionId: persisted.claudeSessionId,
17683
17696
  restored: true,
17684
17697
  activity: persisted.activity
17685
17698
  };
17686
17699
  }
17687
17700
  return {
17688
- id,
17689
- name: persisted.name,
17690
- commandType: persisted.commandType,
17701
+ ...base,
17691
17702
  status: "done",
17692
17703
  startedAt: persisted.startedAt,
17693
17704
  pty: null,
17694
- scrollback: "",
17695
- idleTimer: null,
17696
- lastResizeAt: 0,
17697
17705
  runName: persisted.runName,
17698
17706
  runArgs: persisted.runArgs,
17699
- assistArgs: persisted.assistArgs,
17700
- cwd: persisted.cwd,
17701
17707
  restored: false
17702
17708
  };
17703
17709
  }
17710
+ function isBacklogRun(persisted) {
17711
+ return persisted.commandType === "assist" && persisted.assistArgs?.[0] === "backlog" && persisted.assistArgs?.[1] === "run";
17712
+ }
17704
17713
 
17705
17714
  // src/commands/sessions/daemon/resumeSession.ts
17706
17715
  function resumeSession(id, sessionId, cwd, name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.264.0",
3
+ "version": "0.264.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {