@agimon-ai/po-git 0.0.0-alpha.65 → 0.0.0-alpha.67

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.
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_worktreeOperations = require("../worktreeOperations-C1ygq-Na.cjs");
5
+ const require_worktreeOperations = require("../worktreeOperations-CD7s0YnO.cjs");
6
6
  let node_fs_promises = require("node:fs/promises");
7
7
  node_fs_promises = require_worktreeOperations.__toESM(node_fs_promises, 1);
8
8
  let node_path = require("node:path");
@@ -2006,11 +2006,15 @@ function sameList(left, right) {
2006
2006
  return other !== void 0 && entry.id === other.id && entry.branch === other.branch && entry.sessionId === other.sessionId && entry.orphaned === other.orphaned && entry.unowned === other.unowned;
2007
2007
  });
2008
2008
  }
2009
- function errorTargetFor(command) {
2010
- return command.action === "create" ? { action: "create" } : {
2009
+ function errorTargetFor(command, error) {
2010
+ if (command.action === "close") return {
2011
2011
  action: "close",
2012
2012
  id: command.id
2013
2013
  };
2014
+ return error instanceof require_worktreeOperations.PoGitExpectedError && error.code === "rift_missing" ? {
2015
+ action: "create",
2016
+ riftMissing: true
2017
+ } : { action: "create" };
2014
2018
  }
2015
2019
  /** A command the page sent, or undefined when the frame was not one. */
2016
2020
  function parseCommand(payload) {
@@ -2198,7 +2202,7 @@ function createWorktreesChannel(options = {}) {
2198
2202
  }).catch((error) => {
2199
2203
  if (generations.get(scope.sessionId) !== generation) return;
2200
2204
  host.onNotice(`worktree command failed for ${scope.sessionId} (${failureText(error)})`);
2201
- mark(scope, void 0, failureText(error), errorTargetFor(command));
2205
+ mark(scope, void 0, failureText(error), errorTargetFor(command, error));
2202
2206
  }).finally(() => {
2203
2207
  if (generations.get(scope.sessionId) === generation) busy.delete(scope.sessionId);
2204
2208
  });