claude-maestro 0.1.21 → 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.
Files changed (28) hide show
  1. package/out/main/index.js +313 -29
  2. package/out/preload/index.js +8 -1
  3. package/out/renderer/assets/{index-Bf87-cF0.js → index-3xTQW6mE.js} +5 -5
  4. package/out/renderer/assets/{index-DroXAl3A.js → index-B-yxP0lP.js} +1 -1
  5. package/out/renderer/assets/{index-C3_9l5Zo.js → index-B30bhZbu.js} +2 -2
  6. package/out/renderer/assets/{index-DD6EoqPp.js → index-BDHkFxx6.js} +2 -2
  7. package/out/renderer/assets/{index-kJ0KF5bI.js → index-BIwBfhPk.js} +2 -2
  8. package/out/renderer/assets/{index-Cfvyl_8T.js → index-BKvwH0TK.js} +3 -3
  9. package/out/renderer/assets/{index-DGNONcNh.js → index-BX47FB7e.js} +3 -3
  10. package/out/renderer/assets/{index-CIAp39oC.js → index-BlwNwTsP.js} +2 -2
  11. package/out/renderer/assets/{index-Bm6BMufC.js → index-ByVJrO1u.js} +2 -2
  12. package/out/renderer/assets/{index-Bw6wDwNB.js → index-C8pOtVhi.js} +2 -2
  13. package/out/renderer/assets/{index-iIulTEbp.js → index-CGyGFDvb.js} +5 -5
  14. package/out/renderer/assets/{index-DzjUOrFM.js → index-CdMsY_a8.js} +5 -5
  15. package/out/renderer/assets/{index-CdG7xnB7.js → index-Ce5ZMPFL.js} +2 -2
  16. package/out/renderer/assets/{index-Uh6FxvAQ.js → index-CgYg-Rwh.js} +329 -53
  17. package/out/renderer/assets/{index-CTyPr1hG.css → index-DFTUs-Bf.css} +126 -1
  18. package/out/renderer/assets/{index-D9lxbtli.js → index-DLZ9KBr_.js} +5 -5
  19. package/out/renderer/assets/{index-C2wfbMG1.js → index-DSzGVyZR.js} +2 -2
  20. package/out/renderer/assets/{index-BPiKmKfX.js → index-DilMbkSp.js} +5 -5
  21. package/out/renderer/assets/{index-BDJGybQo.js → index-DwuBzjPV.js} +2 -2
  22. package/out/renderer/assets/{index-Ck4WZgFA.js → index-DyMtiIII.js} +2 -2
  23. package/out/renderer/assets/{index-CZmL3oq-.js → index-I6gteObT.js} +5 -5
  24. package/out/renderer/assets/{index-BDxfkk76.js → index-c4Ddyscc.js} +2 -2
  25. package/out/renderer/assets/{index-CYo0nynQ.js → index-ca-bRyvC.js} +4 -4
  26. package/out/renderer/assets/{index-BNIPHMhg.js → index-gn8sOd6r.js} +2 -2
  27. package/out/renderer/index.html +2 -2
  28. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Ck4WZgFA.js","./index-DroXAl3A.js","./index-C3_9l5Zo.js","./index-kJ0KF5bI.js","./index-C2wfbMG1.js","./index-CYo0nynQ.js","./index-BDxfkk76.js","./index-CdG7xnB7.js","./index-CZmL3oq-.js","./index-DD6EoqPp.js","./index-DGNONcNh.js","./index-BPiKmKfX.js","./index-D9lxbtli.js","./index-iIulTEbp.js","./index-Bm6BMufC.js","./index-BDJGybQo.js","./index-Cfvyl_8T.js","./index-BNIPHMhg.js","./index-CIAp39oC.js","./index-Bw6wDwNB.js","./dockerfile-Bvk733Ga.js","./simple-mode-DMneyfDu.js","./factor-CMxFHDqz.js","./nsis-3zG7tgur.js","./pug-CTXt1f8z.js","./javascript-C_OHM9hj.js","./index-DzjUOrFM.js","./index-Bf87-cF0.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DyMtiIII.js","./index-B-yxP0lP.js","./index-B30bhZbu.js","./index-BIwBfhPk.js","./index-DSzGVyZR.js","./index-ca-bRyvC.js","./index-c4Ddyscc.js","./index-Ce5ZMPFL.js","./index-I6gteObT.js","./index-BDHkFxx6.js","./index-BX47FB7e.js","./index-DilMbkSp.js","./index-DLZ9KBr_.js","./index-CGyGFDvb.js","./index-ByVJrO1u.js","./index-DwuBzjPV.js","./index-BKvwH0TK.js","./index-gn8sOd6r.js","./index-BlwNwTsP.js","./index-C8pOtVhi.js","./dockerfile-Bvk733Ga.js","./simple-mode-DMneyfDu.js","./factor-CMxFHDqz.js","./nsis-3zG7tgur.js","./pug-CTXt1f8z.js","./javascript-C_OHM9hj.js","./index-CdMsY_a8.js","./index-3xTQW6mE.js"])))=>i.map(i=>d[i]);
2
2
  function getDefaultExportFromCjs(x2) {
3
3
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
4
4
  }
@@ -7596,6 +7596,22 @@ Use ✕ on the task to clean it up.`
7596
7596
  );
7597
7597
  return;
7598
7598
  }
7599
+ if (state.baseBranchBusyPath) {
7600
+ window.alert(
7601
+ `Can't merge into "${wt.baseBranch}" right now: that branch is checked out in another worktree:
7602
+
7603
+ ${state.baseBranchBusyPath}
7604
+
7605
+ Git can't switch the base repo (${wt.baseFolder}) to "${wt.baseBranch}" while it's busy there. Close that worktree (or merge from it), then try again.`
7606
+ );
7607
+ return;
7608
+ }
7609
+ if (state.baseDirty > 0) {
7610
+ window.alert(
7611
+ `Can't merge into "${wt.baseBranch}" right now: the base repo (${wt.baseFolder}) has ${state.baseDirty} uncommitted file(s). Commit, stash, or checkpoint them there first, so the merge can't clobber your work.`
7612
+ );
7613
+ return;
7614
+ }
7599
7615
  let commitFirst = false;
7600
7616
  if (state.dirty > 0) {
7601
7617
  commitFirst = window.confirm(
@@ -7687,6 +7703,68 @@ No running claude terminal found in the parent session — resolve the conflicts
7687
7703
  }
7688
7704
  window.alert(`Merge failed:
7689
7705
 
7706
+ ${result.output}`);
7707
+ },
7708
+ async checkoutBranch(sessionId, branch) {
7709
+ const result = await window.api.gitCheckout(sessionId, branch);
7710
+ if (result.ok) {
7711
+ get().showNotice(`Switched to "${branch}".`, "success");
7712
+ get().refreshGit();
7713
+ return;
7714
+ }
7715
+ if (result.reason === "dirty") {
7716
+ get().showNotice(result.output, "warn");
7717
+ return;
7718
+ }
7719
+ window.alert(`Couldn't switch to "${branch}":
7720
+
7721
+ ${result.output}`);
7722
+ },
7723
+ async createBranch(sessionId) {
7724
+ const name2 = window.prompt("New branch name (created off the current branch):")?.trim();
7725
+ if (!name2) return;
7726
+ const result = await window.api.gitCreateBranch(sessionId, name2);
7727
+ if (result.ok) {
7728
+ get().showNotice(`Created and switched to "${name2}".`, "success");
7729
+ get().refreshGit();
7730
+ return;
7731
+ }
7732
+ if (result.reason === "dirty") {
7733
+ get().showNotice(result.output, "warn");
7734
+ return;
7735
+ }
7736
+ window.alert(`Couldn't create "${name2}":
7737
+
7738
+ ${result.output}`);
7739
+ },
7740
+ async deleteBranch(sessionId, branch) {
7741
+ if (!window.confirm(`Delete local branch "${branch}"? This can't be undone.`)) return;
7742
+ const result = await window.api.gitDeleteBranch(sessionId, branch);
7743
+ if (result.ok) {
7744
+ get().showNotice(`Deleted "${branch}".`, "success");
7745
+ get().refreshGit();
7746
+ return;
7747
+ }
7748
+ window.alert(`Couldn't delete "${branch}":
7749
+
7750
+ ${result.output}`);
7751
+ },
7752
+ async openBranchPr(sessionId) {
7753
+ const result = await window.api.gitCreateBranchPr(sessionId);
7754
+ if (result.ok) {
7755
+ const existed = result.alreadyExists ? "A pull request already exists" : "Opened a pull request";
7756
+ get().showNotice(`${existed}.`, "success");
7757
+ if (result.url && window.confirm(`${existed}:
7758
+
7759
+ ${result.url}
7760
+
7761
+ Open it in your browser?`)) {
7762
+ window.api.openExternal(result.url);
7763
+ }
7764
+ return;
7765
+ }
7766
+ window.alert(`Couldn't open the pull request:
7767
+
7690
7768
  ${result.output}`);
7691
7769
  },
7692
7770
  async removeWorktreeTask(sessionId) {
@@ -7724,7 +7802,14 @@ ${err.message}`);
7724
7802
  try {
7725
7803
  state = await window.api.worktreeState(sessionId);
7726
7804
  } catch {
7727
- state = { folderExists: false, dirty: -1, ahead: -1, conflictFiles: null };
7805
+ state = {
7806
+ folderExists: false,
7807
+ dirty: -1,
7808
+ ahead: -1,
7809
+ conflictFiles: null,
7810
+ baseDirty: -1,
7811
+ baseBranchBusyPath: null
7812
+ };
7728
7813
  }
7729
7814
  set((st2) => {
7730
7815
  const worktreeChecking = { ...st2.worktreeChecking };
@@ -10164,6 +10249,7 @@ ${err.message}`);
10164
10249
  /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "btn", disabled: busy, onClick: () => void onInit(), children: busy ? "Initializing…" : "Initialize repository" })
10165
10250
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10166
10251
  /* @__PURE__ */ jsxRuntimeExports.jsx(StatusChips$1, { status }),
10252
+ /* @__PURE__ */ jsxRuntimeExports.jsx(GitHubAccountPicker, { sessionId: id, nonce: gitNonce }),
10167
10253
  files.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "git-files", children: files.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsx(ChangedFile, { file: f, onOpen: () => openDiff(id, f.path) }, f.path)) }),
10168
10254
  checkpoints.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "git-checkpoints", children: [
10169
10255
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "git-subhead", children: "Checkpoints" }),
@@ -10237,6 +10323,45 @@ ${c2.subject}`,
10237
10323
  ] })
10238
10324
  ] });
10239
10325
  }
10326
+ function GitHubAccountPicker({
10327
+ sessionId,
10328
+ nonce
10329
+ }) {
10330
+ const [info, setInfo] = reactExports.useState(
10331
+ null
10332
+ );
10333
+ reactExports.useEffect(() => {
10334
+ let cancelled = false;
10335
+ void window.api.githubRepoInfo(sessionId).then((i) => {
10336
+ if (!cancelled) setInfo(i);
10337
+ });
10338
+ return () => {
10339
+ cancelled = true;
10340
+ };
10341
+ }, [sessionId, nonce]);
10342
+ if (!info || !info.slug || info.accounts.length === 0) return null;
10343
+ const currentValue = info.current ? `${info.current.host}
10344
+ ${info.current.login}` : "";
10345
+ const onChange = async (value) => {
10346
+ const account = value ? { host: value.split("\n")[0], login: value.split("\n")[1] } : null;
10347
+ await window.api.githubSetRepoAccount(info.slug, account);
10348
+ setInfo({ ...info, current: account });
10349
+ };
10350
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "git-gh-account", title: `Pushes & PRs for ${info.slug} use this GitHub account`, children: [
10351
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "git-gh-account-label", children: "GitHub account" }),
10352
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("select", { value: currentValue, onChange: (e) => void onChange(e.target.value), children: [
10353
+ /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "Default (gh active account)" }),
10354
+ info.accounts.map((a) => /* @__PURE__ */ jsxRuntimeExports.jsxs("option", { value: `${a.host}
10355
+ ${a.login}`, children: [
10356
+ a.login,
10357
+ " @ ",
10358
+ a.host,
10359
+ a.active ? " (active)" : ""
10360
+ ] }, `${a.host}
10361
+ ${a.login}`))
10362
+ ] })
10363
+ ] });
10364
+ }
10240
10365
  function GitRefs({ refs }) {
10241
10366
  const parts = refs.split(",").map((r) => r.trim().replace(/^HEAD -> /, "")).filter(Boolean);
10242
10367
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: parts.map((r) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `git-ref${r.startsWith("tag: ") ? " tag" : ""}`, children: r.replace(/^tag: /, "") }, r)) });
@@ -39059,7 +39184,7 @@ function legacy(parser) {
39059
39184
  return new LanguageSupport(StreamLanguage.define(parser));
39060
39185
  }
39061
39186
  function sql(dialectName) {
39062
- return __vitePreload(() => import("./index-Ck4WZgFA.js"), true ? __vite__mapDeps([0,1]) : void 0, import.meta.url).then((m2) => m2.sql({ dialect: m2[dialectName] }));
39187
+ return __vitePreload(() => import("./index-DyMtiIII.js"), true ? __vite__mapDeps([0,1]) : void 0, import.meta.url).then((m2) => m2.sql({ dialect: m2[dialectName] }));
39063
39188
  }
39064
39189
  const languages = [
39065
39190
  // New-style language modes
@@ -39067,7 +39192,7 @@ const languages = [
39067
39192
  name: "C",
39068
39193
  extensions: ["c", "h", "ino"],
39069
39194
  load() {
39070
- return __vitePreload(() => import("./index-C3_9l5Zo.js"), true ? __vite__mapDeps([2,1]) : void 0, import.meta.url).then((m2) => m2.cpp());
39195
+ return __vitePreload(() => import("./index-B30bhZbu.js"), true ? __vite__mapDeps([2,1]) : void 0, import.meta.url).then((m2) => m2.cpp());
39071
39196
  }
39072
39197
  }),
39073
39198
  /* @__PURE__ */ LanguageDescription.of({
@@ -39075,7 +39200,7 @@ const languages = [
39075
39200
  alias: ["cpp"],
39076
39201
  extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
39077
39202
  load() {
39078
- return __vitePreload(() => import("./index-C3_9l5Zo.js"), true ? __vite__mapDeps([2,1]) : void 0, import.meta.url).then((m2) => m2.cpp());
39203
+ return __vitePreload(() => import("./index-B30bhZbu.js"), true ? __vite__mapDeps([2,1]) : void 0, import.meta.url).then((m2) => m2.cpp());
39079
39204
  }
39080
39205
  }),
39081
39206
  /* @__PURE__ */ LanguageDescription.of({
@@ -39090,14 +39215,14 @@ const languages = [
39090
39215
  name: "CSS",
39091
39216
  extensions: ["css"],
39092
39217
  load() {
39093
- return __vitePreload(() => import("./index-kJ0KF5bI.js"), true ? __vite__mapDeps([3,1]) : void 0, import.meta.url).then((m2) => m2.css());
39218
+ return __vitePreload(() => import("./index-BIwBfhPk.js"), true ? __vite__mapDeps([3,1]) : void 0, import.meta.url).then((m2) => m2.css());
39094
39219
  }
39095
39220
  }),
39096
39221
  /* @__PURE__ */ LanguageDescription.of({
39097
39222
  name: "Go",
39098
39223
  extensions: ["go"],
39099
39224
  load() {
39100
- return __vitePreload(() => import("./index-C2wfbMG1.js"), true ? __vite__mapDeps([4,1]) : void 0, import.meta.url).then((m2) => m2.go());
39225
+ return __vitePreload(() => import("./index-DSzGVyZR.js"), true ? __vite__mapDeps([4,1]) : void 0, import.meta.url).then((m2) => m2.go());
39101
39226
  }
39102
39227
  }),
39103
39228
  /* @__PURE__ */ LanguageDescription.of({
@@ -39105,14 +39230,14 @@ const languages = [
39105
39230
  alias: ["xhtml"],
39106
39231
  extensions: ["html", "htm", "handlebars", "hbs"],
39107
39232
  load() {
39108
- return __vitePreload(() => import("./index-CYo0nynQ.js"), true ? __vite__mapDeps([5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.html());
39233
+ return __vitePreload(() => import("./index-ca-bRyvC.js"), true ? __vite__mapDeps([5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.html());
39109
39234
  }
39110
39235
  }),
39111
39236
  /* @__PURE__ */ LanguageDescription.of({
39112
39237
  name: "Java",
39113
39238
  extensions: ["java"],
39114
39239
  load() {
39115
- return __vitePreload(() => import("./index-CdG7xnB7.js"), true ? __vite__mapDeps([7,1]) : void 0, import.meta.url).then((m2) => m2.java());
39240
+ return __vitePreload(() => import("./index-Ce5ZMPFL.js"), true ? __vite__mapDeps([7,1]) : void 0, import.meta.url).then((m2) => m2.java());
39116
39241
  }
39117
39242
  }),
39118
39243
  /* @__PURE__ */ LanguageDescription.of({
@@ -39120,14 +39245,14 @@ const languages = [
39120
39245
  alias: ["ecmascript", "js", "node"],
39121
39246
  extensions: ["js", "mjs", "cjs"],
39122
39247
  load() {
39123
- return __vitePreload(() => import("./index-BDxfkk76.js"), true ? __vite__mapDeps([6,1]) : void 0, import.meta.url).then((m2) => m2.javascript());
39248
+ return __vitePreload(() => import("./index-c4Ddyscc.js"), true ? __vite__mapDeps([6,1]) : void 0, import.meta.url).then((m2) => m2.javascript());
39124
39249
  }
39125
39250
  }),
39126
39251
  /* @__PURE__ */ LanguageDescription.of({
39127
39252
  name: "Jinja",
39128
39253
  extensions: ["j2", "jinja", "jinja2"],
39129
39254
  load() {
39130
- return __vitePreload(() => import("./index-CZmL3oq-.js"), true ? __vite__mapDeps([8,5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.jinja());
39255
+ return __vitePreload(() => import("./index-I6gteObT.js"), true ? __vite__mapDeps([8,5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.jinja());
39131
39256
  }
39132
39257
  }),
39133
39258
  /* @__PURE__ */ LanguageDescription.of({
@@ -39135,28 +39260,28 @@ const languages = [
39135
39260
  alias: ["json5"],
39136
39261
  extensions: ["json", "map"],
39137
39262
  load() {
39138
- return __vitePreload(() => import("./index-DD6EoqPp.js"), true ? __vite__mapDeps([9,1]) : void 0, import.meta.url).then((m2) => m2.json());
39263
+ return __vitePreload(() => import("./index-BDHkFxx6.js"), true ? __vite__mapDeps([9,1]) : void 0, import.meta.url).then((m2) => m2.json());
39139
39264
  }
39140
39265
  }),
39141
39266
  /* @__PURE__ */ LanguageDescription.of({
39142
39267
  name: "JSX",
39143
39268
  extensions: ["jsx"],
39144
39269
  load() {
39145
- return __vitePreload(() => import("./index-BDxfkk76.js"), true ? __vite__mapDeps([6,1]) : void 0, import.meta.url).then((m2) => m2.javascript({ jsx: true }));
39270
+ return __vitePreload(() => import("./index-c4Ddyscc.js"), true ? __vite__mapDeps([6,1]) : void 0, import.meta.url).then((m2) => m2.javascript({ jsx: true }));
39146
39271
  }
39147
39272
  }),
39148
39273
  /* @__PURE__ */ LanguageDescription.of({
39149
39274
  name: "LESS",
39150
39275
  extensions: ["less"],
39151
39276
  load() {
39152
- return __vitePreload(() => import("./index-DGNONcNh.js"), true ? __vite__mapDeps([10,3,1]) : void 0, import.meta.url).then((m2) => m2.less());
39277
+ return __vitePreload(() => import("./index-BX47FB7e.js"), true ? __vite__mapDeps([10,3,1]) : void 0, import.meta.url).then((m2) => m2.less());
39153
39278
  }
39154
39279
  }),
39155
39280
  /* @__PURE__ */ LanguageDescription.of({
39156
39281
  name: "Liquid",
39157
39282
  extensions: ["liquid"],
39158
39283
  load() {
39159
- return __vitePreload(() => import("./index-BPiKmKfX.js"), true ? __vite__mapDeps([11,5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.liquid());
39284
+ return __vitePreload(() => import("./index-DilMbkSp.js"), true ? __vite__mapDeps([11,5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.liquid());
39160
39285
  }
39161
39286
  }),
39162
39287
  /* @__PURE__ */ LanguageDescription.of({
@@ -39169,7 +39294,7 @@ const languages = [
39169
39294
  name: "Markdown",
39170
39295
  extensions: ["md", "markdown", "mkd"],
39171
39296
  load() {
39172
- return __vitePreload(() => import("./index-D9lxbtli.js"), true ? __vite__mapDeps([12,5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.markdown());
39297
+ return __vitePreload(() => import("./index-DLZ9KBr_.js"), true ? __vite__mapDeps([12,5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.markdown());
39173
39298
  }
39174
39299
  }),
39175
39300
  /* @__PURE__ */ LanguageDescription.of({
@@ -39188,7 +39313,7 @@ const languages = [
39188
39313
  name: "PHP",
39189
39314
  extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
39190
39315
  load() {
39191
- return __vitePreload(() => import("./index-iIulTEbp.js"), true ? __vite__mapDeps([13,1,5,3,6]) : void 0, import.meta.url).then((m2) => m2.php());
39316
+ return __vitePreload(() => import("./index-CGyGFDvb.js"), true ? __vite__mapDeps([13,1,5,3,6]) : void 0, import.meta.url).then((m2) => m2.php());
39192
39317
  }
39193
39318
  }),
39194
39319
  /* @__PURE__ */ LanguageDescription.of({
@@ -39209,28 +39334,28 @@ const languages = [
39209
39334
  extensions: ["BUILD", "bzl", "py", "pyw"],
39210
39335
  filename: /^(BUCK|BUILD)$/,
39211
39336
  load() {
39212
- return __vitePreload(() => import("./index-Bm6BMufC.js"), true ? __vite__mapDeps([14,1]) : void 0, import.meta.url).then((m2) => m2.python());
39337
+ return __vitePreload(() => import("./index-ByVJrO1u.js"), true ? __vite__mapDeps([14,1]) : void 0, import.meta.url).then((m2) => m2.python());
39213
39338
  }
39214
39339
  }),
39215
39340
  /* @__PURE__ */ LanguageDescription.of({
39216
39341
  name: "Rust",
39217
39342
  extensions: ["rs"],
39218
39343
  load() {
39219
- return __vitePreload(() => import("./index-BDJGybQo.js"), true ? __vite__mapDeps([15,1]) : void 0, import.meta.url).then((m2) => m2.rust());
39344
+ return __vitePreload(() => import("./index-DwuBzjPV.js"), true ? __vite__mapDeps([15,1]) : void 0, import.meta.url).then((m2) => m2.rust());
39220
39345
  }
39221
39346
  }),
39222
39347
  /* @__PURE__ */ LanguageDescription.of({
39223
39348
  name: "Sass",
39224
39349
  extensions: ["sass"],
39225
39350
  load() {
39226
- return __vitePreload(() => import("./index-Cfvyl_8T.js"), true ? __vite__mapDeps([16,1,3]) : void 0, import.meta.url).then((m2) => m2.sass({ indented: true }));
39351
+ return __vitePreload(() => import("./index-BKvwH0TK.js"), true ? __vite__mapDeps([16,1,3]) : void 0, import.meta.url).then((m2) => m2.sass({ indented: true }));
39227
39352
  }
39228
39353
  }),
39229
39354
  /* @__PURE__ */ LanguageDescription.of({
39230
39355
  name: "SCSS",
39231
39356
  extensions: ["scss"],
39232
39357
  load() {
39233
- return __vitePreload(() => import("./index-Cfvyl_8T.js"), true ? __vite__mapDeps([16,1,3]) : void 0, import.meta.url).then((m2) => m2.sass());
39358
+ return __vitePreload(() => import("./index-BKvwH0TK.js"), true ? __vite__mapDeps([16,1,3]) : void 0, import.meta.url).then((m2) => m2.sass());
39234
39359
  }
39235
39360
  }),
39236
39361
  /* @__PURE__ */ LanguageDescription.of({
@@ -39250,7 +39375,7 @@ const languages = [
39250
39375
  name: "TSX",
39251
39376
  extensions: ["tsx"],
39252
39377
  load() {
39253
- return __vitePreload(() => import("./index-BDxfkk76.js"), true ? __vite__mapDeps([6,1]) : void 0, import.meta.url).then((m2) => m2.javascript({ jsx: true, typescript: true }));
39378
+ return __vitePreload(() => import("./index-c4Ddyscc.js"), true ? __vite__mapDeps([6,1]) : void 0, import.meta.url).then((m2) => m2.javascript({ jsx: true, typescript: true }));
39254
39379
  }
39255
39380
  }),
39256
39381
  /* @__PURE__ */ LanguageDescription.of({
@@ -39258,14 +39383,14 @@ const languages = [
39258
39383
  alias: ["ts"],
39259
39384
  extensions: ["ts", "mts", "cts"],
39260
39385
  load() {
39261
- return __vitePreload(() => import("./index-BDxfkk76.js"), true ? __vite__mapDeps([6,1]) : void 0, import.meta.url).then((m2) => m2.javascript({ typescript: true }));
39386
+ return __vitePreload(() => import("./index-c4Ddyscc.js"), true ? __vite__mapDeps([6,1]) : void 0, import.meta.url).then((m2) => m2.javascript({ typescript: true }));
39262
39387
  }
39263
39388
  }),
39264
39389
  /* @__PURE__ */ LanguageDescription.of({
39265
39390
  name: "WebAssembly",
39266
39391
  extensions: ["wat", "wast"],
39267
39392
  load() {
39268
- return __vitePreload(() => import("./index-BNIPHMhg.js"), true ? __vite__mapDeps([17,1]) : void 0, import.meta.url).then((m2) => m2.wast());
39393
+ return __vitePreload(() => import("./index-gn8sOd6r.js"), true ? __vite__mapDeps([17,1]) : void 0, import.meta.url).then((m2) => m2.wast());
39269
39394
  }
39270
39395
  }),
39271
39396
  /* @__PURE__ */ LanguageDescription.of({
@@ -39273,7 +39398,7 @@ const languages = [
39273
39398
  alias: ["rss", "wsdl", "xsd"],
39274
39399
  extensions: ["xml", "xsl", "xsd", "svg"],
39275
39400
  load() {
39276
- return __vitePreload(() => import("./index-CIAp39oC.js"), true ? __vite__mapDeps([18,1]) : void 0, import.meta.url).then((m2) => m2.xml());
39401
+ return __vitePreload(() => import("./index-BlwNwTsP.js"), true ? __vite__mapDeps([18,1]) : void 0, import.meta.url).then((m2) => m2.xml());
39277
39402
  }
39278
39403
  }),
39279
39404
  /* @__PURE__ */ LanguageDescription.of({
@@ -39281,7 +39406,7 @@ const languages = [
39281
39406
  alias: ["yml"],
39282
39407
  extensions: ["yaml", "yml"],
39283
39408
  load() {
39284
- return __vitePreload(() => import("./index-Bw6wDwNB.js"), true ? __vite__mapDeps([19,1]) : void 0, import.meta.url).then((m2) => m2.yaml());
39409
+ return __vitePreload(() => import("./index-C8pOtVhi.js"), true ? __vite__mapDeps([19,1]) : void 0, import.meta.url).then((m2) => m2.yaml());
39285
39410
  }
39286
39411
  }),
39287
39412
  // Legacy modes ported from CodeMirror 5
@@ -40070,13 +40195,13 @@ const languages = [
40070
40195
  name: "Vue",
40071
40196
  extensions: ["vue"],
40072
40197
  load() {
40073
- return __vitePreload(() => import("./index-DzjUOrFM.js"), true ? __vite__mapDeps([26,5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.vue());
40198
+ return __vitePreload(() => import("./index-CdMsY_a8.js"), true ? __vite__mapDeps([26,5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.vue());
40074
40199
  }
40075
40200
  }),
40076
40201
  /* @__PURE__ */ LanguageDescription.of({
40077
40202
  name: "Angular Template",
40078
40203
  load() {
40079
- return __vitePreload(() => import("./index-Bf87-cF0.js"), true ? __vite__mapDeps([27,5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.angular());
40204
+ return __vitePreload(() => import("./index-3xTQW6mE.js"), true ? __vite__mapDeps([27,5,1,3,6]) : void 0, import.meta.url).then((m2) => m2.angular());
40080
40205
  }
40081
40206
  })
40082
40207
  ];
@@ -43039,6 +43164,57 @@ function BudgetTab() {
43039
43164
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "field-hint", children: "Leave a budget blank (or 0) to disable it — no progress bar and no alerts. When a budget is set, the Usage widget shows a progress bar and a notification fires at the threshold and again at 100%." })
43040
43165
  ] });
43041
43166
  }
43167
+ function GitHubAccountsTab() {
43168
+ const settings = useStore((s) => s.settings);
43169
+ const reloadSettings = useStore((s) => s.reloadSettings);
43170
+ const [accounts, setAccounts] = reactExports.useState(null);
43171
+ reactExports.useEffect(() => {
43172
+ let live = true;
43173
+ void window.api.githubListAccounts().then((a) => {
43174
+ if (live) setAccounts(a);
43175
+ });
43176
+ return () => {
43177
+ live = false;
43178
+ };
43179
+ }, []);
43180
+ const mappings = Object.entries(settings?.githubRepoAccounts ?? {});
43181
+ async function clearMapping(slug) {
43182
+ await window.api.githubSetRepoAccount(slug, null);
43183
+ await reloadSettings();
43184
+ }
43185
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "settings-body github-tab", children: [
43186
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "appearance-section", children: [
43187
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: "Logged-in accounts" }),
43188
+ accounts === null ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "field-hint", children: "Checking the GitHub CLI…" }) : accounts.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "field-hint", children: [
43189
+ "No GitHub accounts found. Run ",
43190
+ /* @__PURE__ */ jsxRuntimeExports.jsx("code", { children: "gh auth login" }),
43191
+ " in a terminal for each account you want to use (and ",
43192
+ /* @__PURE__ */ jsxRuntimeExports.jsx("code", { children: "gh auth setup-git" }),
43193
+ " once so pushes use the right credentials), then reopen this dialog."
43194
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "github-account-list", children: accounts.map((a) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
43195
+ /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: a.login }),
43196
+ " ",
43197
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "muted", children: [
43198
+ "@ ",
43199
+ a.host
43200
+ ] }),
43201
+ a.active && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "github-active-badge", children: " active" })
43202
+ ] }, `${a.host}/${a.login}`)) })
43203
+ ] }),
43204
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "appearance-section", children: [
43205
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: "Per-repo account" }),
43206
+ mappings.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "field-hint", children: "No repositories are mapped to a specific account yet. Open the Git panel for a repo and pick its GitHub account there — every push and PR from that repo will then use it." }) : /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "github-mapping-list", children: mappings.map(([slug, acc]) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
43207
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "github-mapping-slug", children: slug }),
43208
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "muted", children: [
43209
+ acc.login,
43210
+ " @ ",
43211
+ acc.host
43212
+ ] }),
43213
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "link-button", onClick: () => void clearMapping(slug), children: "Clear" })
43214
+ ] }, slug)) })
43215
+ ] })
43216
+ ] });
43217
+ }
43042
43218
  function SettingsDialog() {
43043
43219
  const close = useStore((s) => s.closeSettings);
43044
43220
  const initialTab = useStore((s) => s.settingsTab);
@@ -43077,12 +43253,21 @@ function SettingsDialog() {
43077
43253
  onClick: () => setTab("budget"),
43078
43254
  children: "Spend budget"
43079
43255
  }
43256
+ ),
43257
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
43258
+ "button",
43259
+ {
43260
+ className: `settings-tab${tab === "github" ? " active" : ""}`,
43261
+ onClick: () => setTab("github"),
43262
+ children: "GitHub accounts"
43263
+ }
43080
43264
  )
43081
43265
  ] }),
43082
43266
  tab === "categories" && /* @__PURE__ */ jsxRuntimeExports.jsx(CategoriesTab, {}),
43083
43267
  tab === "token-efficiency" && /* @__PURE__ */ jsxRuntimeExports.jsx(TokenEfficiencyTab, {}),
43084
43268
  tab === "appearance" && /* @__PURE__ */ jsxRuntimeExports.jsx(AppearanceTab, {}),
43085
- tab === "budget" && /* @__PURE__ */ jsxRuntimeExports.jsx(BudgetTab, {})
43269
+ tab === "budget" && /* @__PURE__ */ jsxRuntimeExports.jsx(BudgetTab, {}),
43270
+ tab === "github" && /* @__PURE__ */ jsxRuntimeExports.jsx(GitHubAccountsTab, {})
43086
43271
  ] }) });
43087
43272
  }
43088
43273
  function slugify(text2) {
@@ -43715,13 +43900,25 @@ function MergeBadge({ sessionId, worktree }) {
43715
43900
  if (!state) kind = "checking";
43716
43901
  else if (!state.folderExists || state.ahead < 0) kind = "unknown";
43717
43902
  else if (state.ahead === 0) kind = "none";
43903
+ else if (state.baseBranchBusyPath) kind = "base-busy";
43904
+ else if (state.baseDirty > 0) kind = "base-dirty";
43718
43905
  else if (state.conflictFiles === null) kind = "unknown";
43719
43906
  else if (state.conflictFiles.length > 0) kind = "conflicts";
43720
43907
  else kind = "clean";
43721
43908
  const dirty = (state?.dirty ?? 0) > 0;
43722
- const label = kind === "checking" ? "…" : kind === "unknown" ? "unknown" : kind === "none" ? "no commits" : kind === "clean" ? "clean" : `conflicts (${state?.conflictFiles?.length ?? 0})`;
43909
+ const label = kind === "checking" ? "…" : kind === "unknown" ? "unknown" : kind === "none" ? "no commits" : kind === "base-busy" ? "base busy" : kind === "base-dirty" ? "base dirty" : kind === "clean" ? "clean" : `conflicts (${state?.conflictFiles?.length ?? 0})`;
43723
43910
  const lines = [];
43724
- if (kind === "conflicts" && state?.conflictFiles) {
43911
+ if (kind === "base-busy" && state) {
43912
+ lines.push(
43913
+ `"${worktree.baseBranch}" is checked out in another worktree, so the merge can't switch the base repo to it:`
43914
+ );
43915
+ lines.push(` ${state.baseBranchBusyPath}`);
43916
+ lines.push("Close that worktree (or merge from it) first.");
43917
+ } else if (kind === "base-dirty" && state) {
43918
+ lines.push(
43919
+ `The base repo has ${state.baseDirty} uncommitted file(s) — commit, stash, or checkpoint them before merging.`
43920
+ );
43921
+ } else if (kind === "conflicts" && state?.conflictFiles) {
43725
43922
  lines.push(`Merging ${worktree.branch} into ${worktree.baseBranch} would conflict in:`);
43726
43923
  for (const f of state.conflictFiles.slice(0, TOOLTIP_FILE_CAP)) lines.push(` ${f}`);
43727
43924
  if (state.conflictFiles.length > TOOLTIP_FILE_CAP) {
@@ -43756,6 +43953,82 @@ function MergeBadge({ sessionId, worktree }) {
43756
43953
  }
43757
43954
  );
43758
43955
  }
43956
+ function BranchSelector({ sessionId }) {
43957
+ const gitNonce = useStore((s) => s.gitNonce);
43958
+ const checkoutBranch = useStore((s) => s.checkoutBranch);
43959
+ const createBranch = useStore((s) => s.createBranch);
43960
+ const deleteBranch = useStore((s) => s.deleteBranch);
43961
+ const openBranchPr = useStore((s) => s.openBranchPr);
43962
+ const [listing, setListing] = reactExports.useState(null);
43963
+ const [selected, setSelected] = reactExports.useState("");
43964
+ reactExports.useEffect(() => {
43965
+ let cancelled = false;
43966
+ void window.api.gitBranches(sessionId).then((b2) => {
43967
+ if (cancelled) return;
43968
+ setListing(b2);
43969
+ setSelected(b2.current ?? "");
43970
+ });
43971
+ return () => {
43972
+ cancelled = true;
43973
+ };
43974
+ }, [sessionId, gitNonce]);
43975
+ if (!listing || listing.branches.length === 0) return null;
43976
+ const current = listing.current;
43977
+ const isOther = !!selected && selected !== current;
43978
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "session-branch", title: current ? `On branch ${current}` : "Detached HEAD", children: [
43979
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { icon: GitBranch, size: 12, className: "branch-mark" }),
43980
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
43981
+ "select",
43982
+ {
43983
+ value: selected,
43984
+ title: "Switch to, create, or pick a branch to manage",
43985
+ onChange: (e) => {
43986
+ const v2 = e.target.value;
43987
+ if (v2 === "__new__") {
43988
+ void createBranch(sessionId);
43989
+ setSelected(current ?? "");
43990
+ } else {
43991
+ setSelected(v2);
43992
+ }
43993
+ },
43994
+ children: [
43995
+ !current && /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "detached" }),
43996
+ listing.branches.map((b2) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: b2, children: b2 === current ? `${b2} (current)` : b2 }, b2)),
43997
+ /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "__new__", children: "+ new branch…" })
43998
+ ]
43999
+ }
44000
+ ),
44001
+ isOther && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
44002
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
44003
+ "button",
44004
+ {
44005
+ className: "btn ghost branch-act",
44006
+ title: `Check out "${selected}"`,
44007
+ onClick: () => void checkoutBranch(sessionId, selected),
44008
+ children: "Switch"
44009
+ }
44010
+ ),
44011
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
44012
+ "button",
44013
+ {
44014
+ className: "btn ghost branch-act",
44015
+ title: `Delete branch "${selected}"`,
44016
+ onClick: () => void deleteBranch(sessionId, selected),
44017
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { icon: Trash2, size: 12 })
44018
+ }
44019
+ )
44020
+ ] }),
44021
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
44022
+ "button",
44023
+ {
44024
+ className: "btn ghost branch-act",
44025
+ title: "Push the current branch and open a pull request",
44026
+ onClick: () => void openBranchPr(sessionId),
44027
+ children: "PR"
44028
+ }
44029
+ )
44030
+ ] });
44031
+ }
43759
44032
  function QueuePopover({
43760
44033
  session,
43761
44034
  anchor,
@@ -43965,28 +44238,31 @@ ${STATUS_LABEL[session.status]} · Ctrl+${index + 1}`,
43965
44238
  ]
43966
44239
  }
43967
44240
  )
43968
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
43969
- "span",
43970
- {
43971
- className: "session-category",
43972
- style: category?.color ? { color: category.color } : void 0,
43973
- children: [
43974
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "cat-dot", style: { background: category?.color ?? "var(--dim)" } }),
43975
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
43976
- "select",
43977
- {
43978
- value: session.config.categoryId ?? "",
43979
- title: "Repo category — changing it restarts the claude terminal",
43980
- onChange: (e) => void setSessionCategory(id, e.target.value || null),
43981
- children: [
43982
- /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "no category" }),
43983
- categories.map((c2) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: c2.id, children: c2.name }, c2.id))
43984
- ]
43985
- }
43986
- )
43987
- ]
43988
- }
43989
- ),
44241
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
44242
+ /* @__PURE__ */ jsxRuntimeExports.jsx(BranchSelector, { sessionId: id }),
44243
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
44244
+ "span",
44245
+ {
44246
+ className: "session-category",
44247
+ style: category?.color ? { color: category.color } : void 0,
44248
+ children: [
44249
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "cat-dot", style: { background: category?.color ?? "var(--dim)" } }),
44250
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
44251
+ "select",
44252
+ {
44253
+ value: session.config.categoryId ?? "",
44254
+ title: "Repo category — changing it restarts the claude terminal",
44255
+ onChange: (e) => void setSessionCategory(id, e.target.value || null),
44256
+ children: [
44257
+ /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "no category" }),
44258
+ categories.map((c2) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: c2.id, children: c2.name }, c2.id))
44259
+ ]
44260
+ }
44261
+ )
44262
+ ]
44263
+ }
44264
+ )
44265
+ ] }),
43990
44266
  session.terminals.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "session-termcount", children: [
43991
44267
  session.terminals.length,
43992
44268
  " terminals"