@henryqw/pi-herdr-clone 0.2.6 → 0.2.7

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.
@@ -129,14 +129,12 @@ async function createBranchedClone(
129
129
  const createdClone = session.createBranchedSession(source.leafId);
130
130
  if (!createdClone) throw new Error("Pi did not create a persisted clone session file.");
131
131
  const cloneFile = resolve(createdClone);
132
- let cloneStat;
133
132
  try {
134
- cloneStat = await stat(cloneFile);
133
+ if ((await stat(cloneFile)).isFile()) return cloneFile;
135
134
  } catch (error) {
136
135
  throw new Error(`Pi clone session file was not created: ${cloneFile}`, { cause: error });
137
136
  }
138
- if (!cloneStat.isFile()) throw new Error(`Pi clone session path is not a file: ${cloneFile}`);
139
- return cloneFile;
137
+ throw new Error(`Pi clone session path is not a file: ${cloneFile}`);
140
138
  }
141
139
 
142
140
  // A worktree layout plugin (e.g. herdr-plus) can start its own agent in a new
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-herdr-clone",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Clone the current Pi conversation path into a new Herdr tab.",
5
5
  "keywords": [
6
6
  "pi-package",