@hyperwindmill/caretaker-cli 0.19.0 → 0.20.0

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.
@@ -12755,11 +12755,11 @@
12755
12755
  });
12756
12756
 
12757
12757
  // src/standalone.tsx
12758
- var import_react19 = __toESM(require_react(), 1);
12758
+ var import_react20 = __toESM(require_react(), 1);
12759
12759
  var import_client = __toESM(require_client(), 1);
12760
12760
 
12761
12761
  // src/App.tsx
12762
- var import_react18 = __toESM(require_react(), 1);
12762
+ var import_react19 = __toESM(require_react(), 1);
12763
12763
 
12764
12764
  // src/MessageList.tsx
12765
12765
  var import_react4 = __toESM(require_react(), 1);
@@ -15911,7 +15911,7 @@ ${text}</tr>
15911
15911
  }
15912
15912
 
15913
15913
  // src/SettingsPanel.tsx
15914
- var import_react15 = __toESM(require_react(), 1);
15914
+ var import_react16 = __toESM(require_react(), 1);
15915
15915
 
15916
15916
  // src/ProvidersTab.tsx
15917
15917
  var import_react6 = __toESM(require_react(), 1);
@@ -16150,7 +16150,7 @@ ${text}</tr>
16150
16150
  }
16151
16151
 
16152
16152
  // src/ProjectsTabSettings.tsx
16153
- var import_react8 = __toESM(require_react(), 1);
16153
+ var import_react9 = __toESM(require_react(), 1);
16154
16154
 
16155
16155
  // src/FolderPicker.tsx
16156
16156
  var import_react7 = __toESM(require_react(), 1);
@@ -16369,24 +16369,110 @@ ${text}</tr>
16369
16369
  ] });
16370
16370
  }
16371
16371
 
16372
- // src/ProjectsTabSettings.tsx
16372
+ // src/project_form_utils.ts
16373
+ function validateRepositoryUrl(url) {
16374
+ const u = url.trim();
16375
+ if (!u) return null;
16376
+ if (u.startsWith("git@") || u.startsWith("ssh://")) {
16377
+ return "SSH remotes are not supported \u2014 use an https:// URL with an access token.";
16378
+ }
16379
+ if (!u.startsWith("https://")) return "Repository URL must start with https://";
16380
+ let parsed;
16381
+ try {
16382
+ parsed = new URL(u);
16383
+ } catch {
16384
+ return "Repository URL is not a valid URL.";
16385
+ }
16386
+ if (!parsed.hostname) return "Repository URL is not a valid URL.";
16387
+ if (parsed.username || parsed.password) {
16388
+ return "Do not put credentials in the repository URL \u2014 they would be stored in .git/config and visible in the process list. Use the access token field instead.";
16389
+ }
16390
+ return null;
16391
+ }
16392
+
16393
+ // src/ProjectRepoSync.tsx
16394
+ var import_react8 = __toESM(require_react(), 1);
16373
16395
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
16396
+ function badgeText(s) {
16397
+ if (s.state === "cloned") return s.branch ? `cloned: ${s.branch} @ ${s.commit ?? "?"}` : "cloned";
16398
+ if (s.state === "syncing") return "syncing\u2026";
16399
+ if (s.state === "broken") return "broken (will re-clone)";
16400
+ return "not cloned";
16401
+ }
16402
+ function ProjectRepoSync({ projectId }) {
16403
+ const [status, setStatus] = (0, import_react8.useState)(null);
16404
+ const [progress, setProgress] = (0, import_react8.useState)("");
16405
+ const [busy, setBusy] = (0, import_react8.useState)(false);
16406
+ const refresh = (0, import_react8.useCallback)(() => {
16407
+ fetch(`/api/projects/${projectId}/repo-status`).then((r) => r.ok ? r.json() : null).then(setStatus).catch(() => setStatus(null));
16408
+ }, [projectId]);
16409
+ (0, import_react8.useEffect)(refresh, [refresh]);
16410
+ const sync = async () => {
16411
+ setBusy(true);
16412
+ setProgress("");
16413
+ try {
16414
+ const res = await fetch(`/api/projects/${projectId}/sync`, { method: "POST" });
16415
+ if (res.status === 409) {
16416
+ setProgress("A sync is already running.");
16417
+ return;
16418
+ }
16419
+ if (!res.ok || !res.body) {
16420
+ setProgress(`Sync failed: HTTP ${res.status}`);
16421
+ return;
16422
+ }
16423
+ const reader = res.body.getReader();
16424
+ const decoder = new TextDecoder();
16425
+ let buf = "";
16426
+ for (; ; ) {
16427
+ const { done, value } = await reader.read();
16428
+ if (done) break;
16429
+ buf += decoder.decode(value, { stream: true });
16430
+ const lines = buf.split("\n");
16431
+ buf = lines.pop() ?? "";
16432
+ for (const line of lines) {
16433
+ if (!line.trim()) continue;
16434
+ try {
16435
+ const p = JSON.parse(line);
16436
+ setProgress(p.step === "error" ? `Sync failed: ${p.message}` : p.message);
16437
+ } catch {
16438
+ }
16439
+ }
16440
+ }
16441
+ } catch (err) {
16442
+ setProgress(`Sync failed: ${err instanceof Error ? err.message : String(err)}`);
16443
+ } finally {
16444
+ setBusy(false);
16445
+ refresh();
16446
+ }
16447
+ };
16448
+ if (status === null) return null;
16449
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginTop: "6px", flexWrap: "wrap" }, children: [
16450
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "settings-card__badge", children: busy ? "syncing\u2026" : badgeText(status) }),
16451
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { className: "btn btn--secondary btn--xs", onClick: sync, disabled: busy, children: status.state === "absent" ? "Clone now" : "Sync now" }),
16452
+ progress && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { style: { fontSize: "10px", opacity: 0.75, fontFamily: "var(--font-mono)" }, children: progress })
16453
+ ] });
16454
+ }
16455
+
16456
+ // src/ProjectsTabSettings.tsx
16457
+ var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
16374
16458
  function ProjectsTabSettings({ config, agents, postMessage }) {
16375
- const [editingProject, setEditingProject] = (0, import_react8.useState)(null);
16376
- const [isCreating, setIsCreating] = (0, import_react8.useState)(false);
16377
- const [name, setName] = (0, import_react8.useState)("");
16378
- const [description, setDescription] = (0, import_react8.useState)("");
16379
- const [workingDir, setWorkingDir] = (0, import_react8.useState)("");
16380
- const [agentId, setAgentId] = (0, import_react8.useState)("");
16381
- const [plannerAgentId, setPlannerAgentId] = (0, import_react8.useState)("");
16382
- const [reviewerAgentId, setReviewerAgentId] = (0, import_react8.useState)("");
16383
- const [planningEnabled, setPlanningEnabled] = (0, import_react8.useState)(null);
16384
- const [reviewEnabled, setReviewEnabled] = (0, import_react8.useState)(null);
16385
- const [sddEnabled, setSddEnabled] = (0, import_react8.useState)(null);
16386
- const [bootstrapText, setBootstrapText] = (0, import_react8.useState)("");
16387
- const [maxRunSecondsText, setMaxRunSecondsText] = (0, import_react8.useState)("");
16388
- const [dockerImage, setDockerImage] = (0, import_react8.useState)("");
16389
- const [errorMsg, setErrorMsg] = (0, import_react8.useState)(null);
16459
+ const [editingProject, setEditingProject] = (0, import_react9.useState)(null);
16460
+ const [isCreating, setIsCreating] = (0, import_react9.useState)(false);
16461
+ const [name, setName] = (0, import_react9.useState)("");
16462
+ const [description, setDescription] = (0, import_react9.useState)("");
16463
+ const [workingDir, setWorkingDir] = (0, import_react9.useState)("");
16464
+ const [agentId, setAgentId] = (0, import_react9.useState)("");
16465
+ const [plannerAgentId, setPlannerAgentId] = (0, import_react9.useState)("");
16466
+ const [reviewerAgentId, setReviewerAgentId] = (0, import_react9.useState)("");
16467
+ const [planningEnabled, setPlanningEnabled] = (0, import_react9.useState)(null);
16468
+ const [reviewEnabled, setReviewEnabled] = (0, import_react9.useState)(null);
16469
+ const [sddEnabled, setSddEnabled] = (0, import_react9.useState)(null);
16470
+ const [bootstrapText, setBootstrapText] = (0, import_react9.useState)("");
16471
+ const [maxRunSecondsText, setMaxRunSecondsText] = (0, import_react9.useState)("");
16472
+ const [dockerImage, setDockerImage] = (0, import_react9.useState)("");
16473
+ const [repositoryUrl, setRepositoryUrl] = (0, import_react9.useState)("");
16474
+ const [repositoryToken, setRepositoryToken] = (0, import_react9.useState)("");
16475
+ const [errorMsg, setErrorMsg] = (0, import_react9.useState)(null);
16390
16476
  const projects = config.projects || [];
16391
16477
  const startEdit = (proj) => {
16392
16478
  setEditingProject(proj);
@@ -16403,6 +16489,8 @@ ${text}</tr>
16403
16489
  setBootstrapText((proj.bootstrapCommands || []).join("\n"));
16404
16490
  setMaxRunSecondsText(proj.maxRunSeconds ? String(proj.maxRunSeconds) : "");
16405
16491
  setDockerImage(proj.dockerImage || "");
16492
+ setRepositoryUrl(proj.repositoryUrl || "");
16493
+ setRepositoryToken("");
16406
16494
  setErrorMsg(null);
16407
16495
  };
16408
16496
  const startCreate = () => {
@@ -16420,6 +16508,8 @@ ${text}</tr>
16420
16508
  setBootstrapText("");
16421
16509
  setMaxRunSecondsText("");
16422
16510
  setDockerImage("");
16511
+ setRepositoryUrl("");
16512
+ setRepositoryToken("");
16423
16513
  setErrorMsg(null);
16424
16514
  };
16425
16515
  const cancelForm = () => {
@@ -16435,8 +16525,14 @@ ${text}</tr>
16435
16525
  setErrorMsg("Project Name is required.");
16436
16526
  return;
16437
16527
  }
16438
- if (!trimmedDir) {
16439
- setErrorMsg("Local Working Directory Path is required.");
16528
+ const trimmedRepoUrl = repositoryUrl.trim();
16529
+ const repoUrlError = validateRepositoryUrl(trimmedRepoUrl);
16530
+ if (repoUrlError) {
16531
+ setErrorMsg(repoUrlError);
16532
+ return;
16533
+ }
16534
+ if (!trimmedDir && !trimmedRepoUrl) {
16535
+ setErrorMsg("Local Working Directory Path is required (or set a Repository URL to use a managed clone).");
16440
16536
  return;
16441
16537
  }
16442
16538
  if (!agentId) {
@@ -16464,7 +16560,9 @@ ${text}</tr>
16464
16560
  sddEnabled,
16465
16561
  bootstrapCommands,
16466
16562
  maxRunSeconds,
16467
- dockerImage: trimmedDocker || null
16563
+ dockerImage: trimmedDocker || null,
16564
+ repositoryUrl: trimmedRepoUrl || null,
16565
+ repositoryToken: trimmedRepoUrl && repositoryToken.trim() ? repositoryToken.trim() : null
16468
16566
  };
16469
16567
  updatedProjects.push(newProj);
16470
16568
  } else if (editingProject) {
@@ -16483,7 +16581,9 @@ ${text}</tr>
16483
16581
  sddEnabled,
16484
16582
  bootstrapCommands,
16485
16583
  maxRunSeconds,
16486
- dockerImage: trimmedDocker || null
16584
+ dockerImage: trimmedDocker || null,
16585
+ repositoryUrl: trimmedRepoUrl || null,
16586
+ repositoryToken: trimmedRepoUrl ? repositoryToken.trim() || editingProject.repositoryToken || null : null
16487
16587
  };
16488
16588
  }
16489
16589
  }
@@ -16513,22 +16613,22 @@ ${text}</tr>
16513
16613
  });
16514
16614
  };
16515
16615
  const showForm = isCreating || editingProject !== null;
16516
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "tab-pane projects-tab-settings", children: [
16517
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "tab-pane__header", children: [
16518
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { children: "Registered Projects" }),
16519
- !showForm && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { className: "btn btn--primary btn--xs", onClick: startCreate, children: "+ Register Project" })
16616
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "tab-pane projects-tab-settings", children: [
16617
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "tab-pane__header", children: [
16618
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { children: "Registered Projects" }),
16619
+ !showForm && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "btn btn--primary btn--xs", onClick: startCreate, children: "+ Register Project" })
16520
16620
  ] }),
16521
- errorMsg && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "validation-error", children: [
16522
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TriangleAlert, { size: 14 }),
16621
+ errorMsg && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "validation-error", children: [
16622
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TriangleAlert, { size: 14 }),
16523
16623
  " ",
16524
16624
  errorMsg
16525
16625
  ] }),
16526
- showForm ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "glass-form", children: [
16527
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h4", { children: isCreating ? "Register New Project" : `Edit Project: ${editingProject?.name}` }),
16528
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "glass-form__body", children: [
16529
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-group", children: [
16530
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-name", children: "Project Name" }),
16531
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
16626
+ showForm ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "glass-form", children: [
16627
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h4", { children: isCreating ? "Register New Project" : `Edit Project: ${editingProject?.name}` }),
16628
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "glass-form__body", children: [
16629
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16630
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-name", children: "Project Name" }),
16631
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16532
16632
  "input",
16533
16633
  {
16534
16634
  id: "project-name",
@@ -16539,9 +16639,9 @@ ${text}</tr>
16539
16639
  }
16540
16640
  )
16541
16641
  ] }),
16542
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-group", children: [
16543
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-description", children: "Description" }),
16544
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
16642
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16643
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-description", children: "Description" }),
16644
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16545
16645
  "textarea",
16546
16646
  {
16547
16647
  id: "project-description",
@@ -16552,9 +16652,9 @@ ${text}</tr>
16552
16652
  }
16553
16653
  )
16554
16654
  ] }),
16555
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-group", children: [
16556
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-dir", children: "Local Directory Path (Absolute)" }),
16557
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
16655
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16656
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-dir", children: "Local Directory Path (Absolute)" }),
16657
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16558
16658
  FolderPicker,
16559
16659
  {
16560
16660
  id: "project-dir",
@@ -16564,105 +16664,142 @@ ${text}</tr>
16564
16664
  }
16565
16665
  )
16566
16666
  ] }),
16567
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-group", children: [
16568
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-agent", children: "Assigned Agent" }),
16569
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
16667
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16668
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-repo-url", children: "Repository URL (optional)" }),
16669
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16670
+ "input",
16671
+ {
16672
+ id: "project-repo-url",
16673
+ type: "text",
16674
+ placeholder: "https://github.com/org/repo.git",
16675
+ value: repositoryUrl,
16676
+ onChange: (e) => setRepositoryUrl(e.target.value)
16677
+ }
16678
+ ),
16679
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { style: { fontSize: "11px", opacity: 0.65, margin: "6px 0 0 0", lineHeight: 1.5 }, children: [
16680
+ "Remote-backed project: caretaker clones this HTTPS repository itself (into the directory above, or a managed folder under ",
16681
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "~/.caretaker/repos/" }),
16682
+ " when the directory is left empty), pulls right before each task starts, and pushes task branches back to the remote. SSH URLs are not supported."
16683
+ ] })
16684
+ ] }),
16685
+ repositoryUrl.trim() && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16686
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-repo-token", children: "Repository access token (optional)" }),
16687
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16688
+ "input",
16689
+ {
16690
+ id: "project-repo-token",
16691
+ type: "password",
16692
+ placeholder: editingProject?.repositoryToken ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022 (leave blank to keep saved token)" : "e.g. a GitHub/GitLab PAT",
16693
+ value: repositoryToken,
16694
+ onChange: (e) => setRepositoryToken(e.target.value),
16695
+ autoComplete: "off"
16696
+ }
16697
+ ),
16698
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { style: { fontSize: "11px", opacity: 0.65, margin: "6px 0 0 0" }, children: [
16699
+ "Stored encrypted. Sent as the ",
16700
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "x-access-token" }),
16701
+ " password over HTTPS only \u2014 never embedded in the URL. Leave empty for public repositories."
16702
+ ] })
16703
+ ] }),
16704
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16705
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-agent", children: "Assigned Agent" }),
16706
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
16570
16707
  "select",
16571
16708
  {
16572
16709
  id: "project-agent",
16573
16710
  value: agentId,
16574
16711
  onChange: (e) => setAgentId(e.target.value),
16575
16712
  children: [
16576
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
16577
- agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
16713
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
16714
+ agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
16578
16715
  ]
16579
16716
  }
16580
16717
  )
16581
16718
  ] }),
16582
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-group", children: [
16583
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-planner", children: "Planner Agent Override (optional)" }),
16584
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
16719
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16720
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-planner", children: "Planner Agent Override (optional)" }),
16721
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
16585
16722
  "select",
16586
16723
  {
16587
16724
  id: "project-planner",
16588
16725
  value: plannerAgentId,
16589
16726
  onChange: (e) => setPlannerAgentId(e.target.value),
16590
16727
  children: [
16591
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "", children: "Same as assigned agent" }),
16592
- agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
16728
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", children: "Same as assigned agent" }),
16729
+ agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
16593
16730
  ]
16594
16731
  }
16595
16732
  )
16596
16733
  ] }),
16597
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-group", children: [
16598
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-reviewer", children: "Reviewer Agent Override (optional)" }),
16599
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
16734
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16735
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-reviewer", children: "Reviewer Agent Override (optional)" }),
16736
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
16600
16737
  "select",
16601
16738
  {
16602
16739
  id: "project-reviewer",
16603
16740
  value: reviewerAgentId,
16604
16741
  onChange: (e) => setReviewerAgentId(e.target.value),
16605
16742
  children: [
16606
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "", children: "Same as assigned agent" }),
16607
- agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
16743
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", children: "Same as assigned agent" }),
16744
+ agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
16608
16745
  ]
16609
16746
  }
16610
16747
  )
16611
16748
  ] }),
16612
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-group", style: { display: "flex", gap: "16px" }, children: [
16613
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
16614
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-planning-enabled", children: "Planning Phase" }),
16615
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
16749
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", style: { display: "flex", gap: "16px" }, children: [
16750
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
16751
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-planning-enabled", children: "Planning Phase" }),
16752
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
16616
16753
  "select",
16617
16754
  {
16618
16755
  id: "project-planning-enabled",
16619
16756
  value: planningEnabled === true ? "on" : planningEnabled === false ? "off" : "default",
16620
16757
  onChange: (e) => setPlanningEnabled(e.target.value === "default" ? null : e.target.value === "on"),
16621
16758
  children: [
16622
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "default", children: "Default (On)" }),
16623
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "on", children: "On" }),
16624
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "off", children: "Off" })
16759
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "default", children: "Default (On)" }),
16760
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "on", children: "On" }),
16761
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "off", children: "Off" })
16625
16762
  ]
16626
16763
  }
16627
16764
  )
16628
16765
  ] }),
16629
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
16630
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-review-enabled", children: "Review at DONE" }),
16631
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
16766
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
16767
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-review-enabled", children: "Review at DONE" }),
16768
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
16632
16769
  "select",
16633
16770
  {
16634
16771
  id: "project-review-enabled",
16635
16772
  value: reviewEnabled === true ? "on" : reviewEnabled === false ? "off" : "default",
16636
16773
  onChange: (e) => setReviewEnabled(e.target.value === "default" ? null : e.target.value === "on"),
16637
16774
  children: [
16638
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "default", children: "Default (On)" }),
16639
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "on", children: "On" }),
16640
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "off", children: "Off" })
16775
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "default", children: "Default (On)" }),
16776
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "on", children: "On" }),
16777
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "off", children: "Off" })
16641
16778
  ]
16642
16779
  }
16643
16780
  )
16644
16781
  ] }),
16645
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
16646
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-sdd-enabled", children: "SDD Mode" }),
16647
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
16782
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
16783
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-sdd-enabled", children: "SDD Mode" }),
16784
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
16648
16785
  "select",
16649
16786
  {
16650
16787
  id: "project-sdd-enabled",
16651
16788
  value: sddEnabled === true ? "on" : sddEnabled === false ? "off" : "default",
16652
16789
  onChange: (e) => setSddEnabled(e.target.value === "default" ? null : e.target.value === "on"),
16653
16790
  children: [
16654
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "default", children: "Default (Off)" }),
16655
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "on", children: "On" }),
16656
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "off", children: "Off" })
16791
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "default", children: "Default (Off)" }),
16792
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "on", children: "On" }),
16793
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "off", children: "Off" })
16657
16794
  ]
16658
16795
  }
16659
16796
  )
16660
16797
  ] })
16661
16798
  ] }),
16662
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: { fontSize: "11px", opacity: 0.65, margin: "6px 0 0 0" }, children: "SDD mode lets the planner write markdown documents (specs, plans) during the planning phase. How and where they are written is up to this project's own conventions (AGENTS.md, agent prompt \u2014 e.g. superpowers specs). Everything else stays read-only." }),
16663
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-group", children: [
16664
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-bootstrap", children: "Bootstrap Commands (one per line)" }),
16665
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
16799
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "11px", opacity: 0.65, margin: "6px 0 0 0" }, children: "SDD mode lets the planner write markdown documents (specs, plans) during the planning phase. How and where they are written is up to this project's own conventions (AGENTS.md, agent prompt \u2014 e.g. superpowers specs). Everything else stays read-only." }),
16800
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16801
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-bootstrap", children: "Bootstrap Commands (one per line)" }),
16802
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16666
16803
  "textarea",
16667
16804
  {
16668
16805
  id: "project-bootstrap",
@@ -16673,40 +16810,40 @@ ${text}</tr>
16673
16810
  style: { fontFamily: "var(--font-mono)", fontSize: "11px" }
16674
16811
  }
16675
16812
  ),
16676
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { style: { fontSize: "11px", opacity: 0.65, margin: "6px 0 0 0", lineHeight: 1.5 }, children: [
16813
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { style: { fontSize: "11px", opacity: 0.65, margin: "6px 0 0 0", lineHeight: 1.5 }, children: [
16677
16814
  "Run once, in order, right after a task worktree is created (git projects only) \u2014 before the agent's first cycle, so it doesn't spend tokens on setup like ",
16678
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "pnpm install" }),
16815
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "pnpm install" }),
16679
16816
  ". The run stops and the task is blocked if any command fails.",
16680
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("br", {}),
16681
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("strong", { children: "One line = one command." }),
16817
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("br", {}),
16818
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: "One line = one command." }),
16682
16819
  " Each line is run as a ",
16683
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("em", { children: "separate" }),
16820
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { children: "separate" }),
16684
16821
  " shell at the worktree root \u2014 this is ",
16685
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("em", { children: "not" }),
16822
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { children: "not" }),
16686
16823
  " a single script. Shell state does not carry over, so a ",
16687
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "cd" }),
16824
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "cd" }),
16688
16825
  " on one line has ",
16689
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("em", { children: "no effect" }),
16826
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { children: "no effect" }),
16690
16827
  " on the next. Chain dependent steps on one line with ",
16691
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "&&" }),
16828
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "&&" }),
16692
16829
  " instead, e.g.",
16693
16830
  " ",
16694
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "cd sub && composer install" }),
16831
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "cd sub && composer install" }),
16695
16832
  ".",
16696
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("br", {}),
16697
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("strong", { children: "Heads up on how tasks work:" }),
16833
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("br", {}),
16834
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: "Heads up on how tasks work:" }),
16698
16835
  " each task runs on its own git worktree/branch, and every cycle commits ",
16699
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("em", { children: "all" }),
16836
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { children: "all" }),
16700
16837
  " changes in that tree. So anything your bootstrap or the agent writes to the workspace that isn't in ",
16701
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: ".gitignore" }),
16838
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: ".gitignore" }),
16702
16839
  " gets committed to the branch \u2014 e.g. a package manager that drops a local store or cache in the repo (pnpm's",
16703
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: ".pnpm-store/" }),
16840
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: ".pnpm-store/" }),
16704
16841
  " under a bind-mounted Docker worktree is a common one). Make sure build/dependency artifacts are gitignored so they don't bloat the task branch."
16705
16842
  ] })
16706
16843
  ] }),
16707
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-group", children: [
16708
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-max-run", children: "Max run seconds per cycle (optional)" }),
16709
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
16844
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16845
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-max-run", children: "Max run seconds per cycle (optional)" }),
16846
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16710
16847
  "input",
16711
16848
  {
16712
16849
  id: "project-max-run",
@@ -16717,11 +16854,11 @@ ${text}</tr>
16717
16854
  placeholder: "Default: 120 (native) / 900 (claude-code)"
16718
16855
  }
16719
16856
  ),
16720
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: { fontSize: "11px", opacity: 0.65, margin: "6px 0 0 0" }, children: "Wall-clock budget for a single heartbeat cycle, enforced as an abort for every provider. Tasks inherit this and can override it. Leave empty for the default." })
16857
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "11px", opacity: 0.65, margin: "6px 0 0 0" }, children: "Wall-clock budget for a single heartbeat cycle, enforced as an abort for every provider. Tasks inherit this and can override it. Leave empty for the default." })
16721
16858
  ] }),
16722
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-group", children: [
16723
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: "project-docker-image", children: "Docker image (optional)" }),
16724
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
16859
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16860
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-docker-image", children: "Docker image (optional)" }),
16861
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16725
16862
  "input",
16726
16863
  {
16727
16864
  id: "project-docker-image",
@@ -16731,76 +16868,77 @@ ${text}</tr>
16731
16868
  placeholder: "e.g. node:22 or ./Dockerfile"
16732
16869
  }
16733
16870
  ),
16734
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { style: { fontSize: "11px", opacity: 0.65, margin: "6px 0 0 0", lineHeight: 1.5 }, children: [
16871
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { style: { fontSize: "11px", opacity: 0.65, margin: "6px 0 0 0", lineHeight: 1.5 }, children: [
16735
16872
  "Run this project's autonomous task agents (dev, planning & review) inside this image. Empty = run on the host.",
16736
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("br", {}),
16873
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("br", {}),
16737
16874
  "A value starting with ",
16738
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "." }),
16875
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "." }),
16739
16876
  ", ",
16740
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "/" }),
16877
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "/" }),
16741
16878
  " or ",
16742
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "\\" }),
16879
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "\\" }),
16743
16880
  " is treated as a path to a ",
16744
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("strong", { children: "Dockerfile" }),
16881
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: "Dockerfile" }),
16745
16882
  " (built per-project); anything else is a pullable image ref (e.g. ",
16746
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "node:22" }),
16883
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "node:22" }),
16747
16884
  ").",
16748
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("br", {}),
16885
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("br", {}),
16749
16886
  "The container runs as your user, so put the package manager ",
16750
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("em", { children: "in the image" }),
16887
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("em", { children: "in the image" }),
16751
16888
  " (e.g. ",
16752
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "corepack enable pnpm" }),
16889
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "corepack enable pnpm" }),
16753
16890
  ") \u2014 ",
16754
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "npm i -g" }),
16891
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "npm i -g" }),
16755
16892
  " fails as non-root. Docker must be installed on the scheduler host."
16756
16893
  ] })
16757
16894
  ] })
16758
16895
  ] }),
16759
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "form-actions", children: [
16760
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { className: "btn btn--secondary", onClick: cancelForm, children: "Cancel" }),
16761
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { className: "btn btn--primary", onClick: validateAndSave, children: "Save" })
16896
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-actions", children: [
16897
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "btn btn--secondary", onClick: cancelForm, children: "Cancel" }),
16898
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "btn btn--primary", onClick: validateAndSave, children: "Save" })
16762
16899
  ] })
16763
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "settings-list", children: projects.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "empty-message", children: "No projects registered in settings. Add one to start organizing your autonomous tasks." }) : projects.map((proj) => {
16900
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "settings-list", children: projects.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "empty-message", children: "No projects registered in settings. Add one to start organizing your autonomous tasks." }) : projects.map((proj) => {
16764
16901
  const assignedAgent = agents.find((a) => a.id === proj.agentId)?.name || "Unknown Agent";
16765
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "settings-card", children: [
16766
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "settings-card__body", children: [
16767
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "settings-card__title", style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
16768
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Folder, { size: 14 }),
16902
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card", children: [
16903
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card__body", children: [
16904
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card__title", style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
16905
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Folder, { size: 14 }),
16769
16906
  " ",
16770
16907
  proj.name
16771
16908
  ] }),
16772
- proj.description && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "settings-card__subtitle", style: { fontSize: "11px", opacity: 0.8, marginBottom: "4px" }, children: proj.description }),
16773
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "settings-card__subtitle", style: { fontFamily: "var(--font-mono)", fontSize: "10px" }, children: proj.workingDir }),
16774
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px", marginTop: "6px" }, children: [
16775
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "settings-card__badge", children: [
16909
+ proj.description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "settings-card__subtitle", style: { fontSize: "11px", opacity: 0.8, marginBottom: "4px" }, children: proj.description }),
16910
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "settings-card__subtitle", style: { fontFamily: "var(--font-mono)", fontSize: "10px" }, children: proj.workingDir }),
16911
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px", marginTop: "6px" }, children: [
16912
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card__badge", children: [
16776
16913
  "Agent: ",
16777
16914
  assignedAgent
16778
16915
  ] }),
16779
- proj.dockerImage && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "settings-card__badge", children: [
16916
+ proj.dockerImage && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card__badge", children: [
16780
16917
  "Docker: ",
16781
16918
  proj.dockerImage
16782
16919
  ] })
16783
- ] })
16920
+ ] }),
16921
+ proj.repositoryUrl && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ProjectRepoSync, { projectId: proj.id })
16784
16922
  ] }),
16785
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "settings-card__actions", children: [
16786
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
16923
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card__actions", children: [
16924
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16787
16925
  "button",
16788
16926
  {
16789
16927
  className: "icon-btn",
16790
16928
  onClick: () => startEdit(proj),
16791
16929
  title: "Edit project",
16792
16930
  "aria-label": "Edit project",
16793
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Pencil, { size: 14 })
16931
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Pencil, { size: 14 })
16794
16932
  }
16795
16933
  ),
16796
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
16934
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16797
16935
  "button",
16798
16936
  {
16799
16937
  className: "icon-btn icon-btn--danger",
16800
16938
  onClick: () => deleteProject(proj.id),
16801
16939
  title: "Delete project",
16802
16940
  "aria-label": "Delete project",
16803
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Trash2, { size: 14 })
16941
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Trash2, { size: 14 })
16804
16942
  }
16805
16943
  )
16806
16944
  ] })
@@ -16810,8 +16948,8 @@ ${text}</tr>
16810
16948
  }
16811
16949
 
16812
16950
  // src/AgentsTab.tsx
16813
- var import_react9 = __toESM(require_react(), 1);
16814
- var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
16951
+ var import_react10 = __toESM(require_react(), 1);
16952
+ var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
16815
16953
  function AgentsTab({
16816
16954
  config,
16817
16955
  agents,
@@ -16822,25 +16960,25 @@ ${text}</tr>
16822
16960
  setModelsResult,
16823
16961
  postMessage
16824
16962
  }) {
16825
- const [editingAgent, setEditingAgent] = (0, import_react9.useState)(null);
16826
- const [isCreating, setIsCreating] = (0, import_react9.useState)(false);
16827
- const [name, setName] = (0, import_react9.useState)("");
16828
- const [systemPrompt, setSystemPrompt] = (0, import_react9.useState)("");
16829
- const [provider, setProvider] = (0, import_react9.useState)("");
16830
- const [model, setModel] = (0, import_react9.useState)("");
16831
- const [maxTurns, setMaxTurns] = (0, import_react9.useState)(30);
16832
- const [workingDir, setWorkingDir] = (0, import_react9.useState)("");
16833
- const [permissionMode, setPermissionMode] = (0, import_react9.useState)("");
16834
- const [strictMcp, setStrictMcp] = (0, import_react9.useState)(false);
16835
- const [selectedTools, setSelectedTools] = (0, import_react9.useState)({});
16836
- const [confirmTools, setConfirmTools] = (0, import_react9.useState)({});
16837
- const [selectedPlugins, setSelectedPlugins] = (0, import_react9.useState)({});
16838
- const [selectedMcpServers, setSelectedMcpServers] = (0, import_react9.useState)({});
16839
- const [fetchingModels, setFetchingModels] = (0, import_react9.useState)(false);
16840
- const [errorMsg, setErrorMsg] = (0, import_react9.useState)(null);
16963
+ const [editingAgent, setEditingAgent] = (0, import_react10.useState)(null);
16964
+ const [isCreating, setIsCreating] = (0, import_react10.useState)(false);
16965
+ const [name, setName] = (0, import_react10.useState)("");
16966
+ const [systemPrompt, setSystemPrompt] = (0, import_react10.useState)("");
16967
+ const [provider, setProvider] = (0, import_react10.useState)("");
16968
+ const [model, setModel] = (0, import_react10.useState)("");
16969
+ const [maxTurns, setMaxTurns] = (0, import_react10.useState)(30);
16970
+ const [workingDir, setWorkingDir] = (0, import_react10.useState)("");
16971
+ const [permissionMode, setPermissionMode] = (0, import_react10.useState)("");
16972
+ const [strictMcp, setStrictMcp] = (0, import_react10.useState)(false);
16973
+ const [selectedTools, setSelectedTools] = (0, import_react10.useState)({});
16974
+ const [confirmTools, setConfirmTools] = (0, import_react10.useState)({});
16975
+ const [selectedPlugins, setSelectedPlugins] = (0, import_react10.useState)({});
16976
+ const [selectedMcpServers, setSelectedMcpServers] = (0, import_react10.useState)({});
16977
+ const [fetchingModels, setFetchingModels] = (0, import_react10.useState)(false);
16978
+ const [errorMsg, setErrorMsg] = (0, import_react10.useState)(null);
16841
16979
  const providerType = config.providers.find((p) => p.name === provider)?.type ?? "openai";
16842
16980
  const isClaudeCode = providerType === "claude-code";
16843
- (0, import_react9.useEffect)(() => {
16981
+ (0, import_react10.useEffect)(() => {
16844
16982
  if (modelsResult) {
16845
16983
  setFetchingModels(false);
16846
16984
  if (!modelsResult.ok) {
@@ -16999,22 +17137,22 @@ ${text}</tr>
16999
17137
  });
17000
17138
  };
17001
17139
  const showForm = isCreating || editingAgent !== null;
17002
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "tab-pane agents-tab", children: [
17003
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "tab-pane__header", children: [
17004
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { children: "Agents" }),
17005
- !showForm && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "btn btn--primary btn--xs", onClick: startCreate, children: "+ Add Agent" })
17140
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "tab-pane agents-tab", children: [
17141
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "tab-pane__header", children: [
17142
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { children: "Agents" }),
17143
+ !showForm && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: "btn btn--primary btn--xs", onClick: startCreate, children: "+ Add Agent" })
17006
17144
  ] }),
17007
- errorMsg && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "validation-error", children: [
17008
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TriangleAlert, { size: 13 }),
17145
+ errorMsg && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "validation-error", children: [
17146
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TriangleAlert, { size: 13 }),
17009
17147
  " ",
17010
17148
  errorMsg
17011
17149
  ] }),
17012
- showForm ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "glass-form", children: [
17013
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h4", { children: isCreating ? "Create Agent" : `Edit Agent: ${editingAgent?.name}` }),
17014
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "glass-form__body", children: [
17015
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
17016
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "agent-name", children: "Agent Name" }),
17017
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17150
+ showForm ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "glass-form", children: [
17151
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h4", { children: isCreating ? "Create Agent" : `Edit Agent: ${editingAgent?.name}` }),
17152
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "glass-form__body", children: [
17153
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17154
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "agent-name", children: "Agent Name" }),
17155
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17018
17156
  "input",
17019
17157
  {
17020
17158
  id: "agent-name",
@@ -17025,9 +17163,9 @@ ${text}</tr>
17025
17163
  }
17026
17164
  )
17027
17165
  ] }),
17028
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
17029
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "agent-prompt", children: "System Prompt" }),
17030
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17166
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17167
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "agent-prompt", children: "System Prompt" }),
17168
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17031
17169
  "textarea",
17032
17170
  {
17033
17171
  id: "agent-prompt",
@@ -17038,25 +17176,25 @@ ${text}</tr>
17038
17176
  }
17039
17177
  )
17040
17178
  ] }),
17041
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-row", children: [
17042
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
17043
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "agent-provider", children: "Provider" }),
17044
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
17179
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-row", children: [
17180
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17181
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "agent-provider", children: "Provider" }),
17182
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
17045
17183
  "select",
17046
17184
  {
17047
17185
  id: "agent-provider",
17048
17186
  value: provider,
17049
17187
  onChange: (e) => setProvider(e.target.value),
17050
17188
  children: [
17051
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", disabled: true, children: "-- Select Provider --" }),
17052
- config.providers.map((p) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: p.name, children: p.name }, p.name))
17189
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "", disabled: true, children: "-- Select Provider --" }),
17190
+ config.providers.map((p) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: p.name, children: p.name }, p.name))
17053
17191
  ]
17054
17192
  }
17055
17193
  )
17056
17194
  ] }),
17057
- !isClaudeCode && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
17058
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "agent-turns", children: "Max Turns" }),
17059
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17195
+ !isClaudeCode && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17196
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "agent-turns", children: "Max Turns" }),
17197
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17060
17198
  "input",
17061
17199
  {
17062
17200
  id: "agent-turns",
@@ -17069,21 +17207,21 @@ ${text}</tr>
17069
17207
  )
17070
17208
  ] })
17071
17209
  ] }),
17072
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
17073
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "agent-model", children: "Model" }),
17074
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "input-with-action", children: [
17075
- !isClaudeCode && modelsResult?.ok ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
17210
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17211
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "agent-model", children: "Model" }),
17212
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "input-with-action", children: [
17213
+ !isClaudeCode && modelsResult?.ok ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
17076
17214
  "select",
17077
17215
  {
17078
17216
  id: "agent-model",
17079
17217
  value: model,
17080
17218
  onChange: (e) => setModel(e.target.value),
17081
17219
  children: [
17082
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", children: "-- Select Model --" }),
17083
- modelsResult.ids.map((id) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: id, children: id }, id))
17220
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "", children: "-- Select Model --" }),
17221
+ modelsResult.ids.map((id) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: id, children: id }, id))
17084
17222
  ]
17085
17223
  }
17086
- ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17224
+ ) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17087
17225
  "input",
17088
17226
  {
17089
17227
  id: "agent-model",
@@ -17093,7 +17231,7 @@ ${text}</tr>
17093
17231
  onChange: (e) => setModel(e.target.value)
17094
17232
  }
17095
17233
  ),
17096
- !isClaudeCode && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17234
+ !isClaudeCode && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17097
17235
  "button",
17098
17236
  {
17099
17237
  type: "button",
@@ -17105,9 +17243,9 @@ ${text}</tr>
17105
17243
  )
17106
17244
  ] })
17107
17245
  ] }),
17108
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
17109
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "agent-dir", children: "Working Directory (Absolute Path - Optional)" }),
17110
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17246
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17247
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "agent-dir", children: "Working Directory (Absolute Path - Optional)" }),
17248
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17111
17249
  FolderPicker,
17112
17250
  {
17113
17251
  id: "agent-dir",
@@ -17119,26 +17257,26 @@ ${text}</tr>
17119
17257
  ] }),
17120
17258
  isClaudeCode ? (
17121
17259
  /* Permission mode + strict-MCP toggle (replace the tool/plugins pickers, ignored at runtime) */
17122
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
17123
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
17124
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "agent-permission-mode", children: "Permission Mode" }),
17125
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
17260
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
17261
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17262
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "agent-permission-mode", children: "Permission Mode" }),
17263
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
17126
17264
  "select",
17127
17265
  {
17128
17266
  id: "agent-permission-mode",
17129
17267
  value: permissionMode,
17130
17268
  onChange: (e) => setPermissionMode(e.target.value),
17131
17269
  children: [
17132
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", children: "Auto (Claude Code default from ~/.claude/settings.json)" }),
17133
- ["acceptEdits", "auto", "bypassPermissions", "manual", "dontAsk", "plan"].map((m) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: m, children: m }, m))
17270
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "", children: "Auto (Claude Code default from ~/.claude/settings.json)" }),
17271
+ ["acceptEdits", "auto", "bypassPermissions", "manual", "dontAsk", "plan"].map((m) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: m, children: m }, m))
17134
17272
  ]
17135
17273
  }
17136
17274
  ),
17137
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)", lineHeight: "1.4", margin: "4px 0 0" }, children: "Claude Code uses its own tools and permissions. Uses your local Claude Code session; Anthropic may bill programmatic use as extra usage." })
17275
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)", lineHeight: "1.4", margin: "4px 0 0" }, children: "Claude Code uses its own tools and permissions. Uses your local Claude Code session; Anthropic may bill programmatic use as extra usage." })
17138
17276
  ] }),
17139
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
17140
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer" }, children: [
17141
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17277
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17278
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer" }, children: [
17279
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17142
17280
  "input",
17143
17281
  {
17144
17282
  type: "checkbox",
@@ -17148,23 +17286,23 @@ ${text}</tr>
17148
17286
  ),
17149
17287
  "Strict MCP config"
17150
17288
  ] }),
17151
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)", lineHeight: "1.4", margin: "4px 0 0" }, children: [
17289
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)", lineHeight: "1.4", margin: "4px 0 0" }, children: [
17152
17290
  "Off (default): merge your native ~/.claude MCP servers with caretaker's \u2014 e.g. add a",
17153
17291
  " ",
17154
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("code", { children: "caretaker-cli mcp" }),
17292
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", { children: "caretaker-cli mcp" }),
17155
17293
  " stdio server to ~/.claude for task tools in chat. On: use only caretaker's servers (--strict-mcp-config)."
17156
17294
  ] })
17157
17295
  ] })
17158
17296
  ] })
17159
- ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
17160
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group form-group--chips", children: [
17161
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { children: "Exposed Tools" }),
17162
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "chips-container-vertical", children: [
17163
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "chips-header-row", children: [
17164
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "chip-col-name", children: "Tool" }),
17165
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "chip-col-check", children: [
17166
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Allow" }),
17167
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17297
+ ) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
17298
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group form-group--chips", children: [
17299
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { children: "Exposed Tools" }),
17300
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "chips-container-vertical", children: [
17301
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "chips-header-row", children: [
17302
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "chip-col-name", children: "Tool" }),
17303
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "chip-col-check", children: [
17304
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Allow" }),
17305
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17168
17306
  "input",
17169
17307
  {
17170
17308
  type: "checkbox",
@@ -17182,9 +17320,9 @@ ${text}</tr>
17182
17320
  }
17183
17321
  )
17184
17322
  ] }),
17185
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "chip-col-check", children: [
17186
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Ask First" }),
17187
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17323
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "chip-col-check", children: [
17324
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Ask First" }),
17325
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17188
17326
  "input",
17189
17327
  {
17190
17328
  type: "checkbox",
@@ -17203,9 +17341,9 @@ ${text}</tr>
17203
17341
  )
17204
17342
  ] })
17205
17343
  ] }),
17206
- availableTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "chip-row", children: [
17207
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "chip-name", children: tool }),
17208
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17344
+ availableTools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "chip-row", children: [
17345
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "chip-name", children: tool }),
17346
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17209
17347
  "input",
17210
17348
  {
17211
17349
  type: "checkbox",
@@ -17219,7 +17357,7 @@ ${text}</tr>
17219
17357
  }
17220
17358
  }
17221
17359
  ),
17222
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17360
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17223
17361
  "input",
17224
17362
  {
17225
17363
  type: "checkbox",
@@ -17237,10 +17375,10 @@ ${text}</tr>
17237
17375
  ] }, tool))
17238
17376
  ] })
17239
17377
  ] }),
17240
- pluginsFile.plugins.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
17241
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { children: "Mounted Plugins" }),
17242
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "chips-list", children: pluginsFile.plugins.map((p) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "chip-item", children: [
17243
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17378
+ pluginsFile.plugins.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17379
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { children: "Mounted Plugins" }),
17380
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "chips-list", children: pluginsFile.plugins.map((p) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "chip-item", children: [
17381
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17244
17382
  "input",
17245
17383
  {
17246
17384
  type: "checkbox",
@@ -17253,14 +17391,14 @@ ${text}</tr>
17253
17391
  }
17254
17392
  }
17255
17393
  ),
17256
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: p.name })
17394
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: p.name })
17257
17395
  ] }, p.name)) })
17258
17396
  ] })
17259
17397
  ] }),
17260
- mcpServersFile.servers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
17261
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { children: "Mounted MCP Servers" }),
17262
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "chips-list", children: mcpServersFile.servers.map((s) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "chip-item", children: [
17263
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17398
+ mcpServersFile.servers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17399
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { children: "Mounted MCP Servers" }),
17400
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "chips-list", children: mcpServersFile.servers.map((s) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "chip-item", children: [
17401
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17264
17402
  "input",
17265
17403
  {
17266
17404
  type: "checkbox",
@@ -17273,26 +17411,26 @@ ${text}</tr>
17273
17411
  }
17274
17412
  }
17275
17413
  ),
17276
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: s.name })
17414
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: s.name })
17277
17415
  ] }, s.id)) })
17278
17416
  ] })
17279
17417
  ] }),
17280
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-actions", children: [
17281
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "btn btn--secondary", onClick: cancelForm, children: "Cancel" }),
17282
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { className: "btn btn--primary", onClick: validateAndSave, children: "Save" })
17418
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-actions", children: [
17419
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: "btn btn--secondary", onClick: cancelForm, children: "Cancel" }),
17420
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: "btn btn--primary", onClick: validateAndSave, children: "Save" })
17283
17421
  ] })
17284
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "settings-list", children: agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "empty-message", children: "No agents configured. Add one to define your assistant." }) : agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card", children: [
17285
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card__body", children: [
17286
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card__title", children: [
17422
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "settings-list", children: agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "empty-message", children: "No agents configured. Add one to define your assistant." }) : agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card", children: [
17423
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card__body", children: [
17424
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card__title", children: [
17287
17425
  agent.name,
17288
- agent.pluginId && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "settings-card__badge-managed", title: "Managed by a plugin sync", children: "Managed" })
17426
+ agent.pluginId && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "settings-card__badge-managed", title: "Managed by a plugin sync", children: "Managed" })
17289
17427
  ] }),
17290
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card__subtitle", children: [
17428
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card__subtitle", children: [
17291
17429
  agent.provider,
17292
17430
  " \u2022 ",
17293
17431
  agent.model
17294
17432
  ] }),
17295
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card__metadata", children: [
17433
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card__metadata", children: [
17296
17434
  "Turns: ",
17297
17435
  agent.maxTurns || 30,
17298
17436
  " \u2022 Tools: ",
@@ -17301,23 +17439,23 @@ ${text}</tr>
17301
17439
  agent.mcpServers && agent.mcpServers.length > 0 && ` \u2022 MCP: ${agent.mcpServers.length}`
17302
17440
  ] })
17303
17441
  ] }),
17304
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "settings-card__actions", children: [
17305
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17442
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card__actions", children: [
17443
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17306
17444
  "button",
17307
17445
  {
17308
17446
  className: "icon-btn",
17309
17447
  onClick: () => startEdit(agent),
17310
17448
  title: "Edit agent",
17311
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Pencil, { size: 13 })
17449
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Pencil, { size: 13 })
17312
17450
  }
17313
17451
  ),
17314
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
17452
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17315
17453
  "button",
17316
17454
  {
17317
17455
  className: "icon-btn icon-btn--danger",
17318
17456
  onClick: () => deleteAgent(agent.id),
17319
17457
  title: "Delete agent",
17320
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Trash2, { size: 13 })
17458
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Trash2, { size: 13 })
17321
17459
  }
17322
17460
  )
17323
17461
  ] })
@@ -17326,8 +17464,8 @@ ${text}</tr>
17326
17464
  }
17327
17465
 
17328
17466
  // src/PluginsTab.tsx
17329
- var import_react10 = __toESM(require_react(), 1);
17330
- var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
17467
+ var import_react11 = __toESM(require_react(), 1);
17468
+ var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
17331
17469
  function PluginsTab({
17332
17470
  pluginsFile,
17333
17471
  refreshingSourceId,
@@ -17335,15 +17473,15 @@ ${text}</tr>
17335
17473
  setRefreshOutcome,
17336
17474
  postMessage
17337
17475
  }) {
17338
- const [editingSource, setEditingSource] = (0, import_react10.useState)(null);
17339
- const [isCreating, setIsCreating] = (0, import_react10.useState)(false);
17340
- const [kind, setKind] = (0, import_react10.useState)("git");
17341
- const [url, setUrl] = (0, import_react10.useState)("");
17342
- const [ref, setRef] = (0, import_react10.useState)("");
17343
- const [authToken, setAuthToken] = (0, import_react10.useState)("");
17344
- const [refreshOnStart, setRefreshOnStart] = (0, import_react10.useState)(true);
17345
- const [errorMsg, setErrorMsg] = (0, import_react10.useState)(null);
17346
- (0, import_react10.useEffect)(() => {
17476
+ const [editingSource, setEditingSource] = (0, import_react11.useState)(null);
17477
+ const [isCreating, setIsCreating] = (0, import_react11.useState)(false);
17478
+ const [kind, setKind] = (0, import_react11.useState)("git");
17479
+ const [url, setUrl] = (0, import_react11.useState)("");
17480
+ const [ref, setRef] = (0, import_react11.useState)("");
17481
+ const [authToken, setAuthToken] = (0, import_react11.useState)("");
17482
+ const [refreshOnStart, setRefreshOnStart] = (0, import_react11.useState)(true);
17483
+ const [errorMsg, setErrorMsg] = (0, import_react11.useState)(null);
17484
+ (0, import_react11.useEffect)(() => {
17347
17485
  return () => {
17348
17486
  setRefreshOutcome(null);
17349
17487
  };
@@ -17431,40 +17569,40 @@ ${text}</tr>
17431
17569
  });
17432
17570
  };
17433
17571
  const showForm = isCreating || editingSource !== null;
17434
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "tab-pane plugins-tab", children: [
17435
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "tab-pane__header", children: [
17436
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { children: "Plugins" }),
17437
- !showForm && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: "btn btn--primary btn--xs", onClick: startCreate, children: "+ Register Source" })
17572
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "tab-pane plugins-tab", children: [
17573
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "tab-pane__header", children: [
17574
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { children: "Plugins" }),
17575
+ !showForm && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "btn btn--primary btn--xs", onClick: startCreate, children: "+ Register Source" })
17438
17576
  ] }),
17439
- errorMsg && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "validation-error", children: [
17440
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TriangleAlert, { size: 13 }),
17577
+ errorMsg && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "validation-error", children: [
17578
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TriangleAlert, { size: 13 }),
17441
17579
  " ",
17442
17580
  errorMsg
17443
17581
  ] }),
17444
- refreshOutcome && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: `sync-banner ${refreshOutcome.error ? "sync-banner--error" : "sync-banner--success"}`, children: [
17445
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "sync-banner__title", children: [
17582
+ refreshOutcome && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: `sync-banner ${refreshOutcome.error ? "sync-banner--error" : "sync-banner--success"}`, children: [
17583
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "sync-banner__title", children: [
17446
17584
  refreshOutcome.error ? "Sync Failed" : "Sync Succeeded",
17447
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: "sync-banner__close", onClick: () => setRefreshOutcome(null), "aria-label": "Dismiss", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(X, { size: 13 }) })
17585
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "sync-banner__close", onClick: () => setRefreshOutcome(null), "aria-label": "Dismiss", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(X, { size: 13 }) })
17448
17586
  ] }),
17449
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "sync-banner__body", children: refreshOutcome.error ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "error-text", children: refreshOutcome.error }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { children: [
17587
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "sync-banner__body", children: refreshOutcome.error ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "error-text", children: refreshOutcome.error }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { children: [
17450
17588
  "Found ",
17451
17589
  refreshOutcome.pluginsFound,
17452
17590
  " plugins.",
17453
17591
  " ",
17454
- refreshOutcome.sha && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "sha-text", children: [
17592
+ refreshOutcome.sha && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "sha-text", children: [
17455
17593
  "SHA: ",
17456
17594
  refreshOutcome.sha.substring(0, 8)
17457
17595
  ] })
17458
17596
  ] }) })
17459
17597
  ] }),
17460
- showForm ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "glass-form", children: [
17461
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h4", { children: isCreating ? "Register Plugin Source" : "Edit Plugin Source" }),
17462
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "glass-form__body", children: [
17463
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17464
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { children: "Source Type" }),
17465
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "radio-group", children: [
17466
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "radio-label", children: [
17467
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17598
+ showForm ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "glass-form", children: [
17599
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h4", { children: isCreating ? "Register Plugin Source" : "Edit Plugin Source" }),
17600
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "glass-form__body", children: [
17601
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17602
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { children: "Source Type" }),
17603
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "radio-group", children: [
17604
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: "radio-label", children: [
17605
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17468
17606
  "input",
17469
17607
  {
17470
17608
  type: "radio",
@@ -17473,10 +17611,10 @@ ${text}</tr>
17473
17611
  onChange: () => setKind("git")
17474
17612
  }
17475
17613
  ),
17476
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Git Remote" })
17614
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Git Remote" })
17477
17615
  ] }),
17478
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "radio-label", children: [
17479
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17616
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: "radio-label", children: [
17617
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17480
17618
  "input",
17481
17619
  {
17482
17620
  type: "radio",
@@ -17485,13 +17623,13 @@ ${text}</tr>
17485
17623
  onChange: () => setKind("path")
17486
17624
  }
17487
17625
  ),
17488
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Local Path" })
17626
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Local Path" })
17489
17627
  ] })
17490
17628
  ] })
17491
17629
  ] }),
17492
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17493
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "source-url", children: kind === "git" ? "Git Repository URL" : "Absolute Filesystem Path" }),
17494
- kind === "git" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17630
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17631
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: "source-url", children: kind === "git" ? "Git Repository URL" : "Absolute Filesystem Path" }),
17632
+ kind === "git" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17495
17633
  "input",
17496
17634
  {
17497
17635
  id: "source-url",
@@ -17500,7 +17638,7 @@ ${text}</tr>
17500
17638
  value: url,
17501
17639
  onChange: (e) => setUrl(e.target.value)
17502
17640
  }
17503
- ) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17641
+ ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17504
17642
  FolderPicker,
17505
17643
  {
17506
17644
  id: "source-url",
@@ -17510,10 +17648,10 @@ ${text}</tr>
17510
17648
  }
17511
17649
  )
17512
17650
  ] }),
17513
- kind === "git" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
17514
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17515
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "source-ref", children: "Branch / Ref (Optional)" }),
17516
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17651
+ kind === "git" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
17652
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17653
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: "source-ref", children: "Branch / Ref (Optional)" }),
17654
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17517
17655
  "input",
17518
17656
  {
17519
17657
  id: "source-ref",
@@ -17524,9 +17662,9 @@ ${text}</tr>
17524
17662
  }
17525
17663
  )
17526
17664
  ] }),
17527
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
17528
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "source-token", children: "Auth Token (Optional - encrypted)" }),
17529
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17665
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17666
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: "source-token", children: "Auth Token (Optional - encrypted)" }),
17667
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17530
17668
  "input",
17531
17669
  {
17532
17670
  id: "source-token",
@@ -17538,8 +17676,8 @@ ${text}</tr>
17538
17676
  )
17539
17677
  ] })
17540
17678
  ] }),
17541
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "form-group form-group--checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "checkbox-label", children: [
17542
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17679
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "form-group form-group--checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: "checkbox-label", children: [
17680
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17543
17681
  "input",
17544
17682
  {
17545
17683
  type: "checkbox",
@@ -17547,42 +17685,42 @@ ${text}</tr>
17547
17685
  onChange: (e) => setRefreshOnStart(e.target.checked)
17548
17686
  }
17549
17687
  ),
17550
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Automatically refresh on startup" })
17688
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Automatically refresh on startup" })
17551
17689
  ] }) })
17552
17690
  ] }),
17553
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-actions", children: [
17554
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: "btn btn--secondary", onClick: cancelForm, children: "Cancel" }),
17555
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("button", { className: "btn btn--primary", onClick: validateAndSave, children: "Save" })
17691
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-actions", children: [
17692
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "btn btn--secondary", onClick: cancelForm, children: "Cancel" }),
17693
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "btn btn--primary", onClick: validateAndSave, children: "Save" })
17556
17694
  ] })
17557
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "settings-list", children: pluginsFile.sources.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "empty-message", children: "No plugin sources configured. Register a Git repository or local folder." }) : pluginsFile.sources.map((source) => {
17695
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "settings-list", children: pluginsFile.sources.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "empty-message", children: "No plugin sources configured. Register a Git repository or local folder." }) : pluginsFile.sources.map((source) => {
17558
17696
  const discovered = pluginsFile.plugins.filter((p) => p.sourceId === source.id);
17559
17697
  const isRefreshing = refreshingSourceId === source.id;
17560
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card settings-card--plugin", children: [
17561
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card__body", children: [
17562
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card__title", children: [
17563
- source.kind === "git" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(GitBranch, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Folder, { size: 13 }),
17698
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card settings-card--plugin", children: [
17699
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__body", children: [
17700
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__title", children: [
17701
+ source.kind === "git" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(GitBranch, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Folder, { size: 13 }),
17564
17702
  source.kind === "git" ? " Git Source" : " Local Source",
17565
- isRefreshing && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "settings-card__badge-managed", children: "Syncing..." })
17703
+ isRefreshing && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "settings-card__badge-managed", children: "Syncing..." })
17566
17704
  ] }),
17567
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "settings-card__subtitle text-ellipsis", title: source.url, children: source.url }),
17568
- source.kind === "git" && source.ref && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card__metadata", children: [
17705
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "settings-card__subtitle text-ellipsis", title: source.url, children: source.url }),
17706
+ source.kind === "git" && source.ref && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__metadata", children: [
17569
17707
  "Ref: ",
17570
17708
  source.ref
17571
17709
  ] }),
17572
- discovered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "discovered-plugins", children: [
17573
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "discovered-plugins__title", children: "Discovered Plugins:" }),
17574
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ul", { className: "discovered-plugins__list", children: discovered.map((p) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("li", { className: "discovered-plugin-item", title: p.description || "", children: [
17575
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "plugin-name", children: p.name }),
17576
- p.manifestKind && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "plugin-manifest-badge", children: p.manifestKind })
17710
+ discovered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "discovered-plugins", children: [
17711
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "discovered-plugins__title", children: "Discovered Plugins:" }),
17712
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("ul", { className: "discovered-plugins__list", children: discovered.map((p) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { className: "discovered-plugin-item", title: p.description || "", children: [
17713
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "plugin-name", children: p.name }),
17714
+ p.manifestKind && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "plugin-manifest-badge", children: p.manifestKind })
17577
17715
  ] }, p.id)) })
17578
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "discovered-plugins discovered-plugins--empty", children: "No plugins synced. Click Sync below." }),
17579
- source.lastFetchedAt && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card__footer", children: [
17716
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "discovered-plugins discovered-plugins--empty", children: "No plugins synced. Click Sync below." }),
17717
+ source.lastFetchedAt && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__footer", children: [
17580
17718
  "Last Synced: ",
17581
17719
  new Date(source.lastFetchedAt).toLocaleTimeString()
17582
17720
  ] })
17583
17721
  ] }),
17584
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "settings-card__actions-bottom", children: [
17585
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17722
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__actions-bottom", children: [
17723
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17586
17724
  "button",
17587
17725
  {
17588
17726
  className: "btn btn--secondary btn--xs",
@@ -17591,8 +17729,8 @@ ${text}</tr>
17591
17729
  children: isRefreshing ? "Syncing..." : "Sync Now"
17592
17730
  }
17593
17731
  ),
17594
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "actions-right", children: [
17595
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17732
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "actions-right", children: [
17733
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17596
17734
  "button",
17597
17735
  {
17598
17736
  className: "icon-btn",
@@ -17600,10 +17738,10 @@ ${text}</tr>
17600
17738
  onClick: () => startEdit(source),
17601
17739
  title: "Edit source",
17602
17740
  "aria-label": "Edit source",
17603
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Pencil, { size: 13 })
17741
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Pencil, { size: 13 })
17604
17742
  }
17605
17743
  ),
17606
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
17744
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17607
17745
  "button",
17608
17746
  {
17609
17747
  className: "icon-btn icon-btn--danger",
@@ -17611,7 +17749,7 @@ ${text}</tr>
17611
17749
  onClick: () => deleteSource(source.id),
17612
17750
  title: "Delete source",
17613
17751
  "aria-label": "Delete source",
17614
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Trash2, { size: 13 })
17752
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Trash2, { size: 13 })
17615
17753
  }
17616
17754
  )
17617
17755
  ] })
@@ -17622,25 +17760,25 @@ ${text}</tr>
17622
17760
  }
17623
17761
 
17624
17762
  // src/McpTab.tsx
17625
- var import_react11 = __toESM(require_react(), 1);
17626
- var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
17763
+ var import_react12 = __toESM(require_react(), 1);
17764
+ var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
17627
17765
  function McpTab({ mcpServersFile, mcpAuthOutcome, setMcpAuthOutcome, postMessage }) {
17628
- const [editingServer, setEditingServer] = (0, import_react11.useState)(null);
17629
- const [isCreating, setIsCreating] = (0, import_react11.useState)(false);
17630
- (0, import_react11.useEffect)(() => {
17766
+ const [editingServer, setEditingServer] = (0, import_react12.useState)(null);
17767
+ const [isCreating, setIsCreating] = (0, import_react12.useState)(false);
17768
+ (0, import_react12.useEffect)(() => {
17631
17769
  return () => {
17632
17770
  setMcpAuthOutcome(null);
17633
17771
  };
17634
17772
  }, []);
17635
- const [name, setName] = (0, import_react11.useState)("");
17636
- const [transport, setTransport] = (0, import_react11.useState)("stdio");
17637
- const [enabled, setEnabled] = (0, import_react11.useState)(true);
17638
- const [command, setCommand] = (0, import_react11.useState)("");
17639
- const [argsStr, setArgsStr] = (0, import_react11.useState)("");
17640
- const [envStr, setEnvStr] = (0, import_react11.useState)("");
17641
- const [url, setUrl] = (0, import_react11.useState)("");
17642
- const [headersStr, setHeadersStr] = (0, import_react11.useState)("");
17643
- const [errorMsg, setErrorMsg] = (0, import_react11.useState)(null);
17773
+ const [name, setName] = (0, import_react12.useState)("");
17774
+ const [transport, setTransport] = (0, import_react12.useState)("stdio");
17775
+ const [enabled, setEnabled] = (0, import_react12.useState)(true);
17776
+ const [command, setCommand] = (0, import_react12.useState)("");
17777
+ const [argsStr, setArgsStr] = (0, import_react12.useState)("");
17778
+ const [envStr, setEnvStr] = (0, import_react12.useState)("");
17779
+ const [url, setUrl] = (0, import_react12.useState)("");
17780
+ const [headersStr, setHeadersStr] = (0, import_react12.useState)("");
17781
+ const [errorMsg, setErrorMsg] = (0, import_react12.useState)(null);
17644
17782
  const startCreate = () => {
17645
17783
  setIsCreating(true);
17646
17784
  setEditingServer(null);
@@ -17792,29 +17930,29 @@ ${text}</tr>
17792
17930
  });
17793
17931
  };
17794
17932
  const showForm = isCreating || editingServer !== null;
17795
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "tab-pane mcp-tab", children: [
17796
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "tab-pane__header", children: [
17797
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { children: "Model Context Protocol" }),
17798
- !showForm && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "btn btn--primary btn--xs", onClick: startCreate, children: "+ Register Server" })
17933
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "tab-pane mcp-tab", children: [
17934
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "tab-pane__header", children: [
17935
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { children: "Model Context Protocol" }),
17936
+ !showForm && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "btn btn--primary btn--xs", onClick: startCreate, children: "+ Register Server" })
17799
17937
  ] }),
17800
- errorMsg && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "validation-error", children: [
17801
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TriangleAlert, { size: 13 }),
17938
+ errorMsg && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "validation-error", children: [
17939
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TriangleAlert, { size: 13 }),
17802
17940
  " ",
17803
17941
  errorMsg
17804
17942
  ] }),
17805
- mcpAuthOutcome && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: `sync-banner ${!mcpAuthOutcome.ok ? "sync-banner--error" : "sync-banner--success"}`, children: [
17806
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "sync-banner__title", children: [
17943
+ mcpAuthOutcome && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `sync-banner ${!mcpAuthOutcome.ok ? "sync-banner--error" : "sync-banner--success"}`, children: [
17944
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "sync-banner__title", children: [
17807
17945
  !mcpAuthOutcome.ok ? "Authentication Failed" : "Authentication Succeeded",
17808
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "sync-banner__close", onClick: () => setMcpAuthOutcome(null), "aria-label": "Dismiss", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(X, { size: 13 }) })
17946
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "sync-banner__close", onClick: () => setMcpAuthOutcome(null), "aria-label": "Dismiss", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(X, { size: 13 }) })
17809
17947
  ] }),
17810
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "sync-banner__body", children: !mcpAuthOutcome.ok ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "error-text", children: mcpAuthOutcome.error || "Authentication failed." }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Successfully authenticated with server." }) })
17948
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "sync-banner__body", children: !mcpAuthOutcome.ok ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "error-text", children: mcpAuthOutcome.error || "Authentication failed." }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "Successfully authenticated with server." }) })
17811
17949
  ] }),
17812
- showForm ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "glass-form", children: [
17813
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h4", { children: isCreating ? "Register MCP Server" : `Edit MCP Server: ${editingServer?.name}` }),
17814
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "glass-form__body", children: [
17815
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17816
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: "mcp-name", children: "Server Name" }),
17817
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17950
+ showForm ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "glass-form", children: [
17951
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h4", { children: isCreating ? "Register MCP Server" : `Edit MCP Server: ${editingServer?.name}` }),
17952
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "glass-form__body", children: [
17953
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
17954
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "mcp-name", children: "Server Name" }),
17955
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17818
17956
  "input",
17819
17957
  {
17820
17958
  id: "mcp-name",
@@ -17825,11 +17963,11 @@ ${text}</tr>
17825
17963
  }
17826
17964
  )
17827
17965
  ] }),
17828
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17829
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { children: "Connection Protocol" }),
17830
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "radio-group", children: [
17831
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: "radio-label", children: [
17832
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17966
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
17967
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { children: "Connection Protocol" }),
17968
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "radio-group", children: [
17969
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "radio-label", children: [
17970
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17833
17971
  "input",
17834
17972
  {
17835
17973
  type: "radio",
@@ -17838,10 +17976,10 @@ ${text}</tr>
17838
17976
  onChange: () => setTransport("stdio")
17839
17977
  }
17840
17978
  ),
17841
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Stdio Command (Local)" })
17979
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "Stdio Command (Local)" })
17842
17980
  ] }),
17843
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: "radio-label", children: [
17844
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17981
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "radio-label", children: [
17982
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17845
17983
  "input",
17846
17984
  {
17847
17985
  type: "radio",
@@ -17850,12 +17988,12 @@ ${text}</tr>
17850
17988
  onChange: () => setTransport("http")
17851
17989
  }
17852
17990
  ),
17853
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "HTTP Stream (Remote)" })
17991
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "HTTP Stream (Remote)" })
17854
17992
  ] })
17855
17993
  ] })
17856
17994
  ] }),
17857
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "form-group form-group--checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: "checkbox-label", children: [
17858
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
17995
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "form-group form-group--checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: "checkbox-label", children: [
17996
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17859
17997
  "input",
17860
17998
  {
17861
17999
  type: "checkbox",
@@ -17863,12 +18001,12 @@ ${text}</tr>
17863
18001
  onChange: (e) => setEnabled(e.target.checked)
17864
18002
  }
17865
18003
  ),
17866
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Enabled" })
18004
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "Enabled" })
17867
18005
  ] }) }),
17868
- transport === "stdio" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
17869
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17870
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: "mcp-command", children: "Executable / Command" }),
17871
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
18006
+ transport === "stdio" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
18007
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18008
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "mcp-command", children: "Executable / Command" }),
18009
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17872
18010
  "input",
17873
18011
  {
17874
18012
  id: "mcp-command",
@@ -17879,9 +18017,9 @@ ${text}</tr>
17879
18017
  }
17880
18018
  )
17881
18019
  ] }),
17882
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17883
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: "mcp-args", children: "Command Arguments (Space separated)" }),
17884
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
18020
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18021
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "mcp-args", children: "Command Arguments (Space separated)" }),
18022
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17885
18023
  "input",
17886
18024
  {
17887
18025
  id: "mcp-args",
@@ -17892,9 +18030,9 @@ ${text}</tr>
17892
18030
  }
17893
18031
  )
17894
18032
  ] }),
17895
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17896
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: "mcp-env", children: "Environment Variables (KEY=VALUE, one per line)" }),
17897
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
18033
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18034
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "mcp-env", children: "Environment Variables (KEY=VALUE, one per line)" }),
18035
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17898
18036
  "textarea",
17899
18037
  {
17900
18038
  id: "mcp-env",
@@ -17905,10 +18043,10 @@ ${text}</tr>
17905
18043
  }
17906
18044
  )
17907
18045
  ] })
17908
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
17909
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17910
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: "mcp-url", children: "HTTP Endpoint URL" }),
17911
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
18046
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
18047
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18048
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "mcp-url", children: "HTTP Endpoint URL" }),
18049
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17912
18050
  "input",
17913
18051
  {
17914
18052
  id: "mcp-url",
@@ -17919,9 +18057,9 @@ ${text}</tr>
17919
18057
  }
17920
18058
  )
17921
18059
  ] }),
17922
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-group", children: [
17923
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: "mcp-headers", children: "HTTP Headers (KEY=VALUE, one per line)" }),
17924
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
18060
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18061
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "mcp-headers", children: "HTTP Headers (KEY=VALUE, one per line)" }),
18062
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17925
18063
  "textarea",
17926
18064
  {
17927
18065
  id: "mcp-headers",
@@ -17934,50 +18072,50 @@ ${text}</tr>
17934
18072
  ] })
17935
18073
  ] })
17936
18074
  ] }),
17937
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "form-actions", children: [
17938
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "btn btn--secondary", onClick: cancelForm, children: "Cancel" }),
17939
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "btn btn--primary", onClick: validateAndSave, children: "Save" })
18075
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-actions", children: [
18076
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "btn btn--secondary", onClick: cancelForm, children: "Cancel" }),
18077
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "btn btn--primary", onClick: validateAndSave, children: "Save" })
17940
18078
  ] })
17941
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "settings-list", children: mcpServersFile.servers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "empty-message", children: "No MCP servers registered. Connect filesystem tools or semantic indexes." }) : mcpServersFile.servers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card", children: [
17942
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__body", children: [
17943
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__title", children: [
18079
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "settings-list", children: mcpServersFile.servers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "empty-message", children: "No MCP servers registered. Connect filesystem tools or semantic indexes." }) : mcpServersFile.servers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card", children: [
18080
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__body", children: [
18081
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__title", children: [
17944
18082
  server.name,
17945
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "toggle-pill-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
18083
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "toggle-pill-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17946
18084
  "button",
17947
18085
  {
17948
18086
  className: `toggle-pill ${server.enabled ? "toggle-pill--active" : ""}`,
17949
18087
  onClick: () => toggleServerEnabled(server),
17950
18088
  title: server.enabled ? "Disable server" : "Enable server",
17951
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "toggle-pill__handle" })
18089
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "toggle-pill__handle" })
17952
18090
  }
17953
18091
  ) })
17954
18092
  ] }),
17955
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__subtitle", children: [
18093
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__subtitle", children: [
17956
18094
  server.transport === "stdio" ? "Stdio Stdio" : "SSE Stream",
17957
- server.pluginId && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "settings-card__badge-managed", title: "Managed by a plugin sync", children: "Managed" })
18095
+ server.pluginId && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "settings-card__badge-managed", title: "Managed by a plugin sync", children: "Managed" })
17958
18096
  ] }),
17959
- server.transport === "stdio" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__metadata text-ellipsis", title: `${server.command} ${server.args?.join(" ")}`, children: [
18097
+ server.transport === "stdio" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__metadata text-ellipsis", title: `${server.command} ${server.args?.join(" ")}`, children: [
17960
18098
  "Cmd: ",
17961
18099
  server.command,
17962
18100
  " ",
17963
18101
  server.args?.join(" ")
17964
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__metadata text-ellipsis", title: server.url, children: [
18102
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__metadata text-ellipsis", title: server.url, children: [
17965
18103
  "URL: ",
17966
18104
  server.url
17967
18105
  ] }),
17968
- server.lastConnectError && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__error-text text-ellipsis", title: server.lastConnectError, children: [
17969
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TriangleAlert, { size: 13 }),
18106
+ server.lastConnectError && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__error-text text-ellipsis", title: server.lastConnectError, children: [
18107
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TriangleAlert, { size: 13 }),
17970
18108
  " Connect Error: ",
17971
18109
  server.lastConnectError
17972
18110
  ] }),
17973
- server.transport === "http" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__metadata", children: [
18111
+ server.transport === "http" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__metadata", children: [
17974
18112
  "Status:",
17975
18113
  " ",
17976
- server.hasMcpTokens ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "success-text", style: { fontWeight: "500" }, children: "authenticated" }) : /(401|unauthorized)/i.test(server.lastConnectError ?? "") ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "error-text", style: { fontWeight: "500" }, children: "needs authentication" }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "muted-text", children: "not authenticated" })
18114
+ server.hasMcpTokens ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "success-text", style: { fontWeight: "500" }, children: "authenticated" }) : /(401|unauthorized)/i.test(server.lastConnectError ?? "") ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "error-text", style: { fontWeight: "500" }, children: "needs authentication" }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "muted-text", children: "not authenticated" })
17977
18115
  ] })
17978
18116
  ] }),
17979
- (!server.pluginId || server.transport === "http") && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "settings-card__actions", style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
17980
- server.transport === "http" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
18117
+ (!server.pluginId || server.transport === "http") && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__actions", style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
18118
+ server.transport === "http" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17981
18119
  "button",
17982
18120
  {
17983
18121
  className: "btn btn--secondary btn--xs",
@@ -17985,7 +18123,7 @@ ${text}</tr>
17985
18123
  children: "Authenticate"
17986
18124
  }
17987
18125
  ),
17988
- server.transport === "http" && server.hasMcpTokens && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
18126
+ server.transport === "http" && server.hasMcpTokens && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17989
18127
  "button",
17990
18128
  {
17991
18129
  className: "btn btn--secondary btn--xs",
@@ -17993,25 +18131,25 @@ ${text}</tr>
17993
18131
  children: "Sign out"
17994
18132
  }
17995
18133
  ),
17996
- !server.pluginId && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
17997
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
18134
+ !server.pluginId && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
18135
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
17998
18136
  "button",
17999
18137
  {
18000
18138
  className: "icon-btn",
18001
18139
  onClick: () => startEdit(server),
18002
18140
  title: "Edit server",
18003
18141
  "aria-label": "Edit server",
18004
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Pencil, { size: 13 })
18142
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Pencil, { size: 13 })
18005
18143
  }
18006
18144
  ),
18007
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
18145
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18008
18146
  "button",
18009
18147
  {
18010
18148
  className: "icon-btn icon-btn--danger",
18011
18149
  onClick: () => deleteServer(server.id),
18012
18150
  title: "Delete server",
18013
18151
  "aria-label": "Delete server",
18014
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Trash2, { size: 13 })
18152
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Trash2, { size: 13 })
18015
18153
  }
18016
18154
  )
18017
18155
  ] })
@@ -18021,8 +18159,8 @@ ${text}</tr>
18021
18159
  }
18022
18160
 
18023
18161
  // src/SchedulerTab.tsx
18024
- var import_react12 = __toESM(require_react(), 1);
18025
- var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
18162
+ var import_react13 = __toESM(require_react(), 1);
18163
+ var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
18026
18164
  function closeStreamingAssistant(items) {
18027
18165
  const last = items[items.length - 1];
18028
18166
  if (!last || last.kind !== "assistant" || !last.streaming) return items;
@@ -18080,20 +18218,20 @@ ${text}</tr>
18080
18218
  }
18081
18219
  function SchedulerTab({ config, agents, postMessage, taskRuns = {} }) {
18082
18220
  const tasks = config.scheduler?.tasks || [];
18083
- const [editingTask, setEditingTask] = (0, import_react12.useState)(null);
18084
- const [isCreating, setIsCreating] = (0, import_react12.useState)(false);
18085
- const [viewingTaskLogs, setViewingTaskLogs] = (0, import_react12.useState)(null);
18086
- const [selectedRunId, setSelectedRunId] = (0, import_react12.useState)(null);
18087
- const [name, setName] = (0, import_react12.useState)("");
18088
- const [type, setType] = (0, import_react12.useState)("heartbeat");
18089
- const [enabled, setEnabled] = (0, import_react12.useState)(true);
18090
- const [agentId, setAgentId] = (0, import_react12.useState)("");
18091
- const [workingDir, setWorkingDir] = (0, import_react12.useState)("");
18092
- const [prompt, setPrompt] = (0, import_react12.useState)("");
18093
- const [cron, setCron] = (0, import_react12.useState)("*/15 * * * *");
18094
- const [telegramBotToken, setTelegramBotToken] = (0, import_react12.useState)("");
18095
- const [telegramAllowedChats, setTelegramAllowedChats] = (0, import_react12.useState)("");
18096
- const [errorMsg, setErrorMsg] = (0, import_react12.useState)(null);
18221
+ const [editingTask, setEditingTask] = (0, import_react13.useState)(null);
18222
+ const [isCreating, setIsCreating] = (0, import_react13.useState)(false);
18223
+ const [viewingTaskLogs, setViewingTaskLogs] = (0, import_react13.useState)(null);
18224
+ const [selectedRunId, setSelectedRunId] = (0, import_react13.useState)(null);
18225
+ const [name, setName] = (0, import_react13.useState)("");
18226
+ const [type, setType] = (0, import_react13.useState)("heartbeat");
18227
+ const [enabled, setEnabled] = (0, import_react13.useState)(true);
18228
+ const [agentId, setAgentId] = (0, import_react13.useState)("");
18229
+ const [workingDir, setWorkingDir] = (0, import_react13.useState)("");
18230
+ const [prompt, setPrompt] = (0, import_react13.useState)("");
18231
+ const [cron, setCron] = (0, import_react13.useState)("*/15 * * * *");
18232
+ const [telegramBotToken, setTelegramBotToken] = (0, import_react13.useState)("");
18233
+ const [telegramAllowedChats, setTelegramAllowedChats] = (0, import_react13.useState)("");
18234
+ const [errorMsg, setErrorMsg] = (0, import_react13.useState)(null);
18097
18235
  const startEdit = (task) => {
18098
18236
  setEditingTask(task);
18099
18237
  setIsCreating(false);
@@ -18247,24 +18385,24 @@ ${text}</tr>
18247
18385
  const runs = viewingTaskLogs ? taskRuns[viewingTaskLogs.id] || [] : [];
18248
18386
  const activeRunId = selectedRunId || runs[0]?.runId;
18249
18387
  const activeRun = runs.find((r) => r.runId === activeRunId);
18250
- const activeRunChatItems = (0, import_react12.useMemo)(() => activeRun ? reconstructChatItems(activeRun.messages || []) : [], [activeRun]);
18388
+ const activeRunChatItems = (0, import_react13.useMemo)(() => activeRun ? reconstructChatItems(activeRun.messages || []) : [], [activeRun]);
18251
18389
  const selectedAgentName = viewingTaskLogs ? agents.find((a) => a.id === viewingTaskLogs.agentId)?.name : "";
18252
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "tab-pane scheduler-tab", children: [
18253
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "tab-pane__header", children: [
18254
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { children: "Scheduled Tasks" }),
18255
- !showForm && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "btn btn--primary btn--xs", onClick: startCreate, children: "+ Add Task" })
18390
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "tab-pane scheduler-tab", children: [
18391
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "tab-pane__header", children: [
18392
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { children: "Scheduled Tasks" }),
18393
+ !showForm && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { className: "btn btn--primary btn--xs", onClick: startCreate, children: "+ Add Task" })
18256
18394
  ] }),
18257
- errorMsg && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "validation-error", children: [
18258
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TriangleAlert, { size: 14 }),
18395
+ errorMsg && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "validation-error", children: [
18396
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TriangleAlert, { size: 14 }),
18259
18397
  " ",
18260
18398
  errorMsg
18261
18399
  ] }),
18262
- showForm ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "glass-form", children: [
18263
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h4", { children: isCreating ? "Add Scheduled Task" : `Edit Task: ${editingTask?.name}` }),
18264
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "glass-form__body", children: [
18265
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18266
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "task-name", children: "Task Name" }),
18267
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18400
+ showForm ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "glass-form", children: [
18401
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h4", { children: isCreating ? "Add Scheduled Task" : `Edit Task: ${editingTask?.name}` }),
18402
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "glass-form__body", children: [
18403
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", children: [
18404
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { htmlFor: "task-name", children: "Task Name" }),
18405
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18268
18406
  "input",
18269
18407
  {
18270
18408
  id: "task-name",
@@ -18275,9 +18413,9 @@ ${text}</tr>
18275
18413
  }
18276
18414
  )
18277
18415
  ] }),
18278
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18279
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "task-type", children: "Task Type" }),
18280
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
18416
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", children: [
18417
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { htmlFor: "task-type", children: "Task Type" }),
18418
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
18281
18419
  "select",
18282
18420
  {
18283
18421
  id: "task-type",
@@ -18294,14 +18432,14 @@ ${text}</tr>
18294
18432
  cursor: "pointer"
18295
18433
  },
18296
18434
  children: [
18297
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: "heartbeat", children: "Heartbeat (Recurring Agent Execution)" }),
18298
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: "telegram", children: "Telegram Poller (Autonomous Telegram Agent)" })
18435
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "heartbeat", children: "Heartbeat (Recurring Agent Execution)" }),
18436
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "telegram", children: "Telegram Poller (Autonomous Telegram Agent)" })
18299
18437
  ]
18300
18438
  }
18301
18439
  )
18302
18440
  ] }),
18303
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", style: { display: "flex", alignItems: "center", gap: "8px", margin: "14px 0" }, children: [
18304
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18441
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", style: { display: "flex", alignItems: "center", gap: "8px", margin: "14px 0" }, children: [
18442
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18305
18443
  "input",
18306
18444
  {
18307
18445
  id: "task-enabled",
@@ -18311,11 +18449,11 @@ ${text}</tr>
18311
18449
  style: { width: "auto", cursor: "pointer" }
18312
18450
  }
18313
18451
  ),
18314
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "task-enabled", style: { cursor: "pointer", fontWeight: 600, fontSize: "12px" }, children: "Active (Run scheduler for this task)" })
18452
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { htmlFor: "task-enabled", style: { cursor: "pointer", fontWeight: 600, fontSize: "12px" }, children: "Active (Run scheduler for this task)" })
18315
18453
  ] }),
18316
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18317
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "task-agent", children: "Agent to Execute" }),
18318
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
18454
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", children: [
18455
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { htmlFor: "task-agent", children: "Agent to Execute" }),
18456
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
18319
18457
  "select",
18320
18458
  {
18321
18459
  id: "task-agent",
@@ -18332,16 +18470,16 @@ ${text}</tr>
18332
18470
  cursor: "pointer"
18333
18471
  },
18334
18472
  children: [
18335
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
18336
- agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
18473
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
18474
+ agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
18337
18475
  ]
18338
18476
  }
18339
18477
  )
18340
18478
  ] }),
18341
- type === "heartbeat" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
18342
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18343
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "task-cron", children: "Cron Timing" }),
18344
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18479
+ type === "heartbeat" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
18480
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", children: [
18481
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { htmlFor: "task-cron", children: "Cron Timing" }),
18482
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18345
18483
  "input",
18346
18484
  {
18347
18485
  id: "task-cron",
@@ -18352,9 +18490,9 @@ ${text}</tr>
18352
18490
  }
18353
18491
  )
18354
18492
  ] }),
18355
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18356
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "task-dir", children: "Working Directory (Absolute path, optional)" }),
18357
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18493
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", children: [
18494
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { htmlFor: "task-dir", children: "Working Directory (Absolute path, optional)" }),
18495
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18358
18496
  "input",
18359
18497
  {
18360
18498
  id: "task-dir",
@@ -18365,9 +18503,9 @@ ${text}</tr>
18365
18503
  }
18366
18504
  )
18367
18505
  ] }),
18368
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18369
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "task-prompt", children: "Periodic Prompt" }),
18370
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18506
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", children: [
18507
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { htmlFor: "task-prompt", children: "Periodic Prompt" }),
18508
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18371
18509
  "textarea",
18372
18510
  {
18373
18511
  id: "task-prompt",
@@ -18389,10 +18527,10 @@ ${text}</tr>
18389
18527
  }
18390
18528
  )
18391
18529
  ] })
18392
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
18393
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18394
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "tg-token", children: "Telegram Bot Token" }),
18395
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18530
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
18531
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", children: [
18532
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { htmlFor: "tg-token", children: "Telegram Bot Token" }),
18533
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18396
18534
  "input",
18397
18535
  {
18398
18536
  id: "tg-token",
@@ -18403,9 +18541,9 @@ ${text}</tr>
18403
18541
  }
18404
18542
  )
18405
18543
  ] }),
18406
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-group", children: [
18407
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { htmlFor: "tg-chats", children: "Allowed Chat IDs (Comma-separated, optional)" }),
18408
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18544
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", children: [
18545
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { htmlFor: "tg-chats", children: "Allowed Chat IDs (Comma-separated, optional)" }),
18546
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18409
18547
  "input",
18410
18548
  {
18411
18549
  id: "tg-chats",
@@ -18415,7 +18553,7 @@ ${text}</tr>
18415
18553
  onChange: (e) => setTelegramAllowedChats(e.target.value)
18416
18554
  }
18417
18555
  ),
18418
- telegramAllowedChats.trim() === "" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: {
18556
+ telegramAllowedChats.trim() === "" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { style: {
18419
18557
  background: "rgba(220, 150, 50, 0.10)",
18420
18558
  border: "1px solid rgba(220, 150, 50, 0.35)",
18421
18559
  borderRadius: "var(--radius-md)",
@@ -18425,13 +18563,13 @@ ${text}</tr>
18425
18563
  lineHeight: "1.4",
18426
18564
  color: "var(--vscode-notificationsWarningIcon-foreground, #d49a32)"
18427
18565
  }, children: [
18428
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TriangleAlert, { size: 13 }),
18566
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TriangleAlert, { size: 13 }),
18429
18567
  " ",
18430
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: "Security:" }),
18568
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Security:" }),
18431
18569
  " with no whitelist, anyone who sends a message to this bot can execute every tool this agent has enabled \u2014 including shell commands and filesystem writes. Tool calls run with auto-approval; the chat ID whitelist is the only access boundary."
18432
18570
  ] })
18433
18571
  ] }),
18434
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "glass-form__help-card", style: {
18572
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "glass-form__help-card", style: {
18435
18573
  background: "rgba(255, 255, 255, 0.03)",
18436
18574
  border: "1px solid rgba(255, 255, 255, 0.05)",
18437
18575
  borderRadius: "var(--radius-md)",
@@ -18441,37 +18579,37 @@ ${text}</tr>
18441
18579
  lineHeight: "1.4",
18442
18580
  color: "var(--vscode-descriptionForeground)"
18443
18581
  }, children: [
18444
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("strong", { children: [
18445
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Lightbulb, { size: 14 }),
18582
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("strong", { children: [
18583
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Lightbulb, { size: 14 }),
18446
18584
  " Quick Setup Guide:"
18447
18585
  ] }),
18448
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("ol", { style: { margin: "6px 0 0 16px", padding: 0 }, children: [
18449
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
18586
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("ol", { style: { margin: "6px 0 0 16px", padding: 0 }, children: [
18587
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { children: [
18450
18588
  "Create a new bot via Telegram's ",
18451
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: "@BotFather" }),
18589
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "@BotFather" }),
18452
18590
  " to obtain your HTTP API token."
18453
18591
  ] }),
18454
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { children: [
18592
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { children: [
18455
18593
  "Obtain your chat ID by messaging ",
18456
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: "@userinfobot" }),
18594
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "@userinfobot" }),
18457
18595
  " on Telegram."
18458
18596
  ] }),
18459
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: "Whitelist your chat ID above to prevent unauthorized users from using your local shell/tools!" })
18597
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: "Whitelist your chat ID above to prevent unauthorized users from using your local shell/tools!" })
18460
18598
  ] })
18461
18599
  ] })
18462
18600
  ] })
18463
18601
  ] }),
18464
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "form-actions", children: [
18465
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "btn btn--secondary", onClick: cancelForm, children: "Cancel" }),
18466
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "btn btn--primary", onClick: validateAndSave, children: "Save Task" })
18602
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-actions", children: [
18603
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { className: "btn btn--secondary", onClick: cancelForm, children: "Cancel" }),
18604
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { className: "btn btn--primary", onClick: validateAndSave, children: "Save Task" })
18467
18605
  ] })
18468
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "settings-list", children: tasks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "empty-message", children: "No scheduled tasks configured. Add a heartbeat task to run agents periodically." }) : tasks.map((task) => {
18606
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "settings-list", children: tasks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "empty-message", children: "No scheduled tasks configured. Add a heartbeat task to run agents periodically." }) : tasks.map((task) => {
18469
18607
  const agentName = agents.find((a) => a.id === task.agentId)?.name || task.agentId;
18470
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card", children: [
18471
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__body", children: [
18472
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__title", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
18473
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: task.name }),
18474
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18608
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "settings-card", children: [
18609
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "settings-card__body", children: [
18610
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "settings-card__title", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
18611
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: task.name }),
18612
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18475
18613
  "span",
18476
18614
  {
18477
18615
  onClick: () => toggleTaskEnabled(task),
@@ -18490,43 +18628,43 @@ ${text}</tr>
18490
18628
  gap: "4px"
18491
18629
  },
18492
18630
  title: "Toggle task active state",
18493
- children: task.enabled ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
18494
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Circle, { size: 9, fill: "currentColor" }),
18631
+ children: task.enabled ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
18632
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Circle, { size: 9, fill: "currentColor" }),
18495
18633
  " Active"
18496
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
18497
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Circle, { size: 9 }),
18634
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
18635
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Circle, { size: 9 }),
18498
18636
  " Off"
18499
18637
  ] })
18500
18638
  }
18501
18639
  )
18502
18640
  ] }),
18503
- task.type === "telegram" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__subtitle", style: { fontSize: "11px", marginTop: "4px" }, children: [
18504
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: "Agent:" }),
18641
+ task.type === "telegram" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "settings-card__subtitle", style: { fontSize: "11px", marginTop: "4px" }, children: [
18642
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Agent:" }),
18505
18643
  " ",
18506
18644
  agentName,
18507
18645
  " \xB7 ",
18508
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: "Type:" }),
18646
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Type:" }),
18509
18647
  " ",
18510
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("code", { children: "Telegram Poller" })
18511
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
18512
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__subtitle", style: { fontSize: "11px", marginTop: "4px" }, children: [
18513
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: "Agent:" }),
18648
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: "Telegram Poller" })
18649
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
18650
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "settings-card__subtitle", style: { fontSize: "11px", marginTop: "4px" }, children: [
18651
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Agent:" }),
18514
18652
  " ",
18515
18653
  agentName,
18516
18654
  " \xB7 ",
18517
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: "Schedule:" }),
18655
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "Schedule:" }),
18518
18656
  " ",
18519
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("code", { children: task.cron })
18657
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: task.cron })
18520
18658
  ] }),
18521
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__subtitle", style: { fontSize: "11px", fontStyle: "italic", opacity: 0.85, marginTop: "2px" }, children: [
18659
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "settings-card__subtitle", style: { fontSize: "11px", fontStyle: "italic", opacity: 0.85, marginTop: "2px" }, children: [
18522
18660
  '"',
18523
18661
  task.prompt.length > 60 ? task.prompt.substring(0, 57) + "..." : task.prompt,
18524
18662
  '"'
18525
18663
  ] })
18526
18664
  ] })
18527
18665
  ] }),
18528
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "settings-card__actions", children: [
18529
- task.type !== "telegram" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18666
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "settings-card__actions", children: [
18667
+ task.type !== "telegram" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18530
18668
  "button",
18531
18669
  {
18532
18670
  className: "icon-btn",
@@ -18534,67 +18672,67 @@ ${text}</tr>
18534
18672
  title: "View execution logs",
18535
18673
  "aria-label": "View execution logs",
18536
18674
  style: { fontSize: "12px", marginRight: "4px" },
18537
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ScrollText, { size: 13 })
18675
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollText, { size: 13 })
18538
18676
  }
18539
18677
  ),
18540
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18678
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18541
18679
  "button",
18542
18680
  {
18543
18681
  className: "icon-btn",
18544
18682
  onClick: () => startEdit(task),
18545
18683
  title: "Edit task",
18546
18684
  "aria-label": "Edit task",
18547
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Pencil, { size: 14 })
18685
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Pencil, { size: 14 })
18548
18686
  }
18549
18687
  ),
18550
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18688
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18551
18689
  "button",
18552
18690
  {
18553
18691
  className: "icon-btn icon-btn--danger",
18554
18692
  onClick: () => deleteTask(task.id),
18555
18693
  title: "Delete task",
18556
18694
  "aria-label": "Delete task",
18557
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Trash2, { size: 14 })
18695
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Trash2, { size: 14 })
18558
18696
  }
18559
18697
  )
18560
18698
  ] })
18561
18699
  ] }, task.id);
18562
18700
  }) }),
18563
- viewingTaskLogs && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "execution-console", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "execution-console__panel", children: [
18564
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("header", { className: "execution-console__header", children: [
18565
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("h3", { style: { margin: 0, fontSize: "14px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
18566
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ScrollText, { size: 14 }),
18701
+ viewingTaskLogs && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "execution-console", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "execution-console__panel", children: [
18702
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { className: "execution-console__header", children: [
18703
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("h3", { style: { margin: 0, fontSize: "14px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
18704
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollText, { size: 14 }),
18567
18705
  " Execution Logs: ",
18568
18706
  viewingTaskLogs.name
18569
18707
  ] }),
18570
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18708
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18571
18709
  "button",
18572
18710
  {
18573
18711
  className: "execution-console__close-btn",
18574
18712
  onClick: () => setViewingTaskLogs(null),
18575
18713
  title: "Close console",
18576
18714
  "aria-label": "Close console",
18577
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(X, { size: 16 })
18715
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(X, { size: 16 })
18578
18716
  }
18579
18717
  )
18580
18718
  ] }),
18581
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "execution-console__body", children: [
18582
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "execution-console__runs-list", children: [
18583
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "app__sidebar-section-title", style: { paddingLeft: "4px", marginBottom: "8px" }, children: "Execution History" }),
18584
- runs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "app__sidebar-empty-text", children: "No execution runs recorded yet." }) : runs.map((run) => {
18719
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "execution-console__body", children: [
18720
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "execution-console__runs-list", children: [
18721
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "app__sidebar-section-title", style: { paddingLeft: "4px", marginBottom: "8px" }, children: "Execution History" }),
18722
+ runs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "app__sidebar-empty-text", children: "No execution runs recorded yet." }) : runs.map((run) => {
18585
18723
  const isSelected = run.runId === activeRunId;
18586
18724
  const date = new Date(run.timestamp);
18587
18725
  const formattedDate = date.toLocaleString();
18588
18726
  const isSuccess = run.status === "success";
18589
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
18727
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
18590
18728
  "button",
18591
18729
  {
18592
18730
  className: `execution-console__run-item ${isSelected ? "execution-console__run-item--active" : ""}`,
18593
18731
  onClick: () => setSelectedRunId(run.runId),
18594
18732
  children: [
18595
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", width: "100%" }, children: [
18596
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { fontSize: "10px", color: "var(--vscode-descriptionForeground)" }, children: run.runId }),
18597
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: {
18733
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", width: "100%" }, children: [
18734
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { style: { fontSize: "10px", color: "var(--vscode-descriptionForeground)" }, children: run.runId }),
18735
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { style: {
18598
18736
  fontSize: "9px",
18599
18737
  fontWeight: 700,
18600
18738
  padding: "1px 5px",
@@ -18604,31 +18742,31 @@ ${text}</tr>
18604
18742
  border: `1px solid ${isSuccess ? "oklch(0.72 0.18 140 / 0.3)" : "oklch(0.6 0.18 20 / 0.3)"}`
18605
18743
  }, children: run.status.toUpperCase() })
18606
18744
  ] }),
18607
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { fontSize: "11px", fontWeight: 600, marginTop: "2px" }, children: formattedDate })
18745
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { style: { fontSize: "11px", fontWeight: 600, marginTop: "2px" }, children: formattedDate })
18608
18746
  ]
18609
18747
  },
18610
18748
  run.runId
18611
18749
  );
18612
18750
  })
18613
18751
  ] }),
18614
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "execution-console__run-details", children: activeRun ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
18615
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "execution-console__run-header", children: [
18616
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [
18617
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { style: { fontSize: "12px", fontWeight: 700 }, children: [
18752
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "execution-console__run-details", children: activeRun ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
18753
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "execution-console__run-header", children: [
18754
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [
18755
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { style: { fontSize: "12px", fontWeight: 700 }, children: [
18618
18756
  "Run: ",
18619
18757
  activeRun.runId
18620
18758
  ] }),
18621
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { style: { fontSize: "10px", color: "var(--vscode-descriptionForeground)" }, children: [
18759
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { style: { fontSize: "10px", color: "var(--vscode-descriptionForeground)" }, children: [
18622
18760
  "Executed on: ",
18623
18761
  new Date(activeRun.timestamp).toLocaleString()
18624
18762
  ] })
18625
18763
  ] }),
18626
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)" }, children: [
18764
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)" }, children: [
18627
18765
  "Agent: ",
18628
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: selectedAgentName })
18766
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: selectedAgentName })
18629
18767
  ] }) })
18630
18768
  ] }),
18631
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "messages", style: { padding: "20px 24px", flex: 1, overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
18769
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "messages", style: { padding: "20px 24px", flex: 1, overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18632
18770
  MessageList,
18633
18771
  {
18634
18772
  items: activeRunChatItems,
@@ -18636,14 +18774,14 @@ ${text}</tr>
18636
18774
  agentName: selectedAgentName
18637
18775
  }
18638
18776
  ) })
18639
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "app__empty-state", style: { height: "100%", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { children: "Select an execution run from the left sidebar to view details" }) }) })
18777
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "app__empty-state", style: { height: "100%", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: "Select an execution run from the left sidebar to view details" }) }) })
18640
18778
  ] })
18641
18779
  ] }) })
18642
18780
  ] });
18643
18781
  }
18644
18782
 
18645
18783
  // src/VoiceTab.tsx
18646
- var import_react14 = __toESM(require_react(), 1);
18784
+ var import_react15 = __toESM(require_react(), 1);
18647
18785
 
18648
18786
  // src/voice_utils.ts
18649
18787
  var END_OF_TURN_MS = 1200;
@@ -18711,7 +18849,7 @@ ${text}</tr>
18711
18849
  }
18712
18850
 
18713
18851
  // src/VoiceBackendBlock.tsx
18714
- var import_react13 = __toESM(require_react(), 1);
18852
+ var import_react14 = __toESM(require_react(), 1);
18715
18853
 
18716
18854
  // src/voice_backend_utils.ts
18717
18855
  function backendStatusText(status) {
@@ -18728,7 +18866,7 @@ ${text}</tr>
18728
18866
  }
18729
18867
 
18730
18868
  // src/VoiceBackendBlock.tsx
18731
- var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
18869
+ var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
18732
18870
  var CONFIRM_DELETE_MS = 4e3;
18733
18871
  function VoiceBackendBlock({
18734
18872
  target,
@@ -18737,11 +18875,11 @@ ${text}</tr>
18737
18875
  onStatusChange,
18738
18876
  hint
18739
18877
  }) {
18740
- const [busy, setBusy] = (0, import_react13.useState)(false);
18741
- const [progress, setProgress] = (0, import_react13.useState)(null);
18742
- const [error, setError] = (0, import_react13.useState)(null);
18743
- const [confirmingDelete, setConfirmingDelete] = (0, import_react13.useState)(false);
18744
- const confirmDeleteTimer = (0, import_react13.useRef)(null);
18878
+ const [busy, setBusy] = (0, import_react14.useState)(false);
18879
+ const [progress, setProgress] = (0, import_react14.useState)(null);
18880
+ const [error, setError] = (0, import_react14.useState)(null);
18881
+ const [confirmingDelete, setConfirmingDelete] = (0, import_react14.useState)(false);
18882
+ const confirmDeleteTimer = (0, import_react14.useRef)(null);
18745
18883
  const disarmDelete = () => {
18746
18884
  if (confirmDeleteTimer.current) clearTimeout(confirmDeleteTimer.current);
18747
18885
  confirmDeleteTimer.current = null;
@@ -18755,14 +18893,14 @@ ${text}</tr>
18755
18893
  CONFIRM_DELETE_MS
18756
18894
  );
18757
18895
  };
18758
- (0, import_react13.useEffect)(
18896
+ (0, import_react14.useEffect)(
18759
18897
  () => () => {
18760
18898
  if (confirmDeleteTimer.current) clearTimeout(confirmDeleteTimer.current);
18761
18899
  },
18762
18900
  []
18763
18901
  );
18764
- const lastContainer = (0, import_react13.useRef)(null);
18765
- (0, import_react13.useEffect)(() => {
18902
+ const lastContainer = (0, import_react14.useRef)(null);
18903
+ (0, import_react14.useEffect)(() => {
18766
18904
  if (status.container === "running" && lastContainer.current !== "running") {
18767
18905
  setError(null);
18768
18906
  }
@@ -18845,11 +18983,11 @@ ${text}</tr>
18845
18983
  setBusy(false);
18846
18984
  }
18847
18985
  };
18848
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", children: [
18849
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "voice-backend-status", children: [
18850
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: progress ?? backendStatusText(status) }),
18851
- status.container === "running" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: stop, disabled: busy, children: busy ? "Stopping\u2026" : "Stop" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: start, disabled: busy, children: busy ? "Starting\u2026" : "Start" }),
18852
- status.container !== "absent" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
18986
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
18987
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "voice-backend-status", children: [
18988
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: progress ?? backendStatusText(status) }),
18989
+ status.container === "running" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: stop, disabled: busy, children: busy ? "Stopping\u2026" : "Stop" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: start, disabled: busy, children: busy ? "Starting\u2026" : "Start" }),
18990
+ status.container !== "absent" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
18853
18991
  "button",
18854
18992
  {
18855
18993
  type: "button",
@@ -18859,9 +18997,9 @@ ${text}</tr>
18859
18997
  }
18860
18998
  )
18861
18999
  ] }),
18862
- error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { className: "form-error", children: error }),
18863
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("small", { children: [
18864
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("strong", { children: [
19000
+ error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { className: "form-error", children: error }),
19001
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
19002
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("strong", { children: [
18865
19003
  label,
18866
19004
  "."
18867
19005
  ] }),
@@ -18872,7 +19010,7 @@ ${text}</tr>
18872
19010
  }
18873
19011
 
18874
19012
  // src/VoiceTab.tsx
18875
- var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
19013
+ var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
18876
19014
  var BACKEND_POLL_MS = 1e4;
18877
19015
  var EMPTY = { enabled: false, endpoint: "", sttModel: "" };
18878
19016
  var LOCAL_DEFAULTS = {
@@ -18897,24 +19035,24 @@ ${text}</tr>
18897
19035
  }
18898
19036
  function VoiceTab({ config, onSave, postMessage, sttCatalogResult, ttsCatalogResult }) {
18899
19037
  const current = config.voice ?? EMPTY;
18900
- const [enabled, setEnabled] = (0, import_react14.useState)(current.enabled);
18901
- const [endpoint, setEndpoint] = (0, import_react14.useState)(current.endpoint);
18902
- const [apiKey, setApiKey] = (0, import_react14.useState)(current.apiKey ?? "");
18903
- const [sttModel, setSttModel] = (0, import_react14.useState)(current.sttModel);
18904
- const [ttsEndpoint, setTtsEndpoint] = (0, import_react14.useState)(current.ttsEndpoint ?? "");
18905
- const [ttsApiKey, setTtsApiKey] = (0, import_react14.useState)(current.ttsApiKey ?? "");
18906
- const [ttsModel, setTtsModel] = (0, import_react14.useState)(current.ttsModel ?? "");
18907
- const [ttsVoice, setTtsVoice] = (0, import_react14.useState)(current.ttsVoice ?? "");
18908
- const [ttsSpeed, setTtsSpeed] = (0, import_react14.useState)(
19038
+ const [enabled, setEnabled] = (0, import_react15.useState)(current.enabled);
19039
+ const [endpoint, setEndpoint] = (0, import_react15.useState)(current.endpoint);
19040
+ const [apiKey, setApiKey] = (0, import_react15.useState)(current.apiKey ?? "");
19041
+ const [sttModel, setSttModel] = (0, import_react15.useState)(current.sttModel);
19042
+ const [ttsEndpoint, setTtsEndpoint] = (0, import_react15.useState)(current.ttsEndpoint ?? "");
19043
+ const [ttsApiKey, setTtsApiKey] = (0, import_react15.useState)(current.ttsApiKey ?? "");
19044
+ const [ttsModel, setTtsModel] = (0, import_react15.useState)(current.ttsModel ?? "");
19045
+ const [ttsVoice, setTtsVoice] = (0, import_react15.useState)(current.ttsVoice ?? "");
19046
+ const [ttsSpeed, setTtsSpeed] = (0, import_react15.useState)(
18909
19047
  current.ttsSpeed === void 0 ? "" : String(current.ttsSpeed)
18910
19048
  );
18911
- const [lang, setLang] = (0, import_react14.useState)(current.lang ?? "");
18912
- const [fetching, setFetching] = (0, import_react14.useState)(false);
18913
- const [fetchingTts, setFetchingTts] = (0, import_react14.useState)(false);
18914
- const [saveState, setSaveState] = (0, import_react14.useState)("idle");
18915
- const pendingSave = (0, import_react14.useRef)(null);
18916
- const [autoStartBackend, setAutoStartBackend] = (0, import_react14.useState)(current.autoStartBackend ?? false);
18917
- const [backendStatuses, setBackendStatuses] = (0, import_react14.useState)(null);
19049
+ const [lang, setLang] = (0, import_react15.useState)(current.lang ?? "");
19050
+ const [fetching, setFetching] = (0, import_react15.useState)(false);
19051
+ const [fetchingTts, setFetchingTts] = (0, import_react15.useState)(false);
19052
+ const [saveState, setSaveState] = (0, import_react15.useState)("idle");
19053
+ const pendingSave = (0, import_react15.useRef)(null);
19054
+ const [autoStartBackend, setAutoStartBackend] = (0, import_react15.useState)(current.autoStartBackend ?? false);
19055
+ const [backendStatuses, setBackendStatuses] = (0, import_react15.useState)(null);
18918
19056
  const fetchBackendStatuses = async () => {
18919
19057
  try {
18920
19058
  const res = await fetch("/api/voice/backend");
@@ -18924,7 +19062,7 @@ ${text}</tr>
18924
19062
  } catch {
18925
19063
  }
18926
19064
  };
18927
- (0, import_react14.useEffect)(() => {
19065
+ (0, import_react15.useEffect)(() => {
18928
19066
  fetchBackendStatuses();
18929
19067
  const interval = setInterval(fetchBackendStatuses, BACKEND_POLL_MS);
18930
19068
  return () => clearInterval(interval);
@@ -18934,23 +19072,23 @@ ${text}</tr>
18934
19072
  (prev) => prev ? { ...prev, [target]: status } : { stt: status, tts: null }
18935
19073
  );
18936
19074
  };
18937
- (0, import_react14.useEffect)(() => {
19075
+ (0, import_react15.useEffect)(() => {
18938
19076
  if (sttCatalogResult) setFetching(false);
18939
19077
  }, [sttCatalogResult]);
18940
- (0, import_react14.useEffect)(() => {
19078
+ (0, import_react15.useEffect)(() => {
18941
19079
  if (ttsCatalogResult) setFetchingTts(false);
18942
19080
  }, [ttsCatalogResult]);
18943
- (0, import_react14.useEffect)(() => {
19081
+ (0, import_react15.useEffect)(() => {
18944
19082
  if (saveState !== "saving" || pendingSave.current === null) return;
18945
19083
  if (voiceSignature(config.voice) !== pendingSave.current) return;
18946
19084
  setSaveState("saved");
18947
19085
  }, [config.voice, saveState]);
18948
- (0, import_react14.useEffect)(() => {
19086
+ (0, import_react15.useEffect)(() => {
18949
19087
  if (saveState !== "saved") return;
18950
19088
  const clear = setTimeout(() => setSaveState("idle"), 2500);
18951
19089
  return () => clearTimeout(clear);
18952
19090
  }, [saveState]);
18953
- (0, import_react14.useEffect)(() => {
19091
+ (0, import_react15.useEffect)(() => {
18954
19092
  if (saveState !== "saving") return;
18955
19093
  const giveUp = setTimeout(() => setSaveState("idle"), 6e3);
18956
19094
  return () => clearTimeout(giveUp);
@@ -18998,11 +19136,11 @@ ${text}</tr>
18998
19136
  };
18999
19137
  const showSttBackend = backendStatuses !== null && backendStatuses.stt.docker !== "absent" && backendStatuses.stt.port !== null;
19000
19138
  const showTtsBackend = backendStatuses !== null && backendStatuses.tts !== null && backendStatuses.tts.docker !== "absent" && backendStatuses.tts.port !== null;
19001
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "glass-form", children: [
19002
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h4", { children: "Voice" }),
19003
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "glass-form__body", children: [
19004
- !endpoint.trim() && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19005
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19139
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "glass-form", children: [
19140
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h4", { children: "Voice" }),
19141
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "glass-form__body", children: [
19142
+ !endpoint.trim() && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19143
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19006
19144
  "button",
19007
19145
  {
19008
19146
  type: "button",
@@ -19016,9 +19154,9 @@ ${text}</tr>
19016
19154
  children: "Use local defaults"
19017
19155
  }
19018
19156
  ),
19019
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Fills the form for a fully local backend (a Speaches container on port 8969) that caretaker can run for you if Docker is installed. Nothing is saved yet \u2014 adjust anything, including the port in the endpoint, then press Save; a Start button appears below afterwards." })
19157
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: "Fills the form for a fully local backend (a Speaches container on port 8969) that caretaker can run for you if Docker is installed. Nothing is saved yet \u2014 adjust anything, including the port in the endpoint, then press Save; a Start button appears below afterwards." })
19020
19158
  ] }),
19021
- showSttBackend && backendStatuses && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19159
+ showSttBackend && backendStatuses && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19022
19160
  VoiceBackendBlock,
19023
19161
  {
19024
19162
  target: "stt",
@@ -19028,7 +19166,7 @@ ${text}</tr>
19028
19166
  hint: "The first start downloads about 2 GB. The container publishes on the port in your endpoint \u2014 if that port is taken, change it there and save; caretaker never picks a port for you. Delete removes the container but keeps the downloaded models \u2014 try it when the backend misbehaves after switching networks."
19029
19167
  }
19030
19168
  ),
19031
- showTtsBackend && backendStatuses?.tts && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19169
+ showTtsBackend && backendStatuses?.tts && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19032
19170
  VoiceBackendBlock,
19033
19171
  {
19034
19172
  target: "tts",
@@ -19038,9 +19176,9 @@ ${text}</tr>
19038
19176
  hint: "A small image. The container publishes on the port in your synthesis endpoint. Delete removes the container; the image stays cached."
19039
19177
  }
19040
19178
  ),
19041
- (showSttBackend || showTtsBackend) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group form-group--checkbox", children: [
19042
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { htmlFor: "voice-backend-autostart", children: [
19043
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19179
+ (showSttBackend || showTtsBackend) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group form-group--checkbox", children: [
19180
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { htmlFor: "voice-backend-autostart", children: [
19181
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19044
19182
  "input",
19045
19183
  {
19046
19184
  id: "voice-backend-autostart",
@@ -19051,10 +19189,10 @@ ${text}</tr>
19051
19189
  ),
19052
19190
  "Start automatically with caretaker"
19053
19191
  ] }),
19054
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Applies to both containers: a Speaches pull does not block the edge-tts start \u2014 they are independent." })
19192
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: "Applies to both containers: a Speaches pull does not block the edge-tts start \u2014 they are independent." })
19055
19193
  ] }),
19056
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "form-group form-group--checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { htmlFor: "voice-enabled", children: [
19057
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19194
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "form-group form-group--checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { htmlFor: "voice-enabled", children: [
19195
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19058
19196
  "input",
19059
19197
  {
19060
19198
  id: "voice-enabled",
@@ -19065,9 +19203,9 @@ ${text}</tr>
19065
19203
  ),
19066
19204
  "Enable voice mode"
19067
19205
  ] }) }),
19068
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19069
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-endpoint", children: "Speech Endpoint" }),
19070
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19206
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19207
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: "voice-endpoint", children: "Speech Endpoint" }),
19208
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19071
19209
  "input",
19072
19210
  {
19073
19211
  id: "voice-endpoint",
@@ -19077,18 +19215,18 @@ ${text}</tr>
19077
19215
  onChange: (e) => setEndpoint(e.target.value)
19078
19216
  }
19079
19217
  ),
19080
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
19218
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
19081
19219
  "OpenAI-compatible speech endpoint \u2014 e.g. a local Speaches container. Transcription posts to ",
19082
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: "/audio/transcriptions" }),
19220
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: "/audio/transcriptions" }),
19083
19221
  ". When no separate synthesis endpoint is set below, synthesis also posts to",
19084
19222
  " ",
19085
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: "/audio/speech" }),
19223
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: "/audio/speech" }),
19086
19224
  " here. Voice is unavailable in the VSCode sidebar."
19087
19225
  ] })
19088
19226
  ] }),
19089
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19090
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-key", children: "API Key (optional)" }),
19091
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19227
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19228
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: "voice-key", children: "API Key (optional)" }),
19229
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19092
19230
  "input",
19093
19231
  {
19094
19232
  id: "voice-key",
@@ -19098,30 +19236,30 @@ ${text}</tr>
19098
19236
  onChange: (e) => setApiKey(e.target.value)
19099
19237
  }
19100
19238
  ),
19101
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Stored encrypted. Never sent to the browser \u2014 requests are proxied." })
19239
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: "Stored encrypted. Never sent to the browser \u2014 requests are proxied." })
19102
19240
  ] }),
19103
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19104
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: fetchSttCatalog, disabled: fetching || !endpoint.trim(), children: fetching ? "Fetching\u2026" : "Fetch models" }),
19105
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Reads the endpoint's installed models so the transcription field below becomes a list. Endpoints that do not report a task per model still work \u2014 the field stays free text." }),
19106
- sttFetchError && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { className: "form-error", children: [
19241
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19242
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", onClick: fetchSttCatalog, disabled: fetching || !endpoint.trim(), children: fetching ? "Fetching\u2026" : "Fetch models" }),
19243
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: "Reads the endpoint's installed models so the transcription field below becomes a list. Endpoints that do not report a task per model still work \u2014 the field stays free text." }),
19244
+ sttFetchError && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { className: "form-error", children: [
19107
19245
  "Fetch failed: ",
19108
19246
  sttFetchError
19109
19247
  ] })
19110
19248
  ] }),
19111
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19112
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-stt", children: "Transcription Model" }),
19113
- sttCatalog && sttCatalog.stt.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
19249
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19250
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: "voice-stt", children: "Transcription Model" }),
19251
+ sttCatalog && sttCatalog.stt.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
19114
19252
  "select",
19115
19253
  {
19116
19254
  id: "voice-stt",
19117
19255
  value: sttModel,
19118
19256
  onChange: (e) => setSttModel(e.target.value),
19119
19257
  children: [
19120
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "-- Select a model --" }),
19121
- withCurrent(sttCatalog.stt, sttModel).map((id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: id, children: id }, id))
19258
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", children: "-- Select a model --" }),
19259
+ withCurrent(sttCatalog.stt, sttModel).map((id) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: id, children: id }, id))
19122
19260
  ]
19123
19261
  }
19124
- ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19262
+ ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19125
19263
  "input",
19126
19264
  {
19127
19265
  id: "voice-stt",
@@ -19132,9 +19270,9 @@ ${text}</tr>
19132
19270
  }
19133
19271
  )
19134
19272
  ] }),
19135
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19136
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-tts-endpoint", children: "Synthesis Endpoint (optional)" }),
19137
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19273
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19274
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: "voice-tts-endpoint", children: "Synthesis Endpoint (optional)" }),
19275
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19138
19276
  "input",
19139
19277
  {
19140
19278
  id: "voice-tts-endpoint",
@@ -19144,7 +19282,7 @@ ${text}</tr>
19144
19282
  onChange: (e) => setTtsEndpoint(e.target.value)
19145
19283
  }
19146
19284
  ),
19147
- !ttsEndpoint.trim() && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19285
+ !ttsEndpoint.trim() && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19148
19286
  "button",
19149
19287
  {
19150
19288
  type: "button",
@@ -19157,18 +19295,18 @@ ${text}</tr>
19157
19295
  children: "Use Microsoft Edge voices"
19158
19296
  }
19159
19297
  ),
19160
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
19298
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
19161
19299
  "Leave empty when one server does both. A local openai-edge-tts container gives you Microsoft Neural voices such as",
19162
19300
  " ",
19163
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: "it-IT-ElsaNeural" }),
19301
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: "it-IT-ElsaNeural" }),
19164
19302
  " or ",
19165
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: "it-IT-DiegoNeural" }),
19303
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: "it-IT-DiegoNeural" }),
19166
19304
  ", but cannot transcribe \u2014 transcription always uses the endpoint above. Nothing is saved yet \u2014 press Save after adjusting."
19167
19305
  ] })
19168
19306
  ] }),
19169
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19170
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-tts-key", children: "Synthesis API Key (optional)" }),
19171
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19307
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19308
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: "voice-tts-key", children: "Synthesis API Key (optional)" }),
19309
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19172
19310
  "input",
19173
19311
  {
19174
19312
  id: "voice-tts-key",
@@ -19178,10 +19316,10 @@ ${text}</tr>
19178
19316
  onChange: (e) => setTtsApiKey(e.target.value)
19179
19317
  }
19180
19318
  ),
19181
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Stored encrypted. Only sent to the synthesis endpoint \u2014 the transcription key is never sent there, and vice versa." })
19319
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: "Stored encrypted. Only sent to the synthesis endpoint \u2014 the transcription key is never sent there, and vice versa." })
19182
19320
  ] }),
19183
- ttsEndpoint.trim() && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19184
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19321
+ ttsEndpoint.trim() && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19322
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19185
19323
  "button",
19186
19324
  {
19187
19325
  type: "button",
@@ -19190,19 +19328,19 @@ ${text}</tr>
19190
19328
  children: fetchingTts ? "Fetching\u2026" : "Fetch synthesis models"
19191
19329
  }
19192
19330
  ),
19193
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
19331
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
19194
19332
  "Reads the synthesis endpoint's models and voices. For edge-tts, the voice list comes from ",
19195
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: "/voices/all" }),
19333
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: "/voices/all" }),
19196
19334
  "."
19197
19335
  ] }),
19198
- ttsFetchError && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { className: "form-error", children: [
19336
+ ttsFetchError && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { className: "form-error", children: [
19199
19337
  "Fetch failed: ",
19200
19338
  ttsFetchError
19201
19339
  ] })
19202
19340
  ] }),
19203
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19204
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-tts", children: "Synthesis Model (optional)" }),
19205
- ttsCatalog && ttsCatalog.tts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
19341
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19342
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: "voice-tts", children: "Synthesis Model (optional)" }),
19343
+ ttsCatalog && ttsCatalog.tts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
19206
19344
  "select",
19207
19345
  {
19208
19346
  id: "voice-tts",
@@ -19215,14 +19353,14 @@ ${text}</tr>
19215
19353
  }
19216
19354
  },
19217
19355
  children: [
19218
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "-- None (dictation only) --" }),
19356
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", children: "-- None (dictation only) --" }),
19219
19357
  withCurrent(
19220
19358
  ttsCatalog.tts.map((m) => m.id),
19221
19359
  ttsModel
19222
- ).map((id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: id, children: id }, id))
19360
+ ).map((id) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: id, children: id }, id))
19223
19361
  ]
19224
19362
  }
19225
- ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19363
+ ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19226
19364
  "input",
19227
19365
  {
19228
19366
  id: "voice-tts",
@@ -19232,22 +19370,22 @@ ${text}</tr>
19232
19370
  onChange: (e) => setTtsModel(e.target.value)
19233
19371
  }
19234
19372
  ),
19235
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Required for conversation mode. Without it, only dictation is offered." })
19373
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: "Required for conversation mode. Without it, only dictation is offered." })
19236
19374
  ] }),
19237
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19238
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-voice", children: "Voice (optional)" }),
19239
- voicesForModel.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
19375
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19376
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: "voice-voice", children: "Voice (optional)" }),
19377
+ voicesForModel.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
19240
19378
  "select",
19241
19379
  {
19242
19380
  id: "voice-voice",
19243
19381
  value: ttsVoice,
19244
19382
  onChange: (e) => setTtsVoice(e.target.value),
19245
19383
  children: [
19246
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "-- Select a voice --" }),
19247
- voicesForModel.map((v) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: v.id, children: voiceLabel(v) }, v.id))
19384
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", children: "-- Select a voice --" }),
19385
+ voicesForModel.map((v) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: v.id, children: voiceLabel(v) }, v.id))
19248
19386
  ]
19249
19387
  }
19250
- ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19388
+ ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19251
19389
  "input",
19252
19390
  {
19253
19391
  id: "voice-voice",
@@ -19257,11 +19395,11 @@ ${text}</tr>
19257
19395
  onChange: (e) => setTtsVoice(e.target.value)
19258
19396
  }
19259
19397
  ),
19260
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Pick one whose language matches yours. A model trained mostly on English keeps an English inflection even on its other-language voices." })
19398
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: "Pick one whose language matches yours. A model trained mostly on English keeps an English inflection even on its other-language voices." })
19261
19399
  ] }),
19262
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19263
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-speed", children: "Speaking Rate (optional)" }),
19264
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19400
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19401
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: "voice-speed", children: "Speaking Rate (optional)" }),
19402
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19265
19403
  "input",
19266
19404
  {
19267
19405
  id: "voice-speed",
@@ -19274,11 +19412,11 @@ ${text}</tr>
19274
19412
  onChange: (e) => setTtsSpeed(e.target.value)
19275
19413
  }
19276
19414
  ),
19277
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Multiplier, clamped to 0.5\u20132. Useful because some voices are just slow: raise it if the reply drags. Piper responds less to this than Kokoro, since for Piper it stretches phoneme durations." })
19415
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: "Multiplier, clamped to 0.5\u20132. Useful because some voices are just slow: raise it if the reply drags. Piper responds less to this than Kokoro, since for Piper it stretches phoneme durations." })
19278
19416
  ] }),
19279
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
19280
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-lang", children: "Language (optional)" }),
19281
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
19417
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-group", children: [
19418
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: "voice-lang", children: "Language (optional)" }),
19419
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19282
19420
  "input",
19283
19421
  {
19284
19422
  id: "voice-lang",
@@ -19290,15 +19428,15 @@ ${text}</tr>
19290
19428
  )
19291
19429
  ] })
19292
19430
  ] }),
19293
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-actions", children: [
19294
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: save, children: "Save" }),
19295
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { role: "status", "aria-live": "polite", className: "form-save-state", children: saveState === "saving" ? "Saving\u2026" : saveState === "saved" ? "Saved \u2713" : "" })
19431
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "form-actions", children: [
19432
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", onClick: save, children: "Save" }),
19433
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { role: "status", "aria-live": "polite", className: "form-save-state", children: saveState === "saving" ? "Saving\u2026" : saveState === "saved" ? "Saved \u2713" : "" })
19296
19434
  ] })
19297
19435
  ] });
19298
19436
  }
19299
19437
 
19300
19438
  // src/SettingsPanel.tsx
19301
- var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
19439
+ var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
19302
19440
  function SettingsPanel({
19303
19441
  layout = "compact",
19304
19442
  postMessage,
@@ -19315,16 +19453,16 @@ ${text}</tr>
19315
19453
  taskRuns = {},
19316
19454
  onClose
19317
19455
  }) {
19318
- const [activeTab, setActiveTab] = (0, import_react15.useState)("providers");
19456
+ const [activeTab, setActiveTab] = (0, import_react16.useState)("providers");
19319
19457
  if (!settingsData) {
19320
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "settings-panel settings-panel--loading", children: [
19321
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, children: [
19322
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ArrowLeft, { size: 14 }),
19458
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "settings-panel settings-panel--loading", children: [
19459
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, children: [
19460
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowLeft, { size: 14 }),
19323
19461
  " Back to Chat"
19324
19462
  ] }),
19325
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "settings-panel__loading-spinner", children: [
19326
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "spinner" }),
19327
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Loading configurations..." })
19463
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "settings-panel__loading-spinner", children: [
19464
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "spinner" }),
19465
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Loading configurations..." })
19328
19466
  ] })
19329
19467
  ] });
19330
19468
  }
@@ -19332,7 +19470,7 @@ ${text}</tr>
19332
19470
  const renderTabContent = () => {
19333
19471
  switch (activeTab) {
19334
19472
  case "providers":
19335
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19473
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19336
19474
  ProvidersTab,
19337
19475
  {
19338
19476
  config,
@@ -19341,7 +19479,7 @@ ${text}</tr>
19341
19479
  }
19342
19480
  );
19343
19481
  case "projects":
19344
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19482
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19345
19483
  ProjectsTabSettings,
19346
19484
  {
19347
19485
  config,
@@ -19350,7 +19488,7 @@ ${text}</tr>
19350
19488
  }
19351
19489
  );
19352
19490
  case "agents":
19353
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19491
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19354
19492
  AgentsTab,
19355
19493
  {
19356
19494
  config,
@@ -19364,7 +19502,7 @@ ${text}</tr>
19364
19502
  }
19365
19503
  );
19366
19504
  case "plugins":
19367
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19505
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19368
19506
  PluginsTab,
19369
19507
  {
19370
19508
  pluginsFile,
@@ -19375,7 +19513,7 @@ ${text}</tr>
19375
19513
  }
19376
19514
  );
19377
19515
  case "mcp":
19378
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19516
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19379
19517
  McpTab,
19380
19518
  {
19381
19519
  mcpServersFile,
@@ -19385,7 +19523,7 @@ ${text}</tr>
19385
19523
  }
19386
19524
  );
19387
19525
  case "scheduler":
19388
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19526
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19389
19527
  SchedulerTab,
19390
19528
  {
19391
19529
  config,
@@ -19395,7 +19533,7 @@ ${text}</tr>
19395
19533
  }
19396
19534
  );
19397
19535
  case "voice":
19398
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19536
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19399
19537
  VoiceTab,
19400
19538
  {
19401
19539
  config,
@@ -19407,16 +19545,16 @@ ${text}</tr>
19407
19545
  );
19408
19546
  }
19409
19547
  };
19410
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "settings-panel", children: [
19411
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { className: "settings-panel__header", children: [
19412
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, title: "Go back to chat", children: [
19413
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ArrowLeft, { size: 14 }),
19548
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "settings-panel", children: [
19549
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("header", { className: "settings-panel__header", children: [
19550
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, title: "Go back to chat", children: [
19551
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowLeft, { size: 14 }),
19414
19552
  " Chat"
19415
19553
  ] }),
19416
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h2", { className: "settings-panel__title", children: "Caretaker Config" })
19554
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { className: "settings-panel__title", children: "Caretaker Config" })
19417
19555
  ] }),
19418
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("nav", { className: "settings-panel__tabs", children: [
19419
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19556
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("nav", { className: "settings-panel__tabs", children: [
19557
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19420
19558
  "button",
19421
19559
  {
19422
19560
  className: `settings-panel__tab-btn ${activeTab === "providers" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19424,7 +19562,7 @@ ${text}</tr>
19424
19562
  children: "Providers"
19425
19563
  }
19426
19564
  ),
19427
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19565
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19428
19566
  "button",
19429
19567
  {
19430
19568
  className: `settings-panel__tab-btn ${activeTab === "projects" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19432,7 +19570,7 @@ ${text}</tr>
19432
19570
  children: "Projects"
19433
19571
  }
19434
19572
  ),
19435
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19573
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19436
19574
  "button",
19437
19575
  {
19438
19576
  className: `settings-panel__tab-btn ${activeTab === "agents" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19440,7 +19578,7 @@ ${text}</tr>
19440
19578
  children: "Agents"
19441
19579
  }
19442
19580
  ),
19443
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19581
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19444
19582
  "button",
19445
19583
  {
19446
19584
  className: `settings-panel__tab-btn ${activeTab === "plugins" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19448,7 +19586,7 @@ ${text}</tr>
19448
19586
  children: "Plugins"
19449
19587
  }
19450
19588
  ),
19451
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19589
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19452
19590
  "button",
19453
19591
  {
19454
19592
  className: `settings-panel__tab-btn ${activeTab === "mcp" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19456,7 +19594,7 @@ ${text}</tr>
19456
19594
  children: "MCP"
19457
19595
  }
19458
19596
  ),
19459
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19597
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19460
19598
  "button",
19461
19599
  {
19462
19600
  className: `settings-panel__tab-btn ${activeTab === "scheduler" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19464,7 +19602,7 @@ ${text}</tr>
19464
19602
  children: "Scheduler"
19465
19603
  }
19466
19604
  ),
19467
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
19605
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19468
19606
  "button",
19469
19607
  {
19470
19608
  className: `settings-panel__tab-btn ${activeTab === "voice" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19473,13 +19611,13 @@ ${text}</tr>
19473
19611
  }
19474
19612
  )
19475
19613
  ] }),
19476
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("main", { className: "settings-panel__content", children: renderTabContent() })
19614
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("main", { className: "settings-panel__content", children: renderTabContent() })
19477
19615
  ] });
19478
19616
  }
19479
19617
 
19480
19618
  // src/ProjectsTab.tsx
19481
- var import_react16 = __toESM(require_react(), 1);
19482
- var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
19619
+ var import_react17 = __toESM(require_react(), 1);
19620
+ var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
19483
19621
  var LS_PROJECT_KEY = "caretaker.taskView.selectedProjectId";
19484
19622
  var LS_ARCHIVED_KEY = "caretaker.taskView.showArchived";
19485
19623
  function loadSavedProjectId() {
@@ -19570,15 +19708,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
19570
19708
  }
19571
19709
  var PAGE_SIZE = 20;
19572
19710
  function ProjectsTab({ agents }) {
19573
- const [projects, setProjects] = (0, import_react16.useState)([]);
19574
- const [selectedProjectId, setSelectedProjectId] = (0, import_react16.useState)(loadSavedProjectId);
19575
- const [tasks, setTasks] = (0, import_react16.useState)([]);
19576
- const [selectedTaskId, setSelectedTaskId] = (0, import_react16.useState)(null);
19577
- const [taskMessages, setTaskMessages] = (0, import_react16.useState)([]);
19578
- const [view, setView] = (0, import_react16.useState)("list");
19579
- const [page, setPage] = (0, import_react16.useState)(0);
19580
- const [isNewTaskOpen, setIsNewTaskOpen] = (0, import_react16.useState)(false);
19581
- const [newTask, setNewTask] = (0, import_react16.useState)({
19711
+ const [projects, setProjects] = (0, import_react17.useState)([]);
19712
+ const [selectedProjectId, setSelectedProjectId] = (0, import_react17.useState)(loadSavedProjectId);
19713
+ const [tasks, setTasks] = (0, import_react17.useState)([]);
19714
+ const [selectedTaskId, setSelectedTaskId] = (0, import_react17.useState)(null);
19715
+ const [taskMessages, setTaskMessages] = (0, import_react17.useState)([]);
19716
+ const [view, setView] = (0, import_react17.useState)("list");
19717
+ const [page, setPage] = (0, import_react17.useState)(0);
19718
+ const [isNewTaskOpen, setIsNewTaskOpen] = (0, import_react17.useState)(false);
19719
+ const [newTask, setNewTask] = (0, import_react17.useState)({
19582
19720
  title: "",
19583
19721
  objective: "",
19584
19722
  checklistText: "",
@@ -19587,19 +19725,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
19587
19725
  plannerAgentId: "",
19588
19726
  reviewerAgentId: ""
19589
19727
  });
19590
- const [composerText, setComposerText] = (0, import_react16.useState)("");
19591
- const [isSending, setIsSending] = (0, import_react16.useState)(false);
19592
- const [showArchived, setShowArchived] = (0, import_react16.useState)(loadShowArchived);
19593
- const [pendingConfirm, setPendingConfirm] = (0, import_react16.useState)(null);
19594
- const [taskError, setTaskError] = (0, import_react16.useState)(null);
19595
- const threadIntervalRef = (0, import_react16.useRef)(null);
19596
- (0, import_react16.useEffect)(() => {
19728
+ const [composerText, setComposerText] = (0, import_react17.useState)("");
19729
+ const [isSending, setIsSending] = (0, import_react17.useState)(false);
19730
+ const [showArchived, setShowArchived] = (0, import_react17.useState)(loadShowArchived);
19731
+ const [pendingConfirm, setPendingConfirm] = (0, import_react17.useState)(null);
19732
+ const [taskError, setTaskError] = (0, import_react17.useState)(null);
19733
+ const threadIntervalRef = (0, import_react17.useRef)(null);
19734
+ (0, import_react17.useEffect)(() => {
19597
19735
  fetchProjects();
19598
19736
  return () => {
19599
19737
  stopThreadPolling();
19600
19738
  };
19601
19739
  }, []);
19602
- (0, import_react16.useEffect)(() => {
19740
+ (0, import_react17.useEffect)(() => {
19603
19741
  if (projects.length > 0 && selectedProjectId === null) {
19604
19742
  setSelectedProjectId(projects[0].id);
19605
19743
  }
@@ -19610,13 +19748,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
19610
19748
  setSelectedProjectId(null);
19611
19749
  }
19612
19750
  }, [projects]);
19613
- (0, import_react16.useEffect)(() => {
19751
+ (0, import_react17.useEffect)(() => {
19614
19752
  saveProjectId(selectedProjectId);
19615
19753
  }, [selectedProjectId]);
19616
- (0, import_react16.useEffect)(() => {
19754
+ (0, import_react17.useEffect)(() => {
19617
19755
  saveShowArchived(showArchived);
19618
19756
  }, [showArchived]);
19619
- (0, import_react16.useEffect)(() => {
19757
+ (0, import_react17.useEffect)(() => {
19620
19758
  if (selectedProjectId !== null) {
19621
19759
  fetchTasks(selectedProjectId);
19622
19760
  setView("list");
@@ -19628,7 +19766,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
19628
19766
  setTasks([]);
19629
19767
  }
19630
19768
  }, [selectedProjectId, showArchived]);
19631
- (0, import_react16.useEffect)(() => {
19769
+ (0, import_react17.useEffect)(() => {
19632
19770
  if (selectedTaskId !== null) {
19633
19771
  fetchTaskMessages(selectedTaskId);
19634
19772
  startThreadPolling(selectedTaskId);
@@ -19801,7 +19939,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
19801
19939
  const cancelPendingAction = () => {
19802
19940
  setPendingConfirm(null);
19803
19941
  };
19804
- (0, import_react16.useEffect)(() => {
19942
+ (0, import_react17.useEffect)(() => {
19805
19943
  if (!pendingConfirm) return;
19806
19944
  function handleKeyDown(event) {
19807
19945
  if (event.key === "Escape") {
@@ -19811,7 +19949,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
19811
19949
  window.addEventListener("keydown", handleKeyDown);
19812
19950
  return () => window.removeEventListener("keydown", handleKeyDown);
19813
19951
  }, [pendingConfirm]);
19814
- (0, import_react16.useEffect)(() => {
19952
+ (0, import_react17.useEffect)(() => {
19815
19953
  if (!taskError) return;
19816
19954
  const t = setTimeout(() => setTaskError(null), 5e3);
19817
19955
  return () => clearTimeout(t);
@@ -19942,7 +20080,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
19942
20080
  const selectedProject = projects.find((p) => p.id === selectedProjectId);
19943
20081
  const selectedTask = tasks.find((t) => t.id === selectedTaskId);
19944
20082
  const selectedProjectAgentName = agents.find((a) => a.id === selectedProject?.agentId)?.name || "Default Agent";
19945
- const taskAgentLabels = (0, import_react16.useMemo)(() => {
20083
+ const taskAgentLabels = (0, import_react17.useMemo)(() => {
19946
20084
  if (!selectedTask) return void 0;
19947
20085
  const agentLabelFor = (agentId) => {
19948
20086
  const a = agents.find((x) => x.id === agentId);
@@ -19988,8 +20126,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
19988
20126
  const safePage = Math.min(page, totalPages - 1);
19989
20127
  const pageStart = safePage * PAGE_SIZE;
19990
20128
  const pageTasks = tasks.slice(pageStart, pageStart + PAGE_SIZE);
19991
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "app", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
19992
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("main", { className: "app__chat-pane", style: { flex: 1, display: "flex", flexDirection: "column", background: "var(--vscode-editor-background)" }, children: projects.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: "No projects registered. Create one from the Settings panel to get started." }) }) : selectedProject ? view === "list" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20129
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
20130
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("main", { className: "app__chat-pane", style: { flex: 1, display: "flex", flexDirection: "column", background: "var(--vscode-editor-background)" }, children: projects.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: "No projects registered. Create one from the Settings panel to get started." }) }) : selectedProject ? view === "list" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19993
20131
  TaskListView,
19994
20132
  {
19995
20133
  projects,
@@ -20011,7 +20149,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20011
20149
  onArchive: handleArchiveFromList,
20012
20150
  statusColor
20013
20151
  }
20014
- ) : view === "log" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20152
+ ) : view === "log" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20015
20153
  TaskLogView,
20016
20154
  {
20017
20155
  task: selectedTask,
@@ -20028,7 +20166,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20028
20166
  onToggleStatus: handleToggleTaskStatus,
20029
20167
  statusColor
20030
20168
  }
20031
- ) : view === "edit" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20169
+ ) : view === "edit" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20032
20170
  TaskEditView,
20033
20171
  {
20034
20172
  task: selectedTask,
@@ -20046,11 +20184,11 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20046
20184
  onOpenLog: () => setView("log"),
20047
20185
  statusColor
20048
20186
  }
20049
- ) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "app__empty-state", children: [
20050
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: "Task not found. Go back to the list." }),
20051
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "settings-panel__back-btn", onClick: backToList, style: { marginTop: "12px" }, children: "\u2190 Back to list" })
20187
+ ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__empty-state", children: [
20188
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: "Task not found. Go back to the list." }),
20189
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "settings-panel__back-btn", onClick: backToList, style: { marginTop: "12px" }, children: "\u2190 Back to list" })
20052
20190
  ] }) : null }),
20053
- isNewTaskOpen && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20191
+ isNewTaskOpen && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20054
20192
  "div",
20055
20193
  {
20056
20194
  style: {
@@ -20065,7 +20203,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20065
20203
  justifyContent: "center",
20066
20204
  zIndex: 999
20067
20205
  },
20068
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20206
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20069
20207
  "form",
20070
20208
  {
20071
20209
  onSubmit: handleCreateTask,
@@ -20076,14 +20214,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20076
20214
  background: "var(--vscode-sideBar-background)"
20077
20215
  },
20078
20216
  children: [
20079
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "confirm__header", children: [
20080
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { fontSize: "18px", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Wrench, { size: 18 }) }),
20081
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "confirm__prompt", style: { fontSize: "14px" }, children: "Create New Task" })
20217
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "confirm__header", children: [
20218
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { fontSize: "18px", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Wrench, { size: 18 }) }),
20219
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "confirm__prompt", style: { fontSize: "14px" }, children: "Create New Task" })
20082
20220
  ] }),
20083
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: [
20084
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20221
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: [
20222
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20085
20223
  "Task Title",
20086
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20224
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20087
20225
  "input",
20088
20226
  {
20089
20227
  type: "text",
@@ -20103,9 +20241,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20103
20241
  }
20104
20242
  )
20105
20243
  ] }),
20106
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20244
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20107
20245
  "Objective (Extended markdown goal description)",
20108
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20246
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20109
20247
  "textarea",
20110
20248
  {
20111
20249
  required: true,
@@ -20126,9 +20264,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20126
20264
  }
20127
20265
  )
20128
20266
  ] }),
20129
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20267
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20130
20268
  "Checklist Items (One item per line)",
20131
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20269
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20132
20270
  "textarea",
20133
20271
  {
20134
20272
  placeholder: "Create route handler\nWrite unit tests\nUpdate documentation",
@@ -20148,9 +20286,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20148
20286
  }
20149
20287
  )
20150
20288
  ] }),
20151
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20289
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20152
20290
  "Assigned Agent (optional \u2014 overrides project default)",
20153
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20291
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20154
20292
  "select",
20155
20293
  {
20156
20294
  value: newTask.agentId,
@@ -20165,8 +20303,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20165
20303
  outline: "none"
20166
20304
  },
20167
20305
  children: [
20168
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
20169
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
20306
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
20307
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
20170
20308
  a.name,
20171
20309
  " (",
20172
20310
  a.provider,
@@ -20176,9 +20314,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20176
20314
  }
20177
20315
  )
20178
20316
  ] }),
20179
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20317
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20180
20318
  "Planner Agent Override (optional)",
20181
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20319
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20182
20320
  "select",
20183
20321
  {
20184
20322
  value: newTask.plannerAgentId,
@@ -20193,8 +20331,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20193
20331
  outline: "none"
20194
20332
  },
20195
20333
  children: [
20196
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
20197
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
20334
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
20335
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
20198
20336
  a.name,
20199
20337
  " (",
20200
20338
  a.provider,
@@ -20204,9 +20342,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20204
20342
  }
20205
20343
  )
20206
20344
  ] }),
20207
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20345
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20208
20346
  "Reviewer Agent Override (optional)",
20209
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20347
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20210
20348
  "select",
20211
20349
  {
20212
20350
  value: newTask.reviewerAgentId,
@@ -20221,8 +20359,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20221
20359
  outline: "none"
20222
20360
  },
20223
20361
  children: [
20224
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
20225
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
20362
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
20363
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
20226
20364
  a.name,
20227
20365
  " (",
20228
20366
  a.provider,
@@ -20232,8 +20370,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20232
20370
  }
20233
20371
  )
20234
20372
  ] }),
20235
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "12px", display: "flex", alignItems: "center", gap: "6px", cursor: "pointer", marginTop: "4px" }, children: [
20236
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20373
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "12px", display: "flex", alignItems: "center", gap: "6px", cursor: "pointer", marginTop: "4px" }, children: [
20374
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20237
20375
  "input",
20238
20376
  {
20239
20377
  type: "checkbox",
@@ -20242,24 +20380,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20242
20380
  style: { cursor: "pointer" }
20243
20381
  }
20244
20382
  ),
20245
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Start active immediately (Heartbeat loop claims it)" })
20383
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Start active immediately (Heartbeat loop claims it)" })
20246
20384
  ] })
20247
20385
  ] }),
20248
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "confirm__buttons", style: { justifyContent: "flex-end", marginTop: "10px" }, children: [
20249
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", className: "confirm__btn", onClick: () => setIsNewTaskOpen(false), children: "Cancel" }),
20250
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "submit", className: "confirm__btn confirm__btn--primary", children: "Create Task" })
20386
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "confirm__buttons", style: { justifyContent: "flex-end", marginTop: "10px" }, children: [
20387
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: "confirm__btn", onClick: () => setIsNewTaskOpen(false), children: "Cancel" }),
20388
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "submit", className: "confirm__btn confirm__btn--primary", children: "Create Task" })
20251
20389
  ] })
20252
20390
  ]
20253
20391
  }
20254
20392
  )
20255
20393
  }
20256
20394
  ),
20257
- pendingConfirm && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "app__confirm-overlay", onClick: cancelPendingAction, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
20258
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "app__confirm-title", children: pendingConfirm.type === "delete" ? "Delete task" : pendingConfirm.type === "archive" ? "Archive task" : "Discard worktree" }),
20259
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "app__confirm-message", children: pendingConfirm.type === "delete" ? `Permanently delete task #${pendingConfirm.task.id} "${pendingConfirm.task.title}"? This removes the task and all its messages from the store. This action cannot be undone.` : pendingConfirm.type === "archive" ? `Archive task #${pendingConfirm.task.id} "${pendingConfirm.task.title}"? It will be hidden from the list and excluded from the scheduler. You can unarchive it later by enabling "Show archived".` : `Discard the worktree for task #${pendingConfirm.task.id}? Pending changes are committed to branch ${pendingConfirm.task.branch}; the branch is kept.` }),
20260
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "app__confirm-buttons", children: [
20261
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "app__confirm-btn", onClick: cancelPendingAction, children: "Cancel" }),
20262
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20395
+ pendingConfirm && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__confirm-overlay", onClick: cancelPendingAction, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
20396
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__confirm-title", children: pendingConfirm.type === "delete" ? "Delete task" : pendingConfirm.type === "archive" ? "Archive task" : "Discard worktree" }),
20397
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "app__confirm-message", children: pendingConfirm.type === "delete" ? `Permanently delete task #${pendingConfirm.task.id} "${pendingConfirm.task.title}"? This removes the task and all its messages from the store. This action cannot be undone.` : pendingConfirm.type === "archive" ? `Archive task #${pendingConfirm.task.id} "${pendingConfirm.task.title}"? It will be hidden from the list and excluded from the scheduler. You can unarchive it later by enabling "Show archived".` : `Discard the worktree for task #${pendingConfirm.task.id}? Pending changes are committed to branch ${pendingConfirm.task.branch}; the branch is kept.` }),
20398
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__confirm-buttons", children: [
20399
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "app__confirm-btn", onClick: cancelPendingAction, children: "Cancel" }),
20400
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20263
20401
  "button",
20264
20402
  {
20265
20403
  className: `app__confirm-btn ${pendingConfirm.type === "delete" ? "app__confirm-btn--danger" : ""}`,
@@ -20269,7 +20407,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20269
20407
  )
20270
20408
  ] })
20271
20409
  ] }) }),
20272
- taskError && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "app__error-banner", onClick: () => setTaskError(null), title: "Click to dismiss", children: taskError })
20410
+ taskError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__error-banner", onClick: () => setTaskError(null), title: "Click to dismiss", children: taskError })
20273
20411
  ] });
20274
20412
  }
20275
20413
  function TaskListView({
@@ -20292,10 +20430,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20292
20430
  onArchive,
20293
20431
  statusColor
20294
20432
  }) {
20295
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
20296
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "task-view__header", children: [
20297
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
20298
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20433
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
20434
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "task-view__header", children: [
20435
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
20436
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20299
20437
  "select",
20300
20438
  {
20301
20439
  className: "task-view__project-filter",
@@ -20312,17 +20450,17 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20312
20450
  outline: "none",
20313
20451
  cursor: "pointer"
20314
20452
  },
20315
- children: projects.map((p) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: p.id, children: p.name }, p.id))
20453
+ children: projects.map((p) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: p.id, children: p.name }, p.id))
20316
20454
  }
20317
20455
  ),
20318
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: [
20456
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: [
20319
20457
  "Agent: ",
20320
20458
  agentName
20321
20459
  ] })
20322
20460
  ] }),
20323
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
20324
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: "task-view__archived-toggle", children: [
20325
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20461
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
20462
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "task-view__archived-toggle", children: [
20463
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20326
20464
  "input",
20327
20465
  {
20328
20466
  type: "checkbox",
@@ -20333,42 +20471,42 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20333
20471
  ),
20334
20472
  "Show archived"
20335
20473
  ] }),
20336
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "app__new-chat-btn", onClick: onNewTask, style: { padding: "4px 10px", fontSize: "11px" }, children: "+ New Task" })
20474
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "app__new-chat-btn", onClick: onNewTask, style: { padding: "4px 10px", fontSize: "11px" }, children: "+ New Task" })
20337
20475
  ] })
20338
20476
  ] }),
20339
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { flex: 1, overflowY: "auto", padding: "0 16px 16px" }, children: allTasksCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
20477
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { flex: 1, overflowY: "auto", padding: "0 16px 16px" }, children: allTasksCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { children: [
20340
20478
  "No tasks created for ",
20341
20479
  project.name,
20342
20480
  '. Click "+ New Task" to start.'
20343
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("table", { className: "task-table", children: [
20344
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("tr", { children: [
20345
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "60px" }, children: "#" }),
20346
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", children: "Title" }),
20347
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "90px" }, children: "Status" }),
20348
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "100px" }, children: "Agent" }),
20349
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "120px" }, children: "Checklist" }),
20350
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "180px" }, children: "Branch" }),
20351
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "150px" }, children: "Updated" }),
20352
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "70px" } })
20481
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { className: "task-table", children: [
20482
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { children: [
20483
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "60px" }, children: "#" }),
20484
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", children: "Title" }),
20485
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "90px" }, children: "Status" }),
20486
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "100px" }, children: "Agent" }),
20487
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "120px" }, children: "Checklist" }),
20488
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "180px" }, children: "Branch" }),
20489
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "150px" }, children: "Updated" }),
20490
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "70px" } })
20353
20491
  ] }) }),
20354
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tbody", { children: tasks.map((task) => {
20492
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tbody", { children: tasks.map((task) => {
20355
20493
  const completedCount = task.checklist.filter((c) => c.status === "done").length;
20356
20494
  const totalCount = task.checklist.length;
20357
20495
  const isArchived = !!task.archived;
20358
20496
  const updated = new Date(task.updatedAt);
20359
20497
  const updatedStr = isNaN(updated.getTime()) ? task.updatedAt : updated.toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
20360
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20498
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20361
20499
  "tr",
20362
20500
  {
20363
20501
  className: `task-table__row${isArchived ? " task-table__row--archived" : ""}`,
20364
20502
  onClick: () => onOpenLog(task),
20365
20503
  children: [
20366
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td task-table__td--mono", children: task.id }),
20367
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "task-table__title", children: [
20368
- isArchived && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Archive, { size: 11 }),
20504
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td task-table__td--mono", children: task.id }),
20505
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "task-table__title", children: [
20506
+ isArchived && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Archive, { size: 11 }),
20369
20507
  task.title
20370
20508
  ] }) }),
20371
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20509
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20372
20510
  "span",
20373
20511
  {
20374
20512
  className: "task-table__badge",
@@ -20376,28 +20514,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20376
20514
  children: task.status
20377
20515
  }
20378
20516
  ) }),
20379
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", style: { fontSize: "11px" }, children: task.agentId ? agents.find((a) => a.id === task.agentId)?.name || task.agentId : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { opacity: 0.4 }, children: "default" }) }),
20380
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", children: totalCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "task-table__progress", children: [
20381
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "task-table__progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20517
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td", style: { fontSize: "11px" }, children: task.agentId ? agents.find((a) => a.id === task.agentId)?.name || task.agentId : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { opacity: 0.4 }, children: "default" }) }),
20518
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td", children: totalCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "task-table__progress", children: [
20519
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "task-table__progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20382
20520
  "span",
20383
20521
  {
20384
20522
  className: "task-table__progress-fill",
20385
20523
  style: { width: `${completedCount / totalCount * 100}%` }
20386
20524
  }
20387
20525
  ) }),
20388
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "task-table__progress-text", children: [
20526
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "task-table__progress-text", children: [
20389
20527
  completedCount,
20390
20528
  "/",
20391
20529
  totalCount
20392
20530
  ] })
20393
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
20394
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", children: task.branch ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "task-table__branch", children: [
20395
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GitBranch, { size: 11 }),
20396
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: task.branch })
20397
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
20398
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td task-table__td--muted", children: updatedStr }),
20399
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "inline-flex", gap: "2px" }, children: [
20400
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20531
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
20532
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td", children: task.branch ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "task-table__branch", children: [
20533
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GitBranch, { size: 11 }),
20534
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: task.branch })
20535
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
20536
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td task-table__td--muted", children: updatedStr }),
20537
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "inline-flex", gap: "2px" }, children: [
20538
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20401
20539
  "button",
20402
20540
  {
20403
20541
  className: "task-table__edit-btn",
@@ -20407,10 +20545,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20407
20545
  },
20408
20546
  title: task.archived ? "Unarchive task" : "Archive task",
20409
20547
  "aria-label": task.archived ? "Unarchive task" : "Archive task",
20410
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Archive, { size: 13 })
20548
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Archive, { size: 13 })
20411
20549
  }
20412
20550
  ),
20413
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20551
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20414
20552
  "button",
20415
20553
  {
20416
20554
  className: "task-table__edit-btn",
@@ -20420,7 +20558,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20420
20558
  },
20421
20559
  title: "Edit task",
20422
20560
  "aria-label": "Edit task",
20423
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Pencil, { size: 13 })
20561
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Pencil, { size: 13 })
20424
20562
  }
20425
20563
  )
20426
20564
  ] }) })
@@ -20430,8 +20568,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20430
20568
  );
20431
20569
  }) })
20432
20570
  ] }) }),
20433
- totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "task-table__pagination", children: [
20434
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20571
+ totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "task-table__pagination", children: [
20572
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20435
20573
  "button",
20436
20574
  {
20437
20575
  className: "task-table__page-btn",
@@ -20440,13 +20578,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20440
20578
  children: "\u2039 Prev"
20441
20579
  }
20442
20580
  ),
20443
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "task-table__page-info", children: [
20581
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "task-table__page-info", children: [
20444
20582
  "Page ",
20445
20583
  page + 1,
20446
20584
  " of ",
20447
20585
  totalPages
20448
20586
  ] }),
20449
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20587
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20450
20588
  "button",
20451
20589
  {
20452
20590
  className: "task-table__page-btn",
@@ -20475,20 +20613,20 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20475
20613
  }) {
20476
20614
  const completedCount = task.checklist.filter((c) => c.status === "done").length;
20477
20615
  const totalCount = task.checklist.length;
20478
- const chatItems = (0, import_react16.useMemo)(() => taskMessagesToChatItems(taskMessages, agentLabels), [taskMessages, agentLabels]);
20479
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
20480
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "12px 14px" }, children: [
20481
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
20482
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowLeft, { size: 13 }) }),
20483
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "app__chat-header-info", children: [
20484
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
20616
+ const chatItems = (0, import_react17.useMemo)(() => taskMessagesToChatItems(taskMessages, agentLabels), [taskMessages, agentLabels]);
20617
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
20618
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "12px 14px" }, children: [
20619
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
20620
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowLeft, { size: 13 }) }),
20621
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__chat-header-info", children: [
20622
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
20485
20623
  "Task #",
20486
20624
  task.id,
20487
20625
  ": ",
20488
20626
  task.title
20489
20627
  ] }),
20490
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: [
20491
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20628
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: [
20629
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20492
20630
  "span",
20493
20631
  {
20494
20632
  className: `agent-status-dot agent-status-dot--active ${isActiveLike ? "agent-status-dot--pulsing" : ""}`,
@@ -20499,24 +20637,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20499
20637
  ] })
20500
20638
  ] })
20501
20639
  ] }),
20502
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
20503
- task.status !== "done" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20640
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
20641
+ task.status !== "done" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20504
20642
  "button",
20505
20643
  {
20506
20644
  className: "confirm__btn confirm__btn--primary",
20507
20645
  onClick: () => onToggleStatus(task),
20508
20646
  title: isActiveLike ? "Pause this task (aborts the running agent)" : "Activate this task",
20509
20647
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
20510
- children: isActiveLike ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
20511
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Pause, { size: 12 }),
20648
+ children: isActiveLike ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
20649
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Pause, { size: 12 }),
20512
20650
  " Pause"
20513
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
20514
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Play, { size: 12 }),
20651
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
20652
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Play, { size: 12 }),
20515
20653
  " Activate"
20516
20654
  ] })
20517
20655
  }
20518
20656
  ),
20519
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20657
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20520
20658
  "span",
20521
20659
  {
20522
20660
  className: "task-table__badge",
@@ -20526,8 +20664,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20526
20664
  )
20527
20665
  ] })
20528
20666
  ] }),
20529
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "row" }, children: [
20530
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20667
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "row" }, children: [
20668
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20531
20669
  "aside",
20532
20670
  {
20533
20671
  style: {
@@ -20540,19 +20678,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20540
20678
  background: "var(--vscode-sideBar-background, rgba(0,0,0,0.1))"
20541
20679
  },
20542
20680
  children: [
20543
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { padding: "10px 12px", borderBottom: "1px solid var(--vscode-panel-border, rgba(255,255,255,0.05))" }, children: [
20544
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: 0, fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
20545
- totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { fontSize: "10px", opacity: 0.5, marginTop: "2px" }, children: [
20681
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { padding: "10px 12px", borderBottom: "1px solid var(--vscode-panel-border, rgba(255,255,255,0.05))" }, children: [
20682
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { style: { margin: 0, fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
20683
+ totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { fontSize: "10px", opacity: 0.5, marginTop: "2px" }, children: [
20546
20684
  completedCount,
20547
20685
  "/",
20548
20686
  totalCount,
20549
20687
  " done"
20550
20688
  ] })
20551
20689
  ] }),
20552
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { padding: "8px 10px", display: "flex", flexDirection: "column", gap: "4px" }, children: totalCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { fontSize: "11px", opacity: 0.4, padding: "8px 4px" }, children: "No checklist items." }) : (task.checklist || []).map((item) => {
20690
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { padding: "8px 10px", display: "flex", flexDirection: "column", gap: "4px" }, children: totalCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { fontSize: "11px", opacity: 0.4, padding: "8px 4px" }, children: "No checklist items." }) : (task.checklist || []).map((item) => {
20553
20691
  const isDone = item.status === "done";
20554
20692
  const isInProgress = item.status === "in_progress";
20555
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20693
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20556
20694
  "label",
20557
20695
  {
20558
20696
  style: {
@@ -20569,7 +20707,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20569
20707
  },
20570
20708
  title: isInProgress ? "In progress" : isDone ? "Done" : "Pending",
20571
20709
  children: [
20572
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20710
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20573
20711
  "input",
20574
20712
  {
20575
20713
  type: "checkbox",
@@ -20578,7 +20716,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20578
20716
  style: { marginTop: "2px", cursor: "pointer", flexShrink: 0 }
20579
20717
  }
20580
20718
  ),
20581
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { wordBreak: "break-word" }, children: item.text })
20719
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { wordBreak: "break-word" }, children: item.text })
20582
20720
  ]
20583
20721
  },
20584
20722
  item.id
@@ -20587,10 +20725,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20587
20725
  ]
20588
20726
  }
20589
20727
  ),
20590
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
20591
- taskMessages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "messages messages--empty", children: "No messages in this execution yet. Agent will start on next tick." }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MessageList, { items: chatItems, sessionId: null, compact: true }),
20592
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("form", { className: "composer", onSubmit: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "flex-end" }, children: [
20593
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20728
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
20729
+ taskMessages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "messages messages--empty", children: "No messages in this execution yet. Agent will start on next tick." }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MessageList, { items: chatItems, sessionId: null, compact: true }),
20730
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("form", { className: "composer", onSubmit: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "flex-end" }, children: [
20731
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20594
20732
  "textarea",
20595
20733
  {
20596
20734
  className: "composer__input",
@@ -20606,7 +20744,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20606
20744
  style: { flex: 1, minHeight: "44px" }
20607
20745
  }
20608
20746
  ),
20609
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20747
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20610
20748
  "button",
20611
20749
  {
20612
20750
  type: "submit",
@@ -20638,12 +20776,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20638
20776
  statusColor
20639
20777
  }) {
20640
20778
  const isRunning = task.status === "active" || task.status === "reviewing" || task.status === "planning";
20641
- const [draftTitle, setDraftTitle] = (0, import_react16.useState)(task.title);
20642
- const [draftObjective, setDraftObjective] = (0, import_react16.useState)(task.objective);
20643
- const [lastTaskId, setLastTaskId] = (0, import_react16.useState)(task.id);
20779
+ const [draftTitle, setDraftTitle] = (0, import_react17.useState)(task.title);
20780
+ const [draftObjective, setDraftObjective] = (0, import_react17.useState)(task.objective);
20781
+ const [lastTaskId, setLastTaskId] = (0, import_react17.useState)(task.id);
20644
20782
  const trimmedTitle = draftTitle.trim();
20645
20783
  const isDirty = trimmedTitle !== task.title.trim() || draftObjective.trim() !== task.objective.trim();
20646
- (0, import_react16.useEffect)(() => {
20784
+ (0, import_react17.useEffect)(() => {
20647
20785
  if (task.id !== lastTaskId) {
20648
20786
  setDraftTitle(task.title);
20649
20787
  setDraftObjective(task.objective);
@@ -20658,16 +20796,16 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20658
20796
  setDraftTitle(task.title);
20659
20797
  setDraftObjective(task.objective);
20660
20798
  };
20661
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%", overflowY: "auto" }, children: [
20662
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "task-view__sub-header", style: { padding: "12px 14px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
20663
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
20664
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowLeft, { size: 13 }) }),
20665
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("h3", { style: { margin: 0, fontSize: "15px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
20666
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { style: { opacity: 0.6 }, children: [
20799
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%", overflowY: "auto" }, children: [
20800
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "task-view__sub-header", style: { padding: "12px 14px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
20801
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
20802
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowLeft, { size: 13 }) }),
20803
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("h3", { style: { margin: 0, fontSize: "15px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
20804
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { style: { opacity: 0.6 }, children: [
20667
20805
  "Task #",
20668
20806
  task.id
20669
20807
  ] }),
20670
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20808
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20671
20809
  "input",
20672
20810
  {
20673
20811
  value: draftTitle,
@@ -20688,7 +20826,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20688
20826
  }
20689
20827
  )
20690
20828
  ] }),
20691
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20829
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20692
20830
  "span",
20693
20831
  {
20694
20832
  className: "task-table__badge",
@@ -20697,8 +20835,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20697
20835
  }
20698
20836
  )
20699
20837
  ] }),
20700
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "inline-flex", gap: "6px" }, children: [
20701
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20838
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "inline-flex", gap: "6px" }, children: [
20839
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20702
20840
  "button",
20703
20841
  {
20704
20842
  className: "confirm__btn",
@@ -20708,7 +20846,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20708
20846
  children: "View Log"
20709
20847
  }
20710
20848
  ),
20711
- task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20849
+ task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20712
20850
  "button",
20713
20851
  {
20714
20852
  className: "confirm__btn",
@@ -20716,12 +20854,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20716
20854
  title: `Commit pending changes to ${task.branch} and remove the worktree`,
20717
20855
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
20718
20856
  children: [
20719
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GitBranch, { size: 12 }),
20857
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GitBranch, { size: 12 }),
20720
20858
  " Discard worktree"
20721
20859
  ]
20722
20860
  }
20723
20861
  ),
20724
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20862
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20725
20863
  "button",
20726
20864
  {
20727
20865
  className: "confirm__btn",
@@ -20729,28 +20867,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20729
20867
  title: task.archived ? "Unarchive this task" : "Archive this task (hides it from the list, excludes from scheduler)",
20730
20868
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
20731
20869
  children: [
20732
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Archive, { size: 12 }),
20870
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Archive, { size: 12 }),
20733
20871
  " ",
20734
20872
  task.archived ? "Unarchive" : "Archive"
20735
20873
  ]
20736
20874
  }
20737
20875
  ),
20738
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20876
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20739
20877
  "button",
20740
20878
  {
20741
20879
  className: "confirm__btn confirm__btn--primary",
20742
20880
  onClick: () => onToggleStatus(task),
20743
20881
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
20744
- children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
20745
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Pause, { size: 12 }),
20882
+ children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
20883
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Pause, { size: 12 }),
20746
20884
  " Pause"
20747
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
20748
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Play, { size: 12 }),
20885
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
20886
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Play, { size: 12 }),
20749
20887
  " Activate"
20750
20888
  ] })
20751
20889
  }
20752
20890
  ),
20753
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20891
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20754
20892
  "button",
20755
20893
  {
20756
20894
  className: "confirm__btn",
@@ -20758,22 +20896,22 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20758
20896
  title: "Permanently delete this task and all its messages",
20759
20897
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px", color: "#ef4444" },
20760
20898
  children: [
20761
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Trash2, { size: 12 }),
20899
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Trash2, { size: 12 }),
20762
20900
  " Delete"
20763
20901
  ]
20764
20902
  }
20765
20903
  )
20766
20904
  ] })
20767
20905
  ] }),
20768
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { padding: "16px", maxWidth: "720px" }, children: [
20769
- task.branch && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "6px", fontSize: "11px", opacity: 0.75 }, children: [
20770
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GitBranch, { size: 12 }),
20771
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { style: { fontFamily: "monospace" }, children: task.branch }),
20772
- !task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { opacity: 0.6 }, children: "(worktree removed)" })
20906
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { padding: "16px", maxWidth: "720px" }, children: [
20907
+ task.branch && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "6px", fontSize: "11px", opacity: 0.75 }, children: [
20908
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GitBranch, { size: 12 }),
20909
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { style: { fontFamily: "monospace" }, children: task.branch }),
20910
+ !task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { opacity: 0.6 }, children: "(worktree removed)" })
20773
20911
  ] }),
20774
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px" }, children: [
20775
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Objective" }),
20776
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20912
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px" }, children: [
20913
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Objective" }),
20914
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20777
20915
  "textarea",
20778
20916
  {
20779
20917
  value: draftObjective,
@@ -20797,8 +20935,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20797
20935
  }
20798
20936
  }
20799
20937
  ),
20800
- isDirty && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center", marginTop: "8px" }, children: [
20801
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20938
+ isDirty && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center", marginTop: "8px" }, children: [
20939
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20802
20940
  "button",
20803
20941
  {
20804
20942
  className: "confirm__btn confirm__btn--primary",
@@ -20811,13 +20949,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20811
20949
  children: "Save"
20812
20950
  }
20813
20951
  ),
20814
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "confirm__btn", onClick: resetDraft, style: { padding: "3px 10px", fontSize: "10px" }, children: "Cancel" }),
20815
- isRunning && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: "Applies from the next cycle." })
20952
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "confirm__btn", onClick: resetDraft, style: { padding: "3px 10px", fontSize: "10px" }, children: "Cancel" }),
20953
+ isRunning && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: "Applies from the next cycle." })
20816
20954
  ] })
20817
20955
  ] }),
20818
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px" }, children: [
20819
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Assigned Agent" }),
20820
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20956
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px" }, children: [
20957
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Assigned Agent" }),
20958
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20821
20959
  "select",
20822
20960
  {
20823
20961
  value: task.agentId || "",
@@ -20837,8 +20975,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20837
20975
  },
20838
20976
  title: isRunning ? "Pause the task before changing its agent" : "Choose which agent runs this task",
20839
20977
  children: [
20840
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
20841
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
20978
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
20979
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
20842
20980
  a.name,
20843
20981
  " (",
20844
20982
  a.provider,
@@ -20848,9 +20986,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20848
20986
  }
20849
20987
  )
20850
20988
  ] }),
20851
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px" }, children: [
20852
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Planner Agent" }),
20853
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
20989
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px" }, children: [
20990
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Planner Agent" }),
20991
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20854
20992
  "select",
20855
20993
  {
20856
20994
  value: task.plannerAgentId || "",
@@ -20859,8 +20997,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20859
20997
  style: { background: "var(--vscode-input-background, #252526)", color: "var(--vscode-input-foreground)", border: "1px solid var(--vscode-input-border, #3c3c3c)", borderRadius: "4px", padding: "6px 8px", fontSize: "12px", outline: "none", width: "100%", cursor: isRunning ? "not-allowed" : "pointer", opacity: isRunning ? 0.6 : 1 },
20860
20998
  title: isRunning ? "Pause the task before changing its planner" : "Agent that runs the planning phase (read-only). Unset: falls back to the project planner, then the developer.",
20861
20999
  children: [
20862
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
20863
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
21000
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
21001
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
20864
21002
  a.name,
20865
21003
  " (",
20866
21004
  a.provider,
@@ -20870,9 +21008,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20870
21008
  }
20871
21009
  )
20872
21010
  ] }),
20873
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px" }, children: [
20874
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Reviewer Agent" }),
20875
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
21011
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21012
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Reviewer Agent" }),
21013
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20876
21014
  "select",
20877
21015
  {
20878
21016
  value: task.reviewerAgentId || "",
@@ -20881,8 +21019,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20881
21019
  style: { background: "var(--vscode-input-background, #252526)", color: "var(--vscode-input-foreground)", border: "1px solid var(--vscode-input-border, #3c3c3c)", borderRadius: "4px", padding: "6px 8px", fontSize: "12px", outline: "none", width: "100%", cursor: isRunning ? "not-allowed" : "pointer", opacity: isRunning ? 0.6 : 1 },
20882
21020
  title: isRunning ? "Pause the task before changing its reviewer" : "Agent that reviews the branch at DONE. Unset: falls back to the project reviewer, then the developer.",
20883
21021
  children: [
20884
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
20885
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
21022
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
21023
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
20886
21024
  a.name,
20887
21025
  " (",
20888
21026
  a.provider,
@@ -20892,31 +21030,31 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20892
21030
  }
20893
21031
  )
20894
21032
  ] }),
20895
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px" }, children: [
20896
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Phases" }),
20897
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { display: "flex", gap: "12px" }, children: [
21033
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21034
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Phases" }),
21035
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { display: "flex", gap: "12px" }, children: [
20898
21036
  { flag: "planningEnabled", label: "Planning phase", value: task.planningEnabled },
20899
21037
  { flag: "reviewEnabled", label: "Review at DONE", value: task.reviewEnabled },
20900
21038
  { flag: "sddEnabled", label: "SDD mode (.md specs)", value: task.sddEnabled }
20901
- ].map(({ flag, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", flex: 1 }, children: [
21039
+ ].map(({ flag, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", flex: 1 }, children: [
20902
21040
  label,
20903
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
21041
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20904
21042
  "select",
20905
21043
  {
20906
21044
  value: value === true ? "on" : value === false ? "off" : "inherit",
20907
21045
  onChange: (e) => onSetFlag(task, flag, e.target.value === "inherit" ? null : e.target.value === "on"),
20908
21046
  style: { background: "var(--vscode-input-background, #252526)", color: "var(--vscode-input-foreground)", border: "1px solid var(--vscode-input-border, #3c3c3c)", borderRadius: "4px", padding: "6px 8px", fontSize: "12px", outline: "none" },
20909
21047
  children: [
20910
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "inherit", children: "Project default" }),
20911
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "on", children: "On" }),
20912
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "off", children: "Off" })
21048
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "inherit", children: "Project default" }),
21049
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "on", children: "On" }),
21050
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "off", children: "Off" })
20913
21051
  ]
20914
21052
  }
20915
21053
  )
20916
21054
  ] }, flag)) }),
20917
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", marginTop: "12px", maxWidth: "260px" }, children: [
21055
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", marginTop: "12px", maxWidth: "260px" }, children: [
20918
21056
  "Max run seconds per cycle",
20919
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
21057
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20920
21058
  "input",
20921
21059
  {
20922
21060
  type: "number",
@@ -20939,7 +21077,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20939
21077
  )
20940
21078
  ] })
20941
21079
  ] }),
20942
- task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
21080
+ task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20943
21081
  "div",
20944
21082
  {
20945
21083
  style: {
@@ -20952,19 +21090,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20952
21090
  fontSize: "12px"
20953
21091
  },
20954
21092
  children: [
20955
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("strong", { children: [
20956
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TriangleAlert, { size: 13 }),
21093
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("strong", { children: [
21094
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TriangleAlert, { size: 13 }),
20957
21095
  " Blocked Reason:"
20958
21096
  ] }),
20959
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { style: { margin: "4px 0 0 0" }, children: task.blockedReason })
21097
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { style: { margin: "4px 0 0 0" }, children: task.blockedReason })
20960
21098
  ]
20961
21099
  }
20962
21100
  ),
20963
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { children: [
20964
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 8px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
20965
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: (task.checklist || []).map((item) => {
21101
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
21102
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { style: { margin: "0 0 8px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
21103
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: (task.checklist || []).map((item) => {
20966
21104
  const isDone = item.status === "done";
20967
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
21105
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20968
21106
  "label",
20969
21107
  {
20970
21108
  style: {
@@ -20981,7 +21119,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20981
21119
  opacity: isDone ? 0.6 : 1
20982
21120
  },
20983
21121
  children: [
20984
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
21122
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20985
21123
  "input",
20986
21124
  {
20987
21125
  type: "checkbox",
@@ -20990,7 +21128,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20990
21128
  style: { marginTop: "2px", cursor: "pointer" }
20991
21129
  }
20992
21130
  ),
20993
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: item.text })
21131
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: item.text })
20994
21132
  ]
20995
21133
  },
20996
21134
  item.id
@@ -21002,7 +21140,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21002
21140
  }
21003
21141
 
21004
21142
  // src/useVoice.ts
21005
- var import_react17 = __toESM(require_react(), 1);
21143
+ var import_react18 = __toESM(require_react(), 1);
21006
21144
  function canCapture() {
21007
21145
  return typeof window !== "undefined" && typeof MediaRecorder !== "undefined" && !!navigator.mediaDevices?.getUserMedia;
21008
21146
  }
@@ -21027,37 +21165,37 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21027
21165
  const { voice, chatStatus, pendingConfirmCount, items, onTranscript } = opts;
21028
21166
  const available = !!voice && voice.enabled && voice.configured && canCapture();
21029
21167
  const canSpeak = !!voice?.canSpeak;
21030
- const [phase, setPhase] = (0, import_react17.useState)("idle");
21031
- const [mode, setMode] = (0, import_react17.useState)("dictate");
21032
- const [error, setError] = (0, import_react17.useState)(null);
21033
- const phaseRef = (0, import_react17.useRef)(phase);
21168
+ const [phase, setPhase] = (0, import_react18.useState)("idle");
21169
+ const [mode, setMode] = (0, import_react18.useState)("dictate");
21170
+ const [error, setError] = (0, import_react18.useState)(null);
21171
+ const phaseRef = (0, import_react18.useRef)(phase);
21034
21172
  phaseRef.current = phase;
21035
- const modeRef = (0, import_react17.useRef)(mode);
21173
+ const modeRef = (0, import_react18.useRef)(mode);
21036
21174
  modeRef.current = mode;
21037
- const onTranscriptRef = (0, import_react17.useRef)(onTranscript);
21175
+ const onTranscriptRef = (0, import_react18.useRef)(onTranscript);
21038
21176
  onTranscriptRef.current = onTranscript;
21039
- const itemsRef = (0, import_react17.useRef)(items);
21177
+ const itemsRef = (0, import_react18.useRef)(items);
21040
21178
  itemsRef.current = items;
21041
- const chatStatusRef = (0, import_react17.useRef)(chatStatus);
21179
+ const chatStatusRef = (0, import_react18.useRef)(chatStatus);
21042
21180
  chatStatusRef.current = chatStatus;
21043
- const streamRef = (0, import_react17.useRef)(null);
21044
- const recorderRef = (0, import_react17.useRef)(null);
21045
- const chunksRef = (0, import_react17.useRef)([]);
21046
- const vadRef = (0, import_react17.useRef)(null);
21047
- const audioRef = (0, import_react17.useRef)(null);
21048
- const idleTimerRef = (0, import_react17.useRef)(null);
21049
- const heardSpeechRef = (0, import_react17.useRef)(false);
21050
- const sawStreamingRef = (0, import_react17.useRef)(false);
21051
- const cursorRef = (0, import_react17.useRef)(0);
21052
- const queueRef = (0, import_react17.useRef)([]);
21053
- const apply = (0, import_react17.useCallback)((event) => {
21181
+ const streamRef = (0, import_react18.useRef)(null);
21182
+ const recorderRef = (0, import_react18.useRef)(null);
21183
+ const chunksRef = (0, import_react18.useRef)([]);
21184
+ const vadRef = (0, import_react18.useRef)(null);
21185
+ const audioRef = (0, import_react18.useRef)(null);
21186
+ const idleTimerRef = (0, import_react18.useRef)(null);
21187
+ const heardSpeechRef = (0, import_react18.useRef)(false);
21188
+ const sawStreamingRef = (0, import_react18.useRef)(false);
21189
+ const cursorRef = (0, import_react18.useRef)(0);
21190
+ const queueRef = (0, import_react18.useRef)([]);
21191
+ const apply = (0, import_react18.useCallback)((event) => {
21054
21192
  setPhase((current) => nextPhase(current, event));
21055
21193
  }, []);
21056
21194
  const clearIdleTimer = () => {
21057
21195
  if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
21058
21196
  idleTimerRef.current = null;
21059
21197
  };
21060
- const teardownCapture = (0, import_react17.useCallback)(() => {
21198
+ const teardownCapture = (0, import_react18.useCallback)(() => {
21061
21199
  clearIdleTimer();
21062
21200
  try {
21063
21201
  vadRef.current?.destroy();
@@ -21074,14 +21212,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21074
21212
  chunksRef.current = [];
21075
21213
  heardSpeechRef.current = false;
21076
21214
  }, []);
21077
- const stopPlayback = (0, import_react17.useCallback)(() => {
21215
+ const stopPlayback = (0, import_react18.useCallback)(() => {
21078
21216
  if (audioRef.current) {
21079
21217
  audioRef.current.pause();
21080
21218
  audioRef.current.src = "";
21081
21219
  audioRef.current = null;
21082
21220
  }
21083
21221
  }, []);
21084
- const fail = (0, import_react17.useCallback)(
21222
+ const fail = (0, import_react18.useCallback)(
21085
21223
  (message) => {
21086
21224
  teardownCapture();
21087
21225
  stopPlayback();
@@ -21090,7 +21228,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21090
21228
  },
21091
21229
  [apply, teardownCapture, stopPlayback]
21092
21230
  );
21093
- const finishRecording = (0, import_react17.useCallback)(() => {
21231
+ const finishRecording = (0, import_react18.useCallback)(() => {
21094
21232
  const recorder = recorderRef.current;
21095
21233
  if (!recorder || recorder.state === "inactive") return;
21096
21234
  recorder.onstop = async () => {
@@ -21119,7 +21257,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21119
21257
  };
21120
21258
  recorder.stop();
21121
21259
  }, [apply, fail, teardownCapture]);
21122
- const startRecording = (0, import_react17.useCallback)(async () => {
21260
+ const startRecording = (0, import_react18.useCallback)(async () => {
21123
21261
  setError(null);
21124
21262
  chunksRef.current = [];
21125
21263
  heardSpeechRef.current = false;
@@ -21164,7 +21302,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21164
21302
  fail(`Microphone unavailable: ${err}`);
21165
21303
  }
21166
21304
  }, [apply, fail, finishRecording, teardownCapture]);
21167
- const speakReply = (0, import_react17.useCallback)(async () => {
21305
+ const speakReply = (0, import_react18.useCallback)(async () => {
21168
21306
  const text = queueRef.current.shift();
21169
21307
  if (!text) {
21170
21308
  apply({
@@ -21208,10 +21346,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21208
21346
  fail(`Synthesis failed: ${err}`);
21209
21347
  }
21210
21348
  }, [apply, fail]);
21211
- (0, import_react17.useEffect)(() => {
21349
+ (0, import_react18.useEffect)(() => {
21212
21350
  if (chatStatus === "streaming") sawStreamingRef.current = true;
21213
21351
  }, [chatStatus]);
21214
- (0, import_react17.useEffect)(() => {
21352
+ (0, import_react18.useEffect)(() => {
21215
21353
  if (modeRef.current !== "conversation") return;
21216
21354
  if (phaseRef.current === "idle") return;
21217
21355
  const { texts, cursor } = takeFinalizedBubbles(items, cursorRef.current);
@@ -21220,7 +21358,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21220
21358
  queueRef.current.push(...texts);
21221
21359
  apply({ kind: "speechQueued", mode: "conversation", canSpeak });
21222
21360
  }, [items, canSpeak, apply]);
21223
- (0, import_react17.useEffect)(() => {
21361
+ (0, import_react18.useEffect)(() => {
21224
21362
  if (phase !== "awaiting") return;
21225
21363
  if (chatStatus === "error") {
21226
21364
  apply({ kind: "failed", mode: "conversation" });
@@ -21242,8 +21380,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21242
21380
  pendingSpeech: queueRef.current.length
21243
21381
  });
21244
21382
  }, [phase, chatStatus, pendingConfirmCount, canSpeak, apply]);
21245
- const prevPhase = (0, import_react17.useRef)("idle");
21246
- (0, import_react17.useEffect)(() => {
21383
+ const prevPhase = (0, import_react18.useRef)("idle");
21384
+ (0, import_react18.useEffect)(() => {
21247
21385
  const from = prevPhase.current;
21248
21386
  prevPhase.current = phase;
21249
21387
  if (from === phase) return;
@@ -21255,14 +21393,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21255
21393
  queueRef.current = [];
21256
21394
  }
21257
21395
  }, [phase, startRecording, speakReply, teardownCapture, stopPlayback]);
21258
- (0, import_react17.useEffect)(
21396
+ (0, import_react18.useEffect)(
21259
21397
  () => () => {
21260
21398
  teardownCapture();
21261
21399
  stopPlayback();
21262
21400
  },
21263
21401
  [teardownCapture, stopPlayback]
21264
21402
  );
21265
- const toggle = (0, import_react17.useCallback)(() => {
21403
+ const toggle = (0, import_react18.useCallback)(() => {
21266
21404
  if (!available) return;
21267
21405
  const current = phaseRef.current;
21268
21406
  if (current === "idle") {
@@ -21276,7 +21414,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21276
21414
  }
21277
21415
  apply({ kind: "userStop", mode: modeRef.current });
21278
21416
  }, [available, apply, finishRecording]);
21279
- const changeMode = (0, import_react17.useCallback)(
21417
+ const changeMode = (0, import_react18.useCallback)(
21280
21418
  (next) => {
21281
21419
  apply({ kind: "userStop", mode: modeRef.current });
21282
21420
  setMode(next);
@@ -21287,7 +21425,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21287
21425
  }
21288
21426
 
21289
21427
  // src/App.tsx
21290
- var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
21428
+ var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
21291
21429
  function closeStreamingAssistant2(items) {
21292
21430
  const last = items[items.length - 1];
21293
21431
  if (!last || last.kind !== "assistant" || !last.streaming) return items;
@@ -21449,35 +21587,35 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21449
21587
  }
21450
21588
  }
21451
21589
  function App({ postMessage, layout = "compact" }) {
21452
- const [chatState, dispatch] = (0, import_react18.useReducer)(reducer, {
21590
+ const [chatState, dispatch] = (0, import_react19.useReducer)(reducer, {
21453
21591
  items: [],
21454
21592
  status: "idle",
21455
21593
  errorText: null,
21456
21594
  pendingConfirms: [],
21457
21595
  contextUsage: null
21458
21596
  });
21459
- const [agents, setAgents] = (0, import_react18.useState)([]);
21460
- const [sessions, setSessions] = (0, import_react18.useState)([]);
21461
- const [selectedAgentId, setSelectedAgentId] = (0, import_react18.useState)(null);
21462
- const [selectedSessionId, setSelectedSessionId] = (0, import_react18.useState)(null);
21463
- const [showSessions, setShowSessions] = (0, import_react18.useState)(false);
21464
- const [showAllAgents, setShowAllAgents] = (0, import_react18.useState)(false);
21465
- const [pendingDelete, setPendingDelete] = (0, import_react18.useState)(null);
21466
- const [activeScreen, setActiveScreen] = (0, import_react18.useState)("chat");
21467
- const [settingsData, setSettingsData] = (0, import_react18.useState)(null);
21468
- const [modelsResult, setModelsResult] = (0, import_react18.useState)(null);
21469
- const [refreshingSourceId, setRefreshingSourceId] = (0, import_react18.useState)(null);
21470
- const [refreshOutcome, setRefreshOutcome] = (0, import_react18.useState)(null);
21471
- const [mcpAuthOutcome, setMcpAuthOutcome] = (0, import_react18.useState)(null);
21472
- const [taskRuns, setTaskRuns] = (0, import_react18.useState)({});
21473
- const [voiceConfig, setVoiceConfig] = (0, import_react18.useState)(null);
21474
- const [sttCatalogResult, setSttCatalogResult] = (0, import_react18.useState)(null);
21475
- const [ttsCatalogResult, setTtsCatalogResult] = (0, import_react18.useState)(null);
21476
- const [composerDraft, setComposerDraft] = (0, import_react18.useState)("");
21477
- (0, import_react18.useEffect)(() => {
21597
+ const [agents, setAgents] = (0, import_react19.useState)([]);
21598
+ const [sessions, setSessions] = (0, import_react19.useState)([]);
21599
+ const [selectedAgentId, setSelectedAgentId] = (0, import_react19.useState)(null);
21600
+ const [selectedSessionId, setSelectedSessionId] = (0, import_react19.useState)(null);
21601
+ const [showSessions, setShowSessions] = (0, import_react19.useState)(false);
21602
+ const [showAllAgents, setShowAllAgents] = (0, import_react19.useState)(false);
21603
+ const [pendingDelete, setPendingDelete] = (0, import_react19.useState)(null);
21604
+ const [activeScreen, setActiveScreen] = (0, import_react19.useState)("chat");
21605
+ const [settingsData, setSettingsData] = (0, import_react19.useState)(null);
21606
+ const [modelsResult, setModelsResult] = (0, import_react19.useState)(null);
21607
+ const [refreshingSourceId, setRefreshingSourceId] = (0, import_react19.useState)(null);
21608
+ const [refreshOutcome, setRefreshOutcome] = (0, import_react19.useState)(null);
21609
+ const [mcpAuthOutcome, setMcpAuthOutcome] = (0, import_react19.useState)(null);
21610
+ const [taskRuns, setTaskRuns] = (0, import_react19.useState)({});
21611
+ const [voiceConfig, setVoiceConfig] = (0, import_react19.useState)(null);
21612
+ const [sttCatalogResult, setSttCatalogResult] = (0, import_react19.useState)(null);
21613
+ const [ttsCatalogResult, setTtsCatalogResult] = (0, import_react19.useState)(null);
21614
+ const [composerDraft, setComposerDraft] = (0, import_react19.useState)("");
21615
+ (0, import_react19.useEffect)(() => {
21478
21616
  postMessage({ type: "webviewReady" });
21479
21617
  }, []);
21480
- (0, import_react18.useEffect)(() => {
21618
+ (0, import_react19.useEffect)(() => {
21481
21619
  function handle(event) {
21482
21620
  const msg = event.data;
21483
21621
  if (!msg || typeof msg !== "object" || !("type" in msg)) return;
@@ -21585,15 +21723,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21585
21723
  if (voice2) msg.voice = true;
21586
21724
  postMessage(msg);
21587
21725
  };
21588
- const onConfirm = (0, import_react18.useCallback)((id, decision) => {
21726
+ const onConfirm = (0, import_react19.useCallback)((id, decision) => {
21589
21727
  dispatch({ kind: "permission-resolved", id });
21590
21728
  postMessage({ type: "permission_response", id, decision });
21591
21729
  }, [postMessage]);
21592
21730
  const onAbort = () => {
21593
21731
  postMessage({ type: "abort" });
21594
21732
  };
21595
- const confirmCards = (0, import_react18.useMemo)(
21596
- () => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ConfirmCard, { pending: p, onDecide: onConfirm }, p.id)),
21733
+ const confirmCards = (0, import_react19.useMemo)(
21734
+ () => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ConfirmCard, { pending: p, onDecide: onConfirm }, p.id)),
21597
21735
  [chatState.pendingConfirms, onConfirm]
21598
21736
  );
21599
21737
  const onSelectAgent = (agentId) => {
@@ -21633,7 +21771,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21633
21771
  const cancelDeleteSession = () => {
21634
21772
  setPendingDelete(null);
21635
21773
  };
21636
- (0, import_react18.useEffect)(() => {
21774
+ (0, import_react19.useEffect)(() => {
21637
21775
  if (!pendingDelete) return;
21638
21776
  function handleKeyDown(event) {
21639
21777
  if (event.key === "Escape") {
@@ -21648,7 +21786,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21648
21786
  setShowSessions(!showSessions);
21649
21787
  }
21650
21788
  };
21651
- (0, import_react18.useEffect)(() => {
21789
+ (0, import_react19.useEffect)(() => {
21652
21790
  function handleClickOutside(event) {
21653
21791
  const target = event.target;
21654
21792
  if (showSessions && !target.closest(".app__sessions-dropdown")) {
@@ -21662,18 +21800,18 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21662
21800
  const selectedAgentName = agents.find((a) => a.id === selectedAgentId)?.name;
21663
21801
  const activeAgent = agents.find((a) => a.id === selectedAgentId);
21664
21802
  if (activeScreen === "projects" && layout === "sidebar") {
21665
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app", style: { height: "100%" }, children: [
21666
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__header-row", children: [
21667
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__logo-title-wrapper", onClick: () => setActiveScreen("chat"), style: { cursor: "pointer" }, children: [
21668
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
21669
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Caretaker" })
21803
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app", style: { height: "100%" }, children: [
21804
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__header-row", children: [
21805
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__logo-title-wrapper", onClick: () => setActiveScreen("chat"), style: { cursor: "pointer" }, children: [
21806
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
21807
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Caretaker" })
21670
21808
  ] }),
21671
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__controls", children: [
21672
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "app__sessions-btn", onClick: () => setActiveScreen("chat"), children: [
21673
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MessageSquare, { size: 13 }),
21809
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__controls", children: [
21810
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "app__sessions-btn", onClick: () => setActiveScreen("chat"), children: [
21811
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MessageSquare, { size: 13 }),
21674
21812
  " Chat"
21675
21813
  ] }),
21676
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21814
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21677
21815
  "button",
21678
21816
  {
21679
21817
  className: "app__settings-btn",
@@ -21683,18 +21821,18 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21683
21821
  },
21684
21822
  title: "Caretaker Settings",
21685
21823
  children: [
21686
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Settings, { size: 13 }),
21824
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Settings, { size: 13 }),
21687
21825
  " Settings"
21688
21826
  ]
21689
21827
  }
21690
21828
  )
21691
21829
  ] })
21692
21830
  ] }) }),
21693
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ProjectsTab, { agents }) })
21831
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ProjectsTab, { agents }) })
21694
21832
  ] });
21695
21833
  }
21696
21834
  if (activeScreen === "settings") {
21697
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: `app ${layout === "sidebar" ? "app--settings-centered" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21835
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `app ${layout === "sidebar" ? "app--settings-centered" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21698
21836
  SettingsPanel,
21699
21837
  {
21700
21838
  layout,
@@ -21714,43 +21852,43 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21714
21852
  }
21715
21853
  ) });
21716
21854
  }
21717
- const deleteOverlay = pendingDelete && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__confirm-overlay", onClick: cancelDeleteSession, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
21718
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__confirm-title", children: "Delete conversation" }),
21719
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "app__confirm-message", children: [
21855
+ const deleteOverlay = pendingDelete && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__confirm-overlay", onClick: cancelDeleteSession, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
21856
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__confirm-title", children: "Delete conversation" }),
21857
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "app__confirm-message", children: [
21720
21858
  "Delete conversation \u201C",
21721
21859
  pendingDelete.title,
21722
21860
  "\u201D? This cannot be undone."
21723
21861
  ] }),
21724
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__confirm-buttons", children: [
21725
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "app__confirm-btn", onClick: cancelDeleteSession, children: "Cancel" }),
21726
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "app__confirm-btn app__confirm-btn--danger", onClick: confirmDeleteSession, children: "Delete" })
21862
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__confirm-buttons", children: [
21863
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "app__confirm-btn", onClick: cancelDeleteSession, children: "Cancel" }),
21864
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "app__confirm-btn app__confirm-btn--danger", onClick: confirmDeleteSession, children: "Delete" })
21727
21865
  ] })
21728
21866
  ] }) });
21729
21867
  if (layout === "sidebar") {
21730
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app app--with-sidebar", children: [
21731
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("aside", { className: "app__sidebar", children: [
21732
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-header", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__logo-title-wrapper", children: [
21733
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
21734
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Caretaker" })
21868
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app app--with-sidebar", children: [
21869
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("aside", { className: "app__sidebar", children: [
21870
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sidebar-header", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__logo-title-wrapper", children: [
21871
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
21872
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Caretaker" })
21735
21873
  ] }) }),
21736
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sidebar-content", children: [
21737
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sidebar-section", children: [
21738
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-section-title", children: "Agents" }),
21739
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-agents-list", children: selectedAgentId && !showAllAgents ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21874
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sidebar-content", children: [
21875
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sidebar-section", children: [
21876
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sidebar-section-title", children: "Agents" }),
21877
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sidebar-agents-list", children: selectedAgentId && !showAllAgents ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21740
21878
  "button",
21741
21879
  {
21742
21880
  className: "app__sidebar-agent-item app__sidebar-agent-item--collapsed-active",
21743
21881
  onClick: () => setShowAllAgents(true),
21744
21882
  title: "Switch Agent",
21745
21883
  children: [
21746
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "agent-status-dot agent-status-dot--active" }),
21747
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__sidebar-agent-name", children: activeAgent?.name || selectedAgentId }),
21748
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronDown, { className: "app__sidebar-chevron", size: 10 })
21884
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "agent-status-dot agent-status-dot--active" }),
21885
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__sidebar-agent-name", children: activeAgent?.name || selectedAgentId }),
21886
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronDown, { className: "app__sidebar-chevron", size: 10 })
21749
21887
  ]
21750
21888
  }
21751
- ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: `app__sidebar-agents-list-expanded ${selectedAgentId ? "app__sidebar-agents-list-expanded--has-active" : ""}`, children: agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-empty-text", children: "No agents found" }) : agents.map((agent) => {
21889
+ ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `app__sidebar-agents-list-expanded ${selectedAgentId ? "app__sidebar-agents-list-expanded--has-active" : ""}`, children: agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sidebar-empty-text", children: "No agents found" }) : agents.map((agent) => {
21752
21890
  const isSelected = selectedAgentId === agent.id;
21753
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21891
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21754
21892
  "button",
21755
21893
  {
21756
21894
  className: `app__sidebar-agent-item ${isSelected ? "app__sidebar-agent-item--active" : ""}`,
@@ -21762,19 +21900,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21762
21900
  }
21763
21901
  },
21764
21902
  children: [
21765
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: `agent-status-dot ${isSelected ? "agent-status-dot--active" : ""}` }),
21766
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__sidebar-agent-name", children: agent.name }),
21767
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronUp, { className: "app__sidebar-chevron app__sidebar-chevron--up", size: 10 })
21903
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: `agent-status-dot ${isSelected ? "agent-status-dot--active" : ""}` }),
21904
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__sidebar-agent-name", children: agent.name }),
21905
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronUp, { className: "app__sidebar-chevron app__sidebar-chevron--up", size: 10 })
21768
21906
  ]
21769
21907
  },
21770
21908
  agent.id
21771
21909
  );
21772
21910
  }) }) })
21773
21911
  ] }),
21774
- selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sidebar-section", children: [
21775
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sidebar-section-header", children: [
21776
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__sidebar-section-title", children: "Conversations" }),
21777
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21912
+ selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sidebar-section", children: [
21913
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sidebar-section-header", children: [
21914
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__sidebar-section-title", children: "Conversations" }),
21915
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21778
21916
  "button",
21779
21917
  {
21780
21918
  className: "app__sidebar-new-chat-btn",
@@ -21784,15 +21922,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21784
21922
  }
21785
21923
  )
21786
21924
  ] }),
21787
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-sessions-list", children: sessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-empty-text", children: "No conversations yet" }) : sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21925
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sidebar-sessions-list", children: sessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sidebar-empty-text", children: "No conversations yet" }) : sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21788
21926
  "div",
21789
21927
  {
21790
21928
  className: `app__sidebar-session-item ${selectedSessionId === session.id ? "app__sidebar-session-item--active" : ""}`,
21791
21929
  onClick: () => onSelectSession(session.id),
21792
21930
  children: [
21793
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__sidebar-session-icon", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MessageSquare, { size: 13 }) }),
21794
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__sidebar-session-title", title: session.title, children: session.title }),
21795
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21931
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__sidebar-session-icon", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MessageSquare, { size: 13 }) }),
21932
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__sidebar-session-title", title: session.title, children: session.title }),
21933
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21796
21934
  "button",
21797
21935
  {
21798
21936
  className: "app__sidebar-session-delete",
@@ -21801,7 +21939,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21801
21939
  e.stopPropagation();
21802
21940
  onDeleteSession(session.id, session.title);
21803
21941
  },
21804
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Trash2, { size: 12 })
21942
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Trash2, { size: 12 })
21805
21943
  }
21806
21944
  )
21807
21945
  ]
@@ -21810,8 +21948,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21810
21948
  )) })
21811
21949
  ] })
21812
21950
  ] }),
21813
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sidebar-footer", style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
21814
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21951
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sidebar-footer", style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
21952
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21815
21953
  "button",
21816
21954
  {
21817
21955
  className: "app__sidebar-settings-btn",
@@ -21819,13 +21957,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21819
21957
  setActiveScreen("projects");
21820
21958
  },
21821
21959
  title: "Projects & Autonomous Tasks",
21822
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
21823
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FolderKanban, { size: 13 }),
21960
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
21961
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FolderKanban, { size: 13 }),
21824
21962
  " Projects"
21825
21963
  ] })
21826
21964
  }
21827
21965
  ),
21828
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21966
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21829
21967
  "button",
21830
21968
  {
21831
21969
  className: "app__sidebar-settings-btn",
@@ -21835,22 +21973,22 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21835
21973
  },
21836
21974
  title: "Caretaker Settings",
21837
21975
  children: [
21838
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Settings, { className: "app__settings-icon", size: 14 }),
21839
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Settings" })
21976
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Settings, { className: "app__settings-icon", size: 14 }),
21977
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Settings" })
21840
21978
  ]
21841
21979
  }
21842
21980
  )
21843
21981
  ] })
21844
21982
  ] }),
21845
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("main", { className: "app__chat-pane", children: selectedAgentId ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
21846
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("header", { className: "app__chat-header", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__chat-header-info", children: [
21847
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { className: "app__chat-header-title", children: selectedAgentName }),
21848
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "app__chat-header-status", children: [
21849
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: `agent-status-dot agent-status-dot--active ${chatState.status === "streaming" ? "agent-status-dot--pulsing" : ""}` }),
21983
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("main", { className: "app__chat-pane", children: selectedAgentId ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
21984
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("header", { className: "app__chat-header", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__chat-header-info", children: [
21985
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "app__chat-header-title", children: selectedAgentName }),
21986
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "app__chat-header-status", children: [
21987
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: `agent-status-dot agent-status-dot--active ${chatState.status === "streaming" ? "agent-status-dot--pulsing" : ""}` }),
21850
21988
  chatState.status === "streaming" ? "Streaming response..." : "Ready"
21851
21989
  ] })
21852
21990
  ] }) }),
21853
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21991
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21854
21992
  MessageList,
21855
21993
  {
21856
21994
  items: chatState.items,
@@ -21860,12 +21998,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21860
21998
  trailing: confirmCards
21861
21999
  }
21862
22000
  ),
21863
- (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__error", children: [
21864
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TriangleAlert, { size: 14 }),
22001
+ (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__error", children: [
22002
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TriangleAlert, { size: 14 }),
21865
22003
  " ",
21866
22004
  chatState.errorText || voice.error
21867
22005
  ] }),
21868
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
22006
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21869
22007
  Composer,
21870
22008
  {
21871
22009
  disabled: composerDisabled,
@@ -21884,30 +22022,30 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21884
22022
  onValueChange: setComposerDraft
21885
22023
  }
21886
22024
  )
21887
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: "Select an agent from the sidebar to start chatting" }) }) }),
22025
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Select an agent from the sidebar to start chatting" }) }) }),
21888
22026
  deleteOverlay
21889
22027
  ] });
21890
22028
  }
21891
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app", children: [
21892
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__header-row", children: [
21893
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__logo-title-wrapper", children: [
21894
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
21895
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Caretaker" })
22029
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app", children: [
22030
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__header-row", children: [
22031
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__logo-title-wrapper", children: [
22032
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
22033
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Caretaker" })
21896
22034
  ] }),
21897
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__controls", children: [
21898
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__agent-select-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
22035
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__controls", children: [
22036
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__agent-select-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21899
22037
  "select",
21900
22038
  {
21901
22039
  className: "app__agent-select",
21902
22040
  value: selectedAgentId ?? "",
21903
22041
  onChange: (e) => onSelectAgent(e.target.value),
21904
22042
  children: [
21905
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
21906
- agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
22043
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
22044
+ agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
21907
22045
  ]
21908
22046
  }
21909
22047
  ) }),
21910
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
22048
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21911
22049
  "button",
21912
22050
  {
21913
22051
  className: "app__sessions-btn",
@@ -21915,13 +22053,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21915
22053
  disabled: !selectedAgentId,
21916
22054
  title: "View conversations",
21917
22055
  children: [
21918
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MessageSquare, { size: 13 }),
22056
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MessageSquare, { size: 13 }),
21919
22057
  " ",
21920
22058
  sessions.length
21921
22059
  ]
21922
22060
  }
21923
22061
  ),
21924
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
22062
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21925
22063
  "button",
21926
22064
  {
21927
22065
  className: "app__new-chat-btn",
@@ -21931,7 +22069,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21931
22069
  children: "+ New"
21932
22070
  }
21933
22071
  ),
21934
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
22072
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21935
22073
  "button",
21936
22074
  {
21937
22075
  className: "app__settings-btn",
@@ -21940,24 +22078,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21940
22078
  postMessage({ type: "getSettingsData" });
21941
22079
  },
21942
22080
  title: "Caretaker Settings",
21943
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Settings, { className: "app__settings-icon", size: 14 })
22081
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Settings, { className: "app__settings-icon", size: 14 })
21944
22082
  }
21945
22083
  )
21946
22084
  ] })
21947
22085
  ] }) }),
21948
- showSessions && sessions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sessions-dropdown", children: [
21949
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sessions-title", children: [
22086
+ showSessions && sessions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sessions-dropdown", children: [
22087
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sessions-title", children: [
21950
22088
  "Conversations for ",
21951
22089
  selectedAgentName
21952
22090
  ] }),
21953
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sessions-list", children: sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
22091
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sessions-list", children: sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21954
22092
  "div",
21955
22093
  {
21956
22094
  className: `app__session-item ${selectedSessionId === session.id ? "app__session-item--active" : ""}`,
21957
22095
  onClick: () => onSelectSession(session.id),
21958
22096
  children: [
21959
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__session-item-title", children: session.title }),
21960
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
22097
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__session-item-title", children: session.title }),
22098
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21961
22099
  "button",
21962
22100
  {
21963
22101
  className: "app__session-item-delete",
@@ -21966,7 +22104,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21966
22104
  e.stopPropagation();
21967
22105
  onDeleteSession(session.id, session.title);
21968
22106
  },
21969
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Trash2, { size: 12 })
22107
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Trash2, { size: 12 })
21970
22108
  }
21971
22109
  )
21972
22110
  ]
@@ -21974,12 +22112,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21974
22112
  session.id
21975
22113
  )) })
21976
22114
  ] }),
21977
- showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sessions-dropdown app__sessions-dropdown--empty", children: [
21978
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sessions-title", children: "No conversations yet" }),
21979
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "app__sessions-empty", children: "Start a new chat to create a conversation" })
22115
+ showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sessions-dropdown app__sessions-dropdown--empty", children: [
22116
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sessions-title", children: "No conversations yet" }),
22117
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "app__sessions-empty", children: "Start a new chat to create a conversation" })
21980
22118
  ] }),
21981
- !selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: "Select an agent to start chatting" }) }),
21982
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
22119
+ !selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Select an agent to start chatting" }) }),
22120
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21983
22121
  MessageList,
21984
22122
  {
21985
22123
  items: chatState.items,
@@ -21989,12 +22127,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21989
22127
  trailing: confirmCards
21990
22128
  }
21991
22129
  ),
21992
- (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__error", children: [
21993
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TriangleAlert, { size: 14 }),
22130
+ (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__error", children: [
22131
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TriangleAlert, { size: 14 }),
21994
22132
  " ",
21995
22133
  chatState.errorText || voice.error
21996
22134
  ] }),
21997
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
22135
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21998
22136
  Composer,
21999
22137
  {
22000
22138
  disabled: composerDisabled,
@@ -22018,12 +22156,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22018
22156
  }
22019
22157
 
22020
22158
  // src/standalone.tsx
22021
- var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
22159
+ var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
22022
22160
  function StandaloneApp() {
22023
- const [ws, setWs] = (0, import_react19.useState)(null);
22024
- const [connected, setConnected] = (0, import_react19.useState)(false);
22025
- const [error, setError] = (0, import_react19.useState)(null);
22026
- (0, import_react19.useEffect)(() => {
22161
+ const [ws, setWs] = (0, import_react20.useState)(null);
22162
+ const [connected, setConnected] = (0, import_react20.useState)(false);
22163
+ const [error, setError] = (0, import_react20.useState)(null);
22164
+ (0, import_react20.useEffect)(() => {
22027
22165
  let active = true;
22028
22166
  const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
22029
22167
  const socket = new WebSocket(`${protocol}//${window.location.host}/api/ws`);
@@ -22069,7 +22207,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22069
22207
  }
22070
22208
  };
22071
22209
  if (error) {
22072
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: {
22210
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: {
22073
22211
  display: "flex",
22074
22212
  flexDirection: "column",
22075
22213
  alignItems: "center",
@@ -22081,9 +22219,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22081
22219
  padding: "20px",
22082
22220
  textAlign: "center"
22083
22221
  }, children: [
22084
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { style: { color: "#ff6b6b" }, children: "Caretaker Connection Failed" }),
22085
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: error }),
22086
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22222
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { style: { color: "#ff6b6b" }, children: "Caretaker Connection Failed" }),
22223
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: error }),
22224
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22087
22225
  "button",
22088
22226
  {
22089
22227
  onClick: () => setWs(null),
@@ -22102,7 +22240,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22102
22240
  ] });
22103
22241
  }
22104
22242
  if (!connected) {
22105
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: {
22243
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: {
22106
22244
  display: "flex",
22107
22245
  flexDirection: "column",
22108
22246
  alignItems: "center",
@@ -22112,7 +22250,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22112
22250
  background: "#1e1e1e",
22113
22251
  color: "#f1f1f1"
22114
22252
  }, children: [
22115
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: {
22253
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: {
22116
22254
  border: "4px solid rgba(255,255,255,0.1)",
22117
22255
  width: "36px",
22118
22256
  height: "36px",
@@ -22121,8 +22259,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22121
22259
  animation: "spin 1s linear infinite",
22122
22260
  marginBottom: "16px"
22123
22261
  } }),
22124
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Connecting to Caretaker server..." }),
22125
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("style", { children: `
22262
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Connecting to Caretaker server..." }),
22263
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("style", { children: `
22126
22264
  @keyframes spin {
22127
22265
  0% { transform: rotate(0deg); }
22128
22266
  100% { transform: rotate(360deg); }
@@ -22130,12 +22268,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22130
22268
  ` })
22131
22269
  ] });
22132
22270
  }
22133
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(App, { postMessage, layout: "sidebar" });
22271
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(App, { postMessage, layout: "sidebar" });
22134
22272
  }
22135
22273
  var rootEl = document.getElementById("root");
22136
22274
  if (!rootEl) throw new Error("#root not found");
22137
22275
  (0, import_client.createRoot)(rootEl).render(
22138
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react19.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StandaloneApp, {}) })
22276
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react20.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(StandaloneApp, {}) })
22139
22277
  );
22140
22278
  })();
22141
22279
  /*! Bundled license information: