@hyperwindmill/caretaker-cli 0.22.0 → 0.24.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.
Files changed (61) hide show
  1. package/dist/cli/web/scheduler/locks.d.ts +3 -3
  2. package/dist/cli/web/scheduler/memory_extract.d.ts +55 -0
  3. package/dist/cli/web/scheduler/memory_extract.d.ts.map +1 -0
  4. package/dist/cli/web/scheduler/memory_extract.js +112 -0
  5. package/dist/cli/web/scheduler/memory_sweep.d.ts +68 -0
  6. package/dist/cli/web/scheduler/memory_sweep.d.ts.map +1 -0
  7. package/dist/cli/web/scheduler/memory_sweep.js +329 -0
  8. package/dist/cli/web/scheduler/task_review.d.ts +3 -0
  9. package/dist/cli/web/scheduler/task_review.d.ts.map +1 -1
  10. package/dist/cli/web/scheduler/task_review.js +1 -0
  11. package/dist/cli/web/scheduler/task_roles.js +1 -1
  12. package/dist/cli/web/scheduler/task_strategy.d.ts.map +1 -1
  13. package/dist/cli/web/scheduler/task_strategy.js +8 -4
  14. package/dist/cli/web/scheduler.d.ts.map +1 -1
  15. package/dist/cli/web/scheduler.js +5 -0
  16. package/dist/cli/web/server.d.ts.map +1 -1
  17. package/dist/cli/web/server.js +67 -27
  18. package/dist/harness/claude_code_runner.d.ts.map +1 -1
  19. package/dist/harness/claude_code_runner.js +5 -0
  20. package/dist/harness/loop.d.ts +9 -0
  21. package/dist/harness/loop.d.ts.map +1 -1
  22. package/dist/harness/loop.js +10 -0
  23. package/dist/harness/memory_recall.d.ts +23 -0
  24. package/dist/harness/memory_recall.d.ts.map +1 -0
  25. package/dist/harness/memory_recall.js +70 -0
  26. package/dist/harness/tools/builtin/index.d.ts +2 -1
  27. package/dist/harness/tools/builtin/index.d.ts.map +1 -1
  28. package/dist/harness/tools/builtin/index.js +4 -1
  29. package/dist/harness/tools/builtin/memory_tools.d.ts +3 -0
  30. package/dist/harness/tools/builtin/memory_tools.d.ts.map +1 -0
  31. package/dist/harness/tools/builtin/memory_tools.js +60 -0
  32. package/dist/harness/tools/builtin/task_tools.js +37 -37
  33. package/dist/harness/tools/resolve.d.ts.map +1 -1
  34. package/dist/harness/tools/resolve.js +15 -0
  35. package/dist/harness/tools/types.d.ts +6 -0
  36. package/dist/harness/tools/types.d.ts.map +1 -1
  37. package/dist/lib/docker.d.ts +1 -1
  38. package/dist/lib/docker.d.ts.map +1 -1
  39. package/dist/lib/docker.js +2 -2
  40. package/dist/lib/project_resolve.d.ts +5 -0
  41. package/dist/lib/project_resolve.d.ts.map +1 -0
  42. package/dist/lib/project_resolve.js +23 -0
  43. package/dist/lib/project_slug.d.ts +29 -0
  44. package/dist/lib/project_slug.d.ts.map +1 -0
  45. package/dist/lib/project_slug.js +41 -0
  46. package/dist/lib/task_git.d.ts +5 -5
  47. package/dist/lib/task_git.d.ts.map +1 -1
  48. package/dist/lib/task_git.js +8 -6
  49. package/dist/mcp/builtin_server.d.ts +1 -0
  50. package/dist/mcp/builtin_server.d.ts.map +1 -1
  51. package/dist/mcp/builtin_server.js +6 -5
  52. package/dist/store/db.d.ts +78 -7
  53. package/dist/store/db.d.ts.map +1 -1
  54. package/dist/store/db.js +127 -15
  55. package/dist/store/json.d.ts +1 -0
  56. package/dist/store/json.d.ts.map +1 -1
  57. package/dist/store/json.js +6 -1
  58. package/dist/tui/agents.js +5 -2
  59. package/dist/webview/standalone.js +602 -434
  60. package/dist/webview/standalone.js.map +4 -4
  61. package/package.json +3 -3
@@ -12755,11 +12755,11 @@
12755
12755
  });
12756
12756
 
12757
12757
  // src/standalone.tsx
12758
- var import_react20 = __toESM(require_react(), 1);
12758
+ var import_react21 = __toESM(require_react(), 1);
12759
12759
  var import_client = __toESM(require_client(), 1);
12760
12760
 
12761
12761
  // src/App.tsx
12762
- var import_react19 = __toESM(require_react(), 1);
12762
+ var import_react20 = __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_react16 = __toESM(require_react(), 1);
15914
+ var import_react17 = __toESM(require_react(), 1);
15915
15915
 
15916
15916
  // src/ProvidersTab.tsx
15917
15917
  var import_react6 = __toESM(require_react(), 1);
@@ -16455,9 +16455,11 @@ ${text}</tr>
16455
16455
 
16456
16456
  // src/ProjectsTabSettings.tsx
16457
16457
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
16458
+ var SLUG_RE = /^[a-z0-9](?:[a-z0-9-]{0,37}[a-z0-9])?$/;
16458
16459
  function ProjectsTabSettings({ config, agents, postMessage }) {
16459
16460
  const [editingProject, setEditingProject] = (0, import_react9.useState)(null);
16460
16461
  const [isCreating, setIsCreating] = (0, import_react9.useState)(false);
16462
+ const [slugText, setSlugText] = (0, import_react9.useState)("");
16461
16463
  const [name, setName] = (0, import_react9.useState)("");
16462
16464
  const [description, setDescription] = (0, import_react9.useState)("");
16463
16465
  const [workingDir, setWorkingDir] = (0, import_react9.useState)("");
@@ -16477,6 +16479,7 @@ ${text}</tr>
16477
16479
  const startEdit = (proj) => {
16478
16480
  setEditingProject(proj);
16479
16481
  setIsCreating(false);
16482
+ setSlugText(proj.id);
16480
16483
  setName(proj.name);
16481
16484
  setDescription(proj.description || "");
16482
16485
  setWorkingDir(proj.workingDir);
@@ -16496,6 +16499,7 @@ ${text}</tr>
16496
16499
  const startCreate = () => {
16497
16500
  setIsCreating(true);
16498
16501
  setEditingProject(null);
16502
+ setSlugText("");
16499
16503
  setName("");
16500
16504
  setDescription("");
16501
16505
  setWorkingDir("");
@@ -16545,9 +16549,13 @@ ${text}</tr>
16545
16549
  const trimmedDocker = dockerImage.trim();
16546
16550
  const updatedProjects = [...projects];
16547
16551
  if (isCreating) {
16548
- const nextId = projects.length > 0 ? Math.max(...projects.map((p) => p.id)) + 1 : 1;
16552
+ const slug = slugText.trim();
16553
+ if (!SLUG_RE.test(slug) || projects.some((p) => p.id === slug)) {
16554
+ setErrorMsg("Project id must be 1-39 chars of a-z, 0-9 and hyphens (start/end alphanumeric) and unique.");
16555
+ return;
16556
+ }
16549
16557
  const newProj = {
16550
- id: nextId,
16558
+ id: slug,
16551
16559
  name: trimmedName,
16552
16560
  description: trimmedDesc,
16553
16561
  workingDir: trimmedDir,
@@ -16598,19 +16606,14 @@ ${text}</tr>
16598
16606
  setEditingProject(null);
16599
16607
  setErrorMsg(null);
16600
16608
  };
16601
- const deleteProject = (id) => {
16609
+ const deleteProject = async (id) => {
16602
16610
  if (!confirm("Are you sure you want to delete this project? All associated tasks will be permanently removed from disk.")) return;
16603
- const updatedProjects = projects.filter((p) => p.id !== id);
16604
- postMessage({
16605
- type: "saveConfig",
16606
- config: {
16607
- ...config,
16608
- projects: updatedProjects
16609
- }
16610
- });
16611
- fetch(`/api/projects/${id}`, { method: "DELETE" }).catch((err) => {
16612
- console.error("Failed to trigger database tasks cleanup on project deletion:", err);
16613
- });
16611
+ try {
16612
+ await fetch(`/api/projects/${id}`, { method: "DELETE" });
16613
+ } catch (err) {
16614
+ console.error("Failed to delete project:", err);
16615
+ }
16616
+ postMessage({ type: "getSettingsData" });
16614
16617
  };
16615
16618
  const showForm = isCreating || editingProject !== null;
16616
16619
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "tab-pane projects-tab-settings", children: [
@@ -16626,6 +16629,31 @@ ${text}</tr>
16626
16629
  showForm ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "glass-form", children: [
16627
16630
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h4", { children: isCreating ? "Register New Project" : `Edit Project: ${editingProject?.name}` }),
16628
16631
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "glass-form__body", children: [
16632
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16633
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { htmlFor: "project-id", children: [
16634
+ "Project ID ",
16635
+ isCreating && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { opacity: 0.6 }, children: "(slug: a-z, 0-9, hyphens)" })
16636
+ ] }),
16637
+ isCreating ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16638
+ "input",
16639
+ {
16640
+ id: "project-id",
16641
+ type: "text",
16642
+ placeholder: "e.g. backend-service",
16643
+ value: slugText,
16644
+ onChange: (e) => setSlugText(e.target.value.toLowerCase())
16645
+ }
16646
+ ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
16647
+ "input",
16648
+ {
16649
+ id: "project-id",
16650
+ type: "text",
16651
+ value: editingProject?.id || "",
16652
+ disabled: true,
16653
+ style: { opacity: 0.7, cursor: "not-allowed" }
16654
+ }
16655
+ )
16656
+ ] }),
16629
16657
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "form-group", children: [
16630
16658
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: "project-name", children: "Project Name" }),
16631
16659
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
@@ -19740,8 +19768,133 @@ ${text}</tr>
19740
19768
  ] });
19741
19769
  }
19742
19770
 
19743
- // src/SettingsPanel.tsx
19771
+ // src/MemoryTab.tsx
19772
+ var import_react16 = __toESM(require_react(), 1);
19773
+
19774
+ // src/memory_tab_utils.ts
19775
+ function buildMemoryConfig(form) {
19776
+ const agentId = form.agentId.trim();
19777
+ if (!form.enabled || !agentId) return void 0;
19778
+ const out = { agentId };
19779
+ const sweep = Number.parseInt(form.sweepMinutes, 10);
19780
+ if (Number.isFinite(sweep) && sweep > 0) out.sweepMinutes = sweep;
19781
+ const min = Number.parseInt(form.minNewMessages, 10);
19782
+ if (Number.isFinite(min) && min > 0) out.minNewMessages = min;
19783
+ return out;
19784
+ }
19785
+ function memorySignature(m) {
19786
+ if (!m) return "";
19787
+ return JSON.stringify([m.agentId ?? "", m.sweepMinutes ?? "", m.minNewMessages ?? ""]);
19788
+ }
19789
+
19790
+ // src/MemoryTab.tsx
19744
19791
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
19792
+ function MemoryTab({ config, agents, onSave }) {
19793
+ const current = config.memory;
19794
+ const [enabled, setEnabled] = (0, import_react16.useState)(!!current);
19795
+ const [agentId, setAgentId] = (0, import_react16.useState)(current?.agentId ?? "");
19796
+ const [sweepMinutes, setSweepMinutes] = (0, import_react16.useState)(
19797
+ current?.sweepMinutes === void 0 ? "" : String(current.sweepMinutes)
19798
+ );
19799
+ const [minNewMessages, setMinNewMessages] = (0, import_react16.useState)(
19800
+ current?.minNewMessages === void 0 ? "" : String(current.minNewMessages)
19801
+ );
19802
+ const [saveState, setSaveState] = (0, import_react16.useState)("idle");
19803
+ const pendingSave = (0, import_react16.useRef)(null);
19804
+ (0, import_react16.useEffect)(() => {
19805
+ if (saveState !== "saving" || pendingSave.current === null) return;
19806
+ if (memorySignature(config.memory) !== pendingSave.current)
19807
+ return;
19808
+ setSaveState("saved");
19809
+ }, [config.memory, saveState]);
19810
+ (0, import_react16.useEffect)(() => {
19811
+ if (saveState !== "saved") return;
19812
+ const t = setTimeout(() => setSaveState("idle"), 2e3);
19813
+ return () => clearTimeout(t);
19814
+ }, [saveState]);
19815
+ const selectedAgent = agents.find((a) => a.id === agentId);
19816
+ const missingAgent = enabled && !selectedAgent;
19817
+ const save = () => {
19818
+ const memory = buildMemoryConfig({ enabled, agentId, sweepMinutes, minNewMessages });
19819
+ pendingSave.current = memorySignature(memory);
19820
+ setSaveState("saving");
19821
+ const next = { ...config };
19822
+ if (memory) next.memory = memory;
19823
+ else delete next.memory;
19824
+ onSave(next);
19825
+ };
19826
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "glass-form", children: [
19827
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { children: "Memory" }),
19828
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "glass-form__body", children: [
19829
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group form-group--checkbox", children: [
19830
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { htmlFor: "memory-enabled", children: [
19831
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19832
+ "input",
19833
+ {
19834
+ id: "memory-enabled",
19835
+ type: "checkbox",
19836
+ checked: enabled,
19837
+ onChange: (e) => setEnabled(e.target.checked)
19838
+ }
19839
+ ),
19840
+ "Enable memory"
19841
+ ] }),
19842
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: "A background sweep keeps a rolling summary of every chat session. It runs only while the web server (or the desktop app) is up, like the rest of the scheduler." })
19843
+ ] }),
19844
+ enabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
19845
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group", children: [
19846
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: "memory-agent", children: "Memory agent" }),
19847
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { id: "memory-agent", value: agentId, onChange: (e) => setAgentId(e.target.value), children: [
19848
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "\u2014 select an agent \u2014" }),
19849
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
19850
+ a.name,
19851
+ " \xB7 ",
19852
+ a.model
19853
+ ] }, a.id))
19854
+ ] }),
19855
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: "The agent whose identity (system prompt, provider, model) runs the summarize calls \u2014 every provider works, Claude Code included. Calls are always fresh one-shot conversations, never the agent's own sessions. A lean dedicated agent (short system prompt, no plugins) keeps them cheap." }),
19856
+ missingAgent && agentId && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { className: "form-error", children: "This agent no longer exists \u2014 pick another." })
19857
+ ] }),
19858
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group", children: [
19859
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: "memory-sweep-minutes", children: "Sweep interval (minutes)" }),
19860
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19861
+ "input",
19862
+ {
19863
+ id: "memory-sweep-minutes",
19864
+ type: "number",
19865
+ min: 1,
19866
+ placeholder: "5",
19867
+ value: sweepMinutes,
19868
+ onChange: (e) => setSweepMinutes(e.target.value)
19869
+ }
19870
+ )
19871
+ ] }),
19872
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group", children: [
19873
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: "memory-min-new", children: "Min new messages per session" }),
19874
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19875
+ "input",
19876
+ {
19877
+ id: "memory-min-new",
19878
+ type: "number",
19879
+ min: 1,
19880
+ placeholder: "4",
19881
+ value: minNewMessages,
19882
+ onChange: (e) => setMinNewMessages(e.target.value)
19883
+ }
19884
+ ),
19885
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: "A session is re-summarized only once it accumulated at least this many new messages since the last pass." })
19886
+ ] })
19887
+ ] })
19888
+ ] }),
19889
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-actions", children: [
19890
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: save, disabled: enabled && !agentId, children: "Save" }),
19891
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { role: "status", "aria-live": "polite", className: "form-save-state", children: saveState === "saving" ? "Saving\u2026" : saveState === "saved" ? "Saved \u2713" : "" })
19892
+ ] })
19893
+ ] });
19894
+ }
19895
+
19896
+ // src/SettingsPanel.tsx
19897
+ var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
19745
19898
  function SettingsPanel({
19746
19899
  layout = "compact",
19747
19900
  postMessage,
@@ -19758,16 +19911,16 @@ ${text}</tr>
19758
19911
  taskRuns = {},
19759
19912
  onClose
19760
19913
  }) {
19761
- const [activeTab, setActiveTab] = (0, import_react16.useState)("providers");
19914
+ const [activeTab, setActiveTab] = (0, import_react17.useState)("providers");
19762
19915
  if (!settingsData) {
19763
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "settings-panel settings-panel--loading", children: [
19764
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, children: [
19765
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowLeft, { size: 14 }),
19916
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "settings-panel settings-panel--loading", children: [
19917
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, children: [
19918
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowLeft, { size: 14 }),
19766
19919
  " Back to Chat"
19767
19920
  ] }),
19768
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "settings-panel__loading-spinner", children: [
19769
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "spinner" }),
19770
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Loading configurations..." })
19921
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "settings-panel__loading-spinner", children: [
19922
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "spinner" }),
19923
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Loading configurations..." })
19771
19924
  ] })
19772
19925
  ] });
19773
19926
  }
@@ -19775,7 +19928,7 @@ ${text}</tr>
19775
19928
  const renderTabContent = () => {
19776
19929
  switch (activeTab) {
19777
19930
  case "providers":
19778
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19931
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19779
19932
  ProvidersTab,
19780
19933
  {
19781
19934
  config,
@@ -19784,7 +19937,7 @@ ${text}</tr>
19784
19937
  }
19785
19938
  );
19786
19939
  case "projects":
19787
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19940
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19788
19941
  ProjectsTabSettings,
19789
19942
  {
19790
19943
  config,
@@ -19793,7 +19946,7 @@ ${text}</tr>
19793
19946
  }
19794
19947
  );
19795
19948
  case "agents":
19796
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19949
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19797
19950
  AgentsTab,
19798
19951
  {
19799
19952
  config,
@@ -19807,7 +19960,7 @@ ${text}</tr>
19807
19960
  }
19808
19961
  );
19809
19962
  case "plugins":
19810
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19963
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19811
19964
  PluginsTab,
19812
19965
  {
19813
19966
  pluginsFile,
@@ -19818,7 +19971,7 @@ ${text}</tr>
19818
19971
  }
19819
19972
  );
19820
19973
  case "mcp":
19821
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19974
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19822
19975
  McpTab,
19823
19976
  {
19824
19977
  mcpServersFile,
@@ -19828,7 +19981,7 @@ ${text}</tr>
19828
19981
  }
19829
19982
  );
19830
19983
  case "services":
19831
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19984
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19832
19985
  ServicesTab,
19833
19986
  {
19834
19987
  config,
@@ -19838,7 +19991,7 @@ ${text}</tr>
19838
19991
  }
19839
19992
  );
19840
19993
  case "voice":
19841
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
19994
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19842
19995
  VoiceTab,
19843
19996
  {
19844
19997
  config,
@@ -19848,18 +20001,27 @@ ${text}</tr>
19848
20001
  ttsCatalogResult
19849
20002
  }
19850
20003
  );
20004
+ case "memory":
20005
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20006
+ MemoryTab,
20007
+ {
20008
+ config,
20009
+ agents,
20010
+ onSave: (updatedConfig) => postMessage({ type: "saveConfig", config: updatedConfig })
20011
+ }
20012
+ );
19851
20013
  }
19852
20014
  };
19853
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "settings-panel", children: [
19854
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("header", { className: "settings-panel__header", children: [
19855
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, title: "Go back to chat", children: [
19856
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowLeft, { size: 14 }),
20015
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "settings-panel", children: [
20016
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { className: "settings-panel__header", children: [
20017
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, title: "Go back to chat", children: [
20018
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowLeft, { size: 14 }),
19857
20019
  " Chat"
19858
20020
  ] }),
19859
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { className: "settings-panel__title", children: "Caretaker Config" })
20021
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { className: "settings-panel__title", children: "Caretaker Config" })
19860
20022
  ] }),
19861
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("nav", { className: "settings-panel__tabs", children: [
19862
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20023
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: "settings-panel__tabs", children: [
20024
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19863
20025
  "button",
19864
20026
  {
19865
20027
  className: `settings-panel__tab-btn ${activeTab === "providers" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19867,7 +20029,7 @@ ${text}</tr>
19867
20029
  children: "Providers"
19868
20030
  }
19869
20031
  ),
19870
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20032
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19871
20033
  "button",
19872
20034
  {
19873
20035
  className: `settings-panel__tab-btn ${activeTab === "projects" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19875,7 +20037,7 @@ ${text}</tr>
19875
20037
  children: "Projects"
19876
20038
  }
19877
20039
  ),
19878
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20040
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19879
20041
  "button",
19880
20042
  {
19881
20043
  className: `settings-panel__tab-btn ${activeTab === "agents" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19883,7 +20045,7 @@ ${text}</tr>
19883
20045
  children: "Agents"
19884
20046
  }
19885
20047
  ),
19886
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20048
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19887
20049
  "button",
19888
20050
  {
19889
20051
  className: `settings-panel__tab-btn ${activeTab === "plugins" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19891,7 +20053,7 @@ ${text}</tr>
19891
20053
  children: "Plugins"
19892
20054
  }
19893
20055
  ),
19894
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20056
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19895
20057
  "button",
19896
20058
  {
19897
20059
  className: `settings-panel__tab-btn ${activeTab === "mcp" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19899,7 +20061,7 @@ ${text}</tr>
19899
20061
  children: "MCP"
19900
20062
  }
19901
20063
  ),
19902
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20064
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19903
20065
  "button",
19904
20066
  {
19905
20067
  className: `settings-panel__tab-btn ${activeTab === "services" ? "settings-panel__tab-btn--active" : ""}`,
@@ -19907,30 +20069,36 @@ ${text}</tr>
19907
20069
  children: "Services"
19908
20070
  }
19909
20071
  ),
19910
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
20072
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
19911
20073
  "button",
19912
20074
  {
19913
20075
  className: `settings-panel__tab-btn ${activeTab === "voice" ? "settings-panel__tab-btn--active" : ""}`,
19914
20076
  onClick: () => setActiveTab("voice"),
19915
20077
  children: "Voice"
19916
20078
  }
20079
+ ),
20080
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20081
+ "button",
20082
+ {
20083
+ className: `settings-panel__tab-btn ${activeTab === "memory" ? "settings-panel__tab-btn--active" : ""}`,
20084
+ onClick: () => setActiveTab("memory"),
20085
+ children: "Memory"
20086
+ }
19917
20087
  )
19918
20088
  ] }),
19919
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("main", { className: "settings-panel__content", children: renderTabContent() })
20089
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("main", { className: "settings-panel__content", children: renderTabContent() })
19920
20090
  ] });
19921
20091
  }
19922
20092
 
19923
20093
  // src/ProjectsTab.tsx
19924
- var import_react17 = __toESM(require_react(), 1);
19925
- var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
20094
+ var import_react18 = __toESM(require_react(), 1);
20095
+ var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
19926
20096
  var LS_PROJECT_KEY = "caretaker.taskView.selectedProjectId";
19927
20097
  var LS_ARCHIVED_KEY = "caretaker.taskView.showArchived";
19928
20098
  function loadSavedProjectId() {
19929
20099
  try {
19930
20100
  const raw = localStorage.getItem(LS_PROJECT_KEY);
19931
- if (raw === null) return null;
19932
- const n = Number(raw);
19933
- return Number.isFinite(n) ? n : null;
20101
+ return raw && raw.trim() ? raw.trim() : null;
19934
20102
  } catch {
19935
20103
  return null;
19936
20104
  }
@@ -19938,7 +20106,7 @@ ${text}</tr>
19938
20106
  function saveProjectId(id) {
19939
20107
  try {
19940
20108
  if (id === null) localStorage.removeItem(LS_PROJECT_KEY);
19941
- else localStorage.setItem(LS_PROJECT_KEY, String(id));
20109
+ else localStorage.setItem(LS_PROJECT_KEY, id);
19942
20110
  } catch {
19943
20111
  }
19944
20112
  }
@@ -20013,15 +20181,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20013
20181
  }
20014
20182
  var PAGE_SIZE = 20;
20015
20183
  function ProjectsTab({ agents }) {
20016
- const [projects, setProjects] = (0, import_react17.useState)([]);
20017
- const [selectedProjectId, setSelectedProjectId] = (0, import_react17.useState)(loadSavedProjectId);
20018
- const [tasks, setTasks] = (0, import_react17.useState)([]);
20019
- const [selectedTaskId, setSelectedTaskId] = (0, import_react17.useState)(null);
20020
- const [taskMessages, setTaskMessages] = (0, import_react17.useState)([]);
20021
- const [view, setView] = (0, import_react17.useState)("list");
20022
- const [page, setPage] = (0, import_react17.useState)(0);
20023
- const [isNewTaskOpen, setIsNewTaskOpen] = (0, import_react17.useState)(false);
20024
- const [newTask, setNewTask] = (0, import_react17.useState)({
20184
+ const [projects, setProjects] = (0, import_react18.useState)([]);
20185
+ const [selectedProjectId, setSelectedProjectId] = (0, import_react18.useState)(loadSavedProjectId);
20186
+ const [tasks, setTasks] = (0, import_react18.useState)([]);
20187
+ const [selectedTaskId, setSelectedTaskId] = (0, import_react18.useState)(null);
20188
+ const [taskMessages, setTaskMessages] = (0, import_react18.useState)([]);
20189
+ const [view, setView] = (0, import_react18.useState)("list");
20190
+ const [page, setPage] = (0, import_react18.useState)(0);
20191
+ const [isNewTaskOpen, setIsNewTaskOpen] = (0, import_react18.useState)(false);
20192
+ const [newTask, setNewTask] = (0, import_react18.useState)({
20025
20193
  title: "",
20026
20194
  objective: "",
20027
20195
  checklistText: "",
@@ -20030,19 +20198,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20030
20198
  plannerAgentId: "",
20031
20199
  reviewerAgentId: ""
20032
20200
  });
20033
- const [composerText, setComposerText] = (0, import_react17.useState)("");
20034
- const [isSending, setIsSending] = (0, import_react17.useState)(false);
20035
- const [showArchived, setShowArchived] = (0, import_react17.useState)(loadShowArchived);
20036
- const [pendingConfirm, setPendingConfirm] = (0, import_react17.useState)(null);
20037
- const [taskError, setTaskError] = (0, import_react17.useState)(null);
20038
- const threadIntervalRef = (0, import_react17.useRef)(null);
20039
- (0, import_react17.useEffect)(() => {
20201
+ const [composerText, setComposerText] = (0, import_react18.useState)("");
20202
+ const [isSending, setIsSending] = (0, import_react18.useState)(false);
20203
+ const [showArchived, setShowArchived] = (0, import_react18.useState)(loadShowArchived);
20204
+ const [pendingConfirm, setPendingConfirm] = (0, import_react18.useState)(null);
20205
+ const [taskError, setTaskError] = (0, import_react18.useState)(null);
20206
+ const threadIntervalRef = (0, import_react18.useRef)(null);
20207
+ (0, import_react18.useEffect)(() => {
20040
20208
  fetchProjects();
20041
20209
  return () => {
20042
20210
  stopThreadPolling();
20043
20211
  };
20044
20212
  }, []);
20045
- (0, import_react17.useEffect)(() => {
20213
+ (0, import_react18.useEffect)(() => {
20046
20214
  if (projects.length > 0 && selectedProjectId === null) {
20047
20215
  setSelectedProjectId(projects[0].id);
20048
20216
  }
@@ -20053,13 +20221,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20053
20221
  setSelectedProjectId(null);
20054
20222
  }
20055
20223
  }, [projects]);
20056
- (0, import_react17.useEffect)(() => {
20224
+ (0, import_react18.useEffect)(() => {
20057
20225
  saveProjectId(selectedProjectId);
20058
20226
  }, [selectedProjectId]);
20059
- (0, import_react17.useEffect)(() => {
20227
+ (0, import_react18.useEffect)(() => {
20060
20228
  saveShowArchived(showArchived);
20061
20229
  }, [showArchived]);
20062
- (0, import_react17.useEffect)(() => {
20230
+ (0, import_react18.useEffect)(() => {
20063
20231
  if (selectedProjectId !== null) {
20064
20232
  fetchTasks(selectedProjectId);
20065
20233
  setView("list");
@@ -20071,7 +20239,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20071
20239
  setTasks([]);
20072
20240
  }
20073
20241
  }, [selectedProjectId, showArchived]);
20074
- (0, import_react17.useEffect)(() => {
20242
+ (0, import_react18.useEffect)(() => {
20075
20243
  if (selectedTaskId !== null) {
20076
20244
  fetchTaskMessages(selectedTaskId);
20077
20245
  startThreadPolling(selectedTaskId);
@@ -20244,7 +20412,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20244
20412
  const cancelPendingAction = () => {
20245
20413
  setPendingConfirm(null);
20246
20414
  };
20247
- (0, import_react17.useEffect)(() => {
20415
+ (0, import_react18.useEffect)(() => {
20248
20416
  if (!pendingConfirm) return;
20249
20417
  function handleKeyDown(event) {
20250
20418
  if (event.key === "Escape") {
@@ -20254,7 +20422,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20254
20422
  window.addEventListener("keydown", handleKeyDown);
20255
20423
  return () => window.removeEventListener("keydown", handleKeyDown);
20256
20424
  }, [pendingConfirm]);
20257
- (0, import_react17.useEffect)(() => {
20425
+ (0, import_react18.useEffect)(() => {
20258
20426
  if (!taskError) return;
20259
20427
  const t = setTimeout(() => setTaskError(null), 5e3);
20260
20428
  return () => clearTimeout(t);
@@ -20385,7 +20553,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20385
20553
  const selectedProject = projects.find((p) => p.id === selectedProjectId);
20386
20554
  const selectedTask = tasks.find((t) => t.id === selectedTaskId);
20387
20555
  const selectedProjectAgentName = agents.find((a) => a.id === selectedProject?.agentId)?.name || "Default Agent";
20388
- const taskAgentLabels = (0, import_react17.useMemo)(() => {
20556
+ const taskAgentLabels = (0, import_react18.useMemo)(() => {
20389
20557
  if (!selectedTask) return void 0;
20390
20558
  const agentLabelFor = (agentId) => {
20391
20559
  const a = agents.find((x) => x.id === agentId);
@@ -20431,8 +20599,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20431
20599
  const safePage = Math.min(page, totalPages - 1);
20432
20600
  const pageStart = safePage * PAGE_SIZE;
20433
20601
  const pageTasks = tasks.slice(pageStart, pageStart + PAGE_SIZE);
20434
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
20435
- /* @__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)(
20602
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
20603
+ /* @__PURE__ */ (0, import_jsx_runtime17.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_runtime17.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "No projects registered. Create one from the Settings panel to get started." }) }) : selectedProject ? view === "list" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20436
20604
  TaskListView,
20437
20605
  {
20438
20606
  projects,
@@ -20454,7 +20622,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20454
20622
  onArchive: handleArchiveFromList,
20455
20623
  statusColor
20456
20624
  }
20457
- ) : view === "log" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20625
+ ) : view === "log" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20458
20626
  TaskLogView,
20459
20627
  {
20460
20628
  task: selectedTask,
@@ -20471,7 +20639,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20471
20639
  onToggleStatus: handleToggleTaskStatus,
20472
20640
  statusColor
20473
20641
  }
20474
- ) : view === "edit" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20642
+ ) : view === "edit" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20475
20643
  TaskEditView,
20476
20644
  {
20477
20645
  task: selectedTask,
@@ -20489,11 +20657,11 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20489
20657
  onOpenLog: () => setView("log"),
20490
20658
  statusColor
20491
20659
  }
20492
- ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__empty-state", children: [
20493
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: "Task not found. Go back to the list." }),
20494
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "settings-panel__back-btn", onClick: backToList, style: { marginTop: "12px" }, children: "\u2190 Back to list" })
20660
+ ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__empty-state", children: [
20661
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Task not found. Go back to the list." }),
20662
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "settings-panel__back-btn", onClick: backToList, style: { marginTop: "12px" }, children: "\u2190 Back to list" })
20495
20663
  ] }) : null }),
20496
- isNewTaskOpen && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20664
+ isNewTaskOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20497
20665
  "div",
20498
20666
  {
20499
20667
  style: {
@@ -20508,7 +20676,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20508
20676
  justifyContent: "center",
20509
20677
  zIndex: 999
20510
20678
  },
20511
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20679
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
20512
20680
  "form",
20513
20681
  {
20514
20682
  onSubmit: handleCreateTask,
@@ -20519,14 +20687,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20519
20687
  background: "var(--vscode-sideBar-background)"
20520
20688
  },
20521
20689
  children: [
20522
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "confirm__header", children: [
20523
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { fontSize: "18px", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Wrench, { size: 18 }) }),
20524
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "confirm__prompt", style: { fontSize: "14px" }, children: "Create New Task" })
20690
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "confirm__header", children: [
20691
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "18px", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Wrench, { size: 18 }) }),
20692
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "confirm__prompt", style: { fontSize: "14px" }, children: "Create New Task" })
20525
20693
  ] }),
20526
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: [
20527
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20694
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: [
20695
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20528
20696
  "Task Title",
20529
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20697
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20530
20698
  "input",
20531
20699
  {
20532
20700
  type: "text",
@@ -20546,9 +20714,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20546
20714
  }
20547
20715
  )
20548
20716
  ] }),
20549
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20717
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20550
20718
  "Objective (Extended markdown goal description)",
20551
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20719
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20552
20720
  "textarea",
20553
20721
  {
20554
20722
  required: true,
@@ -20569,9 +20737,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20569
20737
  }
20570
20738
  )
20571
20739
  ] }),
20572
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20740
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20573
20741
  "Checklist Items (One item per line)",
20574
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20742
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20575
20743
  "textarea",
20576
20744
  {
20577
20745
  placeholder: "Create route handler\nWrite unit tests\nUpdate documentation",
@@ -20591,9 +20759,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20591
20759
  }
20592
20760
  )
20593
20761
  ] }),
20594
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20762
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20595
20763
  "Assigned Agent (optional \u2014 overrides project default)",
20596
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20764
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
20597
20765
  "select",
20598
20766
  {
20599
20767
  value: newTask.agentId,
@@ -20608,8 +20776,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20608
20776
  outline: "none"
20609
20777
  },
20610
20778
  children: [
20611
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
20612
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
20779
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
20780
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
20613
20781
  a.name,
20614
20782
  " (",
20615
20783
  a.provider,
@@ -20619,9 +20787,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20619
20787
  }
20620
20788
  )
20621
20789
  ] }),
20622
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20790
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20623
20791
  "Planner Agent Override (optional)",
20624
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20792
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
20625
20793
  "select",
20626
20794
  {
20627
20795
  value: newTask.plannerAgentId,
@@ -20636,8 +20804,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20636
20804
  outline: "none"
20637
20805
  },
20638
20806
  children: [
20639
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
20640
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
20807
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
20808
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
20641
20809
  a.name,
20642
20810
  " (",
20643
20811
  a.provider,
@@ -20647,9 +20815,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20647
20815
  }
20648
20816
  )
20649
20817
  ] }),
20650
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20818
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
20651
20819
  "Reviewer Agent Override (optional)",
20652
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20820
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
20653
20821
  "select",
20654
20822
  {
20655
20823
  value: newTask.reviewerAgentId,
@@ -20664,8 +20832,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20664
20832
  outline: "none"
20665
20833
  },
20666
20834
  children: [
20667
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
20668
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
20835
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
20836
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
20669
20837
  a.name,
20670
20838
  " (",
20671
20839
  a.provider,
@@ -20675,8 +20843,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20675
20843
  }
20676
20844
  )
20677
20845
  ] }),
20678
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "12px", display: "flex", alignItems: "center", gap: "6px", cursor: "pointer", marginTop: "4px" }, children: [
20679
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20846
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "12px", display: "flex", alignItems: "center", gap: "6px", cursor: "pointer", marginTop: "4px" }, children: [
20847
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20680
20848
  "input",
20681
20849
  {
20682
20850
  type: "checkbox",
@@ -20685,24 +20853,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20685
20853
  style: { cursor: "pointer" }
20686
20854
  }
20687
20855
  ),
20688
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Start active immediately (Heartbeat loop claims it)" })
20856
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Start active immediately (Heartbeat loop claims it)" })
20689
20857
  ] })
20690
20858
  ] }),
20691
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "confirm__buttons", style: { justifyContent: "flex-end", marginTop: "10px" }, children: [
20692
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: "confirm__btn", onClick: () => setIsNewTaskOpen(false), children: "Cancel" }),
20693
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "submit", className: "confirm__btn confirm__btn--primary", children: "Create Task" })
20859
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "confirm__buttons", style: { justifyContent: "flex-end", marginTop: "10px" }, children: [
20860
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "confirm__btn", onClick: () => setIsNewTaskOpen(false), children: "Cancel" }),
20861
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "submit", className: "confirm__btn confirm__btn--primary", children: "Create Task" })
20694
20862
  ] })
20695
20863
  ]
20696
20864
  }
20697
20865
  )
20698
20866
  }
20699
20867
  ),
20700
- 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: [
20701
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__confirm-title", children: pendingConfirm.type === "delete" ? "Delete task" : pendingConfirm.type === "archive" ? "Archive task" : "Discard worktree" }),
20702
- /* @__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.` }),
20703
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__confirm-buttons", children: [
20704
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "app__confirm-btn", onClick: cancelPendingAction, children: "Cancel" }),
20705
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20868
+ pendingConfirm && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__confirm-overlay", onClick: cancelPendingAction, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
20869
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__confirm-title", children: pendingConfirm.type === "delete" ? "Delete task" : pendingConfirm.type === "archive" ? "Archive task" : "Discard worktree" }),
20870
+ /* @__PURE__ */ (0, import_jsx_runtime17.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.` }),
20871
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__confirm-buttons", children: [
20872
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "app__confirm-btn", onClick: cancelPendingAction, children: "Cancel" }),
20873
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20706
20874
  "button",
20707
20875
  {
20708
20876
  className: `app__confirm-btn ${pendingConfirm.type === "delete" ? "app__confirm-btn--danger" : ""}`,
@@ -20712,7 +20880,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20712
20880
  )
20713
20881
  ] })
20714
20882
  ] }) }),
20715
- taskError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__error-banner", onClick: () => setTaskError(null), title: "Click to dismiss", children: taskError })
20883
+ taskError && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__error-banner", onClick: () => setTaskError(null), title: "Click to dismiss", children: taskError })
20716
20884
  ] });
20717
20885
  }
20718
20886
  function TaskListView({
@@ -20735,15 +20903,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20735
20903
  onArchive,
20736
20904
  statusColor
20737
20905
  }) {
20738
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
20739
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "task-view__header", children: [
20740
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
20741
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20906
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
20907
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-view__header", children: [
20908
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
20909
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20742
20910
  "select",
20743
20911
  {
20744
20912
  className: "task-view__project-filter",
20745
20913
  value: selectedProjectId ?? void 0,
20746
- onChange: (e) => onProjectChange(Number(e.target.value)),
20914
+ onChange: (e) => onProjectChange(e.target.value),
20747
20915
  style: {
20748
20916
  background: "var(--vscode-input-background, #252526)",
20749
20917
  color: "var(--vscode-input-foreground)",
@@ -20755,17 +20923,17 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20755
20923
  outline: "none",
20756
20924
  cursor: "pointer"
20757
20925
  },
20758
- children: projects.map((p) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: p.id, children: p.name }, p.id))
20926
+ children: projects.map((p) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: p.id, children: p.name }, p.id))
20759
20927
  }
20760
20928
  ),
20761
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: [
20929
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: [
20762
20930
  "Agent: ",
20763
20931
  agentName
20764
20932
  ] })
20765
20933
  ] }),
20766
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
20767
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "task-view__archived-toggle", children: [
20768
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20934
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
20935
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "task-view__archived-toggle", children: [
20936
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20769
20937
  "input",
20770
20938
  {
20771
20939
  type: "checkbox",
@@ -20776,42 +20944,42 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20776
20944
  ),
20777
20945
  "Show archived"
20778
20946
  ] }),
20779
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "app__new-chat-btn", onClick: onNewTask, style: { padding: "4px 10px", fontSize: "11px" }, children: "+ New Task" })
20947
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "app__new-chat-btn", onClick: onNewTask, style: { padding: "4px 10px", fontSize: "11px" }, children: "+ New Task" })
20780
20948
  ] })
20781
20949
  ] }),
20782
- /* @__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: [
20950
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { flex: 1, overflowY: "auto", padding: "0 16px 16px" }, children: allTasksCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
20783
20951
  "No tasks created for ",
20784
20952
  project.name,
20785
20953
  '. Click "+ New Task" to start.'
20786
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { className: "task-table", children: [
20787
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { children: [
20788
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "60px" }, children: "#" }),
20789
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", children: "Title" }),
20790
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "90px" }, children: "Status" }),
20791
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "100px" }, children: "Agent" }),
20792
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "120px" }, children: "Checklist" }),
20793
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "180px" }, children: "Branch" }),
20794
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "150px" }, children: "Updated" }),
20795
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "task-table__th", style: { width: "70px" } })
20954
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("table", { className: "task-table", children: [
20955
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("tr", { children: [
20956
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "60px" }, children: "#" }),
20957
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", children: "Title" }),
20958
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "90px" }, children: "Status" }),
20959
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "100px" }, children: "Agent" }),
20960
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "120px" }, children: "Checklist" }),
20961
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "180px" }, children: "Branch" }),
20962
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "150px" }, children: "Updated" }),
20963
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "70px" } })
20796
20964
  ] }) }),
20797
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tbody", { children: tasks.map((task) => {
20965
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tbody", { children: tasks.map((task) => {
20798
20966
  const completedCount = task.checklist.filter((c) => c.status === "done").length;
20799
20967
  const totalCount = task.checklist.length;
20800
20968
  const isArchived = !!task.archived;
20801
20969
  const updated = new Date(task.updatedAt);
20802
20970
  const updatedStr = isNaN(updated.getTime()) ? task.updatedAt : updated.toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
20803
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
20971
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
20804
20972
  "tr",
20805
20973
  {
20806
20974
  className: `task-table__row${isArchived ? " task-table__row--archived" : ""}`,
20807
20975
  onClick: () => onOpenLog(task),
20808
20976
  children: [
20809
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td task-table__td--mono", children: task.id }),
20810
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "task-table__title", children: [
20811
- isArchived && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Archive, { size: 11 }),
20977
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td task-table__td--mono", children: task.id }),
20978
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__title", children: [
20979
+ isArchived && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Archive, { size: 11 }),
20812
20980
  task.title
20813
20981
  ] }) }),
20814
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20982
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20815
20983
  "span",
20816
20984
  {
20817
20985
  className: "task-table__badge",
@@ -20819,28 +20987,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20819
20987
  children: task.status
20820
20988
  }
20821
20989
  ) }),
20822
- /* @__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" }) }),
20823
- /* @__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: [
20824
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "task-table__progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
20990
+ /* @__PURE__ */ (0, import_jsx_runtime17.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_runtime17.jsx)("span", { style: { opacity: 0.4 }, children: "default" }) }),
20991
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: totalCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-table__progress", children: [
20992
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "task-table__progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20825
20993
  "span",
20826
20994
  {
20827
20995
  className: "task-table__progress-fill",
20828
20996
  style: { width: `${completedCount / totalCount * 100}%` }
20829
20997
  }
20830
20998
  ) }),
20831
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "task-table__progress-text", children: [
20999
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__progress-text", children: [
20832
21000
  completedCount,
20833
21001
  "/",
20834
21002
  totalCount
20835
21003
  ] })
20836
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
20837
- /* @__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: [
20838
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GitBranch, { size: 11 }),
20839
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { children: task.branch })
20840
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
20841
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "task-table__td task-table__td--muted", children: updatedStr }),
20842
- /* @__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: [
20843
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21004
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
21005
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: task.branch ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__branch", children: [
21006
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GitBranch, { size: 11 }),
21007
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: task.branch })
21008
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
21009
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td task-table__td--muted", children: updatedStr }),
21010
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "inline-flex", gap: "2px" }, children: [
21011
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20844
21012
  "button",
20845
21013
  {
20846
21014
  className: "task-table__edit-btn",
@@ -20850,10 +21018,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20850
21018
  },
20851
21019
  title: task.archived ? "Unarchive task" : "Archive task",
20852
21020
  "aria-label": task.archived ? "Unarchive task" : "Archive task",
20853
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Archive, { size: 13 })
21021
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Archive, { size: 13 })
20854
21022
  }
20855
21023
  ),
20856
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21024
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20857
21025
  "button",
20858
21026
  {
20859
21027
  className: "task-table__edit-btn",
@@ -20863,7 +21031,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20863
21031
  },
20864
21032
  title: "Edit task",
20865
21033
  "aria-label": "Edit task",
20866
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Pencil, { size: 13 })
21034
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pencil, { size: 13 })
20867
21035
  }
20868
21036
  )
20869
21037
  ] }) })
@@ -20873,8 +21041,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20873
21041
  );
20874
21042
  }) })
20875
21043
  ] }) }),
20876
- totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "task-table__pagination", children: [
20877
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21044
+ totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-table__pagination", children: [
21045
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20878
21046
  "button",
20879
21047
  {
20880
21048
  className: "task-table__page-btn",
@@ -20883,13 +21051,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20883
21051
  children: "\u2039 Prev"
20884
21052
  }
20885
21053
  ),
20886
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "task-table__page-info", children: [
21054
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__page-info", children: [
20887
21055
  "Page ",
20888
21056
  page + 1,
20889
21057
  " of ",
20890
21058
  totalPages
20891
21059
  ] }),
20892
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21060
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20893
21061
  "button",
20894
21062
  {
20895
21063
  className: "task-table__page-btn",
@@ -20918,20 +21086,20 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20918
21086
  }) {
20919
21087
  const completedCount = task.checklist.filter((c) => c.status === "done").length;
20920
21088
  const totalCount = task.checklist.length;
20921
- const chatItems = (0, import_react17.useMemo)(() => taskMessagesToChatItems(taskMessages, agentLabels), [taskMessages, agentLabels]);
20922
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
20923
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "12px 14px" }, children: [
20924
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
20925
- /* @__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 }) }),
20926
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__chat-header-info", children: [
20927
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
21089
+ const chatItems = (0, import_react18.useMemo)(() => taskMessagesToChatItems(taskMessages, agentLabels), [taskMessages, agentLabels]);
21090
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
21091
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "12px 14px" }, children: [
21092
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
21093
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ArrowLeft, { size: 13 }) }),
21094
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__chat-header-info", children: [
21095
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
20928
21096
  "Task #",
20929
21097
  task.id,
20930
21098
  ": ",
20931
21099
  task.title
20932
21100
  ] }),
20933
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: [
20934
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21101
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: [
21102
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20935
21103
  "span",
20936
21104
  {
20937
21105
  className: `agent-status-dot agent-status-dot--active ${isActiveLike ? "agent-status-dot--pulsing" : ""}`,
@@ -20942,24 +21110,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20942
21110
  ] })
20943
21111
  ] })
20944
21112
  ] }),
20945
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
20946
- task.status !== "done" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21113
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
21114
+ task.status !== "done" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20947
21115
  "button",
20948
21116
  {
20949
21117
  className: "confirm__btn confirm__btn--primary",
20950
21118
  onClick: () => onToggleStatus(task),
20951
21119
  title: isActiveLike ? "Pause this task (aborts the running agent)" : "Activate this task",
20952
21120
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
20953
- children: isActiveLike ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
20954
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Pause, { size: 12 }),
21121
+ children: isActiveLike ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
21122
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pause, { size: 12 }),
20955
21123
  " Pause"
20956
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
20957
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Play, { size: 12 }),
21124
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
21125
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Play, { size: 12 }),
20958
21126
  " Activate"
20959
21127
  ] })
20960
21128
  }
20961
21129
  ),
20962
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21130
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
20963
21131
  "span",
20964
21132
  {
20965
21133
  className: "task-table__badge",
@@ -20969,8 +21137,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20969
21137
  )
20970
21138
  ] })
20971
21139
  ] }),
20972
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "row" }, children: [
20973
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21140
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "row" }, children: [
21141
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
20974
21142
  "aside",
20975
21143
  {
20976
21144
  style: {
@@ -20983,19 +21151,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
20983
21151
  background: "var(--vscode-sideBar-background, rgba(0,0,0,0.1))"
20984
21152
  },
20985
21153
  children: [
20986
- /* @__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: [
20987
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h4", { style: { margin: 0, fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
20988
- totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { fontSize: "10px", opacity: 0.5, marginTop: "2px" }, children: [
21154
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { padding: "10px 12px", borderBottom: "1px solid var(--vscode-panel-border, rgba(255,255,255,0.05))" }, children: [
21155
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: 0, fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
21156
+ totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { fontSize: "10px", opacity: 0.5, marginTop: "2px" }, children: [
20989
21157
  completedCount,
20990
21158
  "/",
20991
21159
  totalCount,
20992
21160
  " done"
20993
21161
  ] })
20994
21162
  ] }),
20995
- /* @__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) => {
21163
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { padding: "8px 10px", display: "flex", flexDirection: "column", gap: "4px" }, children: totalCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "11px", opacity: 0.4, padding: "8px 4px" }, children: "No checklist items." }) : (task.checklist || []).map((item) => {
20996
21164
  const isDone = item.status === "done";
20997
21165
  const isInProgress = item.status === "in_progress";
20998
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21166
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
20999
21167
  "label",
21000
21168
  {
21001
21169
  style: {
@@ -21012,7 +21180,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21012
21180
  },
21013
21181
  title: isInProgress ? "In progress" : isDone ? "Done" : "Pending",
21014
21182
  children: [
21015
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21183
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21016
21184
  "input",
21017
21185
  {
21018
21186
  type: "checkbox",
@@ -21021,7 +21189,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21021
21189
  style: { marginTop: "2px", cursor: "pointer", flexShrink: 0 }
21022
21190
  }
21023
21191
  ),
21024
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { wordBreak: "break-word" }, children: item.text })
21192
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { wordBreak: "break-word" }, children: item.text })
21025
21193
  ]
21026
21194
  },
21027
21195
  item.id
@@ -21030,10 +21198,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21030
21198
  ]
21031
21199
  }
21032
21200
  ),
21033
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
21034
- 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 }),
21035
- /* @__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: [
21036
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21201
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
21202
+ taskMessages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "messages messages--empty", children: "No messages in this execution yet. Agent will start on next tick." }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MessageList, { items: chatItems, sessionId: null, compact: true }),
21203
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("form", { className: "composer", onSubmit: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "flex-end" }, children: [
21204
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21037
21205
  "textarea",
21038
21206
  {
21039
21207
  className: "composer__input",
@@ -21049,7 +21217,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21049
21217
  style: { flex: 1, minHeight: "44px" }
21050
21218
  }
21051
21219
  ),
21052
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21220
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21053
21221
  "button",
21054
21222
  {
21055
21223
  type: "submit",
@@ -21081,12 +21249,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21081
21249
  statusColor
21082
21250
  }) {
21083
21251
  const isRunning = task.status === "active" || task.status === "reviewing" || task.status === "planning";
21084
- const [draftTitle, setDraftTitle] = (0, import_react17.useState)(task.title);
21085
- const [draftObjective, setDraftObjective] = (0, import_react17.useState)(task.objective);
21086
- const [lastTaskId, setLastTaskId] = (0, import_react17.useState)(task.id);
21252
+ const [draftTitle, setDraftTitle] = (0, import_react18.useState)(task.title);
21253
+ const [draftObjective, setDraftObjective] = (0, import_react18.useState)(task.objective);
21254
+ const [lastTaskId, setLastTaskId] = (0, import_react18.useState)(task.id);
21087
21255
  const trimmedTitle = draftTitle.trim();
21088
21256
  const isDirty = trimmedTitle !== task.title.trim() || draftObjective.trim() !== task.objective.trim();
21089
- (0, import_react17.useEffect)(() => {
21257
+ (0, import_react18.useEffect)(() => {
21090
21258
  if (task.id !== lastTaskId) {
21091
21259
  setDraftTitle(task.title);
21092
21260
  setDraftObjective(task.objective);
@@ -21101,16 +21269,16 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21101
21269
  setDraftTitle(task.title);
21102
21270
  setDraftObjective(task.objective);
21103
21271
  };
21104
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%", overflowY: "auto" }, children: [
21105
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "task-view__sub-header", style: { padding: "12px 14px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
21106
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
21107
- /* @__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 }) }),
21108
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("h3", { style: { margin: 0, fontSize: "15px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
21109
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { style: { opacity: 0.6 }, children: [
21272
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%", overflowY: "auto" }, children: [
21273
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-view__sub-header", style: { padding: "12px 14px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
21274
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
21275
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ArrowLeft, { size: 13 }) }),
21276
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("h3", { style: { margin: 0, fontSize: "15px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
21277
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: { opacity: 0.6 }, children: [
21110
21278
  "Task #",
21111
21279
  task.id
21112
21280
  ] }),
21113
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21281
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21114
21282
  "input",
21115
21283
  {
21116
21284
  value: draftTitle,
@@ -21131,7 +21299,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21131
21299
  }
21132
21300
  )
21133
21301
  ] }),
21134
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21302
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21135
21303
  "span",
21136
21304
  {
21137
21305
  className: "task-table__badge",
@@ -21140,8 +21308,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21140
21308
  }
21141
21309
  )
21142
21310
  ] }),
21143
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "inline-flex", gap: "6px" }, children: [
21144
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21311
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "inline-flex", gap: "6px" }, children: [
21312
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21145
21313
  "button",
21146
21314
  {
21147
21315
  className: "confirm__btn",
@@ -21151,7 +21319,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21151
21319
  children: "View Log"
21152
21320
  }
21153
21321
  ),
21154
- task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21322
+ task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21155
21323
  "button",
21156
21324
  {
21157
21325
  className: "confirm__btn",
@@ -21159,12 +21327,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21159
21327
  title: `Commit pending changes to ${task.branch} and remove the worktree`,
21160
21328
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
21161
21329
  children: [
21162
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GitBranch, { size: 12 }),
21330
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GitBranch, { size: 12 }),
21163
21331
  " Discard worktree"
21164
21332
  ]
21165
21333
  }
21166
21334
  ),
21167
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21335
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21168
21336
  "button",
21169
21337
  {
21170
21338
  className: "confirm__btn",
@@ -21172,28 +21340,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21172
21340
  title: task.archived ? "Unarchive this task" : "Archive this task (hides it from the list, excludes from scheduler)",
21173
21341
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
21174
21342
  children: [
21175
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Archive, { size: 12 }),
21343
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Archive, { size: 12 }),
21176
21344
  " ",
21177
21345
  task.archived ? "Unarchive" : "Archive"
21178
21346
  ]
21179
21347
  }
21180
21348
  ),
21181
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21349
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21182
21350
  "button",
21183
21351
  {
21184
21352
  className: "confirm__btn confirm__btn--primary",
21185
21353
  onClick: () => onToggleStatus(task),
21186
21354
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
21187
- children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
21188
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Pause, { size: 12 }),
21355
+ children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
21356
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pause, { size: 12 }),
21189
21357
  " Pause"
21190
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
21191
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Play, { size: 12 }),
21358
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
21359
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Play, { size: 12 }),
21192
21360
  " Activate"
21193
21361
  ] })
21194
21362
  }
21195
21363
  ),
21196
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21364
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21197
21365
  "button",
21198
21366
  {
21199
21367
  className: "confirm__btn",
@@ -21201,22 +21369,22 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21201
21369
  title: "Permanently delete this task and all its messages",
21202
21370
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px", color: "#ef4444" },
21203
21371
  children: [
21204
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Trash2, { size: 12 }),
21372
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Trash2, { size: 12 }),
21205
21373
  " Delete"
21206
21374
  ]
21207
21375
  }
21208
21376
  )
21209
21377
  ] })
21210
21378
  ] }),
21211
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { padding: "16px", maxWidth: "720px" }, children: [
21212
- task.branch && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "6px", fontSize: "11px", opacity: 0.75 }, children: [
21213
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GitBranch, { size: 12 }),
21214
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("code", { style: { fontFamily: "monospace" }, children: task.branch }),
21215
- !task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { opacity: 0.6 }, children: "(worktree removed)" })
21379
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { padding: "16px", maxWidth: "720px" }, children: [
21380
+ task.branch && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "6px", fontSize: "11px", opacity: 0.75 }, children: [
21381
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GitBranch, { size: 12 }),
21382
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { style: { fontFamily: "monospace" }, children: task.branch }),
21383
+ !task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { opacity: 0.6 }, children: "(worktree removed)" })
21216
21384
  ] }),
21217
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21218
- /* @__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" }),
21219
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21385
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21386
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Objective" }),
21387
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21220
21388
  "textarea",
21221
21389
  {
21222
21390
  value: draftObjective,
@@ -21240,8 +21408,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21240
21408
  }
21241
21409
  }
21242
21410
  ),
21243
- isDirty && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center", marginTop: "8px" }, children: [
21244
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21411
+ isDirty && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center", marginTop: "8px" }, children: [
21412
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21245
21413
  "button",
21246
21414
  {
21247
21415
  className: "confirm__btn confirm__btn--primary",
@@ -21254,13 +21422,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21254
21422
  children: "Save"
21255
21423
  }
21256
21424
  ),
21257
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "confirm__btn", onClick: resetDraft, style: { padding: "3px 10px", fontSize: "10px" }, children: "Cancel" }),
21258
- isRunning && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: "Applies from the next cycle." })
21425
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "confirm__btn", onClick: resetDraft, style: { padding: "3px 10px", fontSize: "10px" }, children: "Cancel" }),
21426
+ isRunning && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: "Applies from the next cycle." })
21259
21427
  ] })
21260
21428
  ] }),
21261
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21262
- /* @__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" }),
21263
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21429
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21430
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Assigned Agent" }),
21431
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21264
21432
  "select",
21265
21433
  {
21266
21434
  value: task.agentId || "",
@@ -21280,8 +21448,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21280
21448
  },
21281
21449
  title: isRunning ? "Pause the task before changing its agent" : "Choose which agent runs this task",
21282
21450
  children: [
21283
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
21284
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
21451
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
21452
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
21285
21453
  a.name,
21286
21454
  " (",
21287
21455
  a.provider,
@@ -21291,9 +21459,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21291
21459
  }
21292
21460
  )
21293
21461
  ] }),
21294
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21295
- /* @__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" }),
21296
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21462
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21463
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Planner Agent" }),
21464
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21297
21465
  "select",
21298
21466
  {
21299
21467
  value: task.plannerAgentId || "",
@@ -21302,8 +21470,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21302
21470
  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 },
21303
21471
  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.",
21304
21472
  children: [
21305
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
21306
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
21473
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
21474
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
21307
21475
  a.name,
21308
21476
  " (",
21309
21477
  a.provider,
@@ -21313,9 +21481,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21313
21481
  }
21314
21482
  )
21315
21483
  ] }),
21316
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21317
- /* @__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" }),
21318
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21484
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21485
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Reviewer Agent" }),
21486
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21319
21487
  "select",
21320
21488
  {
21321
21489
  value: task.reviewerAgentId || "",
@@ -21324,8 +21492,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21324
21492
  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 },
21325
21493
  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.",
21326
21494
  children: [
21327
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Project default" }),
21328
- agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: a.id, children: [
21495
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
21496
+ agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
21329
21497
  a.name,
21330
21498
  " (",
21331
21499
  a.provider,
@@ -21335,31 +21503,31 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21335
21503
  }
21336
21504
  )
21337
21505
  ] }),
21338
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21339
- /* @__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" }),
21340
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { display: "flex", gap: "12px" }, children: [
21506
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
21507
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Phases" }),
21508
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { display: "flex", gap: "12px" }, children: [
21341
21509
  { flag: "planningEnabled", label: "Planning phase", value: task.planningEnabled },
21342
21510
  { flag: "reviewEnabled", label: "Review at DONE", value: task.reviewEnabled },
21343
21511
  { flag: "sddEnabled", label: "SDD mode (.md specs)", value: task.sddEnabled }
21344
- ].map(({ flag, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", flex: 1 }, children: [
21512
+ ].map(({ flag, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", flex: 1 }, children: [
21345
21513
  label,
21346
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21514
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21347
21515
  "select",
21348
21516
  {
21349
21517
  value: value === true ? "on" : value === false ? "off" : "inherit",
21350
21518
  onChange: (e) => onSetFlag(task, flag, e.target.value === "inherit" ? null : e.target.value === "on"),
21351
21519
  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" },
21352
21520
  children: [
21353
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "inherit", children: "Project default" }),
21354
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "on", children: "On" }),
21355
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "off", children: "Off" })
21521
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "inherit", children: "Project default" }),
21522
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "on", children: "On" }),
21523
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "off", children: "Off" })
21356
21524
  ]
21357
21525
  }
21358
21526
  )
21359
21527
  ] }, flag)) }),
21360
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", marginTop: "12px", maxWidth: "260px" }, children: [
21528
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", marginTop: "12px", maxWidth: "260px" }, children: [
21361
21529
  "Max run seconds per cycle",
21362
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21530
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21363
21531
  "input",
21364
21532
  {
21365
21533
  type: "number",
@@ -21382,7 +21550,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21382
21550
  )
21383
21551
  ] })
21384
21552
  ] }),
21385
- task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21553
+ task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21386
21554
  "div",
21387
21555
  {
21388
21556
  style: {
@@ -21395,19 +21563,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21395
21563
  fontSize: "12px"
21396
21564
  },
21397
21565
  children: [
21398
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("strong", { children: [
21399
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TriangleAlert, { size: 13 }),
21566
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("strong", { children: [
21567
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TriangleAlert, { size: 13 }),
21400
21568
  " Blocked Reason:"
21401
21569
  ] }),
21402
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { style: { margin: "4px 0 0 0" }, children: task.blockedReason })
21570
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { style: { margin: "4px 0 0 0" }, children: task.blockedReason })
21403
21571
  ]
21404
21572
  }
21405
21573
  ),
21406
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
21407
- /* @__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" }),
21408
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: (task.checklist || []).map((item) => {
21574
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
21575
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 8px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
21576
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: (task.checklist || []).map((item) => {
21409
21577
  const isDone = item.status === "done";
21410
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
21578
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
21411
21579
  "label",
21412
21580
  {
21413
21581
  style: {
@@ -21424,7 +21592,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21424
21592
  opacity: isDone ? 0.6 : 1
21425
21593
  },
21426
21594
  children: [
21427
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
21595
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
21428
21596
  "input",
21429
21597
  {
21430
21598
  type: "checkbox",
@@ -21433,7 +21601,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21433
21601
  style: { marginTop: "2px", cursor: "pointer" }
21434
21602
  }
21435
21603
  ),
21436
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: item.text })
21604
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: item.text })
21437
21605
  ]
21438
21606
  },
21439
21607
  item.id
@@ -21445,7 +21613,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21445
21613
  }
21446
21614
 
21447
21615
  // src/useVoice.ts
21448
- var import_react18 = __toESM(require_react(), 1);
21616
+ var import_react19 = __toESM(require_react(), 1);
21449
21617
  function canCapture() {
21450
21618
  return typeof window !== "undefined" && typeof MediaRecorder !== "undefined" && !!navigator.mediaDevices?.getUserMedia;
21451
21619
  }
@@ -21470,37 +21638,37 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21470
21638
  const { voice, chatStatus, pendingConfirmCount, items, onTranscript } = opts;
21471
21639
  const available = !!voice && voice.enabled && voice.configured && canCapture();
21472
21640
  const canSpeak = !!voice?.canSpeak;
21473
- const [phase, setPhase] = (0, import_react18.useState)("idle");
21474
- const [mode, setMode] = (0, import_react18.useState)("dictate");
21475
- const [error, setError] = (0, import_react18.useState)(null);
21476
- const phaseRef = (0, import_react18.useRef)(phase);
21641
+ const [phase, setPhase] = (0, import_react19.useState)("idle");
21642
+ const [mode, setMode] = (0, import_react19.useState)("dictate");
21643
+ const [error, setError] = (0, import_react19.useState)(null);
21644
+ const phaseRef = (0, import_react19.useRef)(phase);
21477
21645
  phaseRef.current = phase;
21478
- const modeRef = (0, import_react18.useRef)(mode);
21646
+ const modeRef = (0, import_react19.useRef)(mode);
21479
21647
  modeRef.current = mode;
21480
- const onTranscriptRef = (0, import_react18.useRef)(onTranscript);
21648
+ const onTranscriptRef = (0, import_react19.useRef)(onTranscript);
21481
21649
  onTranscriptRef.current = onTranscript;
21482
- const itemsRef = (0, import_react18.useRef)(items);
21650
+ const itemsRef = (0, import_react19.useRef)(items);
21483
21651
  itemsRef.current = items;
21484
- const chatStatusRef = (0, import_react18.useRef)(chatStatus);
21652
+ const chatStatusRef = (0, import_react19.useRef)(chatStatus);
21485
21653
  chatStatusRef.current = chatStatus;
21486
- const streamRef = (0, import_react18.useRef)(null);
21487
- const recorderRef = (0, import_react18.useRef)(null);
21488
- const chunksRef = (0, import_react18.useRef)([]);
21489
- const vadRef = (0, import_react18.useRef)(null);
21490
- const audioRef = (0, import_react18.useRef)(null);
21491
- const idleTimerRef = (0, import_react18.useRef)(null);
21492
- const heardSpeechRef = (0, import_react18.useRef)(false);
21493
- const sawStreamingRef = (0, import_react18.useRef)(false);
21494
- const cursorRef = (0, import_react18.useRef)(0);
21495
- const queueRef = (0, import_react18.useRef)([]);
21496
- const apply = (0, import_react18.useCallback)((event) => {
21654
+ const streamRef = (0, import_react19.useRef)(null);
21655
+ const recorderRef = (0, import_react19.useRef)(null);
21656
+ const chunksRef = (0, import_react19.useRef)([]);
21657
+ const vadRef = (0, import_react19.useRef)(null);
21658
+ const audioRef = (0, import_react19.useRef)(null);
21659
+ const idleTimerRef = (0, import_react19.useRef)(null);
21660
+ const heardSpeechRef = (0, import_react19.useRef)(false);
21661
+ const sawStreamingRef = (0, import_react19.useRef)(false);
21662
+ const cursorRef = (0, import_react19.useRef)(0);
21663
+ const queueRef = (0, import_react19.useRef)([]);
21664
+ const apply = (0, import_react19.useCallback)((event) => {
21497
21665
  setPhase((current) => nextPhase(current, event));
21498
21666
  }, []);
21499
21667
  const clearIdleTimer = () => {
21500
21668
  if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
21501
21669
  idleTimerRef.current = null;
21502
21670
  };
21503
- const teardownCapture = (0, import_react18.useCallback)(() => {
21671
+ const teardownCapture = (0, import_react19.useCallback)(() => {
21504
21672
  clearIdleTimer();
21505
21673
  try {
21506
21674
  vadRef.current?.destroy();
@@ -21517,14 +21685,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21517
21685
  chunksRef.current = [];
21518
21686
  heardSpeechRef.current = false;
21519
21687
  }, []);
21520
- const stopPlayback = (0, import_react18.useCallback)(() => {
21688
+ const stopPlayback = (0, import_react19.useCallback)(() => {
21521
21689
  if (audioRef.current) {
21522
21690
  audioRef.current.pause();
21523
21691
  audioRef.current.src = "";
21524
21692
  audioRef.current = null;
21525
21693
  }
21526
21694
  }, []);
21527
- const fail = (0, import_react18.useCallback)(
21695
+ const fail = (0, import_react19.useCallback)(
21528
21696
  (message) => {
21529
21697
  teardownCapture();
21530
21698
  stopPlayback();
@@ -21533,7 +21701,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21533
21701
  },
21534
21702
  [apply, teardownCapture, stopPlayback]
21535
21703
  );
21536
- const finishRecording = (0, import_react18.useCallback)(() => {
21704
+ const finishRecording = (0, import_react19.useCallback)(() => {
21537
21705
  const recorder = recorderRef.current;
21538
21706
  if (!recorder || recorder.state === "inactive") return;
21539
21707
  recorder.onstop = async () => {
@@ -21562,7 +21730,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21562
21730
  };
21563
21731
  recorder.stop();
21564
21732
  }, [apply, fail, teardownCapture]);
21565
- const startRecording = (0, import_react18.useCallback)(async () => {
21733
+ const startRecording = (0, import_react19.useCallback)(async () => {
21566
21734
  setError(null);
21567
21735
  chunksRef.current = [];
21568
21736
  heardSpeechRef.current = false;
@@ -21607,7 +21775,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21607
21775
  fail(`Microphone unavailable: ${err}`);
21608
21776
  }
21609
21777
  }, [apply, fail, finishRecording, teardownCapture]);
21610
- const speakReply = (0, import_react18.useCallback)(async () => {
21778
+ const speakReply = (0, import_react19.useCallback)(async () => {
21611
21779
  const text = queueRef.current.shift();
21612
21780
  if (!text) {
21613
21781
  apply({
@@ -21651,10 +21819,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21651
21819
  fail(`Synthesis failed: ${err}`);
21652
21820
  }
21653
21821
  }, [apply, fail]);
21654
- (0, import_react18.useEffect)(() => {
21822
+ (0, import_react19.useEffect)(() => {
21655
21823
  if (chatStatus === "streaming") sawStreamingRef.current = true;
21656
21824
  }, [chatStatus]);
21657
- (0, import_react18.useEffect)(() => {
21825
+ (0, import_react19.useEffect)(() => {
21658
21826
  if (modeRef.current !== "conversation") return;
21659
21827
  if (phaseRef.current === "idle") return;
21660
21828
  const { texts, cursor } = takeFinalizedBubbles(items, cursorRef.current);
@@ -21663,7 +21831,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21663
21831
  queueRef.current.push(...texts);
21664
21832
  apply({ kind: "speechQueued", mode: "conversation", canSpeak });
21665
21833
  }, [items, canSpeak, apply]);
21666
- (0, import_react18.useEffect)(() => {
21834
+ (0, import_react19.useEffect)(() => {
21667
21835
  if (phase !== "awaiting") return;
21668
21836
  if (chatStatus === "error") {
21669
21837
  apply({ kind: "failed", mode: "conversation" });
@@ -21685,8 +21853,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21685
21853
  pendingSpeech: queueRef.current.length
21686
21854
  });
21687
21855
  }, [phase, chatStatus, pendingConfirmCount, canSpeak, apply]);
21688
- const prevPhase = (0, import_react18.useRef)("idle");
21689
- (0, import_react18.useEffect)(() => {
21856
+ const prevPhase = (0, import_react19.useRef)("idle");
21857
+ (0, import_react19.useEffect)(() => {
21690
21858
  const from = prevPhase.current;
21691
21859
  prevPhase.current = phase;
21692
21860
  if (from === phase) return;
@@ -21698,14 +21866,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21698
21866
  queueRef.current = [];
21699
21867
  }
21700
21868
  }, [phase, startRecording, speakReply, teardownCapture, stopPlayback]);
21701
- (0, import_react18.useEffect)(
21869
+ (0, import_react19.useEffect)(
21702
21870
  () => () => {
21703
21871
  teardownCapture();
21704
21872
  stopPlayback();
21705
21873
  },
21706
21874
  [teardownCapture, stopPlayback]
21707
21875
  );
21708
- const toggle = (0, import_react18.useCallback)(() => {
21876
+ const toggle = (0, import_react19.useCallback)(() => {
21709
21877
  if (!available) return;
21710
21878
  const current = phaseRef.current;
21711
21879
  if (current === "idle") {
@@ -21719,7 +21887,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21719
21887
  }
21720
21888
  apply({ kind: "userStop", mode: modeRef.current });
21721
21889
  }, [available, apply, finishRecording]);
21722
- const changeMode = (0, import_react18.useCallback)(
21890
+ const changeMode = (0, import_react19.useCallback)(
21723
21891
  (next) => {
21724
21892
  apply({ kind: "userStop", mode: modeRef.current });
21725
21893
  setMode(next);
@@ -21730,7 +21898,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21730
21898
  }
21731
21899
 
21732
21900
  // src/App.tsx
21733
- var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
21901
+ var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
21734
21902
  function closeStreamingAssistant2(items) {
21735
21903
  const last = items[items.length - 1];
21736
21904
  if (!last || last.kind !== "assistant" || !last.streaming) return items;
@@ -21892,35 +22060,35 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
21892
22060
  }
21893
22061
  }
21894
22062
  function App({ postMessage, layout = "compact" }) {
21895
- const [chatState, dispatch] = (0, import_react19.useReducer)(reducer, {
22063
+ const [chatState, dispatch] = (0, import_react20.useReducer)(reducer, {
21896
22064
  items: [],
21897
22065
  status: "idle",
21898
22066
  errorText: null,
21899
22067
  pendingConfirms: [],
21900
22068
  contextUsage: null
21901
22069
  });
21902
- const [agents, setAgents] = (0, import_react19.useState)([]);
21903
- const [sessions, setSessions] = (0, import_react19.useState)([]);
21904
- const [selectedAgentId, setSelectedAgentId] = (0, import_react19.useState)(null);
21905
- const [selectedSessionId, setSelectedSessionId] = (0, import_react19.useState)(null);
21906
- const [showSessions, setShowSessions] = (0, import_react19.useState)(false);
21907
- const [showAllAgents, setShowAllAgents] = (0, import_react19.useState)(false);
21908
- const [pendingDelete, setPendingDelete] = (0, import_react19.useState)(null);
21909
- const [activeScreen, setActiveScreen] = (0, import_react19.useState)("chat");
21910
- const [settingsData, setSettingsData] = (0, import_react19.useState)(null);
21911
- const [modelsResult, setModelsResult] = (0, import_react19.useState)(null);
21912
- const [refreshingSourceId, setRefreshingSourceId] = (0, import_react19.useState)(null);
21913
- const [refreshOutcome, setRefreshOutcome] = (0, import_react19.useState)(null);
21914
- const [mcpAuthOutcome, setMcpAuthOutcome] = (0, import_react19.useState)(null);
21915
- const [taskRuns, setTaskRuns] = (0, import_react19.useState)({});
21916
- const [voiceConfig, setVoiceConfig] = (0, import_react19.useState)(null);
21917
- const [sttCatalogResult, setSttCatalogResult] = (0, import_react19.useState)(null);
21918
- const [ttsCatalogResult, setTtsCatalogResult] = (0, import_react19.useState)(null);
21919
- const [composerDraft, setComposerDraft] = (0, import_react19.useState)("");
21920
- (0, import_react19.useEffect)(() => {
22070
+ const [agents, setAgents] = (0, import_react20.useState)([]);
22071
+ const [sessions, setSessions] = (0, import_react20.useState)([]);
22072
+ const [selectedAgentId, setSelectedAgentId] = (0, import_react20.useState)(null);
22073
+ const [selectedSessionId, setSelectedSessionId] = (0, import_react20.useState)(null);
22074
+ const [showSessions, setShowSessions] = (0, import_react20.useState)(false);
22075
+ const [showAllAgents, setShowAllAgents] = (0, import_react20.useState)(false);
22076
+ const [pendingDelete, setPendingDelete] = (0, import_react20.useState)(null);
22077
+ const [activeScreen, setActiveScreen] = (0, import_react20.useState)("chat");
22078
+ const [settingsData, setSettingsData] = (0, import_react20.useState)(null);
22079
+ const [modelsResult, setModelsResult] = (0, import_react20.useState)(null);
22080
+ const [refreshingSourceId, setRefreshingSourceId] = (0, import_react20.useState)(null);
22081
+ const [refreshOutcome, setRefreshOutcome] = (0, import_react20.useState)(null);
22082
+ const [mcpAuthOutcome, setMcpAuthOutcome] = (0, import_react20.useState)(null);
22083
+ const [taskRuns, setTaskRuns] = (0, import_react20.useState)({});
22084
+ const [voiceConfig, setVoiceConfig] = (0, import_react20.useState)(null);
22085
+ const [sttCatalogResult, setSttCatalogResult] = (0, import_react20.useState)(null);
22086
+ const [ttsCatalogResult, setTtsCatalogResult] = (0, import_react20.useState)(null);
22087
+ const [composerDraft, setComposerDraft] = (0, import_react20.useState)("");
22088
+ (0, import_react20.useEffect)(() => {
21921
22089
  postMessage({ type: "webviewReady" });
21922
22090
  }, []);
21923
- (0, import_react19.useEffect)(() => {
22091
+ (0, import_react20.useEffect)(() => {
21924
22092
  function handle(event) {
21925
22093
  const msg = event.data;
21926
22094
  if (!msg || typeof msg !== "object" || !("type" in msg)) return;
@@ -22028,15 +22196,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22028
22196
  if (voice2) msg.voice = true;
22029
22197
  postMessage(msg);
22030
22198
  };
22031
- const onConfirm = (0, import_react19.useCallback)((id, decision) => {
22199
+ const onConfirm = (0, import_react20.useCallback)((id, decision) => {
22032
22200
  dispatch({ kind: "permission-resolved", id });
22033
22201
  postMessage({ type: "permission_response", id, decision });
22034
22202
  }, [postMessage]);
22035
22203
  const onAbort = () => {
22036
22204
  postMessage({ type: "abort" });
22037
22205
  };
22038
- const confirmCards = (0, import_react19.useMemo)(
22039
- () => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ConfirmCard, { pending: p, onDecide: onConfirm }, p.id)),
22206
+ const confirmCards = (0, import_react20.useMemo)(
22207
+ () => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ConfirmCard, { pending: p, onDecide: onConfirm }, p.id)),
22040
22208
  [chatState.pendingConfirms, onConfirm]
22041
22209
  );
22042
22210
  const onSelectAgent = (agentId) => {
@@ -22076,7 +22244,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22076
22244
  const cancelDeleteSession = () => {
22077
22245
  setPendingDelete(null);
22078
22246
  };
22079
- (0, import_react19.useEffect)(() => {
22247
+ (0, import_react20.useEffect)(() => {
22080
22248
  if (!pendingDelete) return;
22081
22249
  function handleKeyDown(event) {
22082
22250
  if (event.key === "Escape") {
@@ -22091,7 +22259,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22091
22259
  setShowSessions(!showSessions);
22092
22260
  }
22093
22261
  };
22094
- (0, import_react19.useEffect)(() => {
22262
+ (0, import_react20.useEffect)(() => {
22095
22263
  function handleClickOutside(event) {
22096
22264
  const target = event.target;
22097
22265
  if (showSessions && !target.closest(".app__sessions-dropdown")) {
@@ -22105,18 +22273,18 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22105
22273
  const selectedAgentName = agents.find((a) => a.id === selectedAgentId)?.name;
22106
22274
  const activeAgent = agents.find((a) => a.id === selectedAgentId);
22107
22275
  if (activeScreen === "projects" && layout === "sidebar") {
22108
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app", style: { height: "100%" }, children: [
22109
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__header-row", children: [
22110
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__logo-title-wrapper", onClick: () => setActiveScreen("chat"), style: { cursor: "pointer" }, children: [
22111
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
22112
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Caretaker" })
22276
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app", style: { height: "100%" }, children: [
22277
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__header-row", children: [
22278
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__logo-title-wrapper", onClick: () => setActiveScreen("chat"), style: { cursor: "pointer" }, children: [
22279
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
22280
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Caretaker" })
22113
22281
  ] }),
22114
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__controls", children: [
22115
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "app__sessions-btn", onClick: () => setActiveScreen("chat"), children: [
22116
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MessageSquare, { size: 13 }),
22282
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__controls", children: [
22283
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "app__sessions-btn", onClick: () => setActiveScreen("chat"), children: [
22284
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageSquare, { size: 13 }),
22117
22285
  " Chat"
22118
22286
  ] }),
22119
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
22287
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
22120
22288
  "button",
22121
22289
  {
22122
22290
  className: "app__settings-btn",
@@ -22126,18 +22294,18 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22126
22294
  },
22127
22295
  title: "Caretaker Settings",
22128
22296
  children: [
22129
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Settings, { size: 13 }),
22297
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Settings, { size: 13 }),
22130
22298
  " Settings"
22131
22299
  ]
22132
22300
  }
22133
22301
  )
22134
22302
  ] })
22135
22303
  ] }) }),
22136
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ProjectsTab, { agents }) })
22304
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ProjectsTab, { agents }) })
22137
22305
  ] });
22138
22306
  }
22139
22307
  if (activeScreen === "settings") {
22140
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `app ${layout === "sidebar" ? "app--settings-centered" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22308
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: `app ${layout === "sidebar" ? "app--settings-centered" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22141
22309
  SettingsPanel,
22142
22310
  {
22143
22311
  layout,
@@ -22157,43 +22325,43 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22157
22325
  }
22158
22326
  ) });
22159
22327
  }
22160
- 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: [
22161
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__confirm-title", children: "Delete conversation" }),
22162
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "app__confirm-message", children: [
22328
+ const deleteOverlay = pendingDelete && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__confirm-overlay", onClick: cancelDeleteSession, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
22329
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__confirm-title", children: "Delete conversation" }),
22330
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "app__confirm-message", children: [
22163
22331
  "Delete conversation \u201C",
22164
22332
  pendingDelete.title,
22165
22333
  "\u201D? This cannot be undone."
22166
22334
  ] }),
22167
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__confirm-buttons", children: [
22168
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "app__confirm-btn", onClick: cancelDeleteSession, children: "Cancel" }),
22169
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "app__confirm-btn app__confirm-btn--danger", onClick: confirmDeleteSession, children: "Delete" })
22335
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__confirm-buttons", children: [
22336
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "app__confirm-btn", onClick: cancelDeleteSession, children: "Cancel" }),
22337
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "app__confirm-btn app__confirm-btn--danger", onClick: confirmDeleteSession, children: "Delete" })
22170
22338
  ] })
22171
22339
  ] }) });
22172
22340
  if (layout === "sidebar") {
22173
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app app--with-sidebar", children: [
22174
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("aside", { className: "app__sidebar", children: [
22175
- /* @__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: [
22176
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
22177
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Caretaker" })
22341
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app app--with-sidebar", children: [
22342
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("aside", { className: "app__sidebar", children: [
22343
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-header", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__logo-title-wrapper", children: [
22344
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
22345
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Caretaker" })
22178
22346
  ] }) }),
22179
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sidebar-content", children: [
22180
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sidebar-section", children: [
22181
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sidebar-section-title", children: "Agents" }),
22182
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sidebar-agents-list", children: selectedAgentId && !showAllAgents ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
22347
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-content", children: [
22348
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-section", children: [
22349
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-section-title", children: "Agents" }),
22350
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-agents-list", children: selectedAgentId && !showAllAgents ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
22183
22351
  "button",
22184
22352
  {
22185
22353
  className: "app__sidebar-agent-item app__sidebar-agent-item--collapsed-active",
22186
22354
  onClick: () => setShowAllAgents(true),
22187
22355
  title: "Switch Agent",
22188
22356
  children: [
22189
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "agent-status-dot agent-status-dot--active" }),
22190
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__sidebar-agent-name", children: activeAgent?.name || selectedAgentId }),
22191
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronDown, { className: "app__sidebar-chevron", size: 10 })
22357
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "agent-status-dot agent-status-dot--active" }),
22358
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-agent-name", children: activeAgent?.name || selectedAgentId }),
22359
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronDown, { className: "app__sidebar-chevron", size: 10 })
22192
22360
  ]
22193
22361
  }
22194
- ) : /* @__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) => {
22362
+ ) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: `app__sidebar-agents-list-expanded ${selectedAgentId ? "app__sidebar-agents-list-expanded--has-active" : ""}`, children: agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-empty-text", children: "No agents found" }) : agents.map((agent) => {
22195
22363
  const isSelected = selectedAgentId === agent.id;
22196
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
22364
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
22197
22365
  "button",
22198
22366
  {
22199
22367
  className: `app__sidebar-agent-item ${isSelected ? "app__sidebar-agent-item--active" : ""}`,
@@ -22205,19 +22373,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22205
22373
  }
22206
22374
  },
22207
22375
  children: [
22208
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: `agent-status-dot ${isSelected ? "agent-status-dot--active" : ""}` }),
22209
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__sidebar-agent-name", children: agent.name }),
22210
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronUp, { className: "app__sidebar-chevron app__sidebar-chevron--up", size: 10 })
22376
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: `agent-status-dot ${isSelected ? "agent-status-dot--active" : ""}` }),
22377
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-agent-name", children: agent.name }),
22378
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronUp, { className: "app__sidebar-chevron app__sidebar-chevron--up", size: 10 })
22211
22379
  ]
22212
22380
  },
22213
22381
  agent.id
22214
22382
  );
22215
22383
  }) }) })
22216
22384
  ] }),
22217
- selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sidebar-section", children: [
22218
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sidebar-section-header", children: [
22219
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__sidebar-section-title", children: "Conversations" }),
22220
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22385
+ selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-section", children: [
22386
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-section-header", children: [
22387
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-section-title", children: "Conversations" }),
22388
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22221
22389
  "button",
22222
22390
  {
22223
22391
  className: "app__sidebar-new-chat-btn",
@@ -22227,15 +22395,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22227
22395
  }
22228
22396
  )
22229
22397
  ] }),
22230
- /* @__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)(
22398
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-sessions-list", children: sessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-empty-text", children: "No conversations yet" }) : sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
22231
22399
  "div",
22232
22400
  {
22233
22401
  className: `app__sidebar-session-item ${selectedSessionId === session.id ? "app__sidebar-session-item--active" : ""}`,
22234
22402
  onClick: () => onSelectSession(session.id),
22235
22403
  children: [
22236
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__sidebar-session-icon", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MessageSquare, { size: 13 }) }),
22237
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__sidebar-session-title", title: session.title, children: session.title }),
22238
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22404
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-session-icon", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageSquare, { size: 13 }) }),
22405
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-session-title", title: session.title, children: session.title }),
22406
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22239
22407
  "button",
22240
22408
  {
22241
22409
  className: "app__sidebar-session-delete",
@@ -22244,7 +22412,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22244
22412
  e.stopPropagation();
22245
22413
  onDeleteSession(session.id, session.title);
22246
22414
  },
22247
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Trash2, { size: 12 })
22415
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Trash2, { size: 12 })
22248
22416
  }
22249
22417
  )
22250
22418
  ]
@@ -22253,8 +22421,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22253
22421
  )) })
22254
22422
  ] })
22255
22423
  ] }),
22256
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sidebar-footer", style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
22257
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22424
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-footer", style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
22425
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22258
22426
  "button",
22259
22427
  {
22260
22428
  className: "app__sidebar-settings-btn",
@@ -22262,13 +22430,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22262
22430
  setActiveScreen("projects");
22263
22431
  },
22264
22432
  title: "Projects & Autonomous Tasks",
22265
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
22266
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FolderKanban, { size: 13 }),
22433
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
22434
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FolderKanban, { size: 13 }),
22267
22435
  " Projects"
22268
22436
  ] })
22269
22437
  }
22270
22438
  ),
22271
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
22439
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
22272
22440
  "button",
22273
22441
  {
22274
22442
  className: "app__sidebar-settings-btn",
@@ -22278,22 +22446,22 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22278
22446
  },
22279
22447
  title: "Caretaker Settings",
22280
22448
  children: [
22281
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Settings, { className: "app__settings-icon", size: 14 }),
22282
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Settings" })
22449
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Settings, { className: "app__settings-icon", size: 14 }),
22450
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Settings" })
22283
22451
  ]
22284
22452
  }
22285
22453
  )
22286
22454
  ] })
22287
22455
  ] }),
22288
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("main", { className: "app__chat-pane", children: selectedAgentId ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
22289
- /* @__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: [
22290
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "app__chat-header-title", children: selectedAgentName }),
22291
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "app__chat-header-status", children: [
22292
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: `agent-status-dot agent-status-dot--active ${chatState.status === "streaming" ? "agent-status-dot--pulsing" : ""}` }),
22456
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("main", { className: "app__chat-pane", children: selectedAgentId ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
22457
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("header", { className: "app__chat-header", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__chat-header-info", children: [
22458
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { className: "app__chat-header-title", children: selectedAgentName }),
22459
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "app__chat-header-status", children: [
22460
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: `agent-status-dot agent-status-dot--active ${chatState.status === "streaming" ? "agent-status-dot--pulsing" : ""}` }),
22293
22461
  chatState.status === "streaming" ? "Streaming response..." : "Ready"
22294
22462
  ] })
22295
22463
  ] }) }),
22296
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22464
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22297
22465
  MessageList,
22298
22466
  {
22299
22467
  items: chatState.items,
@@ -22303,12 +22471,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22303
22471
  trailing: confirmCards
22304
22472
  }
22305
22473
  ),
22306
- (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__error", children: [
22307
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TriangleAlert, { size: 14 }),
22474
+ (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__error", children: [
22475
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TriangleAlert, { size: 14 }),
22308
22476
  " ",
22309
22477
  chatState.errorText || voice.error
22310
22478
  ] }),
22311
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22479
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22312
22480
  Composer,
22313
22481
  {
22314
22482
  disabled: composerDisabled,
@@ -22327,30 +22495,30 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22327
22495
  onValueChange: setComposerDraft
22328
22496
  }
22329
22497
  )
22330
- ] }) : /* @__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" }) }) }),
22498
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Select an agent from the sidebar to start chatting" }) }) }),
22331
22499
  deleteOverlay
22332
22500
  ] });
22333
22501
  }
22334
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app", children: [
22335
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__header-row", children: [
22336
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__logo-title-wrapper", children: [
22337
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
22338
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Caretaker" })
22502
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app", children: [
22503
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__header-row", children: [
22504
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__logo-title-wrapper", children: [
22505
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
22506
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Caretaker" })
22339
22507
  ] }),
22340
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__controls", children: [
22341
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__agent-select-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
22508
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__controls", children: [
22509
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__agent-select-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
22342
22510
  "select",
22343
22511
  {
22344
22512
  className: "app__agent-select",
22345
22513
  value: selectedAgentId ?? "",
22346
22514
  onChange: (e) => onSelectAgent(e.target.value),
22347
22515
  children: [
22348
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
22349
- agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
22516
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
22517
+ agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
22350
22518
  ]
22351
22519
  }
22352
22520
  ) }),
22353
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
22521
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
22354
22522
  "button",
22355
22523
  {
22356
22524
  className: "app__sessions-btn",
@@ -22358,13 +22526,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22358
22526
  disabled: !selectedAgentId,
22359
22527
  title: "View conversations",
22360
22528
  children: [
22361
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MessageSquare, { size: 13 }),
22529
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageSquare, { size: 13 }),
22362
22530
  " ",
22363
22531
  sessions.length
22364
22532
  ]
22365
22533
  }
22366
22534
  ),
22367
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22535
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22368
22536
  "button",
22369
22537
  {
22370
22538
  className: "app__new-chat-btn",
@@ -22374,7 +22542,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22374
22542
  children: "+ New"
22375
22543
  }
22376
22544
  ),
22377
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22545
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22378
22546
  "button",
22379
22547
  {
22380
22548
  className: "app__settings-btn",
@@ -22383,24 +22551,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22383
22551
  postMessage({ type: "getSettingsData" });
22384
22552
  },
22385
22553
  title: "Caretaker Settings",
22386
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Settings, { className: "app__settings-icon", size: 14 })
22554
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Settings, { className: "app__settings-icon", size: 14 })
22387
22555
  }
22388
22556
  )
22389
22557
  ] })
22390
22558
  ] }) }),
22391
- showSessions && sessions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sessions-dropdown", children: [
22392
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sessions-title", children: [
22559
+ showSessions && sessions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sessions-dropdown", children: [
22560
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sessions-title", children: [
22393
22561
  "Conversations for ",
22394
22562
  selectedAgentName
22395
22563
  ] }),
22396
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sessions-list", children: sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
22564
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sessions-list", children: sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
22397
22565
  "div",
22398
22566
  {
22399
22567
  className: `app__session-item ${selectedSessionId === session.id ? "app__session-item--active" : ""}`,
22400
22568
  onClick: () => onSelectSession(session.id),
22401
22569
  children: [
22402
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "app__session-item-title", children: session.title }),
22403
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22570
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__session-item-title", children: session.title }),
22571
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22404
22572
  "button",
22405
22573
  {
22406
22574
  className: "app__session-item-delete",
@@ -22409,7 +22577,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22409
22577
  e.stopPropagation();
22410
22578
  onDeleteSession(session.id, session.title);
22411
22579
  },
22412
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Trash2, { size: 12 })
22580
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Trash2, { size: 12 })
22413
22581
  }
22414
22582
  )
22415
22583
  ]
@@ -22417,12 +22585,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22417
22585
  session.id
22418
22586
  )) })
22419
22587
  ] }),
22420
- showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__sessions-dropdown app__sessions-dropdown--empty", children: [
22421
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__sessions-title", children: "No conversations yet" }),
22422
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "app__sessions-empty", children: "Start a new chat to create a conversation" })
22588
+ showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sessions-dropdown app__sessions-dropdown--empty", children: [
22589
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sessions-title", children: "No conversations yet" }),
22590
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "app__sessions-empty", children: "Start a new chat to create a conversation" })
22423
22591
  ] }),
22424
- !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" }) }),
22425
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22592
+ !selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Select an agent to start chatting" }) }),
22593
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22426
22594
  MessageList,
22427
22595
  {
22428
22596
  items: chatState.items,
@@ -22432,12 +22600,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22432
22600
  trailing: confirmCards
22433
22601
  }
22434
22602
  ),
22435
- (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__error", children: [
22436
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TriangleAlert, { size: 14 }),
22603
+ (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__error", children: [
22604
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TriangleAlert, { size: 14 }),
22437
22605
  " ",
22438
22606
  chatState.errorText || voice.error
22439
22607
  ] }),
22440
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
22608
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22441
22609
  Composer,
22442
22610
  {
22443
22611
  disabled: composerDisabled,
@@ -22461,12 +22629,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22461
22629
  }
22462
22630
 
22463
22631
  // src/standalone.tsx
22464
- var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
22632
+ var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
22465
22633
  function StandaloneApp() {
22466
- const [ws, setWs] = (0, import_react20.useState)(null);
22467
- const [connected, setConnected] = (0, import_react20.useState)(false);
22468
- const [error, setError] = (0, import_react20.useState)(null);
22469
- (0, import_react20.useEffect)(() => {
22634
+ const [ws, setWs] = (0, import_react21.useState)(null);
22635
+ const [connected, setConnected] = (0, import_react21.useState)(false);
22636
+ const [error, setError] = (0, import_react21.useState)(null);
22637
+ (0, import_react21.useEffect)(() => {
22470
22638
  let active = true;
22471
22639
  const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
22472
22640
  const socket = new WebSocket(`${protocol}//${window.location.host}/api/ws`);
@@ -22512,7 +22680,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22512
22680
  }
22513
22681
  };
22514
22682
  if (error) {
22515
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: {
22683
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: {
22516
22684
  display: "flex",
22517
22685
  flexDirection: "column",
22518
22686
  alignItems: "center",
@@ -22524,9 +22692,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22524
22692
  padding: "20px",
22525
22693
  textAlign: "center"
22526
22694
  }, children: [
22527
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { style: { color: "#ff6b6b" }, children: "Caretaker Connection Failed" }),
22528
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: error }),
22529
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
22695
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { style: { color: "#ff6b6b" }, children: "Caretaker Connection Failed" }),
22696
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: error }),
22697
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
22530
22698
  "button",
22531
22699
  {
22532
22700
  onClick: () => setWs(null),
@@ -22545,7 +22713,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22545
22713
  ] });
22546
22714
  }
22547
22715
  if (!connected) {
22548
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: {
22716
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: {
22549
22717
  display: "flex",
22550
22718
  flexDirection: "column",
22551
22719
  alignItems: "center",
@@ -22555,7 +22723,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22555
22723
  background: "#1e1e1e",
22556
22724
  color: "#f1f1f1"
22557
22725
  }, children: [
22558
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: {
22726
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: {
22559
22727
  border: "4px solid rgba(255,255,255,0.1)",
22560
22728
  width: "36px",
22561
22729
  height: "36px",
@@ -22564,8 +22732,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22564
22732
  animation: "spin 1s linear infinite",
22565
22733
  marginBottom: "16px"
22566
22734
  } }),
22567
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Connecting to Caretaker server..." }),
22568
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("style", { children: `
22735
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Connecting to Caretaker server..." }),
22736
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("style", { children: `
22569
22737
  @keyframes spin {
22570
22738
  0% { transform: rotate(0deg); }
22571
22739
  100% { transform: rotate(360deg); }
@@ -22573,12 +22741,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
22573
22741
  ` })
22574
22742
  ] });
22575
22743
  }
22576
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(App, { postMessage, layout: "sidebar" });
22744
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(App, { postMessage, layout: "sidebar" });
22577
22745
  }
22578
22746
  var rootEl = document.getElementById("root");
22579
22747
  if (!rootEl) throw new Error("#root not found");
22580
22748
  (0, import_client.createRoot)(rootEl).render(
22581
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react20.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(StandaloneApp, {}) })
22749
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StandaloneApp, {}) })
22582
22750
  );
22583
22751
  })();
22584
22752
  /*! Bundled license information: