@hyperwindmill/caretaker-cli 0.33.0 → 0.34.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.
@@ -14583,11 +14583,11 @@
14583
14583
  });
14584
14584
 
14585
14585
  // src/standalone.tsx
14586
- var import_react26 = __toESM(require_react(), 1);
14586
+ var import_react27 = __toESM(require_react(), 1);
14587
14587
  var import_client = __toESM(require_client(), 1);
14588
14588
 
14589
14589
  // src/App.tsx
14590
- var import_react25 = __toESM(require_react(), 1);
14590
+ var import_react26 = __toESM(require_react(), 1);
14591
14591
 
14592
14592
  // src/assistant_activation.ts
14593
14593
  function beginActivation(agentId, confirmedAgentId, knownAgentIds, current) {
@@ -17392,7 +17392,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
17392
17392
  }
17393
17393
 
17394
17394
  // src/SettingsPanel.tsx
17395
- var import_react22 = __toESM(require_react(), 1);
17395
+ var import_react23 = __toESM(require_react(), 1);
17396
17396
 
17397
17397
  // src/ProvidersTab.tsx
17398
17398
  var import_react7 = __toESM(require_react(), 1);
@@ -22970,8 +22970,156 @@ Please report this to https://github.com/markedjs/marked.`, e) {
22970
22970
  ] });
22971
22971
  }
22972
22972
 
22973
- // src/SettingsPanel.tsx
22973
+ // src/ApiAccessTab.tsx
22974
+ var import_react22 = __toESM(require_react(), 1);
22974
22975
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
22976
+ function ApiAccessTab() {
22977
+ const [status, setStatus] = (0, import_react22.useState)(null);
22978
+ const [port, setPort] = (0, import_react22.useState)("");
22979
+ const [name, setName] = (0, import_react22.useState)("");
22980
+ const [created, setCreated] = (0, import_react22.useState)(null);
22981
+ const [copied, setCopied] = (0, import_react22.useState)(false);
22982
+ const [confirmId, setConfirmId] = (0, import_react22.useState)(null);
22983
+ const [error, setError] = (0, import_react22.useState)(null);
22984
+ const call = (0, import_react22.useCallback)(async (path, init) => {
22985
+ setError(null);
22986
+ try {
22987
+ const res = await fetch(path, {
22988
+ ...init,
22989
+ headers: init?.body ? { "content-type": "application/json" } : void 0
22990
+ });
22991
+ const data = await res.json();
22992
+ if (!res.ok) {
22993
+ setError(data?.error ?? `Request failed (${res.status})`);
22994
+ return null;
22995
+ }
22996
+ setStatus(data);
22997
+ return data;
22998
+ } catch {
22999
+ setError("The server did not answer.");
23000
+ return null;
23001
+ }
23002
+ }, []);
23003
+ (0, import_react22.useEffect)(() => {
23004
+ void call("/api/access").then((s) => {
23005
+ if (s) setPort(s.port === null ? "" : String(s.port));
23006
+ });
23007
+ }, [call]);
23008
+ const savePort = () => call("/api/access/port", { method: "PUT", body: JSON.stringify({ port: port.trim() === "" ? null : port }) });
23009
+ const createToken = async () => {
23010
+ const data = await call("/api/access/tokens", { method: "POST", body: JSON.stringify({ name }) });
23011
+ if (!data?.token) return;
23012
+ setCreated(data.token);
23013
+ setCopied(false);
23014
+ setName("");
23015
+ };
23016
+ const revoke = async (id) => {
23017
+ setConfirmId(null);
23018
+ await call(`/api/access/tokens/${encodeURIComponent(id)}`, { method: "DELETE" });
23019
+ };
23020
+ const copy = async () => {
23021
+ if (!created) return;
23022
+ try {
23023
+ await navigator.clipboard.writeText(created);
23024
+ setCopied(true);
23025
+ } catch {
23026
+ }
23027
+ };
23028
+ if (!status) {
23029
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "glass-form", children: [
23030
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h4", { children: "API access" }),
23031
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "glass-form__body", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { className: error ? "form-error" : void 0, children: error ?? "Loading\u2026" }) })
23032
+ ] });
23033
+ }
23034
+ const { listener, portOverride } = status;
23035
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "glass-form", children: [
23036
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h4", { children: "API access" }),
23037
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "glass-form__body", children: [
23038
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "form-group", children: [
23039
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "api-access-port", children: "API port" }),
23040
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23041
+ "input",
23042
+ {
23043
+ id: "api-access-port",
23044
+ type: "number",
23045
+ min: 1,
23046
+ max: 65535,
23047
+ placeholder: "off",
23048
+ value: port,
23049
+ onChange: (e) => setPort(e.target.value)
23050
+ }
23051
+ ),
23052
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
23053
+ "A second port that serves the REST API to scripts and other programs. Every request to it must carry ",
23054
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("code", { children: "Authorization: Bearer <token>" }),
23055
+ ". Leave empty to keep it off. The address you are using now is not affected: it stays without authentication, so keep it on this machine or behind an authenticating proxy."
23056
+ ] }),
23057
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
23058
+ "The project and task routes are described at",
23059
+ " ",
23060
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("a", { href: "/api/docs", target: "_blank", rel: "noreferrer", children: "/api/docs" }),
23061
+ " ",
23062
+ "(OpenAPI document: ",
23063
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("code", { children: "/api/openapi.json" }),
23064
+ ")."
23065
+ ] }),
23066
+ portOverride !== null && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
23067
+ "This server was started with ",
23068
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("code", { children: [
23069
+ "--api-port ",
23070
+ portOverride
23071
+ ] }),
23072
+ ", which takes precedence over the saved port until it restarts without it."
23073
+ ] }),
23074
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { role: "status", "aria-live": "polite", className: listener?.error ? "form-error" : void 0, children: !listener ? "The API is off." : listener.error ? `The API could not start on port ${listener.port}: ${listener.error}` : `The API is listening on ${listener.host}:${listener.port}.` })
23075
+ ] }),
23076
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "form-actions", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: savePort, children: "Save port" }) }),
23077
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "form-group", children: [
23078
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "api-access-token-name", children: "Tokens" }),
23079
+ status.tokens.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "No tokens yet. Without one, every request to the API port is refused." }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "settings-list", children: status.tokens.map((t) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "settings-card", children: [
23080
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "settings-card__body", children: [
23081
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "settings-card__title", children: t.name }),
23082
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "settings-card__metadata", children: [
23083
+ "Created ",
23084
+ new Date(t.createdAt).toLocaleString()
23085
+ ] })
23086
+ ] }),
23087
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "settings-card__actions", children: confirmId === t.id ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
23088
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "btn btn--secondary btn--xs", onClick: () => revoke(t.id), children: "Confirm revoke" }),
23089
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "btn btn--secondary btn--xs", onClick: () => setConfirmId(null), children: "Cancel" })
23090
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "btn btn--secondary btn--xs", onClick: () => setConfirmId(t.id), children: "Revoke" }) })
23091
+ ] }, t.id)) })
23092
+ ] }),
23093
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "form-group", children: [
23094
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23095
+ "input",
23096
+ {
23097
+ id: "api-access-token-name",
23098
+ type: "text",
23099
+ placeholder: "Name, e.g. the program that will use it",
23100
+ maxLength: 80,
23101
+ value: name,
23102
+ onChange: (e) => setName(e.target.value)
23103
+ }
23104
+ ),
23105
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "form-actions", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: createToken, disabled: !name.trim(), children: "Create token" }) }),
23106
+ created && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
23107
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "Copy this token now. It is not stored and cannot be shown again." }),
23108
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("input", { type: "text", readOnly: true, value: created, "aria-label": "New token", onFocus: (e) => e.target.select() }),
23109
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "form-actions", children: [
23110
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: copy, children: "Copy" }),
23111
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => setCreated(null), children: "Done" }),
23112
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { role: "status", "aria-live": "polite", className: "form-save-state", children: copied ? "Copied \u2713" : "" })
23113
+ ] })
23114
+ ] })
23115
+ ] }),
23116
+ error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { role: "alert", className: "form-error", children: error })
23117
+ ] })
23118
+ ] });
23119
+ }
23120
+
23121
+ // src/SettingsPanel.tsx
23122
+ var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
22975
23123
  function SettingsPanel({
22976
23124
  layout = "compact",
22977
23125
  postMessage,
@@ -22992,16 +23140,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
22992
23140
  onClose,
22993
23141
  initialTab = "providers"
22994
23142
  }) {
22995
- const [activeTab, setActiveTab] = (0, import_react22.useState)(initialTab);
23143
+ const [activeTab, setActiveTab] = (0, import_react23.useState)(initialTab);
22996
23144
  if (!settingsData) {
22997
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "settings-panel settings-panel--loading", children: [
22998
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, children: [
22999
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ArrowLeft, { size: 14 }),
23145
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "settings-panel settings-panel--loading", children: [
23146
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, children: [
23147
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ArrowLeft, { size: 14 }),
23000
23148
  " Back to Chat"
23001
23149
  ] }),
23002
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "settings-panel__loading-spinner", children: [
23003
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "spinner" }),
23004
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Loading configurations..." })
23150
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "settings-panel__loading-spinner", children: [
23151
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "spinner" }),
23152
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Loading configurations..." })
23005
23153
  ] })
23006
23154
  ] });
23007
23155
  }
@@ -23009,7 +23157,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23009
23157
  const renderTabContent = () => {
23010
23158
  switch (activeTab) {
23011
23159
  case "providers":
23012
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23160
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23013
23161
  ProvidersTab,
23014
23162
  {
23015
23163
  config,
@@ -23021,7 +23169,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23021
23169
  }
23022
23170
  );
23023
23171
  case "projects":
23024
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23172
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23025
23173
  ProjectsTabSettings,
23026
23174
  {
23027
23175
  config,
@@ -23030,7 +23178,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23030
23178
  }
23031
23179
  );
23032
23180
  case "agents":
23033
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23181
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23034
23182
  AgentsTab,
23035
23183
  {
23036
23184
  config,
@@ -23044,7 +23192,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23044
23192
  }
23045
23193
  );
23046
23194
  case "plugins":
23047
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23195
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23048
23196
  PluginsTab,
23049
23197
  {
23050
23198
  pluginsFile,
@@ -23055,7 +23203,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23055
23203
  }
23056
23204
  );
23057
23205
  case "mcp":
23058
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23206
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23059
23207
  McpTab,
23060
23208
  {
23061
23209
  mcpServersFile,
@@ -23065,7 +23213,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23065
23213
  }
23066
23214
  );
23067
23215
  case "services":
23068
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23216
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23069
23217
  ServicesTab,
23070
23218
  {
23071
23219
  config,
@@ -23075,7 +23223,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23075
23223
  }
23076
23224
  );
23077
23225
  case "voice":
23078
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23226
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23079
23227
  VoiceTab,
23080
23228
  {
23081
23229
  config,
@@ -23086,7 +23234,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23086
23234
  }
23087
23235
  );
23088
23236
  case "memory":
23089
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23237
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23090
23238
  MemoryTab,
23091
23239
  {
23092
23240
  config,
@@ -23095,7 +23243,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23095
23243
  }
23096
23244
  );
23097
23245
  case "desktop":
23098
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23246
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23099
23247
  DesktopTab,
23100
23248
  {
23101
23249
  config,
@@ -23103,18 +23251,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23103
23251
  onSave: (updatedConfig) => postMessage({ type: "saveConfig", config: updatedConfig })
23104
23252
  }
23105
23253
  );
23254
+ case "api":
23255
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ApiAccessTab, {});
23106
23256
  }
23107
23257
  };
23108
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "settings-panel", children: [
23109
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { className: "settings-panel__header", children: [
23110
- layout !== "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, title: "Go back to chat", children: [
23111
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ArrowLeft, { size: 14 }),
23258
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "settings-panel", children: [
23259
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("header", { className: "settings-panel__header", children: [
23260
+ layout !== "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, title: "Go back to chat", children: [
23261
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ArrowLeft, { size: 14 }),
23112
23262
  " Chat"
23113
23263
  ] }),
23114
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { className: "settings-panel__title", children: "Caretaker Config" })
23264
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h2", { className: "settings-panel__title", children: "Caretaker Config" })
23115
23265
  ] }),
23116
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("nav", { className: "settings-panel__tabs", children: [
23117
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23266
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("nav", { className: "settings-panel__tabs", children: [
23267
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23118
23268
  "button",
23119
23269
  {
23120
23270
  className: `settings-panel__tab-btn ${activeTab === "providers" ? "settings-panel__tab-btn--active" : ""}`,
@@ -23122,7 +23272,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23122
23272
  children: "Providers"
23123
23273
  }
23124
23274
  ),
23125
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23275
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23126
23276
  "button",
23127
23277
  {
23128
23278
  className: `settings-panel__tab-btn ${activeTab === "projects" ? "settings-panel__tab-btn--active" : ""}`,
@@ -23130,7 +23280,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23130
23280
  children: "Projects"
23131
23281
  }
23132
23282
  ),
23133
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23283
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23134
23284
  "button",
23135
23285
  {
23136
23286
  className: `settings-panel__tab-btn ${activeTab === "agents" ? "settings-panel__tab-btn--active" : ""}`,
@@ -23138,7 +23288,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23138
23288
  children: "Agents"
23139
23289
  }
23140
23290
  ),
23141
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23291
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23142
23292
  "button",
23143
23293
  {
23144
23294
  className: `settings-panel__tab-btn ${activeTab === "plugins" ? "settings-panel__tab-btn--active" : ""}`,
@@ -23146,7 +23296,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23146
23296
  children: "Plugins"
23147
23297
  }
23148
23298
  ),
23149
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23299
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23150
23300
  "button",
23151
23301
  {
23152
23302
  className: `settings-panel__tab-btn ${activeTab === "mcp" ? "settings-panel__tab-btn--active" : ""}`,
@@ -23154,7 +23304,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23154
23304
  children: "MCP"
23155
23305
  }
23156
23306
  ),
23157
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23307
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23158
23308
  "button",
23159
23309
  {
23160
23310
  className: `settings-panel__tab-btn ${activeTab === "services" ? "settings-panel__tab-btn--active" : ""}`,
@@ -23162,7 +23312,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23162
23312
  children: "Services"
23163
23313
  }
23164
23314
  ),
23165
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23315
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23166
23316
  "button",
23167
23317
  {
23168
23318
  className: `settings-panel__tab-btn ${activeTab === "voice" ? "settings-panel__tab-btn--active" : ""}`,
@@ -23170,7 +23320,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23170
23320
  children: "Voice"
23171
23321
  }
23172
23322
  ),
23173
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23323
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23174
23324
  "button",
23175
23325
  {
23176
23326
  className: `settings-panel__tab-btn ${activeTab === "memory" ? "settings-panel__tab-btn--active" : ""}`,
@@ -23178,24 +23328,32 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23178
23328
  children: "Memory"
23179
23329
  }
23180
23330
  ),
23181
- layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
23331
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23182
23332
  "button",
23183
23333
  {
23184
23334
  className: `settings-panel__tab-btn ${activeTab === "desktop" ? "settings-panel__tab-btn--active" : ""}`,
23185
23335
  onClick: () => setActiveTab("desktop"),
23186
23336
  children: "Desktop"
23187
23337
  }
23338
+ ),
23339
+ layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
23340
+ "button",
23341
+ {
23342
+ className: `settings-panel__tab-btn ${activeTab === "api" ? "settings-panel__tab-btn--active" : ""}`,
23343
+ onClick: () => setActiveTab("api"),
23344
+ children: "API"
23345
+ }
23188
23346
  )
23189
23347
  ] }),
23190
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("main", { className: "settings-panel__content", children: renderTabContent() })
23348
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("main", { className: "settings-panel__content", children: renderTabContent() })
23191
23349
  ] });
23192
23350
  }
23193
23351
 
23194
23352
  // src/ProjectsTab.tsx
23195
- var import_react23 = __toESM(require_react(), 1);
23353
+ var import_react24 = __toESM(require_react(), 1);
23196
23354
 
23197
23355
  // src/TaskCycleView.tsx
23198
- var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
23356
+ var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
23199
23357
  function TaskCycleView({ item, postMessage, onBack }) {
23200
23358
  const { sessionId, agentId } = item;
23201
23359
  const chat = useCycleStream(sessionId, {
@@ -23205,25 +23363,25 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23205
23363
  onDone: () => postMessage({ type: "watchCycle", agentId, sessionId })
23206
23364
  });
23207
23365
  const running = chat.status === "streaming";
23208
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: [
23209
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "10px 14px" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
23210
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to the task thread", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ArrowLeft, { size: 13 }) }),
23211
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "app__chat-header-info", children: [
23212
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
23366
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: [
23367
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "10px 14px" }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
23368
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to the task thread", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ArrowLeft, { size: 13 }) }),
23369
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "app__chat-header-info", children: [
23370
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
23213
23371
  cycleRoleLabel(item.role),
23214
23372
  " cycle",
23215
23373
  item.label ? ` \xB7 ${item.label}` : ""
23216
23374
  ] }),
23217
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: running ? "running" : cycleOutcomeLabel(item.outcome) })
23375
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: running ? "running" : cycleOutcomeLabel(item.outcome) })
23218
23376
  ] })
23219
23377
  ] }) }),
23220
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MessageList, { items: chat.items, sessionId: null, isStreaming: running, agentName: item.label }),
23221
- chat.errorText && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "notice notice--block", children: chat.errorText })
23378
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MessageList, { items: chat.items, sessionId: null, isStreaming: running, agentName: item.label }),
23379
+ chat.errorText && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "notice notice--block", children: chat.errorText })
23222
23380
  ] });
23223
23381
  }
23224
23382
 
23225
23383
  // src/ProjectsTab.tsx
23226
- var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
23384
+ var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
23227
23385
  var LS_ARCHIVED_KEY = "caretaker.taskView.showArchived";
23228
23386
  function persistLastProject(id) {
23229
23387
  void fetch("/api/ui-state", {
@@ -23248,15 +23406,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23248
23406
  }
23249
23407
  var PAGE_SIZE = 20;
23250
23408
  function ProjectsTab({ agents, onOpenSettings, postMessage }) {
23251
- const [projects, setProjects] = (0, import_react23.useState)([]);
23252
- const [selectedProjectId, setSelectedProjectId] = (0, import_react23.useState)(null);
23253
- const [tasks, setTasks] = (0, import_react23.useState)([]);
23254
- const [selectedTaskId, setSelectedTaskId] = (0, import_react23.useState)(null);
23255
- const [taskMessages, setTaskMessages] = (0, import_react23.useState)([]);
23256
- const [view, setView] = (0, import_react23.useState)("list");
23257
- const [page, setPage] = (0, import_react23.useState)(0);
23258
- const [isNewTaskOpen, setIsNewTaskOpen] = (0, import_react23.useState)(false);
23259
- const [newTask, setNewTask] = (0, import_react23.useState)({
23409
+ const [projects, setProjects] = (0, import_react24.useState)([]);
23410
+ const [selectedProjectId, setSelectedProjectId] = (0, import_react24.useState)(null);
23411
+ const [tasks, setTasks] = (0, import_react24.useState)([]);
23412
+ const [selectedTaskId, setSelectedTaskId] = (0, import_react24.useState)(null);
23413
+ const [taskMessages, setTaskMessages] = (0, import_react24.useState)([]);
23414
+ const [view, setView] = (0, import_react24.useState)("list");
23415
+ const [page, setPage] = (0, import_react24.useState)(0);
23416
+ const [isNewTaskOpen, setIsNewTaskOpen] = (0, import_react24.useState)(false);
23417
+ const [newTask, setNewTask] = (0, import_react24.useState)({
23260
23418
  title: "",
23261
23419
  objective: "",
23262
23420
  checklistText: "",
@@ -23265,12 +23423,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23265
23423
  plannerAgentId: "",
23266
23424
  reviewerAgentId: ""
23267
23425
  });
23268
- const [isSending, setIsSending] = (0, import_react23.useState)(false);
23269
- const [showArchived, setShowArchived] = (0, import_react23.useState)(loadShowArchived);
23270
- const [pendingConfirm, setPendingConfirm] = (0, import_react23.useState)(null);
23271
- const [taskError, setTaskError] = (0, import_react23.useState)(null);
23272
- const threadIntervalRef = (0, import_react23.useRef)(null);
23273
- (0, import_react23.useEffect)(() => {
23426
+ const [isSending, setIsSending] = (0, import_react24.useState)(false);
23427
+ const [showArchived, setShowArchived] = (0, import_react24.useState)(loadShowArchived);
23428
+ const [pendingConfirm, setPendingConfirm] = (0, import_react24.useState)(null);
23429
+ const [taskError, setTaskError] = (0, import_react24.useState)(null);
23430
+ const threadIntervalRef = (0, import_react24.useRef)(null);
23431
+ (0, import_react24.useEffect)(() => {
23274
23432
  void (async () => {
23275
23433
  try {
23276
23434
  const res = await fetch("/api/ui-state");
@@ -23286,7 +23444,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23286
23444
  stopThreadPolling();
23287
23445
  };
23288
23446
  }, []);
23289
- (0, import_react23.useEffect)(() => {
23447
+ (0, import_react24.useEffect)(() => {
23290
23448
  if (projects.length > 0 && selectedProjectId === null) {
23291
23449
  setSelectedProjectId(projects[0].id);
23292
23450
  }
@@ -23297,10 +23455,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23297
23455
  setSelectedProjectId(null);
23298
23456
  }
23299
23457
  }, [projects]);
23300
- (0, import_react23.useEffect)(() => {
23458
+ (0, import_react24.useEffect)(() => {
23301
23459
  saveShowArchived(showArchived);
23302
23460
  }, [showArchived]);
23303
- (0, import_react23.useEffect)(() => {
23461
+ (0, import_react24.useEffect)(() => {
23304
23462
  if (selectedProjectId !== null) {
23305
23463
  fetchTasks(selectedProjectId);
23306
23464
  setView("list");
@@ -23312,7 +23470,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23312
23470
  setTasks([]);
23313
23471
  }
23314
23472
  }, [selectedProjectId, showArchived]);
23315
- (0, import_react23.useEffect)(() => {
23473
+ (0, import_react24.useEffect)(() => {
23316
23474
  if (selectedTaskId !== null) {
23317
23475
  fetchTaskMessages(selectedTaskId);
23318
23476
  startThreadPolling(selectedTaskId);
@@ -23485,7 +23643,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23485
23643
  const cancelPendingAction = () => {
23486
23644
  setPendingConfirm(null);
23487
23645
  };
23488
- (0, import_react23.useEffect)(() => {
23646
+ (0, import_react24.useEffect)(() => {
23489
23647
  if (!pendingConfirm) return;
23490
23648
  function handleKeyDown(event) {
23491
23649
  if (event.key === "Escape") {
@@ -23495,7 +23653,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23495
23653
  window.addEventListener("keydown", handleKeyDown);
23496
23654
  return () => window.removeEventListener("keydown", handleKeyDown);
23497
23655
  }, [pendingConfirm]);
23498
- (0, import_react23.useEffect)(() => {
23656
+ (0, import_react24.useEffect)(() => {
23499
23657
  if (!taskError) return;
23500
23658
  const t = setTimeout(() => setTaskError(null), 5e3);
23501
23659
  return () => clearTimeout(t);
@@ -23626,7 +23784,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23626
23784
  const selectedProject = projects.find((p) => p.id === selectedProjectId);
23627
23785
  const selectedTask = tasks.find((t) => t.id === selectedTaskId);
23628
23786
  const selectedProjectAgentName = agents.find((a2) => a2.id === selectedProject?.agentId)?.name || "Default Agent";
23629
- const taskAgentLabels = (0, import_react23.useMemo)(() => {
23787
+ const taskAgentLabels = (0, import_react24.useMemo)(() => {
23630
23788
  if (!selectedTask) return void 0;
23631
23789
  const agentLabelFor = (agentId) => {
23632
23790
  const a2 = agents.find((x) => x.id === agentId);
@@ -23672,14 +23830,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23672
23830
  const safePage = Math.min(page, totalPages - 1);
23673
23831
  const pageStart = safePage * PAGE_SIZE;
23674
23832
  const pageTasks = tasks.slice(pageStart, pageStart + PAGE_SIZE);
23675
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "app", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
23676
- /* @__PURE__ */ (0, import_jsx_runtime22.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_runtime22.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { children: [
23833
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
23834
+ /* @__PURE__ */ (0, import_jsx_runtime23.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_runtime23.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
23677
23835
  "No projects registered.",
23678
23836
  " ",
23679
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { className: "app__link-btn", onClick: onOpenSettings, children: "Create one in Settings" }),
23837
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "app__link-btn", onClick: onOpenSettings, children: "Create one in Settings" }),
23680
23838
  " ",
23681
23839
  "to get started."
23682
- ] }) }) : selectedProject ? view === "list" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
23840
+ ] }) }) : selectedProject ? view === "list" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
23683
23841
  TaskListView,
23684
23842
  {
23685
23843
  projects,
@@ -23704,7 +23862,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23704
23862
  onArchive: handleArchiveFromList,
23705
23863
  statusColor
23706
23864
  }
23707
- ) : view === "log" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
23865
+ ) : view === "log" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
23708
23866
  TaskLogView,
23709
23867
  {
23710
23868
  task: selectedTask,
@@ -23720,7 +23878,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23720
23878
  onToggleStatus: handleToggleTaskStatus,
23721
23879
  statusColor
23722
23880
  }
23723
- ) : view === "edit" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
23881
+ ) : view === "edit" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
23724
23882
  TaskEditView,
23725
23883
  {
23726
23884
  task: selectedTask,
@@ -23738,11 +23896,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23738
23896
  onOpenLog: () => setView("log"),
23739
23897
  statusColor
23740
23898
  }
23741
- ) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "app__empty-state", children: [
23742
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { children: "Task not found. Go back to the list." }),
23743
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { className: "settings-panel__back-btn", onClick: backToList, style: { marginTop: "12px" }, children: "\u2190 Back to list" })
23899
+ ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__empty-state", children: [
23900
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "Task not found. Go back to the list." }),
23901
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "settings-panel__back-btn", onClick: backToList, style: { marginTop: "12px" }, children: "\u2190 Back to list" })
23744
23902
  ] }) : null }),
23745
- isNewTaskOpen && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
23903
+ isNewTaskOpen && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
23746
23904
  "div",
23747
23905
  {
23748
23906
  style: {
@@ -23757,7 +23915,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23757
23915
  justifyContent: "center",
23758
23916
  zIndex: 999
23759
23917
  },
23760
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
23918
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
23761
23919
  "form",
23762
23920
  {
23763
23921
  onSubmit: handleCreateTask,
@@ -23768,14 +23926,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23768
23926
  background: "var(--vscode-sideBar-background)"
23769
23927
  },
23770
23928
  children: [
23771
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "confirm__header", children: [
23772
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: { fontSize: "18px", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Wrench, { size: 18 }) }),
23773
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "confirm__prompt", style: { fontSize: "14px" }, children: "Create New Task" })
23929
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "confirm__header", children: [
23930
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { fontSize: "18px", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Wrench, { size: 18 }) }),
23931
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "confirm__prompt", style: { fontSize: "14px" }, children: "Create New Task" })
23774
23932
  ] }),
23775
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: [
23776
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
23933
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: [
23934
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
23777
23935
  "Task Title",
23778
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
23936
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
23779
23937
  "input",
23780
23938
  {
23781
23939
  type: "text",
@@ -23795,9 +23953,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23795
23953
  }
23796
23954
  )
23797
23955
  ] }),
23798
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
23956
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
23799
23957
  "Objective (Extended markdown goal description)",
23800
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
23958
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
23801
23959
  "textarea",
23802
23960
  {
23803
23961
  required: true,
@@ -23818,9 +23976,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23818
23976
  }
23819
23977
  )
23820
23978
  ] }),
23821
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
23979
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
23822
23980
  "Checklist Items (One item per line)",
23823
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
23981
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
23824
23982
  "textarea",
23825
23983
  {
23826
23984
  placeholder: "Create route handler\nWrite unit tests\nUpdate documentation",
@@ -23840,9 +23998,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23840
23998
  }
23841
23999
  )
23842
24000
  ] }),
23843
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
24001
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
23844
24002
  "Assigned Agent (optional \u2014 overrides project default)",
23845
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24003
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
23846
24004
  "select",
23847
24005
  {
23848
24006
  value: newTask.agentId,
@@ -23857,8 +24015,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23857
24015
  outline: "none"
23858
24016
  },
23859
24017
  children: [
23860
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", children: "Project default" }),
23861
- agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("option", { value: a2.id, children: [
24018
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", children: "Project default" }),
24019
+ agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("option", { value: a2.id, children: [
23862
24020
  a2.name,
23863
24021
  " (",
23864
24022
  a2.provider,
@@ -23868,9 +24026,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23868
24026
  }
23869
24027
  )
23870
24028
  ] }),
23871
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
24029
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
23872
24030
  "Planner Agent Override (optional)",
23873
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24031
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
23874
24032
  "select",
23875
24033
  {
23876
24034
  value: newTask.plannerAgentId,
@@ -23885,8 +24043,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23885
24043
  outline: "none"
23886
24044
  },
23887
24045
  children: [
23888
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", children: "Project default" }),
23889
- agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("option", { value: a2.id, children: [
24046
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", children: "Project default" }),
24047
+ agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("option", { value: a2.id, children: [
23890
24048
  a2.name,
23891
24049
  " (",
23892
24050
  a2.provider,
@@ -23896,9 +24054,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23896
24054
  }
23897
24055
  )
23898
24056
  ] }),
23899
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
24057
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
23900
24058
  "Reviewer Agent Override (optional)",
23901
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24059
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
23902
24060
  "select",
23903
24061
  {
23904
24062
  value: newTask.reviewerAgentId,
@@ -23913,8 +24071,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23913
24071
  outline: "none"
23914
24072
  },
23915
24073
  children: [
23916
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", children: "Project default" }),
23917
- agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("option", { value: a2.id, children: [
24074
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", children: "Project default" }),
24075
+ agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("option", { value: a2.id, children: [
23918
24076
  a2.name,
23919
24077
  " (",
23920
24078
  a2.provider,
@@ -23924,8 +24082,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23924
24082
  }
23925
24083
  )
23926
24084
  ] }),
23927
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { style: { fontSize: "12px", display: "flex", alignItems: "center", gap: "6px", cursor: "pointer", marginTop: "4px" }, children: [
23928
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24085
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { style: { fontSize: "12px", display: "flex", alignItems: "center", gap: "6px", cursor: "pointer", marginTop: "4px" }, children: [
24086
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
23929
24087
  "input",
23930
24088
  {
23931
24089
  type: "checkbox",
@@ -23934,24 +24092,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23934
24092
  style: { cursor: "pointer" }
23935
24093
  }
23936
24094
  ),
23937
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "Start active immediately (Heartbeat loop claims it)" })
24095
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "Start active immediately (Heartbeat loop claims it)" })
23938
24096
  ] })
23939
24097
  ] }),
23940
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "confirm__buttons", style: { justifyContent: "flex-end", marginTop: "10px" }, children: [
23941
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { type: "button", className: "confirm__btn", onClick: () => setIsNewTaskOpen(false), children: "Cancel" }),
23942
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { type: "submit", className: "confirm__btn confirm__btn--primary", children: "Create Task" })
24098
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "confirm__buttons", style: { justifyContent: "flex-end", marginTop: "10px" }, children: [
24099
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { type: "button", className: "confirm__btn", onClick: () => setIsNewTaskOpen(false), children: "Cancel" }),
24100
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { type: "submit", className: "confirm__btn confirm__btn--primary", children: "Create Task" })
23943
24101
  ] })
23944
24102
  ]
23945
24103
  }
23946
24104
  )
23947
24105
  }
23948
24106
  ),
23949
- pendingConfirm && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "app__confirm-overlay", onClick: cancelPendingAction, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
23950
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "app__confirm-title", children: pendingConfirm.type === "delete" ? "Delete task" : pendingConfirm.type === "archive" ? "Archive task" : "Discard worktree" }),
23951
- /* @__PURE__ */ (0, import_jsx_runtime22.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.` }),
23952
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "app__confirm-buttons", children: [
23953
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { className: "app__confirm-btn", onClick: cancelPendingAction, children: "Cancel" }),
23954
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24107
+ pendingConfirm && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__confirm-overlay", onClick: cancelPendingAction, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
24108
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__confirm-title", children: pendingConfirm.type === "delete" ? "Delete task" : pendingConfirm.type === "archive" ? "Archive task" : "Discard worktree" }),
24109
+ /* @__PURE__ */ (0, import_jsx_runtime23.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.` }),
24110
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__confirm-buttons", children: [
24111
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "app__confirm-btn", onClick: cancelPendingAction, children: "Cancel" }),
24112
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
23955
24113
  "button",
23956
24114
  {
23957
24115
  className: `app__confirm-btn ${pendingConfirm.type === "delete" ? "app__confirm-btn--danger" : ""}`,
@@ -23961,7 +24119,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23961
24119
  )
23962
24120
  ] })
23963
24121
  ] }) }),
23964
- taskError && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "app__error-banner", onClick: () => setTaskError(null), title: "Click to dismiss", children: taskError })
24122
+ taskError && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__error-banner", onClick: () => setTaskError(null), title: "Click to dismiss", children: taskError })
23965
24123
  ] });
23966
24124
  }
23967
24125
  function TaskListView({
@@ -23984,10 +24142,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
23984
24142
  onArchive,
23985
24143
  statusColor
23986
24144
  }) {
23987
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
23988
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "task-view__header", children: [
23989
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
23990
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24145
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
24146
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "task-view__header", children: [
24147
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
24148
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
23991
24149
  "select",
23992
24150
  {
23993
24151
  className: "task-view__project-filter",
@@ -24004,17 +24162,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24004
24162
  outline: "none",
24005
24163
  cursor: "pointer"
24006
24164
  },
24007
- children: projects.map((p) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: p.id, children: p.name }, p.id))
24165
+ children: projects.map((p) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: p.id, children: p.name }, p.id))
24008
24166
  }
24009
24167
  ),
24010
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: [
24168
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: [
24011
24169
  "Agent: ",
24012
24170
  agentName
24013
24171
  ] })
24014
24172
  ] }),
24015
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
24016
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "task-view__archived-toggle", children: [
24017
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24173
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
24174
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "task-view__archived-toggle", children: [
24175
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24018
24176
  "input",
24019
24177
  {
24020
24178
  type: "checkbox",
@@ -24025,42 +24183,42 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24025
24183
  ),
24026
24184
  "Show archived"
24027
24185
  ] }),
24028
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { className: "app__new-chat-btn", onClick: onNewTask, style: { padding: "4px 10px", fontSize: "11px" }, children: "+ New Task" })
24186
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "app__new-chat-btn", onClick: onNewTask, style: { padding: "4px 10px", fontSize: "11px" }, children: "+ New Task" })
24029
24187
  ] })
24030
24188
  ] }),
24031
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { flex: 1, overflowY: "auto", padding: "0 16px 16px" }, children: allTasksCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { children: [
24189
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { flex: 1, overflowY: "auto", padding: "0 16px 16px" }, children: allTasksCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
24032
24190
  "No tasks created for ",
24033
24191
  project.name,
24034
24192
  '. Click "+ New Task" to start.'
24035
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("table", { className: "task-table", children: [
24036
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("tr", { children: [
24037
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "task-table__th", style: { width: "60px" }, children: "#" }),
24038
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "task-table__th", children: "Title" }),
24039
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "task-table__th", style: { width: "90px" }, children: "Status" }),
24040
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "task-table__th", style: { width: "100px" }, children: "Agent" }),
24041
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "task-table__th", style: { width: "120px" }, children: "Checklist" }),
24042
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "task-table__th", style: { width: "180px" }, children: "Branch" }),
24043
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "task-table__th", style: { width: "150px" }, children: "Updated" }),
24044
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "task-table__th", style: { width: "70px" } })
24193
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("table", { className: "task-table", children: [
24194
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("tr", { children: [
24195
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("th", { className: "task-table__th", style: { width: "60px" }, children: "#" }),
24196
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("th", { className: "task-table__th", children: "Title" }),
24197
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("th", { className: "task-table__th", style: { width: "90px" }, children: "Status" }),
24198
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("th", { className: "task-table__th", style: { width: "100px" }, children: "Agent" }),
24199
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("th", { className: "task-table__th", style: { width: "120px" }, children: "Checklist" }),
24200
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("th", { className: "task-table__th", style: { width: "180px" }, children: "Branch" }),
24201
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("th", { className: "task-table__th", style: { width: "150px" }, children: "Updated" }),
24202
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("th", { className: "task-table__th", style: { width: "70px" } })
24045
24203
  ] }) }),
24046
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tbody", { children: tasks.map((task) => {
24204
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("tbody", { children: tasks.map((task) => {
24047
24205
  const completedCount = task.checklist.filter((c2) => c2.status === "done").length;
24048
24206
  const totalCount = task.checklist.length;
24049
24207
  const isArchived = !!task.archived;
24050
24208
  const updated = new Date(task.updatedAt);
24051
24209
  const updatedStr = isNaN(updated.getTime()) ? task.updatedAt : updated.toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
24052
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24210
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24053
24211
  "tr",
24054
24212
  {
24055
24213
  className: `task-table__row${isArchived ? " task-table__row--archived" : ""}`,
24056
24214
  onClick: () => onOpenLog(task),
24057
24215
  children: [
24058
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "task-table__td task-table__td--mono", children: task.id }),
24059
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "task-table__title", children: [
24060
- isArchived && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Archive, { size: 11 }),
24216
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "task-table__td task-table__td--mono", children: task.id }),
24217
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "task-table__title", children: [
24218
+ isArchived && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Archive, { size: 11 }),
24061
24219
  task.title
24062
24220
  ] }) }),
24063
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24221
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24064
24222
  "span",
24065
24223
  {
24066
24224
  className: "task-table__badge",
@@ -24068,28 +24226,28 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24068
24226
  children: task.status
24069
24227
  }
24070
24228
  ) }),
24071
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "task-table__td", style: { fontSize: "11px" }, children: task.agentId ? agents.find((a2) => a2.id === task.agentId)?.name || task.agentId : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: { opacity: 0.4 }, children: "default" }) }),
24072
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "task-table__td", children: totalCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "task-table__progress", children: [
24073
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "task-table__progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24229
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "task-table__td", style: { fontSize: "11px" }, children: task.agentId ? agents.find((a2) => a2.id === task.agentId)?.name || task.agentId : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { opacity: 0.4 }, children: "default" }) }),
24230
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "task-table__td", children: totalCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "task-table__progress", children: [
24231
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "task-table__progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24074
24232
  "span",
24075
24233
  {
24076
24234
  className: "task-table__progress-fill",
24077
24235
  style: { width: `${completedCount / totalCount * 100}%` }
24078
24236
  }
24079
24237
  ) }),
24080
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "task-table__progress-text", children: [
24238
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "task-table__progress-text", children: [
24081
24239
  completedCount,
24082
24240
  "/",
24083
24241
  totalCount
24084
24242
  ] })
24085
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
24086
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "task-table__td", children: task.branch ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "task-table__branch", children: [
24087
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(GitBranch, { size: 11 }),
24088
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("code", { children: task.branch })
24089
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
24090
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "task-table__td task-table__td--muted", children: updatedStr }),
24091
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "inline-flex", gap: "2px" }, children: [
24092
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24243
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
24244
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "task-table__td", children: task.branch ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "task-table__branch", children: [
24245
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GitBranch, { size: 11 }),
24246
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("code", { children: task.branch })
24247
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
24248
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "task-table__td task-table__td--muted", children: updatedStr }),
24249
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "inline-flex", gap: "2px" }, children: [
24250
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24093
24251
  "button",
24094
24252
  {
24095
24253
  className: "task-table__edit-btn",
@@ -24099,10 +24257,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24099
24257
  },
24100
24258
  title: task.archived ? "Unarchive task" : "Archive task",
24101
24259
  "aria-label": task.archived ? "Unarchive task" : "Archive task",
24102
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Archive, { size: 13 })
24260
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Archive, { size: 13 })
24103
24261
  }
24104
24262
  ),
24105
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24263
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24106
24264
  "button",
24107
24265
  {
24108
24266
  className: "task-table__edit-btn",
@@ -24112,7 +24270,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24112
24270
  },
24113
24271
  title: "Edit task",
24114
24272
  "aria-label": "Edit task",
24115
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Pencil, { size: 13 })
24273
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Pencil, { size: 13 })
24116
24274
  }
24117
24275
  )
24118
24276
  ] }) })
@@ -24122,8 +24280,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24122
24280
  );
24123
24281
  }) })
24124
24282
  ] }) }),
24125
- totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "task-table__pagination", children: [
24126
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24283
+ totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "task-table__pagination", children: [
24284
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24127
24285
  "button",
24128
24286
  {
24129
24287
  className: "task-table__page-btn",
@@ -24132,13 +24290,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24132
24290
  children: "\u2039 Prev"
24133
24291
  }
24134
24292
  ),
24135
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "task-table__page-info", children: [
24293
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "task-table__page-info", children: [
24136
24294
  "Page ",
24137
24295
  page + 1,
24138
24296
  " of ",
24139
24297
  totalPages
24140
24298
  ] }),
24141
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24299
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24142
24300
  "button",
24143
24301
  {
24144
24302
  className: "task-table__page-btn",
@@ -24166,31 +24324,31 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24166
24324
  }) {
24167
24325
  const completedCount = task.checklist.filter((c2) => c2.status === "done").length;
24168
24326
  const totalCount = task.checklist.length;
24169
- const chatItems = (0, import_react23.useMemo)(() => taskMessagesToChatItems(taskMessages, agentLabels), [taskMessages, agentLabels]);
24170
- const [openCycle, setOpenCycle] = (0, import_react23.useState)(null);
24171
- const [draft, setDraft] = (0, import_react23.useState)("");
24172
- const openCycleItem = (0, import_react23.useCallback)((item) => setOpenCycle(item), []);
24173
- const autoOpenedFor = (0, import_react23.useRef)(null);
24174
- (0, import_react23.useEffect)(() => {
24327
+ const chatItems = (0, import_react24.useMemo)(() => taskMessagesToChatItems(taskMessages, agentLabels), [taskMessages, agentLabels]);
24328
+ const [openCycle, setOpenCycle] = (0, import_react24.useState)(null);
24329
+ const [draft, setDraft] = (0, import_react24.useState)("");
24330
+ const openCycleItem = (0, import_react24.useCallback)((item) => setOpenCycle(item), []);
24331
+ const autoOpenedFor = (0, import_react24.useRef)(null);
24332
+ (0, import_react24.useEffect)(() => {
24175
24333
  if (autoOpenedFor.current === task.id || taskMessages.length === 0) return;
24176
24334
  autoOpenedFor.current = task.id;
24177
24335
  const latest = [...chatItems].reverse().find((i) => i.kind === "cycle");
24178
24336
  if (latest && latest.outcome === "running") setOpenCycle(latest);
24179
24337
  }, [task.id, taskMessages.length, chatItems]);
24180
24338
  const liveCycle = openCycle ? chatItems.find((i) => i.kind === "cycle" && i.sessionId === openCycle.sessionId) ?? openCycle : null;
24181
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
24182
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "12px 14px" }, children: [
24183
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
24184
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ArrowLeft, { size: 13 }) }),
24185
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "app__chat-header-info", children: [
24186
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
24339
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
24340
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "12px 14px" }, children: [
24341
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
24342
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowLeft, { size: 13 }) }),
24343
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__chat-header-info", children: [
24344
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
24187
24345
  "Task #",
24188
24346
  task.id,
24189
24347
  ": ",
24190
24348
  task.title
24191
24349
  ] }),
24192
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: [
24193
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24350
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: [
24351
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24194
24352
  "span",
24195
24353
  {
24196
24354
  className: `agent-status-dot agent-status-dot--active ${isActiveLike ? "agent-status-dot--pulsing" : ""}`,
@@ -24201,24 +24359,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24201
24359
  ] })
24202
24360
  ] })
24203
24361
  ] }),
24204
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
24205
- task.status !== "done" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24362
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
24363
+ task.status !== "done" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24206
24364
  "button",
24207
24365
  {
24208
24366
  className: "confirm__btn confirm__btn--primary",
24209
24367
  onClick: () => onToggleStatus(task),
24210
24368
  title: isActiveLike ? "Pause this task (aborts the running agent)" : "Activate this task",
24211
24369
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
24212
- children: isActiveLike ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
24213
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Pause, { size: 12 }),
24370
+ children: isActiveLike ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
24371
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Pause, { size: 12 }),
24214
24372
  " Pause"
24215
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
24216
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Play, { size: 12 }),
24373
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
24374
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Play, { size: 12 }),
24217
24375
  " Activate"
24218
24376
  ] })
24219
24377
  }
24220
24378
  ),
24221
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24379
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24222
24380
  "span",
24223
24381
  {
24224
24382
  className: "task-table__badge",
@@ -24228,8 +24386,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24228
24386
  )
24229
24387
  ] })
24230
24388
  ] }),
24231
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "row" }, children: [
24232
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24389
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "row" }, children: [
24390
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24233
24391
  "aside",
24234
24392
  {
24235
24393
  style: {
@@ -24242,19 +24400,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24242
24400
  background: "var(--vscode-sideBar-background, rgba(0,0,0,0.1))"
24243
24401
  },
24244
24402
  children: [
24245
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { padding: "10px 12px", borderBottom: "1px solid var(--vscode-panel-border, rgba(255,255,255,0.05))" }, children: [
24246
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h4", { style: { margin: 0, fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
24247
- totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { fontSize: "10px", opacity: 0.5, marginTop: "2px" }, children: [
24403
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { padding: "10px 12px", borderBottom: "1px solid var(--vscode-panel-border, rgba(255,255,255,0.05))" }, children: [
24404
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h4", { style: { margin: 0, fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
24405
+ totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { fontSize: "10px", opacity: 0.5, marginTop: "2px" }, children: [
24248
24406
  completedCount,
24249
24407
  "/",
24250
24408
  totalCount,
24251
24409
  " done"
24252
24410
  ] })
24253
24411
  ] }),
24254
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { padding: "8px 10px", display: "flex", flexDirection: "column", gap: "4px" }, children: totalCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: { fontSize: "11px", opacity: 0.4, padding: "8px 4px" }, children: "No checklist items." }) : (task.checklist || []).map((item) => {
24412
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { padding: "8px 10px", display: "flex", flexDirection: "column", gap: "4px" }, children: totalCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { fontSize: "11px", opacity: 0.4, padding: "8px 4px" }, children: "No checklist items." }) : (task.checklist || []).map((item) => {
24255
24413
  const isDone = item.status === "done";
24256
24414
  const isInProgress = item.status === "in_progress";
24257
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24415
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24258
24416
  "label",
24259
24417
  {
24260
24418
  style: {
@@ -24271,7 +24429,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24271
24429
  },
24272
24430
  title: isInProgress ? "In progress" : isDone ? "Done" : "Pending",
24273
24431
  children: [
24274
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24432
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24275
24433
  "input",
24276
24434
  {
24277
24435
  type: "checkbox",
@@ -24280,7 +24438,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24280
24438
  style: { marginTop: "2px", cursor: "pointer", flexShrink: 0 }
24281
24439
  }
24282
24440
  ),
24283
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: { wordBreak: "break-word" }, children: item.text })
24441
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { wordBreak: "break-word" }, children: item.text })
24284
24442
  ]
24285
24443
  },
24286
24444
  item.id
@@ -24289,8 +24447,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24289
24447
  ]
24290
24448
  }
24291
24449
  ),
24292
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
24293
- liveCycle ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24450
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
24451
+ liveCycle ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24294
24452
  TaskCycleView,
24295
24453
  {
24296
24454
  item: liveCycle,
@@ -24298,8 +24456,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24298
24456
  onBack: () => setOpenCycle(null)
24299
24457
  },
24300
24458
  liveCycle.sessionId
24301
- ) : taskMessages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "messages messages--empty", children: "No messages in this execution yet. Agent will start on next tick." }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MessageList, { items: chatItems, sessionId: null, compact: true, onOpenCycle: openCycleItem }),
24302
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24459
+ ) : taskMessages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "messages messages--empty", children: "No messages in this execution yet. Agent will start on next tick." }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MessageList, { items: chatItems, sessionId: null, compact: true, onOpenCycle: openCycleItem }),
24460
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24303
24461
  Composer,
24304
24462
  {
24305
24463
  disabled: isSending,
@@ -24336,12 +24494,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24336
24494
  statusColor
24337
24495
  }) {
24338
24496
  const isRunning = task.status === "active" || task.status === "reviewing" || task.status === "planning";
24339
- const [draftTitle, setDraftTitle] = (0, import_react23.useState)(task.title);
24340
- const [draftObjective, setDraftObjective] = (0, import_react23.useState)(task.objective);
24341
- const [lastTaskId, setLastTaskId] = (0, import_react23.useState)(task.id);
24497
+ const [draftTitle, setDraftTitle] = (0, import_react24.useState)(task.title);
24498
+ const [draftObjective, setDraftObjective] = (0, import_react24.useState)(task.objective);
24499
+ const [lastTaskId, setLastTaskId] = (0, import_react24.useState)(task.id);
24342
24500
  const trimmedTitle = draftTitle.trim();
24343
24501
  const isDirty = trimmedTitle !== task.title.trim() || draftObjective.trim() !== task.objective.trim();
24344
- (0, import_react23.useEffect)(() => {
24502
+ (0, import_react24.useEffect)(() => {
24345
24503
  if (task.id !== lastTaskId) {
24346
24504
  setDraftTitle(task.title);
24347
24505
  setDraftObjective(task.objective);
@@ -24356,16 +24514,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24356
24514
  setDraftTitle(task.title);
24357
24515
  setDraftObjective(task.objective);
24358
24516
  };
24359
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%", overflowY: "auto" }, children: [
24360
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "task-view__sub-header", style: { padding: "12px 14px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
24361
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
24362
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ArrowLeft, { size: 13 }) }),
24363
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("h3", { style: { margin: 0, fontSize: "15px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
24364
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { style: { opacity: 0.6 }, children: [
24517
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%", overflowY: "auto" }, children: [
24518
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "task-view__sub-header", style: { padding: "12px 14px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
24519
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
24520
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowLeft, { size: 13 }) }),
24521
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("h3", { style: { margin: 0, fontSize: "15px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
24522
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { style: { opacity: 0.6 }, children: [
24365
24523
  "Task #",
24366
24524
  task.id
24367
24525
  ] }),
24368
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24526
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24369
24527
  "input",
24370
24528
  {
24371
24529
  value: draftTitle,
@@ -24386,7 +24544,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24386
24544
  }
24387
24545
  )
24388
24546
  ] }),
24389
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24547
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24390
24548
  "span",
24391
24549
  {
24392
24550
  className: "task-table__badge",
@@ -24395,8 +24553,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24395
24553
  }
24396
24554
  )
24397
24555
  ] }),
24398
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "inline-flex", gap: "6px" }, children: [
24399
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24556
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "inline-flex", gap: "6px" }, children: [
24557
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24400
24558
  "button",
24401
24559
  {
24402
24560
  className: "confirm__btn",
@@ -24406,7 +24564,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24406
24564
  children: "View Log"
24407
24565
  }
24408
24566
  ),
24409
- task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24567
+ task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24410
24568
  "button",
24411
24569
  {
24412
24570
  className: "confirm__btn",
@@ -24414,12 +24572,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24414
24572
  title: `Commit pending changes to ${task.branch} and remove the worktree`,
24415
24573
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
24416
24574
  children: [
24417
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(GitBranch, { size: 12 }),
24575
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GitBranch, { size: 12 }),
24418
24576
  " Discard worktree"
24419
24577
  ]
24420
24578
  }
24421
24579
  ),
24422
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24580
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24423
24581
  "button",
24424
24582
  {
24425
24583
  className: "confirm__btn",
@@ -24427,28 +24585,28 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24427
24585
  title: task.archived ? "Unarchive this task" : "Archive this task (hides it from the list, excludes from scheduler)",
24428
24586
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
24429
24587
  children: [
24430
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Archive, { size: 12 }),
24588
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Archive, { size: 12 }),
24431
24589
  " ",
24432
24590
  task.archived ? "Unarchive" : "Archive"
24433
24591
  ]
24434
24592
  }
24435
24593
  ),
24436
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24594
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24437
24595
  "button",
24438
24596
  {
24439
24597
  className: "confirm__btn confirm__btn--primary",
24440
24598
  onClick: () => onToggleStatus(task),
24441
24599
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
24442
- children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
24443
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Pause, { size: 12 }),
24600
+ children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
24601
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Pause, { size: 12 }),
24444
24602
  " Pause"
24445
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
24446
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Play, { size: 12 }),
24603
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
24604
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Play, { size: 12 }),
24447
24605
  " Activate"
24448
24606
  ] })
24449
24607
  }
24450
24608
  ),
24451
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24609
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24452
24610
  "button",
24453
24611
  {
24454
24612
  className: "confirm__btn",
@@ -24456,22 +24614,22 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24456
24614
  title: "Permanently delete this task and all its messages",
24457
24615
  style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px", color: "#ef4444" },
24458
24616
  children: [
24459
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Trash, { size: 12 }),
24617
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Trash, { size: 12 }),
24460
24618
  " Delete"
24461
24619
  ]
24462
24620
  }
24463
24621
  )
24464
24622
  ] })
24465
24623
  ] }),
24466
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { padding: "16px", maxWidth: "720px" }, children: [
24467
- task.branch && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "6px", fontSize: "11px", opacity: 0.75 }, children: [
24468
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(GitBranch, { size: 12 }),
24469
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("code", { style: { fontFamily: "monospace" }, children: task.branch }),
24470
- !task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: { opacity: 0.6 }, children: "(worktree removed)" })
24624
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { padding: "16px", maxWidth: "720px" }, children: [
24625
+ task.branch && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "6px", fontSize: "11px", opacity: 0.75 }, children: [
24626
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GitBranch, { size: 12 }),
24627
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("code", { style: { fontFamily: "monospace" }, children: task.branch }),
24628
+ !task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { opacity: 0.6 }, children: "(worktree removed)" })
24471
24629
  ] }),
24472
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { marginBottom: "16px" }, children: [
24473
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Objective" }),
24474
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24630
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { marginBottom: "16px" }, children: [
24631
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Objective" }),
24632
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24475
24633
  "textarea",
24476
24634
  {
24477
24635
  value: draftObjective,
@@ -24495,8 +24653,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24495
24653
  }
24496
24654
  }
24497
24655
  ),
24498
- isDirty && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center", marginTop: "8px" }, children: [
24499
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24656
+ isDirty && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center", marginTop: "8px" }, children: [
24657
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24500
24658
  "button",
24501
24659
  {
24502
24660
  className: "confirm__btn confirm__btn--primary",
@@ -24509,13 +24667,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24509
24667
  children: "Save"
24510
24668
  }
24511
24669
  ),
24512
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { className: "confirm__btn", onClick: resetDraft, style: { padding: "3px 10px", fontSize: "10px" }, children: "Cancel" }),
24513
- isRunning && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: "Applies from the next cycle." })
24670
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "confirm__btn", onClick: resetDraft, style: { padding: "3px 10px", fontSize: "10px" }, children: "Cancel" }),
24671
+ isRunning && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: "Applies from the next cycle." })
24514
24672
  ] })
24515
24673
  ] }),
24516
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { marginBottom: "16px" }, children: [
24517
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Assigned Agent" }),
24518
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24674
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { marginBottom: "16px" }, children: [
24675
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Assigned Agent" }),
24676
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24519
24677
  "select",
24520
24678
  {
24521
24679
  value: task.agentId || "",
@@ -24535,8 +24693,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24535
24693
  },
24536
24694
  title: isRunning ? "Pause the task before changing its agent" : "Choose which agent runs this task",
24537
24695
  children: [
24538
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", children: "Project default" }),
24539
- agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("option", { value: a2.id, children: [
24696
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", children: "Project default" }),
24697
+ agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("option", { value: a2.id, children: [
24540
24698
  a2.name,
24541
24699
  " (",
24542
24700
  a2.provider,
@@ -24546,9 +24704,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24546
24704
  }
24547
24705
  )
24548
24706
  ] }),
24549
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { marginBottom: "16px" }, children: [
24550
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Planner Agent" }),
24551
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24707
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { marginBottom: "16px" }, children: [
24708
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Planner Agent" }),
24709
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24552
24710
  "select",
24553
24711
  {
24554
24712
  value: task.plannerAgentId || "",
@@ -24557,8 +24715,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24557
24715
  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 },
24558
24716
  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.",
24559
24717
  children: [
24560
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", children: "Project default" }),
24561
- agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("option", { value: a2.id, children: [
24718
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", children: "Project default" }),
24719
+ agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("option", { value: a2.id, children: [
24562
24720
  a2.name,
24563
24721
  " (",
24564
24722
  a2.provider,
@@ -24568,9 +24726,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24568
24726
  }
24569
24727
  )
24570
24728
  ] }),
24571
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { marginBottom: "16px" }, children: [
24572
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Reviewer Agent" }),
24573
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24729
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { marginBottom: "16px" }, children: [
24730
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Reviewer Agent" }),
24731
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24574
24732
  "select",
24575
24733
  {
24576
24734
  value: task.reviewerAgentId || "",
@@ -24579,8 +24737,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24579
24737
  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 },
24580
24738
  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.",
24581
24739
  children: [
24582
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", children: "Project default" }),
24583
- agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("option", { value: a2.id, children: [
24740
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", children: "Project default" }),
24741
+ agents.map((a2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("option", { value: a2.id, children: [
24584
24742
  a2.name,
24585
24743
  " (",
24586
24744
  a2.provider,
@@ -24590,31 +24748,31 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24590
24748
  }
24591
24749
  )
24592
24750
  ] }),
24593
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { marginBottom: "16px" }, children: [
24594
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Phases" }),
24595
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { display: "flex", gap: "12px" }, children: [
24751
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { marginBottom: "16px" }, children: [
24752
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Phases" }),
24753
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { display: "flex", gap: "12px" }, children: [
24596
24754
  { flag: "planningEnabled", label: "Planning phase", value: task.planningEnabled },
24597
24755
  { flag: "reviewEnabled", label: "Review at DONE", value: task.reviewEnabled },
24598
24756
  { flag: "sddEnabled", label: "SDD mode (.md specs)", value: task.sddEnabled }
24599
- ].map(({ flag, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", flex: 1 }, children: [
24757
+ ].map(({ flag, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", flex: 1 }, children: [
24600
24758
  label,
24601
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24759
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24602
24760
  "select",
24603
24761
  {
24604
24762
  value: value === true ? "on" : value === false ? "off" : "inherit",
24605
24763
  onChange: (e) => onSetFlag(task, flag, e.target.value === "inherit" ? null : e.target.value === "on"),
24606
24764
  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" },
24607
24765
  children: [
24608
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "inherit", children: "Project default" }),
24609
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "on", children: "On" }),
24610
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "off", children: "Off" })
24766
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "inherit", children: "Project default" }),
24767
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "on", children: "On" }),
24768
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "off", children: "Off" })
24611
24769
  ]
24612
24770
  }
24613
24771
  )
24614
24772
  ] }, flag)) }),
24615
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", marginTop: "12px", maxWidth: "260px" }, children: [
24773
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", marginTop: "12px", maxWidth: "260px" }, children: [
24616
24774
  "Max run seconds per cycle",
24617
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24775
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24618
24776
  "input",
24619
24777
  {
24620
24778
  type: "number",
@@ -24637,7 +24795,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24637
24795
  )
24638
24796
  ] })
24639
24797
  ] }),
24640
- task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24798
+ task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24641
24799
  "div",
24642
24800
  {
24643
24801
  style: {
@@ -24650,19 +24808,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24650
24808
  fontSize: "12px"
24651
24809
  },
24652
24810
  children: [
24653
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("strong", { children: [
24654
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TriangleAlert, { size: 13 }),
24811
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("strong", { children: [
24812
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TriangleAlert, { size: 13 }),
24655
24813
  " Blocked Reason:"
24656
24814
  ] }),
24657
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { style: { margin: "4px 0 0 0" }, children: task.blockedReason })
24815
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { style: { margin: "4px 0 0 0" }, children: task.blockedReason })
24658
24816
  ]
24659
24817
  }
24660
24818
  ),
24661
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
24662
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h4", { style: { margin: "0 0 8px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
24663
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: (task.checklist || []).map((item) => {
24819
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
24820
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h4", { style: { margin: "0 0 8px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
24821
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: (task.checklist || []).map((item) => {
24664
24822
  const isDone = item.status === "done";
24665
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
24823
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24666
24824
  "label",
24667
24825
  {
24668
24826
  style: {
@@ -24679,7 +24837,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24679
24837
  opacity: isDone ? 0.6 : 1
24680
24838
  },
24681
24839
  children: [
24682
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24840
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
24683
24841
  "input",
24684
24842
  {
24685
24843
  type: "checkbox",
@@ -24688,7 +24846,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24688
24846
  style: { marginTop: "2px", cursor: "pointer" }
24689
24847
  }
24690
24848
  ),
24691
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: item.text })
24849
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: item.text })
24692
24850
  ]
24693
24851
  },
24694
24852
  item.id
@@ -24700,7 +24858,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24700
24858
  }
24701
24859
 
24702
24860
  // src/useVoice.ts
24703
- var import_react24 = __toESM(require_react(), 1);
24861
+ var import_react25 = __toESM(require_react(), 1);
24704
24862
 
24705
24863
  // src/pcm_wav.ts
24706
24864
  function encodeWavPcm16(samples, rate) {
@@ -24769,41 +24927,41 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24769
24927
  const { voice, chatStatus, pendingConfirmCount, items, onTranscript } = opts;
24770
24928
  const available = !!voice && voice.enabled && voice.configured && canCapture();
24771
24929
  const canSpeak = !!voice?.canSpeak;
24772
- const [phase, setPhase] = (0, import_react24.useState)("idle");
24773
- const [mode, setMode] = (0, import_react24.useState)("dictate");
24774
- const [error, setError] = (0, import_react24.useState)(null);
24775
- const voiceRef = (0, import_react24.useRef)(voice);
24930
+ const [phase, setPhase] = (0, import_react25.useState)("idle");
24931
+ const [mode, setMode] = (0, import_react25.useState)("dictate");
24932
+ const [error, setError] = (0, import_react25.useState)(null);
24933
+ const voiceRef = (0, import_react25.useRef)(voice);
24776
24934
  voiceRef.current = voice;
24777
- const bufferMsRef = (0, import_react24.useRef)(voice?.playbackBufferMs);
24935
+ const bufferMsRef = (0, import_react25.useRef)(voice?.playbackBufferMs);
24778
24936
  bufferMsRef.current = voice?.playbackBufferMs;
24779
- const phaseRef = (0, import_react24.useRef)(phase);
24937
+ const phaseRef = (0, import_react25.useRef)(phase);
24780
24938
  phaseRef.current = phase;
24781
- const modeRef = (0, import_react24.useRef)(mode);
24939
+ const modeRef = (0, import_react25.useRef)(mode);
24782
24940
  modeRef.current = mode;
24783
- const onTranscriptRef = (0, import_react24.useRef)(onTranscript);
24941
+ const onTranscriptRef = (0, import_react25.useRef)(onTranscript);
24784
24942
  onTranscriptRef.current = onTranscript;
24785
- const itemsRef = (0, import_react24.useRef)(items);
24943
+ const itemsRef = (0, import_react25.useRef)(items);
24786
24944
  itemsRef.current = items;
24787
- const chatStatusRef = (0, import_react24.useRef)(chatStatus);
24945
+ const chatStatusRef = (0, import_react25.useRef)(chatStatus);
24788
24946
  chatStatusRef.current = chatStatus;
24789
- const streamRef = (0, import_react24.useRef)(null);
24790
- const recorderRef = (0, import_react24.useRef)(null);
24791
- const chunksRef = (0, import_react24.useRef)([]);
24792
- const vadRef = (0, import_react24.useRef)(null);
24793
- const speechAbortRef = (0, import_react24.useRef)(null);
24794
- const idleTimerRef = (0, import_react24.useRef)(null);
24795
- const heardSpeechRef = (0, import_react24.useRef)(false);
24796
- const sawStreamingRef = (0, import_react24.useRef)(false);
24797
- const cursorRef = (0, import_react24.useRef)(0);
24798
- const queueRef = (0, import_react24.useRef)([]);
24799
- const apply = (0, import_react24.useCallback)((event) => {
24947
+ const streamRef = (0, import_react25.useRef)(null);
24948
+ const recorderRef = (0, import_react25.useRef)(null);
24949
+ const chunksRef = (0, import_react25.useRef)([]);
24950
+ const vadRef = (0, import_react25.useRef)(null);
24951
+ const speechAbortRef = (0, import_react25.useRef)(null);
24952
+ const idleTimerRef = (0, import_react25.useRef)(null);
24953
+ const heardSpeechRef = (0, import_react25.useRef)(false);
24954
+ const sawStreamingRef = (0, import_react25.useRef)(false);
24955
+ const cursorRef = (0, import_react25.useRef)(0);
24956
+ const queueRef = (0, import_react25.useRef)([]);
24957
+ const apply = (0, import_react25.useCallback)((event) => {
24800
24958
  setPhase((current) => nextPhase(current, event));
24801
24959
  }, []);
24802
24960
  const clearIdleTimer = () => {
24803
24961
  if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
24804
24962
  idleTimerRef.current = null;
24805
24963
  };
24806
- const teardownCapture = (0, import_react24.useCallback)(() => {
24964
+ const teardownCapture = (0, import_react25.useCallback)(() => {
24807
24965
  clearIdleTimer();
24808
24966
  try {
24809
24967
  vadRef.current?.destroy();
@@ -24820,11 +24978,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24820
24978
  chunksRef.current = [];
24821
24979
  heardSpeechRef.current = false;
24822
24980
  }, []);
24823
- const stopPlayback = (0, import_react24.useCallback)(() => {
24981
+ const stopPlayback = (0, import_react25.useCallback)(() => {
24824
24982
  speechAbortRef.current?.abort();
24825
24983
  speechAbortRef.current = null;
24826
24984
  }, []);
24827
- const fail = (0, import_react24.useCallback)(
24985
+ const fail = (0, import_react25.useCallback)(
24828
24986
  (message) => {
24829
24987
  teardownCapture();
24830
24988
  stopPlayback();
@@ -24833,7 +24991,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24833
24991
  },
24834
24992
  [apply, teardownCapture, stopPlayback]
24835
24993
  );
24836
- const finishRecording = (0, import_react24.useCallback)(() => {
24994
+ const finishRecording = (0, import_react25.useCallback)(() => {
24837
24995
  const recorder = recorderRef.current;
24838
24996
  if (!recorder || recorder.state === "inactive") return;
24839
24997
  recorder.onstop = async () => {
@@ -24863,7 +25021,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24863
25021
  };
24864
25022
  recorder.stop();
24865
25023
  }, [apply, fail, teardownCapture]);
24866
- const startRecording = (0, import_react24.useCallback)(async () => {
25024
+ const startRecording = (0, import_react25.useCallback)(async () => {
24867
25025
  setError(null);
24868
25026
  chunksRef.current = [];
24869
25027
  heardSpeechRef.current = false;
@@ -24908,7 +25066,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24908
25066
  fail(`Microphone unavailable: ${err}`);
24909
25067
  }
24910
25068
  }, [apply, fail, finishRecording, teardownCapture]);
24911
- const speakReply = (0, import_react24.useCallback)(async () => {
25069
+ const speakReply = (0, import_react25.useCallback)(async () => {
24912
25070
  const text = queueRef.current.shift();
24913
25071
  if (!text) {
24914
25072
  apply({
@@ -24947,10 +25105,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24947
25105
  fail(`Synthesis failed: ${err}`);
24948
25106
  }
24949
25107
  }, [apply, fail]);
24950
- (0, import_react24.useEffect)(() => {
25108
+ (0, import_react25.useEffect)(() => {
24951
25109
  if (chatStatus === "streaming") sawStreamingRef.current = true;
24952
25110
  }, [chatStatus]);
24953
- (0, import_react24.useEffect)(() => {
25111
+ (0, import_react25.useEffect)(() => {
24954
25112
  if (modeRef.current !== "conversation") return;
24955
25113
  if (phaseRef.current === "idle") return;
24956
25114
  const { texts, cursor } = takeFinalizedBubbles(items, cursorRef.current);
@@ -24959,7 +25117,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24959
25117
  queueRef.current.push(...texts);
24960
25118
  apply({ kind: "speechQueued", mode: "conversation", canSpeak });
24961
25119
  }, [items, canSpeak, apply]);
24962
- (0, import_react24.useEffect)(() => {
25120
+ (0, import_react25.useEffect)(() => {
24963
25121
  if (phase !== "awaiting") return;
24964
25122
  if (chatStatus === "error") {
24965
25123
  apply({ kind: "failed", mode: "conversation" });
@@ -24981,8 +25139,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24981
25139
  pendingSpeech: queueRef.current.length
24982
25140
  });
24983
25141
  }, [phase, chatStatus, pendingConfirmCount, canSpeak, apply]);
24984
- const prevPhase = (0, import_react24.useRef)("idle");
24985
- (0, import_react24.useEffect)(() => {
25142
+ const prevPhase = (0, import_react25.useRef)("idle");
25143
+ (0, import_react25.useEffect)(() => {
24986
25144
  const from = prevPhase.current;
24987
25145
  prevPhase.current = phase;
24988
25146
  if (from === phase) return;
@@ -24994,14 +25152,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24994
25152
  queueRef.current = [];
24995
25153
  }
24996
25154
  }, [phase, startRecording, speakReply, teardownCapture, stopPlayback]);
24997
- (0, import_react24.useEffect)(
25155
+ (0, import_react25.useEffect)(
24998
25156
  () => () => {
24999
25157
  teardownCapture();
25000
25158
  stopPlayback();
25001
25159
  },
25002
25160
  [teardownCapture, stopPlayback]
25003
25161
  );
25004
- const toggle = (0, import_react24.useCallback)(() => {
25162
+ const toggle = (0, import_react25.useCallback)(() => {
25005
25163
  if (!available) return;
25006
25164
  const current = phaseRef.current;
25007
25165
  if (current === "idle") {
@@ -25015,7 +25173,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25015
25173
  }
25016
25174
  apply({ kind: "userStop", mode: modeRef.current });
25017
25175
  }, [available, apply, finishRecording]);
25018
- const changeMode = (0, import_react24.useCallback)(
25176
+ const changeMode = (0, import_react25.useCallback)(
25019
25177
  (next) => {
25020
25178
  apply({ kind: "userStop", mode: modeRef.current });
25021
25179
  setMode(next);
@@ -25026,7 +25184,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25026
25184
  }
25027
25185
 
25028
25186
  // src/App.tsx
25029
- var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
25187
+ var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
25030
25188
  function takeInjectedActivation() {
25031
25189
  const w2 = window;
25032
25190
  const id = typeof w2.__caretakerAssistant === "string" ? w2.__caretakerAssistant : null;
@@ -25034,36 +25192,36 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25034
25192
  return id;
25035
25193
  }
25036
25194
  function App({ postMessage, layout = "compact" }) {
25037
- const [chatState, dispatch] = (0, import_react25.useReducer)(chatReducer, initialChatState);
25038
- const [agents, setAgents] = (0, import_react25.useState)([]);
25039
- const [sessions, setSessions] = (0, import_react25.useState)([]);
25040
- const [selectedAgentId, setSelectedAgentId] = (0, import_react25.useState)(null);
25041
- const [selectedSessionId, setSelectedSessionId] = (0, import_react25.useState)(null);
25042
- const [showSessions, setShowSessions] = (0, import_react25.useState)(false);
25043
- const [showAllAgents, setShowAllAgents] = (0, import_react25.useState)(false);
25044
- const [pendingDelete, setPendingDelete] = (0, import_react25.useState)(null);
25045
- const [activeScreen, setActiveScreen] = (0, import_react25.useState)("chat");
25046
- const [settingsTab, setSettingsTab] = (0, import_react25.useState)();
25047
- const [settingsData, setSettingsData] = (0, import_react25.useState)(null);
25048
- const [modelsResult, setModelsResult] = (0, import_react25.useState)(null);
25049
- const [acpRegistry, setAcpRegistry] = (0, import_react25.useState)(null);
25050
- const [acpInstall, setAcpInstall] = (0, import_react25.useState)(null);
25051
- const [refreshingSourceId, setRefreshingSourceId] = (0, import_react25.useState)(null);
25052
- const [refreshOutcome, setRefreshOutcome] = (0, import_react25.useState)(null);
25053
- const [mcpAuthOutcome, setMcpAuthOutcome] = (0, import_react25.useState)(null);
25054
- const [taskRuns, setTaskRuns] = (0, import_react25.useState)({});
25055
- const [voiceConfig, setVoiceConfig] = (0, import_react25.useState)(null);
25056
- const [sttCatalogResult, setSttCatalogResult] = (0, import_react25.useState)(null);
25057
- const [ttsCatalogResult, setTtsCatalogResult] = (0, import_react25.useState)(null);
25058
- const [composerDraft, setComposerDraft] = (0, import_react25.useState)("");
25059
- const [activation, setActivation] = (0, import_react25.useState)(null);
25060
- const [confirmedAgentId, setConfirmedAgentId] = (0, import_react25.useState)(null);
25061
- const [pendingAssistantId, setPendingAssistantId] = (0, import_react25.useState)(() => takeInjectedActivation());
25062
- const [composerFocusToken, setComposerFocusToken] = (0, import_react25.useState)(0);
25063
- (0, import_react25.useEffect)(() => {
25195
+ const [chatState, dispatch] = (0, import_react26.useReducer)(chatReducer, initialChatState);
25196
+ const [agents, setAgents] = (0, import_react26.useState)([]);
25197
+ const [sessions, setSessions] = (0, import_react26.useState)([]);
25198
+ const [selectedAgentId, setSelectedAgentId] = (0, import_react26.useState)(null);
25199
+ const [selectedSessionId, setSelectedSessionId] = (0, import_react26.useState)(null);
25200
+ const [showSessions, setShowSessions] = (0, import_react26.useState)(false);
25201
+ const [showAllAgents, setShowAllAgents] = (0, import_react26.useState)(false);
25202
+ const [pendingDelete, setPendingDelete] = (0, import_react26.useState)(null);
25203
+ const [activeScreen, setActiveScreen] = (0, import_react26.useState)("chat");
25204
+ const [settingsTab, setSettingsTab] = (0, import_react26.useState)();
25205
+ const [settingsData, setSettingsData] = (0, import_react26.useState)(null);
25206
+ const [modelsResult, setModelsResult] = (0, import_react26.useState)(null);
25207
+ const [acpRegistry, setAcpRegistry] = (0, import_react26.useState)(null);
25208
+ const [acpInstall, setAcpInstall] = (0, import_react26.useState)(null);
25209
+ const [refreshingSourceId, setRefreshingSourceId] = (0, import_react26.useState)(null);
25210
+ const [refreshOutcome, setRefreshOutcome] = (0, import_react26.useState)(null);
25211
+ const [mcpAuthOutcome, setMcpAuthOutcome] = (0, import_react26.useState)(null);
25212
+ const [taskRuns, setTaskRuns] = (0, import_react26.useState)({});
25213
+ const [voiceConfig, setVoiceConfig] = (0, import_react26.useState)(null);
25214
+ const [sttCatalogResult, setSttCatalogResult] = (0, import_react26.useState)(null);
25215
+ const [ttsCatalogResult, setTtsCatalogResult] = (0, import_react26.useState)(null);
25216
+ const [composerDraft, setComposerDraft] = (0, import_react26.useState)("");
25217
+ const [activation, setActivation] = (0, import_react26.useState)(null);
25218
+ const [confirmedAgentId, setConfirmedAgentId] = (0, import_react26.useState)(null);
25219
+ const [pendingAssistantId, setPendingAssistantId] = (0, import_react26.useState)(() => takeInjectedActivation());
25220
+ const [composerFocusToken, setComposerFocusToken] = (0, import_react26.useState)(0);
25221
+ (0, import_react26.useEffect)(() => {
25064
25222
  postMessage({ type: "webviewReady" });
25065
25223
  }, []);
25066
- (0, import_react25.useEffect)(() => {
25224
+ (0, import_react26.useEffect)(() => {
25067
25225
  function handle(event) {
25068
25226
  const msg = event.data;
25069
25227
  if (!msg || typeof msg !== "object" || !("type" in msg)) return;
@@ -25195,15 +25353,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25195
25353
  if (voice2) msg.voice = true;
25196
25354
  postMessage(msg);
25197
25355
  };
25198
- const onConfirm = (0, import_react25.useCallback)((id, decision) => {
25356
+ const onConfirm = (0, import_react26.useCallback)((id, decision) => {
25199
25357
  dispatch({ kind: "permission-resolved", id });
25200
25358
  postMessage({ type: "permission_response", id, decision });
25201
25359
  }, [postMessage]);
25202
25360
  const onAbort = () => {
25203
25361
  postMessage({ type: "abort" });
25204
25362
  };
25205
- const confirmCards = (0, import_react25.useMemo)(
25206
- () => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ConfirmCard, { pending: p, onDecide: onConfirm }, p.id)),
25363
+ const confirmCards = (0, import_react26.useMemo)(
25364
+ () => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ConfirmCard, { pending: p, onDecide: onConfirm }, p.id)),
25207
25365
  [chatState.pendingConfirms, onConfirm]
25208
25366
  );
25209
25367
  const onSelectAgent = (agentId) => {
@@ -25243,7 +25401,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25243
25401
  const cancelDeleteSession = () => {
25244
25402
  setPendingDelete(null);
25245
25403
  };
25246
- (0, import_react25.useEffect)(() => {
25404
+ (0, import_react26.useEffect)(() => {
25247
25405
  if (!pendingDelete) return;
25248
25406
  function handleKeyDown(event) {
25249
25407
  if (event.key === "Escape") {
@@ -25258,7 +25416,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25258
25416
  setShowSessions(!showSessions);
25259
25417
  }
25260
25418
  };
25261
- (0, import_react25.useEffect)(() => {
25419
+ (0, import_react26.useEffect)(() => {
25262
25420
  function handleClickOutside(event) {
25263
25421
  const target = event.target;
25264
25422
  if (showSessions && !target.closest(".app__sessions-dropdown")) {
@@ -25268,7 +25426,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25268
25426
  document.addEventListener("mousedown", handleClickOutside);
25269
25427
  return () => document.removeEventListener("mousedown", handleClickOutside);
25270
25428
  }, [showSessions]);
25271
- (0, import_react25.useEffect)(() => {
25429
+ (0, import_react26.useEffect)(() => {
25272
25430
  if (!pendingAssistantId) return;
25273
25431
  const r = resolvePending(pendingAssistantId, confirmedAgentId, agents.map((a2) => a2.id), activation);
25274
25432
  setPendingAssistantId(r.pending);
@@ -25277,7 +25435,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25277
25435
  if (r.activation?.step === "awaiting-agent") onSelectAgent(r.activation.agentId);
25278
25436
  setActivation(r.activation);
25279
25437
  }, [pendingAssistantId, agents]);
25280
- (0, import_react25.useEffect)(() => {
25438
+ (0, import_react26.useEffect)(() => {
25281
25439
  if (activation?.step !== "open") return;
25282
25440
  const adopt = localSelectionFor(activation, selectedAgentId);
25283
25441
  if (adopt) {
@@ -25293,7 +25451,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25293
25451
  setActivation(null);
25294
25452
  }
25295
25453
  }, [activation]);
25296
- (0, import_react25.useEffect)(() => {
25454
+ (0, import_react26.useEffect)(() => {
25297
25455
  if (activation?.step !== "mic") return;
25298
25456
  if (voice.mode !== "conversation" || voice.phase !== "idle") return;
25299
25457
  voice.toggle();
@@ -25312,30 +25470,30 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25312
25470
  { id: "projects", label: "Projects", Icon: FolderKanban },
25313
25471
  { id: "settings", label: "Settings", Icon: Settings }
25314
25472
  ];
25315
- const navRail = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("nav", { className: "app__nav", children: [
25316
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo app__nav-logo" }),
25317
- navItems.map(({ id, label, Icon: Icon2 }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
25473
+ const navRail = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("nav", { className: "app__nav", children: [
25474
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo app__nav-logo" }),
25475
+ navItems.map(({ id, label, Icon: Icon2 }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
25318
25476
  "button",
25319
25477
  {
25320
25478
  className: `app__nav-btn ${activeScreen === id ? "app__nav-btn--active" : ""}`,
25321
25479
  onClick: () => openScreen(id),
25322
25480
  title: label,
25323
25481
  children: [
25324
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon2, { size: 18 }),
25325
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: label })
25482
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon2, { size: 18 }),
25483
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: label })
25326
25484
  ]
25327
25485
  },
25328
25486
  id
25329
25487
  ))
25330
25488
  ] });
25331
25489
  if (activeScreen === "projects" && layout === "sidebar") {
25332
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app app--with-sidebar", children: [
25490
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app app--with-sidebar", children: [
25333
25491
  navRail,
25334
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__screen", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ProjectsTab, { agents, onOpenSettings: () => openScreen("settings", "projects"), postMessage }) })
25492
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__screen", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ProjectsTab, { agents, onOpenSettings: () => openScreen("settings", "projects"), postMessage }) })
25335
25493
  ] });
25336
25494
  }
25337
25495
  if (activeScreen === "settings") {
25338
- const panel = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: `app ${layout === "sidebar" ? "app--settings-centered app__screen" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
25496
+ const panel = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `app ${layout === "sidebar" ? "app--settings-centered app__screen" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25339
25497
  SettingsPanel,
25340
25498
  {
25341
25499
  layout,
@@ -25358,44 +25516,44 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25358
25516
  onClose: () => setActiveScreen("chat")
25359
25517
  }
25360
25518
  ) });
25361
- return layout === "sidebar" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app app--with-sidebar", children: [
25519
+ return layout === "sidebar" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app app--with-sidebar", children: [
25362
25520
  navRail,
25363
25521
  panel
25364
25522
  ] }) : panel;
25365
25523
  }
25366
- const deleteOverlay = pendingDelete && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__confirm-overlay", onClick: cancelDeleteSession, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
25367
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__confirm-title", children: "Delete conversation" }),
25368
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "app__confirm-message", children: [
25524
+ const deleteOverlay = pendingDelete && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__confirm-overlay", onClick: cancelDeleteSession, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
25525
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__confirm-title", children: "Delete conversation" }),
25526
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("p", { className: "app__confirm-message", children: [
25369
25527
  "Delete conversation \u201C",
25370
25528
  pendingDelete.title,
25371
25529
  "\u201D? This cannot be undone."
25372
25530
  ] }),
25373
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__confirm-buttons", children: [
25374
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "app__confirm-btn", onClick: cancelDeleteSession, children: "Cancel" }),
25375
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { className: "app__confirm-btn app__confirm-btn--danger", onClick: confirmDeleteSession, children: "Delete" })
25531
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__confirm-buttons", children: [
25532
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { className: "app__confirm-btn", onClick: cancelDeleteSession, children: "Cancel" }),
25533
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { className: "app__confirm-btn app__confirm-btn--danger", onClick: confirmDeleteSession, children: "Delete" })
25376
25534
  ] })
25377
25535
  ] }) });
25378
25536
  if (layout === "sidebar") {
25379
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app app--with-sidebar", children: [
25537
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app app--with-sidebar", children: [
25380
25538
  navRail,
25381
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("aside", { className: "app__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__sidebar-content", children: [
25382
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__sidebar-section", children: [
25383
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__sidebar-section-title", children: "Agents" }),
25384
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__sidebar-agents-list", children: selectedAgentId && !showAllAgents ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
25539
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("aside", { className: "app__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__sidebar-content", children: [
25540
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__sidebar-section", children: [
25541
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__sidebar-section-title", children: "Agents" }),
25542
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__sidebar-agents-list", children: selectedAgentId && !showAllAgents ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
25385
25543
  "button",
25386
25544
  {
25387
25545
  className: "app__sidebar-agent-item app__sidebar-agent-item--collapsed-active",
25388
25546
  onClick: () => setShowAllAgents(true),
25389
25547
  title: "Switch Agent",
25390
25548
  children: [
25391
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "agent-status-dot agent-status-dot--active" }),
25392
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "app__sidebar-agent-name", children: activeAgent?.name || selectedAgentId }),
25393
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronDown, { className: "app__sidebar-chevron", size: 10 })
25549
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "agent-status-dot agent-status-dot--active" }),
25550
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "app__sidebar-agent-name", children: activeAgent?.name || selectedAgentId }),
25551
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChevronDown, { className: "app__sidebar-chevron", size: 10 })
25394
25552
  ]
25395
25553
  }
25396
- ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: `app__sidebar-agents-list-expanded ${selectedAgentId ? "app__sidebar-agents-list-expanded--has-active" : ""}`, children: agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__sidebar-empty-text", children: "No agents found" }) : agents.map((agent) => {
25554
+ ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `app__sidebar-agents-list-expanded ${selectedAgentId ? "app__sidebar-agents-list-expanded--has-active" : ""}`, children: agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__sidebar-empty-text", children: "No agents found" }) : agents.map((agent) => {
25397
25555
  const isSelected = selectedAgentId === agent.id;
25398
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
25556
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
25399
25557
  "button",
25400
25558
  {
25401
25559
  className: `app__sidebar-agent-item ${isSelected ? "app__sidebar-agent-item--active" : ""}`,
@@ -25408,19 +25566,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25408
25566
  }
25409
25567
  },
25410
25568
  children: [
25411
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: `agent-status-dot ${isSelected ? "agent-status-dot--active" : ""}` }),
25412
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "app__sidebar-agent-name", children: agent.name }),
25413
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronUp, { className: "app__sidebar-chevron app__sidebar-chevron--up", size: 10 })
25569
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: `agent-status-dot ${isSelected ? "agent-status-dot--active" : ""}` }),
25570
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "app__sidebar-agent-name", children: agent.name }),
25571
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChevronUp, { className: "app__sidebar-chevron app__sidebar-chevron--up", size: 10 })
25414
25572
  ]
25415
25573
  },
25416
25574
  agent.id
25417
25575
  );
25418
25576
  }) }) })
25419
25577
  ] }),
25420
- selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__sidebar-section", children: [
25421
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__sidebar-section-header", children: [
25422
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "app__sidebar-section-title", children: "Conversations" }),
25423
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
25578
+ selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__sidebar-section", children: [
25579
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__sidebar-section-header", children: [
25580
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "app__sidebar-section-title", children: "Conversations" }),
25581
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25424
25582
  "button",
25425
25583
  {
25426
25584
  className: "app__sidebar-new-chat-btn",
@@ -25430,15 +25588,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25430
25588
  }
25431
25589
  )
25432
25590
  ] }),
25433
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__sidebar-sessions-list", children: sessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__sidebar-empty-text", children: "No conversations yet" }) : sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
25591
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__sidebar-sessions-list", children: sessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__sidebar-empty-text", children: "No conversations yet" }) : sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
25434
25592
  "div",
25435
25593
  {
25436
25594
  className: `app__sidebar-session-item ${selectedSessionId === session.id ? "app__sidebar-session-item--active" : ""}`,
25437
25595
  onClick: () => onSelectSession(session.id),
25438
25596
  children: [
25439
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "app__sidebar-session-icon", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MessageSquare, { size: 13 }) }),
25440
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "app__sidebar-session-title", title: session.title, children: session.title }),
25441
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
25597
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "app__sidebar-session-icon", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MessageSquare, { size: 13 }) }),
25598
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "app__sidebar-session-title", title: session.title, children: session.title }),
25599
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25442
25600
  "button",
25443
25601
  {
25444
25602
  className: "app__sidebar-session-delete",
@@ -25447,7 +25605,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25447
25605
  e.stopPropagation();
25448
25606
  onDeleteSession(session.id, session.title);
25449
25607
  },
25450
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Trash, { size: 12 })
25608
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Trash, { size: 12 })
25451
25609
  }
25452
25610
  )
25453
25611
  ]
@@ -25456,15 +25614,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25456
25614
  )) })
25457
25615
  ] })
25458
25616
  ] }) }),
25459
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("main", { className: "app__chat-pane", children: selectedAgentId ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
25460
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("header", { className: "app__chat-header", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__chat-header-info", children: [
25461
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h2", { className: "app__chat-header-title", children: selectedAgentName }),
25462
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "app__chat-header-status", children: [
25463
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: `agent-status-dot agent-status-dot--active ${chatState.status === "streaming" ? "agent-status-dot--pulsing" : ""}` }),
25617
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("main", { className: "app__chat-pane", children: selectedAgentId ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
25618
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("header", { className: "app__chat-header", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__chat-header-info", children: [
25619
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "app__chat-header-title", children: selectedAgentName }),
25620
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "app__chat-header-status", children: [
25621
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: `agent-status-dot agent-status-dot--active ${chatState.status === "streaming" ? "agent-status-dot--pulsing" : ""}` }),
25464
25622
  chatState.status === "streaming" ? "Streaming response..." : "Ready"
25465
25623
  ] })
25466
25624
  ] }) }),
25467
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
25625
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25468
25626
  MessageList,
25469
25627
  {
25470
25628
  items: chatState.items,
@@ -25474,12 +25632,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25474
25632
  trailing: confirmCards
25475
25633
  }
25476
25634
  ),
25477
- (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__error", children: [
25478
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TriangleAlert, { size: 14 }),
25635
+ (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__error", children: [
25636
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TriangleAlert, { size: 14 }),
25479
25637
  " ",
25480
25638
  chatState.errorText || voice.error
25481
25639
  ] }),
25482
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
25640
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25483
25641
  Composer,
25484
25642
  {
25485
25643
  disabled: composerDisabled,
@@ -25499,18 +25657,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25499
25657
  onValueChange: setComposerDraft
25500
25658
  }
25501
25659
  )
25502
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "Select an agent from the sidebar to start chatting" }) }) }),
25660
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { children: "Select an agent from the sidebar to start chatting" }) }) }),
25503
25661
  deleteOverlay
25504
25662
  ] });
25505
25663
  }
25506
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app", children: [
25507
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__header-row", children: [
25508
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__logo-title-wrapper", children: [
25509
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
25510
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "Caretaker" })
25664
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app", children: [
25665
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__header-row", children: [
25666
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__logo-title-wrapper", children: [
25667
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
25668
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Caretaker" })
25511
25669
  ] }),
25512
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__controls", children: [
25513
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__agent-select-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
25670
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__controls", children: [
25671
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__agent-select-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
25514
25672
  "select",
25515
25673
  {
25516
25674
  className: "app__agent-select",
@@ -25520,12 +25678,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25520
25678
  onSelectAgent(e.target.value);
25521
25679
  },
25522
25680
  children: [
25523
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
25524
- agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
25681
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
25682
+ agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
25525
25683
  ]
25526
25684
  }
25527
25685
  ) }),
25528
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
25686
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
25529
25687
  "button",
25530
25688
  {
25531
25689
  className: "app__sessions-btn",
@@ -25533,13 +25691,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25533
25691
  disabled: !selectedAgentId,
25534
25692
  title: "View conversations",
25535
25693
  children: [
25536
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MessageSquare, { size: 13 }),
25694
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MessageSquare, { size: 13 }),
25537
25695
  " ",
25538
25696
  sessions.length
25539
25697
  ]
25540
25698
  }
25541
25699
  ),
25542
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
25700
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25543
25701
  "button",
25544
25702
  {
25545
25703
  className: "app__new-chat-btn",
@@ -25549,7 +25707,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25549
25707
  children: "+ New"
25550
25708
  }
25551
25709
  ),
25552
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
25710
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25553
25711
  "button",
25554
25712
  {
25555
25713
  className: "app__settings-btn",
@@ -25558,24 +25716,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25558
25716
  postMessage({ type: "getSettingsData" });
25559
25717
  },
25560
25718
  title: "Caretaker Settings",
25561
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Settings, { className: "app__settings-icon", size: 14 })
25719
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Settings, { className: "app__settings-icon", size: 14 })
25562
25720
  }
25563
25721
  )
25564
25722
  ] })
25565
25723
  ] }) }),
25566
- showSessions && sessions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__sessions-dropdown", children: [
25567
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__sessions-title", children: [
25724
+ showSessions && sessions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__sessions-dropdown", children: [
25725
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__sessions-title", children: [
25568
25726
  "Conversations for ",
25569
25727
  selectedAgentName
25570
25728
  ] }),
25571
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__sessions-list", children: sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
25729
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__sessions-list", children: sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
25572
25730
  "div",
25573
25731
  {
25574
25732
  className: `app__session-item ${selectedSessionId === session.id ? "app__session-item--active" : ""}`,
25575
25733
  onClick: () => onSelectSession(session.id),
25576
25734
  children: [
25577
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "app__session-item-title", children: session.title }),
25578
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
25735
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "app__session-item-title", children: session.title }),
25736
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25579
25737
  "button",
25580
25738
  {
25581
25739
  className: "app__session-item-delete",
@@ -25584,7 +25742,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25584
25742
  e.stopPropagation();
25585
25743
  onDeleteSession(session.id, session.title);
25586
25744
  },
25587
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Trash, { size: 12 })
25745
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Trash, { size: 12 })
25588
25746
  }
25589
25747
  )
25590
25748
  ]
@@ -25592,12 +25750,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25592
25750
  session.id
25593
25751
  )) })
25594
25752
  ] }),
25595
- showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__sessions-dropdown app__sessions-dropdown--empty", children: [
25596
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__sessions-title", children: "No conversations yet" }),
25597
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "app__sessions-empty", children: "Start a new chat to create a conversation" })
25753
+ showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__sessions-dropdown app__sessions-dropdown--empty", children: [
25754
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__sessions-title", children: "No conversations yet" }),
25755
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "app__sessions-empty", children: "Start a new chat to create a conversation" })
25598
25756
  ] }),
25599
- !selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "Select an agent to start chatting" }) }),
25600
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
25757
+ !selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { children: "Select an agent to start chatting" }) }),
25758
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25601
25759
  MessageList,
25602
25760
  {
25603
25761
  items: chatState.items,
@@ -25607,12 +25765,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25607
25765
  trailing: confirmCards
25608
25766
  }
25609
25767
  ),
25610
- (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "app__error", children: [
25611
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TriangleAlert, { size: 14 }),
25768
+ (chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "app__error", children: [
25769
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TriangleAlert, { size: 14 }),
25612
25770
  " ",
25613
25771
  chatState.errorText || voice.error
25614
25772
  ] }),
25615
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
25773
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25616
25774
  Composer,
25617
25775
  {
25618
25776
  disabled: composerDisabled,
@@ -25637,12 +25795,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25637
25795
  }
25638
25796
 
25639
25797
  // src/standalone.tsx
25640
- var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
25798
+ var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
25641
25799
  function StandaloneApp() {
25642
- const [ws, setWs] = (0, import_react26.useState)(null);
25643
- const [connected, setConnected] = (0, import_react26.useState)(false);
25644
- const [error, setError] = (0, import_react26.useState)(null);
25645
- (0, import_react26.useEffect)(() => {
25800
+ const [ws, setWs] = (0, import_react27.useState)(null);
25801
+ const [connected, setConnected] = (0, import_react27.useState)(false);
25802
+ const [error, setError] = (0, import_react27.useState)(null);
25803
+ (0, import_react27.useEffect)(() => {
25646
25804
  let active = true;
25647
25805
  const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
25648
25806
  const socket = new WebSocket(`${protocol}//${window.location.host}/api/ws`);
@@ -25688,7 +25846,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25688
25846
  }
25689
25847
  };
25690
25848
  if (error) {
25691
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: {
25849
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: {
25692
25850
  display: "flex",
25693
25851
  flexDirection: "column",
25694
25852
  alignItems: "center",
@@ -25700,9 +25858,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25700
25858
  padding: "20px",
25701
25859
  textAlign: "center"
25702
25860
  }, children: [
25703
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { style: { color: "#ff6b6b" }, children: "Caretaker Connection Failed" }),
25704
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { children: error }),
25705
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
25861
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h3", { style: { color: "#ff6b6b" }, children: "Caretaker Connection Failed" }),
25862
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { children: error }),
25863
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
25706
25864
  "button",
25707
25865
  {
25708
25866
  onClick: () => setWs(null),
@@ -25721,7 +25879,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25721
25879
  ] });
25722
25880
  }
25723
25881
  if (!connected) {
25724
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: {
25882
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: {
25725
25883
  display: "flex",
25726
25884
  flexDirection: "column",
25727
25885
  alignItems: "center",
@@ -25731,7 +25889,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25731
25889
  background: "#1e1e1e",
25732
25890
  color: "#f1f1f1"
25733
25891
  }, children: [
25734
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { style: {
25892
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { style: {
25735
25893
  border: "4px solid rgba(255,255,255,0.1)",
25736
25894
  width: "36px",
25737
25895
  height: "36px",
@@ -25740,8 +25898,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25740
25898
  animation: "spin 1s linear infinite",
25741
25899
  marginBottom: "16px"
25742
25900
  } }),
25743
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "Connecting to Caretaker server..." }),
25744
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("style", { children: `
25901
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Connecting to Caretaker server..." }),
25902
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("style", { children: `
25745
25903
  @keyframes spin {
25746
25904
  0% { transform: rotate(0deg); }
25747
25905
  100% { transform: rotate(360deg); }
@@ -25749,12 +25907,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
25749
25907
  ` })
25750
25908
  ] });
25751
25909
  }
25752
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(App, { postMessage, layout: "sidebar" });
25910
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(App, { postMessage, layout: "sidebar" });
25753
25911
  }
25754
25912
  var rootEl = document.getElementById("root");
25755
25913
  if (!rootEl) throw new Error("#root not found");
25756
25914
  (0, import_client.createRoot)(rootEl).render(
25757
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react26.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StandaloneApp, {}) })
25915
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react27.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StandaloneApp, {}) })
25758
25916
  );
25759
25917
  })();
25760
25918
  /*! Bundled license information: