@hyperwindmill/caretaker-cli 0.17.0 → 0.18.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.
- package/dist/cli/web/server.js +2 -2
- package/dist/cli/web/voice_backend.d.ts +17 -5
- package/dist/cli/web/voice_backend.d.ts.map +1 -1
- package/dist/cli/web/voice_backend.js +253 -114
- package/dist/cli/web/voice_proxy.d.ts +16 -0
- package/dist/cli/web/voice_proxy.d.ts.map +1 -1
- package/dist/cli/web/voice_proxy.js +103 -8
- package/dist/store/json.d.ts.map +1 -1
- package/dist/store/json.js +3 -0
- package/dist/webview/standalone.js +982 -777
- package/dist/webview/standalone.js.map +4 -4
- package/package.json +3 -3
|
@@ -3276,10 +3276,10 @@
|
|
|
3276
3276
|
refCount: 0
|
|
3277
3277
|
};
|
|
3278
3278
|
}
|
|
3279
|
-
function releaseCache(
|
|
3280
|
-
|
|
3281
|
-
0 ===
|
|
3282
|
-
|
|
3279
|
+
function releaseCache(cache2) {
|
|
3280
|
+
cache2.refCount--;
|
|
3281
|
+
0 === cache2.refCount && scheduleCallback$2(NormalPriority, function() {
|
|
3282
|
+
cache2.controller.abort();
|
|
3283
3283
|
});
|
|
3284
3284
|
}
|
|
3285
3285
|
var currentEntangledListeners = null;
|
|
@@ -8639,21 +8639,21 @@
|
|
|
8639
8639
|
case 23:
|
|
8640
8640
|
case 22:
|
|
8641
8641
|
if (null !== fiber.memoizedState && null !== fiber.memoizedState.cachePool) {
|
|
8642
|
-
var
|
|
8643
|
-
null !=
|
|
8642
|
+
var cache2 = fiber.memoizedState.cachePool.pool;
|
|
8643
|
+
null != cache2 && cache2.refCount++;
|
|
8644
8644
|
}
|
|
8645
8645
|
break;
|
|
8646
8646
|
case 24:
|
|
8647
8647
|
releaseCache(fiber.memoizedState.cache);
|
|
8648
8648
|
}
|
|
8649
|
-
|
|
8650
|
-
if (null !==
|
|
8649
|
+
cache2 = fiber.child;
|
|
8650
|
+
if (null !== cache2) cache2.return = fiber, nextEffect = cache2;
|
|
8651
8651
|
else
|
|
8652
8652
|
a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
|
|
8653
|
-
|
|
8654
|
-
var sibling =
|
|
8655
|
-
detachFiberAfterEffects(
|
|
8656
|
-
if (
|
|
8653
|
+
cache2 = nextEffect;
|
|
8654
|
+
var sibling = cache2.sibling, returnFiber = cache2.return;
|
|
8655
|
+
detachFiberAfterEffects(cache2);
|
|
8656
|
+
if (cache2 === fiber) {
|
|
8657
8657
|
nextEffect = null;
|
|
8658
8658
|
break a;
|
|
8659
8659
|
}
|
|
@@ -8668,8 +8668,8 @@
|
|
|
8668
8668
|
}
|
|
8669
8669
|
var DefaultAsyncDispatcher = {
|
|
8670
8670
|
getCacheForType: function(resourceType) {
|
|
8671
|
-
var
|
|
8672
|
-
void 0 === cacheForType && (cacheForType = resourceType(),
|
|
8671
|
+
var cache2 = readContext(CacheContext), cacheForType = cache2.data.get(resourceType);
|
|
8672
|
+
void 0 === cacheForType && (cacheForType = resourceType(), cache2.data.set(resourceType, cacheForType));
|
|
8673
8673
|
return cacheForType;
|
|
8674
8674
|
},
|
|
8675
8675
|
cacheSignal: function() {
|
|
@@ -11808,24 +11808,24 @@
|
|
|
11808
11808
|
var tagCaches = null;
|
|
11809
11809
|
function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
|
|
11810
11810
|
if (null === tagCaches) {
|
|
11811
|
-
var
|
|
11811
|
+
var cache2 = /* @__PURE__ */ new Map();
|
|
11812
11812
|
var caches = tagCaches = /* @__PURE__ */ new Map();
|
|
11813
|
-
caches.set(ownerDocument,
|
|
11813
|
+
caches.set(ownerDocument, cache2);
|
|
11814
11814
|
} else
|
|
11815
|
-
caches = tagCaches,
|
|
11816
|
-
if (
|
|
11817
|
-
|
|
11815
|
+
caches = tagCaches, cache2 = caches.get(ownerDocument), cache2 || (cache2 = /* @__PURE__ */ new Map(), caches.set(ownerDocument, cache2));
|
|
11816
|
+
if (cache2.has(type)) return cache2;
|
|
11817
|
+
cache2.set(type, null);
|
|
11818
11818
|
ownerDocument = ownerDocument.getElementsByTagName(type);
|
|
11819
11819
|
for (caches = 0; caches < ownerDocument.length; caches++) {
|
|
11820
11820
|
var node = ownerDocument[caches];
|
|
11821
11821
|
if (!(node[internalHoistableMarker] || node[internalInstanceKey] || "link" === type && "stylesheet" === node.getAttribute("rel")) && "http://www.w3.org/2000/svg" !== node.namespaceURI) {
|
|
11822
11822
|
var nodeKey = node.getAttribute(keyAttribute) || "";
|
|
11823
11823
|
nodeKey = type + nodeKey;
|
|
11824
|
-
var existing =
|
|
11825
|
-
existing ? existing.push(node) :
|
|
11824
|
+
var existing = cache2.get(nodeKey);
|
|
11825
|
+
existing ? existing.push(node) : cache2.set(nodeKey, [node]);
|
|
11826
11826
|
}
|
|
11827
11827
|
}
|
|
11828
|
-
return
|
|
11828
|
+
return cache2;
|
|
11829
11829
|
}
|
|
11830
11830
|
function mountHoistable(hoistableRoot, type, instance) {
|
|
11831
11831
|
hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
|
|
@@ -12755,14 +12755,17 @@
|
|
|
12755
12755
|
});
|
|
12756
12756
|
|
|
12757
12757
|
// src/standalone.tsx
|
|
12758
|
-
var
|
|
12758
|
+
var import_react19 = __toESM(require_react(), 1);
|
|
12759
12759
|
var import_client = __toESM(require_client(), 1);
|
|
12760
12760
|
|
|
12761
12761
|
// src/App.tsx
|
|
12762
|
-
var
|
|
12762
|
+
var import_react18 = __toESM(require_react(), 1);
|
|
12763
12763
|
|
|
12764
12764
|
// src/MessageList.tsx
|
|
12765
|
-
var
|
|
12765
|
+
var import_react4 = __toESM(require_react(), 1);
|
|
12766
|
+
|
|
12767
|
+
// src/MarkdownText.tsx
|
|
12768
|
+
var import_react = __toESM(require_react(), 1);
|
|
12766
12769
|
|
|
12767
12770
|
// ../../node_modules/.pnpm/marked@15.0.12/node_modules/marked/lib/marked.esm.js
|
|
12768
12771
|
function _getDefaults() {
|
|
@@ -14900,8 +14903,7 @@ ${text}</tr>
|
|
|
14900
14903
|
var parser = _Parser.parse;
|
|
14901
14904
|
var lexer = _Lexer.lex;
|
|
14902
14905
|
|
|
14903
|
-
// src/
|
|
14904
|
-
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
14906
|
+
// src/markdown.ts
|
|
14905
14907
|
function sanitize(html2) {
|
|
14906
14908
|
const dangerous = /<(script|style|iframe|object|embed|form|input|button|textarea)[^>]*>.*?<\/\1>|<(script|style|iframe|object|embed|form|input|button|textarea)[^>]*>/gi;
|
|
14907
14909
|
const sanitized = html2.replace(dangerous, "");
|
|
@@ -14910,18 +14912,38 @@ ${text}</tr>
|
|
|
14910
14912
|
const jsUrls = /href\s*=\s*["']\s*javascript:[^"']*["']/gi;
|
|
14911
14913
|
return noEvents.replace(jsUrls, 'href="#"');
|
|
14912
14914
|
}
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14915
|
+
var cacheLimit = 2e3;
|
|
14916
|
+
var cache = /* @__PURE__ */ new Map();
|
|
14917
|
+
function renderMarkdown(content, useCache = true) {
|
|
14918
|
+
if (useCache) {
|
|
14919
|
+
const hit = cache.get(content);
|
|
14920
|
+
if (hit !== void 0) {
|
|
14921
|
+
cache.delete(content);
|
|
14922
|
+
cache.set(content, hit);
|
|
14923
|
+
return hit;
|
|
14924
|
+
}
|
|
14921
14925
|
}
|
|
14922
|
-
|
|
14926
|
+
const html2 = sanitize(marked.parse(content, { breaks: true, gfm: true }));
|
|
14927
|
+
if (useCache) {
|
|
14928
|
+
cache.set(content, html2);
|
|
14929
|
+
if (cache.size > cacheLimit) {
|
|
14930
|
+
const oldest = cache.keys().next();
|
|
14931
|
+
if (!oldest.done) cache.delete(oldest.value);
|
|
14932
|
+
}
|
|
14933
|
+
}
|
|
14934
|
+
return html2;
|
|
14923
14935
|
}
|
|
14924
14936
|
|
|
14937
|
+
// src/MarkdownText.tsx
|
|
14938
|
+
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
14939
|
+
var MarkdownText = (0, import_react.memo)(function MarkdownText2({ content, inline: inline2 = false, cache: cache2 = true }) {
|
|
14940
|
+
const html2 = renderMarkdown(content, cache2);
|
|
14941
|
+
if (inline2) {
|
|
14942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { dangerouslySetInnerHTML: { __html: html2 } });
|
|
14943
|
+
}
|
|
14944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "markdown-body", dangerouslySetInnerHTML: { __html: html2 } });
|
|
14945
|
+
});
|
|
14946
|
+
|
|
14925
14947
|
// src/toolFormat.ts
|
|
14926
14948
|
var PATH_KEYS = ["path", "file_path", "filePath"];
|
|
14927
14949
|
function toolSummary(args, max = 80) {
|
|
@@ -14970,7 +14992,7 @@ ${text}</tr>
|
|
|
14970
14992
|
}
|
|
14971
14993
|
|
|
14972
14994
|
// ../../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.6/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
14973
|
-
var
|
|
14995
|
+
var import_react3 = __toESM(require_react());
|
|
14974
14996
|
|
|
14975
14997
|
// ../../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.6/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
14976
14998
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -14994,7 +15016,7 @@ ${text}</tr>
|
|
|
14994
15016
|
};
|
|
14995
15017
|
|
|
14996
15018
|
// ../../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.6/node_modules/lucide-react/dist/esm/Icon.js
|
|
14997
|
-
var
|
|
15019
|
+
var import_react2 = __toESM(require_react());
|
|
14998
15020
|
|
|
14999
15021
|
// ../../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.6/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
15000
15022
|
var defaultAttributes = {
|
|
@@ -15010,7 +15032,7 @@ ${text}</tr>
|
|
|
15010
15032
|
};
|
|
15011
15033
|
|
|
15012
15034
|
// ../../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.6/node_modules/lucide-react/dist/esm/Icon.js
|
|
15013
|
-
var Icon = (0,
|
|
15035
|
+
var Icon = (0, import_react2.forwardRef)(
|
|
15014
15036
|
({
|
|
15015
15037
|
color = "currentColor",
|
|
15016
15038
|
size = 24,
|
|
@@ -15020,7 +15042,7 @@ ${text}</tr>
|
|
|
15020
15042
|
children,
|
|
15021
15043
|
iconNode,
|
|
15022
15044
|
...rest
|
|
15023
|
-
}, ref) => (0,
|
|
15045
|
+
}, ref) => (0, import_react2.createElement)(
|
|
15024
15046
|
"svg",
|
|
15025
15047
|
{
|
|
15026
15048
|
ref,
|
|
@@ -15034,7 +15056,7 @@ ${text}</tr>
|
|
|
15034
15056
|
...rest
|
|
15035
15057
|
},
|
|
15036
15058
|
[
|
|
15037
|
-
...iconNode.map(([tag2, attrs]) => (0,
|
|
15059
|
+
...iconNode.map(([tag2, attrs]) => (0, import_react2.createElement)(tag2, attrs)),
|
|
15038
15060
|
...Array.isArray(children) ? children : [children]
|
|
15039
15061
|
]
|
|
15040
15062
|
)
|
|
@@ -15042,8 +15064,8 @@ ${text}</tr>
|
|
|
15042
15064
|
|
|
15043
15065
|
// ../../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.6/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
15044
15066
|
var createLucideIcon = (iconName, iconNode) => {
|
|
15045
|
-
const Component = (0,
|
|
15046
|
-
({ className, ...props }, ref) => (0,
|
|
15067
|
+
const Component = (0, import_react3.forwardRef)(
|
|
15068
|
+
({ className, ...props }, ref) => (0, import_react3.createElement)(Icon, {
|
|
15047
15069
|
ref,
|
|
15048
15070
|
iconNode,
|
|
15049
15071
|
className: mergeClasses(
|
|
@@ -15324,16 +15346,22 @@ ${text}</tr>
|
|
|
15324
15346
|
// src/MessageList.tsx
|
|
15325
15347
|
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
|
15326
15348
|
var STICK_THRESHOLD = 100;
|
|
15327
|
-
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15349
|
+
var MessageList = (0, import_react4.memo)(function MessageList2({
|
|
15350
|
+
items,
|
|
15351
|
+
sessionId = null,
|
|
15352
|
+
trailing,
|
|
15353
|
+
isStreaming,
|
|
15354
|
+
agentName
|
|
15355
|
+
}) {
|
|
15356
|
+
const containerRef = (0, import_react4.useRef)(null);
|
|
15357
|
+
const prevItemsLengthRef = (0, import_react4.useRef)(items.length);
|
|
15358
|
+
const stickRef = (0, import_react4.useRef)(true);
|
|
15331
15359
|
const onScroll = () => {
|
|
15332
15360
|
const c = containerRef.current;
|
|
15333
15361
|
if (!c) return;
|
|
15334
15362
|
stickRef.current = c.scrollHeight - c.scrollTop - c.clientHeight <= STICK_THRESHOLD;
|
|
15335
15363
|
};
|
|
15336
|
-
(0,
|
|
15364
|
+
(0, import_react4.useEffect)(() => {
|
|
15337
15365
|
const container = containerRef.current;
|
|
15338
15366
|
if (!container) return;
|
|
15339
15367
|
const grew = items.length > prevItemsLengthRef.current;
|
|
@@ -15358,8 +15386,29 @@ ${text}</tr>
|
|
|
15358
15386
|
] })
|
|
15359
15387
|
] })
|
|
15360
15388
|
] });
|
|
15361
|
-
}
|
|
15362
|
-
function
|
|
15389
|
+
});
|
|
15390
|
+
var ToolBlock = (0, import_react4.memo)(function ToolBlock2({ item }) {
|
|
15391
|
+
const [open, setOpen] = (0, import_react4.useState)(false);
|
|
15392
|
+
const summary = toolSummary(item.args);
|
|
15393
|
+
const fullArgs = prettyArgs(item.args);
|
|
15394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("details", { className: "tool", open, onToggle: (e) => setOpen(e.currentTarget.open), children: [
|
|
15395
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("summary", { className: "tool__header", children: [
|
|
15396
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__icon", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Wrench, { size: 14 }) }),
|
|
15397
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__name", children: item.name }),
|
|
15398
|
+
summary && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__args", children: summary }),
|
|
15399
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__status", children: item.result === null ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LoaderCircle, { className: "tool__spinner", size: 14 }) : item.result === "" ? null : resultMetric(item.result) }),
|
|
15400
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__chevron" })
|
|
15401
|
+
] }),
|
|
15402
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "tool__body", children: [
|
|
15403
|
+
fullArgs && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("pre", { className: "tool__args-full", children: fullArgs }),
|
|
15404
|
+
item.result !== null && item.result !== "" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "tool__result", children: [
|
|
15405
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__arrow", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CornerDownRight, { size: 13 }) }),
|
|
15406
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "tool__result-content", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MarkdownText, { content: item.result }) })
|
|
15407
|
+
] })
|
|
15408
|
+
] })
|
|
15409
|
+
] });
|
|
15410
|
+
});
|
|
15411
|
+
var Item = (0, import_react4.memo)(function Item2({ item, sessionId }) {
|
|
15363
15412
|
switch (item.kind) {
|
|
15364
15413
|
case "user":
|
|
15365
15414
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "bubble bubble--user", children: [
|
|
@@ -15406,7 +15455,7 @@ ${text}</tr>
|
|
|
15406
15455
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "bubble bubble--assistant", children: [
|
|
15407
15456
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "bubble__role", children: item.label || "assistant" }),
|
|
15408
15457
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "bubble__text", children: [
|
|
15409
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MarkdownText, { content: item.text }),
|
|
15458
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MarkdownText, { content: item.text, cache: !item.streaming }),
|
|
15410
15459
|
item.streaming && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "bubble__caret", children: "\u258C" })
|
|
15411
15460
|
] })
|
|
15412
15461
|
] });
|
|
@@ -15417,38 +15466,20 @@ ${text}</tr>
|
|
|
15417
15466
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "thinking__title", children: "Thinking Process" }),
|
|
15418
15467
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "thinking__chevron" })
|
|
15419
15468
|
] }),
|
|
15420
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "thinking__content", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MarkdownText, { content: item.text }) })
|
|
15469
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "thinking__content", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MarkdownText, { content: item.text, cache: false }) })
|
|
15421
15470
|
] });
|
|
15422
|
-
case "tool":
|
|
15423
|
-
|
|
15424
|
-
const fullArgs = prettyArgs(item.args);
|
|
15425
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("details", { className: "tool", children: [
|
|
15426
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("summary", { className: "tool__header", children: [
|
|
15427
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__icon", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Wrench, { size: 14 }) }),
|
|
15428
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__name", children: item.name }),
|
|
15429
|
-
summary && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__args", children: summary }),
|
|
15430
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__status", children: item.result === null ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LoaderCircle, { className: "tool__spinner", size: 14 }) : item.result === "" ? null : resultMetric(item.result) }),
|
|
15431
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__chevron" })
|
|
15432
|
-
] }),
|
|
15433
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "tool__body", children: [
|
|
15434
|
-
fullArgs && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("pre", { className: "tool__args-full", children: fullArgs }),
|
|
15435
|
-
item.result !== null && item.result !== "" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "tool__result", children: [
|
|
15436
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "tool__arrow", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CornerDownRight, { size: 13 }) }),
|
|
15437
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "tool__result-content", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MarkdownText, { content: item.result }) })
|
|
15438
|
-
] })
|
|
15439
|
-
] })
|
|
15440
|
-
] });
|
|
15441
|
-
}
|
|
15471
|
+
case "tool":
|
|
15472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ToolBlock, { item });
|
|
15442
15473
|
case "notice":
|
|
15443
15474
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: `notice${item.variant === "block" ? " notice--block" : ""}`, children: [
|
|
15444
15475
|
item.variant === "block" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TriangleAlert, { size: 12 }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Settings, { size: 12 }),
|
|
15445
15476
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MarkdownText, { content: item.text })
|
|
15446
15477
|
] });
|
|
15447
15478
|
}
|
|
15448
|
-
}
|
|
15479
|
+
});
|
|
15449
15480
|
|
|
15450
15481
|
// src/Composer.tsx
|
|
15451
|
-
var
|
|
15482
|
+
var import_react5 = __toESM(require_react(), 1);
|
|
15452
15483
|
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
15453
15484
|
function Composer({
|
|
15454
15485
|
disabled,
|
|
@@ -15460,7 +15491,7 @@ ${text}</tr>
|
|
|
15460
15491
|
value: propValue,
|
|
15461
15492
|
onValueChange: propOnValueChange
|
|
15462
15493
|
}) {
|
|
15463
|
-
const [internalValue, setInternalValue] = (0,
|
|
15494
|
+
const [internalValue, setInternalValue] = (0, import_react5.useState)("");
|
|
15464
15495
|
const value = propValue !== void 0 ? propValue : internalValue;
|
|
15465
15496
|
const setValue = (val) => {
|
|
15466
15497
|
if (propOnValueChange) {
|
|
@@ -15473,10 +15504,10 @@ ${text}</tr>
|
|
|
15473
15504
|
setInternalValue(val);
|
|
15474
15505
|
}
|
|
15475
15506
|
};
|
|
15476
|
-
const [attachments, setAttachments] = (0,
|
|
15477
|
-
const [isDragging, setIsDragging] = (0,
|
|
15478
|
-
const fileInputRef = (0,
|
|
15479
|
-
const dragCounter = (0,
|
|
15507
|
+
const [attachments, setAttachments] = (0, import_react5.useState)([]);
|
|
15508
|
+
const [isDragging, setIsDragging] = (0, import_react5.useState)(false);
|
|
15509
|
+
const fileInputRef = (0, import_react5.useRef)(null);
|
|
15510
|
+
const dragCounter = (0, import_react5.useRef)(0);
|
|
15480
15511
|
const send = () => {
|
|
15481
15512
|
onSend(value, attachments.length > 0 ? attachments : void 0);
|
|
15482
15513
|
setValue("");
|
|
@@ -15736,20 +15767,20 @@ ${text}</tr>
|
|
|
15736
15767
|
}
|
|
15737
15768
|
|
|
15738
15769
|
// src/SettingsPanel.tsx
|
|
15739
|
-
var
|
|
15770
|
+
var import_react15 = __toESM(require_react(), 1);
|
|
15740
15771
|
|
|
15741
15772
|
// src/ProvidersTab.tsx
|
|
15742
|
-
var
|
|
15773
|
+
var import_react6 = __toESM(require_react(), 1);
|
|
15743
15774
|
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
15744
15775
|
function ProvidersTab({ config, agents, postMessage }) {
|
|
15745
|
-
const [editingProvider, setEditingProvider] = (0,
|
|
15746
|
-
const [isCreating, setIsCreating] = (0,
|
|
15747
|
-
const [name, setName] = (0,
|
|
15748
|
-
const [type, setType] = (0,
|
|
15749
|
-
const [endpoint, setEndpoint] = (0,
|
|
15750
|
-
const [apiKey, setApiKey] = (0,
|
|
15751
|
-
const [command, setCommand] = (0,
|
|
15752
|
-
const [errorMsg, setErrorMsg] = (0,
|
|
15776
|
+
const [editingProvider, setEditingProvider] = (0, import_react6.useState)(null);
|
|
15777
|
+
const [isCreating, setIsCreating] = (0, import_react6.useState)(false);
|
|
15778
|
+
const [name, setName] = (0, import_react6.useState)("");
|
|
15779
|
+
const [type, setType] = (0, import_react6.useState)("openai");
|
|
15780
|
+
const [endpoint, setEndpoint] = (0, import_react6.useState)("");
|
|
15781
|
+
const [apiKey, setApiKey] = (0, import_react6.useState)("");
|
|
15782
|
+
const [command, setCommand] = (0, import_react6.useState)("");
|
|
15783
|
+
const [errorMsg, setErrorMsg] = (0, import_react6.useState)(null);
|
|
15753
15784
|
const startEdit = (provider) => {
|
|
15754
15785
|
setEditingProvider(provider);
|
|
15755
15786
|
setIsCreating(false);
|
|
@@ -15975,17 +16006,17 @@ ${text}</tr>
|
|
|
15975
16006
|
}
|
|
15976
16007
|
|
|
15977
16008
|
// src/ProjectsTabSettings.tsx
|
|
15978
|
-
var
|
|
16009
|
+
var import_react8 = __toESM(require_react(), 1);
|
|
15979
16010
|
|
|
15980
16011
|
// src/FolderPicker.tsx
|
|
15981
|
-
var
|
|
16012
|
+
var import_react7 = __toESM(require_react(), 1);
|
|
15982
16013
|
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
|
|
15983
16014
|
function FolderPicker({ id, value, onChange, placeholder }) {
|
|
15984
|
-
const [isOpen, setIsOpen] = (0,
|
|
15985
|
-
const [currentPath, setCurrentPath] = (0,
|
|
15986
|
-
const [directories, setDirectories] = (0,
|
|
15987
|
-
const [loading, setLoading] = (0,
|
|
15988
|
-
const [error, setError] = (0,
|
|
16015
|
+
const [isOpen, setIsOpen] = (0, import_react7.useState)(false);
|
|
16016
|
+
const [currentPath, setCurrentPath] = (0, import_react7.useState)(null);
|
|
16017
|
+
const [directories, setDirectories] = (0, import_react7.useState)([]);
|
|
16018
|
+
const [loading, setLoading] = (0, import_react7.useState)(false);
|
|
16019
|
+
const [error, setError] = (0, import_react7.useState)(null);
|
|
15989
16020
|
const fetchDir = async (path) => {
|
|
15990
16021
|
setLoading(true);
|
|
15991
16022
|
setError(null);
|
|
@@ -16197,21 +16228,21 @@ ${text}</tr>
|
|
|
16197
16228
|
// src/ProjectsTabSettings.tsx
|
|
16198
16229
|
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
16199
16230
|
function ProjectsTabSettings({ config, agents, postMessage }) {
|
|
16200
|
-
const [editingProject, setEditingProject] = (0,
|
|
16201
|
-
const [isCreating, setIsCreating] = (0,
|
|
16202
|
-
const [name, setName] = (0,
|
|
16203
|
-
const [description, setDescription] = (0,
|
|
16204
|
-
const [workingDir, setWorkingDir] = (0,
|
|
16205
|
-
const [agentId, setAgentId] = (0,
|
|
16206
|
-
const [plannerAgentId, setPlannerAgentId] = (0,
|
|
16207
|
-
const [reviewerAgentId, setReviewerAgentId] = (0,
|
|
16208
|
-
const [planningEnabled, setPlanningEnabled] = (0,
|
|
16209
|
-
const [reviewEnabled, setReviewEnabled] = (0,
|
|
16210
|
-
const [sddEnabled, setSddEnabled] = (0,
|
|
16211
|
-
const [bootstrapText, setBootstrapText] = (0,
|
|
16212
|
-
const [maxRunSecondsText, setMaxRunSecondsText] = (0,
|
|
16213
|
-
const [dockerImage, setDockerImage] = (0,
|
|
16214
|
-
const [errorMsg, setErrorMsg] = (0,
|
|
16231
|
+
const [editingProject, setEditingProject] = (0, import_react8.useState)(null);
|
|
16232
|
+
const [isCreating, setIsCreating] = (0, import_react8.useState)(false);
|
|
16233
|
+
const [name, setName] = (0, import_react8.useState)("");
|
|
16234
|
+
const [description, setDescription] = (0, import_react8.useState)("");
|
|
16235
|
+
const [workingDir, setWorkingDir] = (0, import_react8.useState)("");
|
|
16236
|
+
const [agentId, setAgentId] = (0, import_react8.useState)("");
|
|
16237
|
+
const [plannerAgentId, setPlannerAgentId] = (0, import_react8.useState)("");
|
|
16238
|
+
const [reviewerAgentId, setReviewerAgentId] = (0, import_react8.useState)("");
|
|
16239
|
+
const [planningEnabled, setPlanningEnabled] = (0, import_react8.useState)(null);
|
|
16240
|
+
const [reviewEnabled, setReviewEnabled] = (0, import_react8.useState)(null);
|
|
16241
|
+
const [sddEnabled, setSddEnabled] = (0, import_react8.useState)(null);
|
|
16242
|
+
const [bootstrapText, setBootstrapText] = (0, import_react8.useState)("");
|
|
16243
|
+
const [maxRunSecondsText, setMaxRunSecondsText] = (0, import_react8.useState)("");
|
|
16244
|
+
const [dockerImage, setDockerImage] = (0, import_react8.useState)("");
|
|
16245
|
+
const [errorMsg, setErrorMsg] = (0, import_react8.useState)(null);
|
|
16215
16246
|
const projects = config.projects || [];
|
|
16216
16247
|
const startEdit = (proj) => {
|
|
16217
16248
|
setEditingProject(proj);
|
|
@@ -16635,7 +16666,7 @@ ${text}</tr>
|
|
|
16635
16666
|
}
|
|
16636
16667
|
|
|
16637
16668
|
// src/AgentsTab.tsx
|
|
16638
|
-
var
|
|
16669
|
+
var import_react9 = __toESM(require_react(), 1);
|
|
16639
16670
|
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
|
|
16640
16671
|
function AgentsTab({
|
|
16641
16672
|
config,
|
|
@@ -16647,25 +16678,25 @@ ${text}</tr>
|
|
|
16647
16678
|
setModelsResult,
|
|
16648
16679
|
postMessage
|
|
16649
16680
|
}) {
|
|
16650
|
-
const [editingAgent, setEditingAgent] = (0,
|
|
16651
|
-
const [isCreating, setIsCreating] = (0,
|
|
16652
|
-
const [name, setName] = (0,
|
|
16653
|
-
const [systemPrompt, setSystemPrompt] = (0,
|
|
16654
|
-
const [provider, setProvider] = (0,
|
|
16655
|
-
const [model, setModel] = (0,
|
|
16656
|
-
const [maxTurns, setMaxTurns] = (0,
|
|
16657
|
-
const [workingDir, setWorkingDir] = (0,
|
|
16658
|
-
const [permissionMode, setPermissionMode] = (0,
|
|
16659
|
-
const [strictMcp, setStrictMcp] = (0,
|
|
16660
|
-
const [selectedTools, setSelectedTools] = (0,
|
|
16661
|
-
const [confirmTools, setConfirmTools] = (0,
|
|
16662
|
-
const [selectedPlugins, setSelectedPlugins] = (0,
|
|
16663
|
-
const [selectedMcpServers, setSelectedMcpServers] = (0,
|
|
16664
|
-
const [fetchingModels, setFetchingModels] = (0,
|
|
16665
|
-
const [errorMsg, setErrorMsg] = (0,
|
|
16681
|
+
const [editingAgent, setEditingAgent] = (0, import_react9.useState)(null);
|
|
16682
|
+
const [isCreating, setIsCreating] = (0, import_react9.useState)(false);
|
|
16683
|
+
const [name, setName] = (0, import_react9.useState)("");
|
|
16684
|
+
const [systemPrompt, setSystemPrompt] = (0, import_react9.useState)("");
|
|
16685
|
+
const [provider, setProvider] = (0, import_react9.useState)("");
|
|
16686
|
+
const [model, setModel] = (0, import_react9.useState)("");
|
|
16687
|
+
const [maxTurns, setMaxTurns] = (0, import_react9.useState)(30);
|
|
16688
|
+
const [workingDir, setWorkingDir] = (0, import_react9.useState)("");
|
|
16689
|
+
const [permissionMode, setPermissionMode] = (0, import_react9.useState)("");
|
|
16690
|
+
const [strictMcp, setStrictMcp] = (0, import_react9.useState)(false);
|
|
16691
|
+
const [selectedTools, setSelectedTools] = (0, import_react9.useState)({});
|
|
16692
|
+
const [confirmTools, setConfirmTools] = (0, import_react9.useState)({});
|
|
16693
|
+
const [selectedPlugins, setSelectedPlugins] = (0, import_react9.useState)({});
|
|
16694
|
+
const [selectedMcpServers, setSelectedMcpServers] = (0, import_react9.useState)({});
|
|
16695
|
+
const [fetchingModels, setFetchingModels] = (0, import_react9.useState)(false);
|
|
16696
|
+
const [errorMsg, setErrorMsg] = (0, import_react9.useState)(null);
|
|
16666
16697
|
const providerType = config.providers.find((p) => p.name === provider)?.type ?? "openai";
|
|
16667
16698
|
const isClaudeCode = providerType === "claude-code";
|
|
16668
|
-
(0,
|
|
16699
|
+
(0, import_react9.useEffect)(() => {
|
|
16669
16700
|
if (modelsResult) {
|
|
16670
16701
|
setFetchingModels(false);
|
|
16671
16702
|
if (!modelsResult.ok) {
|
|
@@ -17151,7 +17182,7 @@ ${text}</tr>
|
|
|
17151
17182
|
}
|
|
17152
17183
|
|
|
17153
17184
|
// src/PluginsTab.tsx
|
|
17154
|
-
var
|
|
17185
|
+
var import_react10 = __toESM(require_react(), 1);
|
|
17155
17186
|
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
|
|
17156
17187
|
function PluginsTab({
|
|
17157
17188
|
pluginsFile,
|
|
@@ -17160,15 +17191,15 @@ ${text}</tr>
|
|
|
17160
17191
|
setRefreshOutcome,
|
|
17161
17192
|
postMessage
|
|
17162
17193
|
}) {
|
|
17163
|
-
const [editingSource, setEditingSource] = (0,
|
|
17164
|
-
const [isCreating, setIsCreating] = (0,
|
|
17165
|
-
const [kind, setKind] = (0,
|
|
17166
|
-
const [url, setUrl] = (0,
|
|
17167
|
-
const [ref, setRef] = (0,
|
|
17168
|
-
const [authToken, setAuthToken] = (0,
|
|
17169
|
-
const [refreshOnStart, setRefreshOnStart] = (0,
|
|
17170
|
-
const [errorMsg, setErrorMsg] = (0,
|
|
17171
|
-
(0,
|
|
17194
|
+
const [editingSource, setEditingSource] = (0, import_react10.useState)(null);
|
|
17195
|
+
const [isCreating, setIsCreating] = (0, import_react10.useState)(false);
|
|
17196
|
+
const [kind, setKind] = (0, import_react10.useState)("git");
|
|
17197
|
+
const [url, setUrl] = (0, import_react10.useState)("");
|
|
17198
|
+
const [ref, setRef] = (0, import_react10.useState)("");
|
|
17199
|
+
const [authToken, setAuthToken] = (0, import_react10.useState)("");
|
|
17200
|
+
const [refreshOnStart, setRefreshOnStart] = (0, import_react10.useState)(true);
|
|
17201
|
+
const [errorMsg, setErrorMsg] = (0, import_react10.useState)(null);
|
|
17202
|
+
(0, import_react10.useEffect)(() => {
|
|
17172
17203
|
return () => {
|
|
17173
17204
|
setRefreshOutcome(null);
|
|
17174
17205
|
};
|
|
@@ -17447,25 +17478,25 @@ ${text}</tr>
|
|
|
17447
17478
|
}
|
|
17448
17479
|
|
|
17449
17480
|
// src/McpTab.tsx
|
|
17450
|
-
var
|
|
17481
|
+
var import_react11 = __toESM(require_react(), 1);
|
|
17451
17482
|
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
17452
17483
|
function McpTab({ mcpServersFile, mcpAuthOutcome, setMcpAuthOutcome, postMessage }) {
|
|
17453
|
-
const [editingServer, setEditingServer] = (0,
|
|
17454
|
-
const [isCreating, setIsCreating] = (0,
|
|
17455
|
-
(0,
|
|
17484
|
+
const [editingServer, setEditingServer] = (0, import_react11.useState)(null);
|
|
17485
|
+
const [isCreating, setIsCreating] = (0, import_react11.useState)(false);
|
|
17486
|
+
(0, import_react11.useEffect)(() => {
|
|
17456
17487
|
return () => {
|
|
17457
17488
|
setMcpAuthOutcome(null);
|
|
17458
17489
|
};
|
|
17459
17490
|
}, []);
|
|
17460
|
-
const [name, setName] = (0,
|
|
17461
|
-
const [transport, setTransport] = (0,
|
|
17462
|
-
const [enabled, setEnabled] = (0,
|
|
17463
|
-
const [command, setCommand] = (0,
|
|
17464
|
-
const [argsStr, setArgsStr] = (0,
|
|
17465
|
-
const [envStr, setEnvStr] = (0,
|
|
17466
|
-
const [url, setUrl] = (0,
|
|
17467
|
-
const [headersStr, setHeadersStr] = (0,
|
|
17468
|
-
const [errorMsg, setErrorMsg] = (0,
|
|
17491
|
+
const [name, setName] = (0, import_react11.useState)("");
|
|
17492
|
+
const [transport, setTransport] = (0, import_react11.useState)("stdio");
|
|
17493
|
+
const [enabled, setEnabled] = (0, import_react11.useState)(true);
|
|
17494
|
+
const [command, setCommand] = (0, import_react11.useState)("");
|
|
17495
|
+
const [argsStr, setArgsStr] = (0, import_react11.useState)("");
|
|
17496
|
+
const [envStr, setEnvStr] = (0, import_react11.useState)("");
|
|
17497
|
+
const [url, setUrl] = (0, import_react11.useState)("");
|
|
17498
|
+
const [headersStr, setHeadersStr] = (0, import_react11.useState)("");
|
|
17499
|
+
const [errorMsg, setErrorMsg] = (0, import_react11.useState)(null);
|
|
17469
17500
|
const startCreate = () => {
|
|
17470
17501
|
setIsCreating(true);
|
|
17471
17502
|
setEditingServer(null);
|
|
@@ -17846,7 +17877,7 @@ ${text}</tr>
|
|
|
17846
17877
|
}
|
|
17847
17878
|
|
|
17848
17879
|
// src/SchedulerTab.tsx
|
|
17849
|
-
var
|
|
17880
|
+
var import_react12 = __toESM(require_react(), 1);
|
|
17850
17881
|
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
17851
17882
|
function closeStreamingAssistant(items) {
|
|
17852
17883
|
const last = items[items.length - 1];
|
|
@@ -17905,20 +17936,20 @@ ${text}</tr>
|
|
|
17905
17936
|
}
|
|
17906
17937
|
function SchedulerTab({ config, agents, postMessage, taskRuns = {} }) {
|
|
17907
17938
|
const tasks = config.scheduler?.tasks || [];
|
|
17908
|
-
const [editingTask, setEditingTask] = (0,
|
|
17909
|
-
const [isCreating, setIsCreating] = (0,
|
|
17910
|
-
const [viewingTaskLogs, setViewingTaskLogs] = (0,
|
|
17911
|
-
const [selectedRunId, setSelectedRunId] = (0,
|
|
17912
|
-
const [name, setName] = (0,
|
|
17913
|
-
const [type, setType] = (0,
|
|
17914
|
-
const [enabled, setEnabled] = (0,
|
|
17915
|
-
const [agentId, setAgentId] = (0,
|
|
17916
|
-
const [workingDir, setWorkingDir] = (0,
|
|
17917
|
-
const [prompt, setPrompt] = (0,
|
|
17918
|
-
const [cron, setCron] = (0,
|
|
17919
|
-
const [telegramBotToken, setTelegramBotToken] = (0,
|
|
17920
|
-
const [telegramAllowedChats, setTelegramAllowedChats] = (0,
|
|
17921
|
-
const [errorMsg, setErrorMsg] = (0,
|
|
17939
|
+
const [editingTask, setEditingTask] = (0, import_react12.useState)(null);
|
|
17940
|
+
const [isCreating, setIsCreating] = (0, import_react12.useState)(false);
|
|
17941
|
+
const [viewingTaskLogs, setViewingTaskLogs] = (0, import_react12.useState)(null);
|
|
17942
|
+
const [selectedRunId, setSelectedRunId] = (0, import_react12.useState)(null);
|
|
17943
|
+
const [name, setName] = (0, import_react12.useState)("");
|
|
17944
|
+
const [type, setType] = (0, import_react12.useState)("heartbeat");
|
|
17945
|
+
const [enabled, setEnabled] = (0, import_react12.useState)(true);
|
|
17946
|
+
const [agentId, setAgentId] = (0, import_react12.useState)("");
|
|
17947
|
+
const [workingDir, setWorkingDir] = (0, import_react12.useState)("");
|
|
17948
|
+
const [prompt, setPrompt] = (0, import_react12.useState)("");
|
|
17949
|
+
const [cron, setCron] = (0, import_react12.useState)("*/15 * * * *");
|
|
17950
|
+
const [telegramBotToken, setTelegramBotToken] = (0, import_react12.useState)("");
|
|
17951
|
+
const [telegramAllowedChats, setTelegramAllowedChats] = (0, import_react12.useState)("");
|
|
17952
|
+
const [errorMsg, setErrorMsg] = (0, import_react12.useState)(null);
|
|
17922
17953
|
const startEdit = (task) => {
|
|
17923
17954
|
setEditingTask(task);
|
|
17924
17955
|
setIsCreating(false);
|
|
@@ -18072,7 +18103,7 @@ ${text}</tr>
|
|
|
18072
18103
|
const runs = viewingTaskLogs ? taskRuns[viewingTaskLogs.id] || [] : [];
|
|
18073
18104
|
const activeRunId = selectedRunId || runs[0]?.runId;
|
|
18074
18105
|
const activeRun = runs.find((r) => r.runId === activeRunId);
|
|
18075
|
-
const activeRunChatItems = activeRun ? reconstructChatItems(activeRun.messages || []) : [];
|
|
18106
|
+
const activeRunChatItems = (0, import_react12.useMemo)(() => activeRun ? reconstructChatItems(activeRun.messages || []) : [], [activeRun]);
|
|
18076
18107
|
const selectedAgentName = viewingTaskLogs ? agents.find((a) => a.id === viewingTaskLogs.agentId)?.name : "";
|
|
18077
18108
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "tab-pane scheduler-tab", children: [
|
|
18078
18109
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "tab-pane__header", children: [
|
|
@@ -18468,7 +18499,7 @@ ${text}</tr>
|
|
|
18468
18499
|
}
|
|
18469
18500
|
|
|
18470
18501
|
// src/VoiceTab.tsx
|
|
18471
|
-
var
|
|
18502
|
+
var import_react14 = __toESM(require_react(), 1);
|
|
18472
18503
|
|
|
18473
18504
|
// src/voice_utils.ts
|
|
18474
18505
|
var END_OF_TURN_MS = 1200;
|
|
@@ -18526,6 +18557,7 @@ ${text}</tr>
|
|
|
18526
18557
|
v.enabled === true,
|
|
18527
18558
|
v.endpoint ?? "",
|
|
18528
18559
|
v.sttModel ?? "",
|
|
18560
|
+
v.ttsEndpoint ?? "",
|
|
18529
18561
|
v.ttsModel ?? "",
|
|
18530
18562
|
v.ttsVoice ?? "",
|
|
18531
18563
|
v.ttsSpeed ?? "",
|
|
@@ -18534,6 +18566,9 @@ ${text}</tr>
|
|
|
18534
18566
|
]);
|
|
18535
18567
|
}
|
|
18536
18568
|
|
|
18569
|
+
// src/VoiceBackendBlock.tsx
|
|
18570
|
+
var import_react13 = __toESM(require_react(), 1);
|
|
18571
|
+
|
|
18537
18572
|
// src/voice_backend_utils.ts
|
|
18538
18573
|
function backendStatusText(status) {
|
|
18539
18574
|
if (status.docker === "denied") return "your user needs to be in the docker group";
|
|
@@ -18548,48 +18583,21 @@ ${text}</tr>
|
|
|
18548
18583
|
return { lines: parts.filter((line) => line.length > 0), remainder };
|
|
18549
18584
|
}
|
|
18550
18585
|
|
|
18551
|
-
// src/
|
|
18586
|
+
// src/VoiceBackendBlock.tsx
|
|
18552
18587
|
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
|
|
18553
|
-
var BACKEND_POLL_MS = 1e4;
|
|
18554
18588
|
var CONFIRM_DELETE_MS = 4e3;
|
|
18555
|
-
|
|
18556
|
-
|
|
18557
|
-
|
|
18558
|
-
|
|
18559
|
-
|
|
18560
|
-
|
|
18561
|
-
}
|
|
18562
|
-
|
|
18563
|
-
const
|
|
18564
|
-
|
|
18565
|
-
|
|
18566
|
-
|
|
18567
|
-
function voiceLabel(v) {
|
|
18568
|
-
const meta = [v.language, v.gender].filter(Boolean).join(", ");
|
|
18569
|
-
return meta ? `${v.id} \u2014 ${meta}` : v.id;
|
|
18570
|
-
}
|
|
18571
|
-
function VoiceTab({ config, onSave, postMessage, catalogResult }) {
|
|
18572
|
-
const current = config.voice ?? EMPTY;
|
|
18573
|
-
const [enabled, setEnabled] = (0, import_react12.useState)(current.enabled);
|
|
18574
|
-
const [endpoint, setEndpoint] = (0, import_react12.useState)(current.endpoint);
|
|
18575
|
-
const [apiKey, setApiKey] = (0, import_react12.useState)(current.apiKey ?? "");
|
|
18576
|
-
const [sttModel, setSttModel] = (0, import_react12.useState)(current.sttModel);
|
|
18577
|
-
const [ttsModel, setTtsModel] = (0, import_react12.useState)(current.ttsModel ?? "");
|
|
18578
|
-
const [ttsVoice, setTtsVoice] = (0, import_react12.useState)(current.ttsVoice ?? "");
|
|
18579
|
-
const [ttsSpeed, setTtsSpeed] = (0, import_react12.useState)(
|
|
18580
|
-
current.ttsSpeed === void 0 ? "" : String(current.ttsSpeed)
|
|
18581
|
-
);
|
|
18582
|
-
const [lang, setLang] = (0, import_react12.useState)(current.lang ?? "");
|
|
18583
|
-
const [fetching, setFetching] = (0, import_react12.useState)(false);
|
|
18584
|
-
const [saveState, setSaveState] = (0, import_react12.useState)("idle");
|
|
18585
|
-
const pendingSave = (0, import_react12.useRef)(null);
|
|
18586
|
-
const [autoStartBackend, setAutoStartBackend] = (0, import_react12.useState)(current.autoStartBackend ?? false);
|
|
18587
|
-
const [backendStatus, setBackendStatus] = (0, import_react12.useState)(null);
|
|
18588
|
-
const [backendBusy, setBackendBusy] = (0, import_react12.useState)(false);
|
|
18589
|
-
const [backendProgress, setBackendProgress] = (0, import_react12.useState)(null);
|
|
18590
|
-
const [backendError, setBackendError] = (0, import_react12.useState)(null);
|
|
18591
|
-
const [confirmingDelete, setConfirmingDelete] = (0, import_react12.useState)(false);
|
|
18592
|
-
const confirmDeleteTimer = (0, import_react12.useRef)(null);
|
|
18589
|
+
function VoiceBackendBlock({
|
|
18590
|
+
target,
|
|
18591
|
+
label,
|
|
18592
|
+
status,
|
|
18593
|
+
onStatusChange,
|
|
18594
|
+
hint
|
|
18595
|
+
}) {
|
|
18596
|
+
const [busy, setBusy] = (0, import_react13.useState)(false);
|
|
18597
|
+
const [progress, setProgress] = (0, import_react13.useState)(null);
|
|
18598
|
+
const [error, setError] = (0, import_react13.useState)(null);
|
|
18599
|
+
const [confirmingDelete, setConfirmingDelete] = (0, import_react13.useState)(false);
|
|
18600
|
+
const confirmDeleteTimer = (0, import_react13.useRef)(null);
|
|
18593
18601
|
const disarmDelete = () => {
|
|
18594
18602
|
if (confirmDeleteTimer.current) clearTimeout(confirmDeleteTimer.current);
|
|
18595
18603
|
confirmDeleteTimer.current = null;
|
|
@@ -18598,44 +18606,33 @@ ${text}</tr>
|
|
|
18598
18606
|
const armDelete = () => {
|
|
18599
18607
|
if (confirmDeleteTimer.current) clearTimeout(confirmDeleteTimer.current);
|
|
18600
18608
|
setConfirmingDelete(true);
|
|
18601
|
-
confirmDeleteTimer.current = setTimeout(
|
|
18609
|
+
confirmDeleteTimer.current = setTimeout(
|
|
18610
|
+
() => setConfirmingDelete(false),
|
|
18611
|
+
CONFIRM_DELETE_MS
|
|
18612
|
+
);
|
|
18602
18613
|
};
|
|
18603
|
-
(0,
|
|
18614
|
+
(0, import_react13.useEffect)(
|
|
18604
18615
|
() => () => {
|
|
18605
18616
|
if (confirmDeleteTimer.current) clearTimeout(confirmDeleteTimer.current);
|
|
18606
18617
|
},
|
|
18607
18618
|
[]
|
|
18608
18619
|
);
|
|
18609
|
-
const lastContainer = (0,
|
|
18610
|
-
|
|
18611
|
-
lastContainer.current
|
|
18612
|
-
|
|
18613
|
-
};
|
|
18614
|
-
const fetchBackendStatus = async () => {
|
|
18615
|
-
try {
|
|
18616
|
-
const res = await fetch("/api/voice/backend");
|
|
18617
|
-
if (!res.ok) return;
|
|
18618
|
-
const status = await res.json();
|
|
18619
|
-
if (status.container === "running" && lastContainer.current !== "running") {
|
|
18620
|
-
setBackendError(null);
|
|
18621
|
-
}
|
|
18622
|
-
adoptBackendStatus(status);
|
|
18623
|
-
} catch {
|
|
18620
|
+
const lastContainer = (0, import_react13.useRef)(null);
|
|
18621
|
+
(0, import_react13.useEffect)(() => {
|
|
18622
|
+
if (status.container === "running" && lastContainer.current !== "running") {
|
|
18623
|
+
setError(null);
|
|
18624
18624
|
}
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
|
|
18629
|
-
|
|
18630
|
-
|
|
18631
|
-
|
|
18632
|
-
setBackendBusy(true);
|
|
18633
|
-
setBackendError(null);
|
|
18634
|
-
setBackendProgress("Starting\u2026");
|
|
18625
|
+
lastContainer.current = status.container;
|
|
18626
|
+
}, [status]);
|
|
18627
|
+
const query = `?target=${target}`;
|
|
18628
|
+
const start = async () => {
|
|
18629
|
+
setBusy(true);
|
|
18630
|
+
setError(null);
|
|
18631
|
+
setProgress("Starting\u2026");
|
|
18635
18632
|
try {
|
|
18636
|
-
const res = await fetch(
|
|
18633
|
+
const res = await fetch(`/api/voice/backend/start${query}`, { method: "POST" });
|
|
18637
18634
|
if (!res.ok || !res.body) {
|
|
18638
|
-
|
|
18635
|
+
setError(await res.text().catch(() => "") || "Start failed.");
|
|
18639
18636
|
return;
|
|
18640
18637
|
}
|
|
18641
18638
|
const reader = res.body.getReader();
|
|
@@ -18650,76 +18647,175 @@ ${text}</tr>
|
|
|
18650
18647
|
);
|
|
18651
18648
|
buffer = remainder;
|
|
18652
18649
|
for (const line of lines) {
|
|
18653
|
-
let
|
|
18650
|
+
let p;
|
|
18654
18651
|
try {
|
|
18655
|
-
|
|
18652
|
+
p = JSON.parse(line);
|
|
18656
18653
|
} catch {
|
|
18657
18654
|
continue;
|
|
18658
18655
|
}
|
|
18659
|
-
if (
|
|
18660
|
-
|
|
18661
|
-
|
|
18662
|
-
|
|
18656
|
+
if (p.status) {
|
|
18657
|
+
lastContainer.current = p.status.container;
|
|
18658
|
+
onStatusChange(p.status);
|
|
18659
|
+
setProgress(null);
|
|
18660
|
+
if (p.step === "error") setError(p.message);
|
|
18663
18661
|
} else {
|
|
18664
|
-
|
|
18662
|
+
setProgress(p.message);
|
|
18665
18663
|
}
|
|
18666
18664
|
}
|
|
18667
18665
|
}
|
|
18668
18666
|
} catch (err) {
|
|
18669
|
-
|
|
18667
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
18670
18668
|
} finally {
|
|
18671
|
-
|
|
18672
|
-
|
|
18673
|
-
fetchBackendStatus();
|
|
18669
|
+
setBusy(false);
|
|
18670
|
+
setProgress(null);
|
|
18674
18671
|
}
|
|
18675
18672
|
};
|
|
18676
|
-
const
|
|
18677
|
-
|
|
18678
|
-
|
|
18673
|
+
const stop = async () => {
|
|
18674
|
+
setBusy(true);
|
|
18675
|
+
setError(null);
|
|
18679
18676
|
try {
|
|
18680
|
-
const res = await fetch(
|
|
18681
|
-
if (res.ok)
|
|
18677
|
+
const res = await fetch(`/api/voice/backend/stop${query}`, { method: "POST" });
|
|
18678
|
+
if (res.ok) {
|
|
18679
|
+
const status2 = await res.json();
|
|
18680
|
+
lastContainer.current = status2.container;
|
|
18681
|
+
onStatusChange(status2);
|
|
18682
|
+
}
|
|
18682
18683
|
} catch {
|
|
18683
18684
|
} finally {
|
|
18684
|
-
|
|
18685
|
-
fetchBackendStatus();
|
|
18685
|
+
setBusy(false);
|
|
18686
18686
|
}
|
|
18687
18687
|
};
|
|
18688
|
-
const
|
|
18688
|
+
const remove = async () => {
|
|
18689
18689
|
disarmDelete();
|
|
18690
|
-
|
|
18691
|
-
|
|
18690
|
+
setBusy(true);
|
|
18691
|
+
setError(null);
|
|
18692
18692
|
try {
|
|
18693
|
-
const res = await fetch(
|
|
18694
|
-
if (res.ok)
|
|
18695
|
-
|
|
18693
|
+
const res = await fetch(`/api/voice/backend/delete${query}`, { method: "POST" });
|
|
18694
|
+
if (res.ok) {
|
|
18695
|
+
const status2 = await res.json();
|
|
18696
|
+
lastContainer.current = status2.container;
|
|
18697
|
+
onStatusChange(status2);
|
|
18698
|
+
} else setError(await res.text().catch(() => "") || "Delete failed.");
|
|
18696
18699
|
} catch {
|
|
18697
18700
|
} finally {
|
|
18698
|
-
|
|
18699
|
-
fetchBackendStatus();
|
|
18701
|
+
setBusy(false);
|
|
18700
18702
|
}
|
|
18701
18703
|
};
|
|
18702
|
-
(0,
|
|
18703
|
-
|
|
18704
|
-
|
|
18705
|
-
|
|
18704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "form-group", children: [
|
|
18705
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "voice-backend-status", children: [
|
|
18706
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: progress ?? backendStatusText(status) }),
|
|
18707
|
+
status.container === "running" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: stop, disabled: busy, children: busy ? "Stopping\u2026" : "Stop" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: start, disabled: busy, children: busy ? "Starting\u2026" : "Start" }),
|
|
18708
|
+
status.container !== "absent" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
18709
|
+
"button",
|
|
18710
|
+
{
|
|
18711
|
+
type: "button",
|
|
18712
|
+
onClick: confirmingDelete ? remove : armDelete,
|
|
18713
|
+
disabled: busy,
|
|
18714
|
+
children: confirmingDelete ? "Really delete?" : "Delete"
|
|
18715
|
+
}
|
|
18716
|
+
)
|
|
18717
|
+
] }),
|
|
18718
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { className: "form-error", children: error }),
|
|
18719
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("small", { children: [
|
|
18720
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("strong", { children: [
|
|
18721
|
+
label,
|
|
18722
|
+
"."
|
|
18723
|
+
] }),
|
|
18724
|
+
" ",
|
|
18725
|
+
hint
|
|
18726
|
+
] })
|
|
18727
|
+
] });
|
|
18728
|
+
}
|
|
18729
|
+
|
|
18730
|
+
// src/VoiceTab.tsx
|
|
18731
|
+
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
|
|
18732
|
+
var BACKEND_POLL_MS = 1e4;
|
|
18733
|
+
var EMPTY = { enabled: false, endpoint: "", sttModel: "" };
|
|
18734
|
+
var LOCAL_DEFAULTS = {
|
|
18735
|
+
endpoint: "http://127.0.0.1:8969/v1",
|
|
18736
|
+
sttModel: "Systran/faster-whisper-small",
|
|
18737
|
+
ttsModel: "speaches-ai/Kokoro-82M-v1.0-ONNX",
|
|
18738
|
+
ttsVoice: "af_heart"
|
|
18739
|
+
};
|
|
18740
|
+
var EDGE_TTS_DEFAULTS = {
|
|
18741
|
+
ttsEndpoint: "http://127.0.0.1:5050/v1",
|
|
18742
|
+
ttsModel: "tts-1",
|
|
18743
|
+
ttsVoice: "it-IT-ElsaNeural"
|
|
18744
|
+
};
|
|
18745
|
+
function withCurrent(ids, current) {
|
|
18746
|
+
const trimmed = current.trim();
|
|
18747
|
+
if (!trimmed || ids.includes(trimmed)) return ids;
|
|
18748
|
+
return [trimmed, ...ids];
|
|
18749
|
+
}
|
|
18750
|
+
function voiceLabel(v) {
|
|
18751
|
+
const meta = [v.language, v.gender].filter(Boolean).join(", ");
|
|
18752
|
+
return meta ? `${v.id} \u2014 ${meta}` : v.id;
|
|
18753
|
+
}
|
|
18754
|
+
function VoiceTab({ config, onSave, postMessage, sttCatalogResult, ttsCatalogResult }) {
|
|
18755
|
+
const current = config.voice ?? EMPTY;
|
|
18756
|
+
const [enabled, setEnabled] = (0, import_react14.useState)(current.enabled);
|
|
18757
|
+
const [endpoint, setEndpoint] = (0, import_react14.useState)(current.endpoint);
|
|
18758
|
+
const [apiKey, setApiKey] = (0, import_react14.useState)(current.apiKey ?? "");
|
|
18759
|
+
const [sttModel, setSttModel] = (0, import_react14.useState)(current.sttModel);
|
|
18760
|
+
const [ttsEndpoint, setTtsEndpoint] = (0, import_react14.useState)(current.ttsEndpoint ?? "");
|
|
18761
|
+
const [ttsApiKey, setTtsApiKey] = (0, import_react14.useState)(current.ttsApiKey ?? "");
|
|
18762
|
+
const [ttsModel, setTtsModel] = (0, import_react14.useState)(current.ttsModel ?? "");
|
|
18763
|
+
const [ttsVoice, setTtsVoice] = (0, import_react14.useState)(current.ttsVoice ?? "");
|
|
18764
|
+
const [ttsSpeed, setTtsSpeed] = (0, import_react14.useState)(
|
|
18765
|
+
current.ttsSpeed === void 0 ? "" : String(current.ttsSpeed)
|
|
18766
|
+
);
|
|
18767
|
+
const [lang, setLang] = (0, import_react14.useState)(current.lang ?? "");
|
|
18768
|
+
const [fetching, setFetching] = (0, import_react14.useState)(false);
|
|
18769
|
+
const [fetchingTts, setFetchingTts] = (0, import_react14.useState)(false);
|
|
18770
|
+
const [saveState, setSaveState] = (0, import_react14.useState)("idle");
|
|
18771
|
+
const pendingSave = (0, import_react14.useRef)(null);
|
|
18772
|
+
const [autoStartBackend, setAutoStartBackend] = (0, import_react14.useState)(current.autoStartBackend ?? false);
|
|
18773
|
+
const [backendStatuses, setBackendStatuses] = (0, import_react14.useState)(null);
|
|
18774
|
+
const fetchBackendStatuses = async () => {
|
|
18775
|
+
try {
|
|
18776
|
+
const res = await fetch("/api/voice/backend");
|
|
18777
|
+
if (!res.ok) return;
|
|
18778
|
+
const statuses = await res.json();
|
|
18779
|
+
setBackendStatuses(statuses);
|
|
18780
|
+
} catch {
|
|
18781
|
+
}
|
|
18782
|
+
};
|
|
18783
|
+
(0, import_react14.useEffect)(() => {
|
|
18784
|
+
fetchBackendStatuses();
|
|
18785
|
+
const interval = setInterval(fetchBackendStatuses, BACKEND_POLL_MS);
|
|
18786
|
+
return () => clearInterval(interval);
|
|
18787
|
+
}, []);
|
|
18788
|
+
const adoptStatus = (target) => (status) => {
|
|
18789
|
+
setBackendStatuses(
|
|
18790
|
+
(prev) => prev ? { ...prev, [target]: status } : { stt: status, tts: null }
|
|
18791
|
+
);
|
|
18792
|
+
};
|
|
18793
|
+
(0, import_react14.useEffect)(() => {
|
|
18794
|
+
if (sttCatalogResult) setFetching(false);
|
|
18795
|
+
}, [sttCatalogResult]);
|
|
18796
|
+
(0, import_react14.useEffect)(() => {
|
|
18797
|
+
if (ttsCatalogResult) setFetchingTts(false);
|
|
18798
|
+
}, [ttsCatalogResult]);
|
|
18799
|
+
(0, import_react14.useEffect)(() => {
|
|
18706
18800
|
if (saveState !== "saving" || pendingSave.current === null) return;
|
|
18707
18801
|
if (voiceSignature(config.voice) !== pendingSave.current) return;
|
|
18708
18802
|
setSaveState("saved");
|
|
18709
18803
|
}, [config.voice, saveState]);
|
|
18710
|
-
(0,
|
|
18804
|
+
(0, import_react14.useEffect)(() => {
|
|
18711
18805
|
if (saveState !== "saved") return;
|
|
18712
18806
|
const clear = setTimeout(() => setSaveState("idle"), 2500);
|
|
18713
18807
|
return () => clearTimeout(clear);
|
|
18714
18808
|
}, [saveState]);
|
|
18715
|
-
(0,
|
|
18809
|
+
(0, import_react14.useEffect)(() => {
|
|
18716
18810
|
if (saveState !== "saving") return;
|
|
18717
18811
|
const giveUp = setTimeout(() => setSaveState("idle"), 6e3);
|
|
18718
18812
|
return () => clearTimeout(giveUp);
|
|
18719
18813
|
}, [saveState]);
|
|
18720
|
-
const
|
|
18721
|
-
const
|
|
18722
|
-
const
|
|
18814
|
+
const sttCatalog = sttCatalogResult?.ok ? sttCatalogResult.catalog : null;
|
|
18815
|
+
const sttFetchError = sttCatalogResult && !sttCatalogResult.ok ? sttCatalogResult.error : null;
|
|
18816
|
+
const ttsCatalog = ttsCatalogResult?.ok ? ttsCatalogResult.catalog : !ttsEndpoint.trim() ? sttCatalog : null;
|
|
18817
|
+
const ttsFetchError = ttsCatalogResult && !ttsCatalogResult.ok ? ttsCatalogResult.error : null;
|
|
18818
|
+
const fetchSttCatalog = () => {
|
|
18723
18819
|
if (!endpoint.trim()) return;
|
|
18724
18820
|
setFetching(true);
|
|
18725
18821
|
postMessage({
|
|
@@ -18728,10 +18824,22 @@ ${text}</tr>
|
|
|
18728
18824
|
apiKey: apiKey.trim() || void 0
|
|
18729
18825
|
});
|
|
18730
18826
|
};
|
|
18731
|
-
const
|
|
18827
|
+
const fetchTtsCatalog = () => {
|
|
18828
|
+
const ep = ttsEndpoint.trim();
|
|
18829
|
+
setFetchingTts(true);
|
|
18830
|
+
postMessage({
|
|
18831
|
+
type: "fetchVoiceModels",
|
|
18832
|
+
endpoint: ep,
|
|
18833
|
+
apiKey: ttsApiKey.trim() || void 0,
|
|
18834
|
+
target: "tts"
|
|
18835
|
+
});
|
|
18836
|
+
};
|
|
18837
|
+
const voicesForModel = ttsCatalog?.tts.find((m) => m.id === ttsModel.trim())?.voices ?? [];
|
|
18732
18838
|
const save = () => {
|
|
18733
18839
|
const voice = { enabled, endpoint: endpoint.trim(), sttModel: sttModel.trim() };
|
|
18734
18840
|
if (apiKey.trim()) voice.apiKey = apiKey.trim();
|
|
18841
|
+
if (ttsEndpoint.trim()) voice.ttsEndpoint = ttsEndpoint.trim();
|
|
18842
|
+
if (ttsApiKey.trim()) voice.ttsApiKey = ttsApiKey.trim();
|
|
18735
18843
|
if (ttsModel.trim()) voice.ttsModel = ttsModel.trim();
|
|
18736
18844
|
if (ttsVoice.trim()) voice.ttsVoice = ttsVoice.trim();
|
|
18737
18845
|
const speed = Number.parseFloat(ttsSpeed);
|
|
@@ -18744,12 +18852,13 @@ ${text}</tr>
|
|
|
18744
18852
|
setSaveState("saving");
|
|
18745
18853
|
onSave({ ...config, voice });
|
|
18746
18854
|
};
|
|
18747
|
-
const
|
|
18748
|
-
|
|
18749
|
-
|
|
18750
|
-
/* @__PURE__ */ (0,
|
|
18751
|
-
|
|
18752
|
-
|
|
18855
|
+
const showSttBackend = backendStatuses !== null && backendStatuses.stt.docker !== "absent" && backendStatuses.stt.port !== null;
|
|
18856
|
+
const showTtsBackend = backendStatuses !== null && backendStatuses.tts !== null && backendStatuses.tts.docker !== "absent" && backendStatuses.tts.port !== null;
|
|
18857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "glass-form", children: [
|
|
18858
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h4", { children: "Voice" }),
|
|
18859
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "glass-form__body", children: [
|
|
18860
|
+
!endpoint.trim() && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
18861
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18753
18862
|
"button",
|
|
18754
18863
|
{
|
|
18755
18864
|
type: "button",
|
|
@@ -18763,25 +18872,31 @@ ${text}</tr>
|
|
|
18763
18872
|
children: "Use local defaults"
|
|
18764
18873
|
}
|
|
18765
18874
|
),
|
|
18766
|
-
/* @__PURE__ */ (0,
|
|
18875
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Fills the form for a fully local backend (a Speaches container on port 8969) that caretaker can run for you if Docker is installed. Nothing is saved yet \u2014 adjust anything, including the port in the endpoint, then press Save; a Start button appears below afterwards." })
|
|
18767
18876
|
] }),
|
|
18768
|
-
|
|
18769
|
-
|
|
18770
|
-
|
|
18771
|
-
|
|
18772
|
-
|
|
18773
|
-
|
|
18774
|
-
|
|
18775
|
-
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
|
|
18877
|
+
showSttBackend && backendStatuses && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18878
|
+
VoiceBackendBlock,
|
|
18879
|
+
{
|
|
18880
|
+
target: "stt",
|
|
18881
|
+
label: "Speech backend (Speaches)",
|
|
18882
|
+
status: backendStatuses.stt,
|
|
18883
|
+
onStatusChange: adoptStatus("stt"),
|
|
18884
|
+
hint: "The first start downloads about 2 GB. The container publishes on the port in your endpoint \u2014 if that port is taken, change it there and save; caretaker never picks a port for you. Delete removes the container but keeps the downloaded models \u2014 try it when the backend misbehaves after switching networks."
|
|
18885
|
+
}
|
|
18886
|
+
),
|
|
18887
|
+
showTtsBackend && backendStatuses?.tts && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18888
|
+
VoiceBackendBlock,
|
|
18889
|
+
{
|
|
18890
|
+
target: "tts",
|
|
18891
|
+
label: "Synthesis backend (edge-tts)",
|
|
18892
|
+
status: backendStatuses.tts,
|
|
18893
|
+
onStatusChange: adoptStatus("tts"),
|
|
18894
|
+
hint: "A small image. The container publishes on the port in your synthesis endpoint. Delete removes the container; the image stays cached."
|
|
18895
|
+
}
|
|
18896
|
+
),
|
|
18897
|
+
(showSttBackend || showTtsBackend) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group form-group--checkbox", children: [
|
|
18898
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { htmlFor: "voice-backend-autostart", children: [
|
|
18899
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18785
18900
|
"input",
|
|
18786
18901
|
{
|
|
18787
18902
|
id: "voice-backend-autostart",
|
|
@@ -18791,11 +18906,11 @@ ${text}</tr>
|
|
|
18791
18906
|
}
|
|
18792
18907
|
),
|
|
18793
18908
|
"Start automatically with caretaker"
|
|
18794
|
-
] })
|
|
18795
|
-
/* @__PURE__ */ (0,
|
|
18909
|
+
] }),
|
|
18910
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Applies to both containers: a Speaches pull does not block the edge-tts start \u2014 they are independent." })
|
|
18796
18911
|
] }),
|
|
18797
|
-
/* @__PURE__ */ (0,
|
|
18798
|
-
/* @__PURE__ */ (0,
|
|
18912
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "form-group form-group--checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { htmlFor: "voice-enabled", children: [
|
|
18913
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18799
18914
|
"input",
|
|
18800
18915
|
{
|
|
18801
18916
|
id: "voice-enabled",
|
|
@@ -18806,9 +18921,9 @@ ${text}</tr>
|
|
|
18806
18921
|
),
|
|
18807
18922
|
"Enable voice mode"
|
|
18808
18923
|
] }) }),
|
|
18809
|
-
/* @__PURE__ */ (0,
|
|
18810
|
-
/* @__PURE__ */ (0,
|
|
18811
|
-
/* @__PURE__ */ (0,
|
|
18924
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
18925
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-endpoint", children: "Speech Endpoint" }),
|
|
18926
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18812
18927
|
"input",
|
|
18813
18928
|
{
|
|
18814
18929
|
id: "voice-endpoint",
|
|
@@ -18818,18 +18933,18 @@ ${text}</tr>
|
|
|
18818
18933
|
onChange: (e) => setEndpoint(e.target.value)
|
|
18819
18934
|
}
|
|
18820
18935
|
),
|
|
18821
|
-
/* @__PURE__ */ (0,
|
|
18936
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
|
|
18822
18937
|
"OpenAI-compatible speech endpoint \u2014 e.g. a local Speaches container. Transcription posts to ",
|
|
18823
|
-
/* @__PURE__ */ (0,
|
|
18824
|
-
", synthesis to",
|
|
18938
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: "/audio/transcriptions" }),
|
|
18939
|
+
". When no separate synthesis endpoint is set below, synthesis also posts to",
|
|
18825
18940
|
" ",
|
|
18826
|
-
/* @__PURE__ */ (0,
|
|
18827
|
-
"
|
|
18941
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: "/audio/speech" }),
|
|
18942
|
+
" here. Voice is unavailable in the VSCode sidebar."
|
|
18828
18943
|
] })
|
|
18829
18944
|
] }),
|
|
18830
|
-
/* @__PURE__ */ (0,
|
|
18831
|
-
/* @__PURE__ */ (0,
|
|
18832
|
-
/* @__PURE__ */ (0,
|
|
18945
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
18946
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-key", children: "API Key (optional)" }),
|
|
18947
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18833
18948
|
"input",
|
|
18834
18949
|
{
|
|
18835
18950
|
id: "voice-key",
|
|
@@ -18839,30 +18954,30 @@ ${text}</tr>
|
|
|
18839
18954
|
onChange: (e) => setApiKey(e.target.value)
|
|
18840
18955
|
}
|
|
18841
18956
|
),
|
|
18842
|
-
/* @__PURE__ */ (0,
|
|
18957
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Stored encrypted. Never sent to the browser \u2014 requests are proxied." })
|
|
18843
18958
|
] }),
|
|
18844
|
-
/* @__PURE__ */ (0,
|
|
18845
|
-
/* @__PURE__ */ (0,
|
|
18846
|
-
/* @__PURE__ */ (0,
|
|
18847
|
-
|
|
18959
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
18960
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: fetchSttCatalog, disabled: fetching || !endpoint.trim(), children: fetching ? "Fetching\u2026" : "Fetch models" }),
|
|
18961
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Reads the endpoint's installed models so the transcription field below becomes a list. Endpoints that do not report a task per model still work \u2014 the field stays free text." }),
|
|
18962
|
+
sttFetchError && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { className: "form-error", children: [
|
|
18848
18963
|
"Fetch failed: ",
|
|
18849
|
-
|
|
18964
|
+
sttFetchError
|
|
18850
18965
|
] })
|
|
18851
18966
|
] }),
|
|
18852
|
-
/* @__PURE__ */ (0,
|
|
18853
|
-
/* @__PURE__ */ (0,
|
|
18854
|
-
|
|
18967
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
18968
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-stt", children: "Transcription Model" }),
|
|
18969
|
+
sttCatalog && sttCatalog.stt.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
18855
18970
|
"select",
|
|
18856
18971
|
{
|
|
18857
18972
|
id: "voice-stt",
|
|
18858
18973
|
value: sttModel,
|
|
18859
18974
|
onChange: (e) => setSttModel(e.target.value),
|
|
18860
18975
|
children: [
|
|
18861
|
-
/* @__PURE__ */ (0,
|
|
18862
|
-
withCurrent(
|
|
18976
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "-- Select a model --" }),
|
|
18977
|
+
withCurrent(sttCatalog.stt, sttModel).map((id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: id, children: id }, id))
|
|
18863
18978
|
]
|
|
18864
18979
|
}
|
|
18865
|
-
) : /* @__PURE__ */ (0,
|
|
18980
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18866
18981
|
"input",
|
|
18867
18982
|
{
|
|
18868
18983
|
id: "voice-stt",
|
|
@@ -18873,68 +18988,136 @@ ${text}</tr>
|
|
|
18873
18988
|
}
|
|
18874
18989
|
)
|
|
18875
18990
|
] }),
|
|
18876
|
-
/* @__PURE__ */ (0,
|
|
18877
|
-
/* @__PURE__ */ (0,
|
|
18878
|
-
|
|
18991
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
18992
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-tts-endpoint", children: "Synthesis Endpoint (optional)" }),
|
|
18993
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18994
|
+
"input",
|
|
18995
|
+
{
|
|
18996
|
+
id: "voice-tts-endpoint",
|
|
18997
|
+
type: "text",
|
|
18998
|
+
placeholder: "Leave empty when one server does both",
|
|
18999
|
+
value: ttsEndpoint,
|
|
19000
|
+
onChange: (e) => setTtsEndpoint(e.target.value)
|
|
19001
|
+
}
|
|
19002
|
+
),
|
|
19003
|
+
!ttsEndpoint.trim() && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19004
|
+
"button",
|
|
19005
|
+
{
|
|
19006
|
+
type: "button",
|
|
19007
|
+
onClick: () => {
|
|
19008
|
+
setTtsEndpoint(EDGE_TTS_DEFAULTS.ttsEndpoint);
|
|
19009
|
+
setTtsModel(EDGE_TTS_DEFAULTS.ttsModel);
|
|
19010
|
+
setTtsVoice(EDGE_TTS_DEFAULTS.ttsVoice);
|
|
19011
|
+
},
|
|
19012
|
+
style: { marginTop: "0.4em" },
|
|
19013
|
+
children: "Use Microsoft Edge voices"
|
|
19014
|
+
}
|
|
19015
|
+
),
|
|
19016
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
|
|
19017
|
+
"Leave empty when one server does both. A local openai-edge-tts container gives you Microsoft Neural voices such as",
|
|
19018
|
+
" ",
|
|
19019
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: "it-IT-ElsaNeural" }),
|
|
19020
|
+
" or ",
|
|
19021
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: "it-IT-DiegoNeural" }),
|
|
19022
|
+
", but cannot transcribe \u2014 transcription always uses the endpoint above. Nothing is saved yet \u2014 press Save after adjusting."
|
|
19023
|
+
] })
|
|
19024
|
+
] }),
|
|
19025
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
19026
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-tts-key", children: "Synthesis API Key (optional)" }),
|
|
19027
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19028
|
+
"input",
|
|
19029
|
+
{
|
|
19030
|
+
id: "voice-tts-key",
|
|
19031
|
+
type: "password",
|
|
19032
|
+
placeholder: "Leave empty for a local server with no auth",
|
|
19033
|
+
value: ttsApiKey,
|
|
19034
|
+
onChange: (e) => setTtsApiKey(e.target.value)
|
|
19035
|
+
}
|
|
19036
|
+
),
|
|
19037
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Stored encrypted. Only sent to the synthesis endpoint \u2014 the transcription key is never sent there, and vice versa." })
|
|
19038
|
+
] }),
|
|
19039
|
+
ttsEndpoint.trim() && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
19040
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19041
|
+
"button",
|
|
19042
|
+
{
|
|
19043
|
+
type: "button",
|
|
19044
|
+
onClick: fetchTtsCatalog,
|
|
19045
|
+
disabled: fetchingTts,
|
|
19046
|
+
children: fetchingTts ? "Fetching\u2026" : "Fetch synthesis models"
|
|
19047
|
+
}
|
|
19048
|
+
),
|
|
19049
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
|
|
19050
|
+
"Reads the synthesis endpoint's models and voices. For edge-tts, the voice list comes from ",
|
|
19051
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("code", { children: "/voices/all" }),
|
|
19052
|
+
"."
|
|
19053
|
+
] }),
|
|
19054
|
+
ttsFetchError && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { className: "form-error", children: [
|
|
19055
|
+
"Fetch failed: ",
|
|
19056
|
+
ttsFetchError
|
|
19057
|
+
] })
|
|
19058
|
+
] }),
|
|
19059
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
19060
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-tts", children: "Synthesis Model (optional)" }),
|
|
19061
|
+
ttsCatalog && ttsCatalog.tts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
18879
19062
|
"select",
|
|
18880
19063
|
{
|
|
18881
19064
|
id: "voice-tts",
|
|
18882
19065
|
value: ttsModel,
|
|
18883
19066
|
onChange: (e) => {
|
|
18884
19067
|
setTtsModel(e.target.value);
|
|
18885
|
-
const next =
|
|
19068
|
+
const next = ttsCatalog.tts.find((m) => m.id === e.target.value);
|
|
18886
19069
|
if (next && !next.voices.some((v) => v.id === ttsVoice)) {
|
|
18887
19070
|
setTtsVoice(next.voices.length === 1 ? next.voices[0].id : "");
|
|
18888
19071
|
}
|
|
18889
19072
|
},
|
|
18890
19073
|
children: [
|
|
18891
|
-
/* @__PURE__ */ (0,
|
|
19074
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "-- None (dictation only) --" }),
|
|
18892
19075
|
withCurrent(
|
|
18893
|
-
|
|
19076
|
+
ttsCatalog.tts.map((m) => m.id),
|
|
18894
19077
|
ttsModel
|
|
18895
|
-
).map((id) => /* @__PURE__ */ (0,
|
|
19078
|
+
).map((id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: id, children: id }, id))
|
|
18896
19079
|
]
|
|
18897
19080
|
}
|
|
18898
|
-
) : /* @__PURE__ */ (0,
|
|
19081
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18899
19082
|
"input",
|
|
18900
19083
|
{
|
|
18901
19084
|
id: "voice-tts",
|
|
18902
19085
|
type: "text",
|
|
18903
|
-
placeholder: "e.g. speaches-ai/Kokoro-82M-v1.0-ONNX",
|
|
19086
|
+
placeholder: "e.g. speaches-ai/Kokoro-82M-v1.0-ONNX or tts-1",
|
|
18904
19087
|
value: ttsModel,
|
|
18905
19088
|
onChange: (e) => setTtsModel(e.target.value)
|
|
18906
19089
|
}
|
|
18907
19090
|
),
|
|
18908
|
-
/* @__PURE__ */ (0,
|
|
19091
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Required for conversation mode. Without it, only dictation is offered." })
|
|
18909
19092
|
] }),
|
|
18910
|
-
/* @__PURE__ */ (0,
|
|
18911
|
-
/* @__PURE__ */ (0,
|
|
18912
|
-
voicesForModel.length > 0 ? /* @__PURE__ */ (0,
|
|
19093
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
19094
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-voice", children: "Voice (optional)" }),
|
|
19095
|
+
voicesForModel.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
18913
19096
|
"select",
|
|
18914
19097
|
{
|
|
18915
19098
|
id: "voice-voice",
|
|
18916
19099
|
value: ttsVoice,
|
|
18917
19100
|
onChange: (e) => setTtsVoice(e.target.value),
|
|
18918
19101
|
children: [
|
|
18919
|
-
/* @__PURE__ */ (0,
|
|
18920
|
-
voicesForModel.map((v) => /* @__PURE__ */ (0,
|
|
19102
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "-- Select a voice --" }),
|
|
19103
|
+
voicesForModel.map((v) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: v.id, children: voiceLabel(v) }, v.id))
|
|
18921
19104
|
]
|
|
18922
19105
|
}
|
|
18923
|
-
) : /* @__PURE__ */ (0,
|
|
19106
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18924
19107
|
"input",
|
|
18925
19108
|
{
|
|
18926
19109
|
id: "voice-voice",
|
|
18927
19110
|
type: "text",
|
|
18928
|
-
placeholder: "e.g.
|
|
19111
|
+
placeholder: "e.g. af_heart or it-IT-ElsaNeural",
|
|
18929
19112
|
value: ttsVoice,
|
|
18930
19113
|
onChange: (e) => setTtsVoice(e.target.value)
|
|
18931
19114
|
}
|
|
18932
19115
|
),
|
|
18933
|
-
/* @__PURE__ */ (0,
|
|
19116
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Pick one whose language matches yours. A model trained mostly on English keeps an English inflection even on its other-language voices." })
|
|
18934
19117
|
] }),
|
|
18935
|
-
/* @__PURE__ */ (0,
|
|
18936
|
-
/* @__PURE__ */ (0,
|
|
18937
|
-
/* @__PURE__ */ (0,
|
|
19118
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
19119
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-speed", children: "Speaking Rate (optional)" }),
|
|
19120
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18938
19121
|
"input",
|
|
18939
19122
|
{
|
|
18940
19123
|
id: "voice-speed",
|
|
@@ -18947,11 +19130,11 @@ ${text}</tr>
|
|
|
18947
19130
|
onChange: (e) => setTtsSpeed(e.target.value)
|
|
18948
19131
|
}
|
|
18949
19132
|
),
|
|
18950
|
-
/* @__PURE__ */ (0,
|
|
19133
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "Multiplier, clamped to 0.5\u20132. Useful because some voices are just slow: raise it if the reply drags. Piper responds less to this than Kokoro, since for Piper it stretches phoneme durations." })
|
|
18951
19134
|
] }),
|
|
18952
|
-
/* @__PURE__ */ (0,
|
|
18953
|
-
/* @__PURE__ */ (0,
|
|
18954
|
-
/* @__PURE__ */ (0,
|
|
19135
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-group", children: [
|
|
19136
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: "voice-lang", children: "Language (optional)" }),
|
|
19137
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18955
19138
|
"input",
|
|
18956
19139
|
{
|
|
18957
19140
|
id: "voice-lang",
|
|
@@ -18963,21 +19146,22 @@ ${text}</tr>
|
|
|
18963
19146
|
)
|
|
18964
19147
|
] })
|
|
18965
19148
|
] }),
|
|
18966
|
-
/* @__PURE__ */ (0,
|
|
18967
|
-
/* @__PURE__ */ (0,
|
|
18968
|
-
/* @__PURE__ */ (0,
|
|
19149
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "form-actions", children: [
|
|
19150
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: save, children: "Save" }),
|
|
19151
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { role: "status", "aria-live": "polite", className: "form-save-state", children: saveState === "saving" ? "Saving\u2026" : saveState === "saved" ? "Saved \u2713" : "" })
|
|
18969
19152
|
] })
|
|
18970
19153
|
] });
|
|
18971
19154
|
}
|
|
18972
19155
|
|
|
18973
19156
|
// src/SettingsPanel.tsx
|
|
18974
|
-
var
|
|
19157
|
+
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
|
|
18975
19158
|
function SettingsPanel({
|
|
18976
19159
|
layout = "compact",
|
|
18977
19160
|
postMessage,
|
|
18978
19161
|
settingsData,
|
|
18979
19162
|
modelsResult,
|
|
18980
|
-
|
|
19163
|
+
sttCatalogResult,
|
|
19164
|
+
ttsCatalogResult,
|
|
18981
19165
|
setModelsResult,
|
|
18982
19166
|
refreshingSourceId,
|
|
18983
19167
|
refreshOutcome,
|
|
@@ -18987,16 +19171,16 @@ ${text}</tr>
|
|
|
18987
19171
|
taskRuns = {},
|
|
18988
19172
|
onClose
|
|
18989
19173
|
}) {
|
|
18990
|
-
const [activeTab, setActiveTab] = (0,
|
|
19174
|
+
const [activeTab, setActiveTab] = (0, import_react15.useState)("providers");
|
|
18991
19175
|
if (!settingsData) {
|
|
18992
|
-
return /* @__PURE__ */ (0,
|
|
18993
|
-
/* @__PURE__ */ (0,
|
|
18994
|
-
/* @__PURE__ */ (0,
|
|
19176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "settings-panel settings-panel--loading", children: [
|
|
19177
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, children: [
|
|
19178
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ArrowLeft, { size: 14 }),
|
|
18995
19179
|
" Back to Chat"
|
|
18996
19180
|
] }),
|
|
18997
|
-
/* @__PURE__ */ (0,
|
|
18998
|
-
/* @__PURE__ */ (0,
|
|
18999
|
-
/* @__PURE__ */ (0,
|
|
19181
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "settings-panel__loading-spinner", children: [
|
|
19182
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "spinner" }),
|
|
19183
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Loading configurations..." })
|
|
19000
19184
|
] })
|
|
19001
19185
|
] });
|
|
19002
19186
|
}
|
|
@@ -19004,7 +19188,7 @@ ${text}</tr>
|
|
|
19004
19188
|
const renderTabContent = () => {
|
|
19005
19189
|
switch (activeTab) {
|
|
19006
19190
|
case "providers":
|
|
19007
|
-
return /* @__PURE__ */ (0,
|
|
19191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19008
19192
|
ProvidersTab,
|
|
19009
19193
|
{
|
|
19010
19194
|
config,
|
|
@@ -19013,7 +19197,7 @@ ${text}</tr>
|
|
|
19013
19197
|
}
|
|
19014
19198
|
);
|
|
19015
19199
|
case "projects":
|
|
19016
|
-
return /* @__PURE__ */ (0,
|
|
19200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19017
19201
|
ProjectsTabSettings,
|
|
19018
19202
|
{
|
|
19019
19203
|
config,
|
|
@@ -19022,7 +19206,7 @@ ${text}</tr>
|
|
|
19022
19206
|
}
|
|
19023
19207
|
);
|
|
19024
19208
|
case "agents":
|
|
19025
|
-
return /* @__PURE__ */ (0,
|
|
19209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19026
19210
|
AgentsTab,
|
|
19027
19211
|
{
|
|
19028
19212
|
config,
|
|
@@ -19036,7 +19220,7 @@ ${text}</tr>
|
|
|
19036
19220
|
}
|
|
19037
19221
|
);
|
|
19038
19222
|
case "plugins":
|
|
19039
|
-
return /* @__PURE__ */ (0,
|
|
19223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19040
19224
|
PluginsTab,
|
|
19041
19225
|
{
|
|
19042
19226
|
pluginsFile,
|
|
@@ -19047,7 +19231,7 @@ ${text}</tr>
|
|
|
19047
19231
|
}
|
|
19048
19232
|
);
|
|
19049
19233
|
case "mcp":
|
|
19050
|
-
return /* @__PURE__ */ (0,
|
|
19234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19051
19235
|
McpTab,
|
|
19052
19236
|
{
|
|
19053
19237
|
mcpServersFile,
|
|
@@ -19057,7 +19241,7 @@ ${text}</tr>
|
|
|
19057
19241
|
}
|
|
19058
19242
|
);
|
|
19059
19243
|
case "scheduler":
|
|
19060
|
-
return /* @__PURE__ */ (0,
|
|
19244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19061
19245
|
SchedulerTab,
|
|
19062
19246
|
{
|
|
19063
19247
|
config,
|
|
@@ -19067,27 +19251,28 @@ ${text}</tr>
|
|
|
19067
19251
|
}
|
|
19068
19252
|
);
|
|
19069
19253
|
case "voice":
|
|
19070
|
-
return /* @__PURE__ */ (0,
|
|
19254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19071
19255
|
VoiceTab,
|
|
19072
19256
|
{
|
|
19073
19257
|
config,
|
|
19074
19258
|
onSave: (updatedConfig) => postMessage({ type: "saveConfig", config: updatedConfig }),
|
|
19075
19259
|
postMessage,
|
|
19076
|
-
|
|
19260
|
+
sttCatalogResult,
|
|
19261
|
+
ttsCatalogResult
|
|
19077
19262
|
}
|
|
19078
19263
|
);
|
|
19079
19264
|
}
|
|
19080
19265
|
};
|
|
19081
|
-
return /* @__PURE__ */ (0,
|
|
19082
|
-
/* @__PURE__ */ (0,
|
|
19083
|
-
/* @__PURE__ */ (0,
|
|
19084
|
-
/* @__PURE__ */ (0,
|
|
19266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "settings-panel", children: [
|
|
19267
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { className: "settings-panel__header", children: [
|
|
19268
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, title: "Go back to chat", children: [
|
|
19269
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ArrowLeft, { size: 14 }),
|
|
19085
19270
|
" Chat"
|
|
19086
19271
|
] }),
|
|
19087
|
-
/* @__PURE__ */ (0,
|
|
19272
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h2", { className: "settings-panel__title", children: "Caretaker Config" })
|
|
19088
19273
|
] }),
|
|
19089
|
-
/* @__PURE__ */ (0,
|
|
19090
|
-
/* @__PURE__ */ (0,
|
|
19274
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("nav", { className: "settings-panel__tabs", children: [
|
|
19275
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19091
19276
|
"button",
|
|
19092
19277
|
{
|
|
19093
19278
|
className: `settings-panel__tab-btn ${activeTab === "providers" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19095,7 +19280,7 @@ ${text}</tr>
|
|
|
19095
19280
|
children: "Providers"
|
|
19096
19281
|
}
|
|
19097
19282
|
),
|
|
19098
|
-
layout === "sidebar" && /* @__PURE__ */ (0,
|
|
19283
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19099
19284
|
"button",
|
|
19100
19285
|
{
|
|
19101
19286
|
className: `settings-panel__tab-btn ${activeTab === "projects" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19103,7 +19288,7 @@ ${text}</tr>
|
|
|
19103
19288
|
children: "Projects"
|
|
19104
19289
|
}
|
|
19105
19290
|
),
|
|
19106
|
-
/* @__PURE__ */ (0,
|
|
19291
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19107
19292
|
"button",
|
|
19108
19293
|
{
|
|
19109
19294
|
className: `settings-panel__tab-btn ${activeTab === "agents" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19111,7 +19296,7 @@ ${text}</tr>
|
|
|
19111
19296
|
children: "Agents"
|
|
19112
19297
|
}
|
|
19113
19298
|
),
|
|
19114
|
-
/* @__PURE__ */ (0,
|
|
19299
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19115
19300
|
"button",
|
|
19116
19301
|
{
|
|
19117
19302
|
className: `settings-panel__tab-btn ${activeTab === "plugins" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19119,7 +19304,7 @@ ${text}</tr>
|
|
|
19119
19304
|
children: "Plugins"
|
|
19120
19305
|
}
|
|
19121
19306
|
),
|
|
19122
|
-
/* @__PURE__ */ (0,
|
|
19307
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19123
19308
|
"button",
|
|
19124
19309
|
{
|
|
19125
19310
|
className: `settings-panel__tab-btn ${activeTab === "mcp" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19127,7 +19312,7 @@ ${text}</tr>
|
|
|
19127
19312
|
children: "MCP"
|
|
19128
19313
|
}
|
|
19129
19314
|
),
|
|
19130
|
-
layout === "sidebar" && /* @__PURE__ */ (0,
|
|
19315
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19131
19316
|
"button",
|
|
19132
19317
|
{
|
|
19133
19318
|
className: `settings-panel__tab-btn ${activeTab === "scheduler" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19135,7 +19320,7 @@ ${text}</tr>
|
|
|
19135
19320
|
children: "Scheduler"
|
|
19136
19321
|
}
|
|
19137
19322
|
),
|
|
19138
|
-
layout === "sidebar" && /* @__PURE__ */ (0,
|
|
19323
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19139
19324
|
"button",
|
|
19140
19325
|
{
|
|
19141
19326
|
className: `settings-panel__tab-btn ${activeTab === "voice" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19144,13 +19329,13 @@ ${text}</tr>
|
|
|
19144
19329
|
}
|
|
19145
19330
|
)
|
|
19146
19331
|
] }),
|
|
19147
|
-
/* @__PURE__ */ (0,
|
|
19332
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("main", { className: "settings-panel__content", children: renderTabContent() })
|
|
19148
19333
|
] });
|
|
19149
19334
|
}
|
|
19150
19335
|
|
|
19151
19336
|
// src/ProjectsTab.tsx
|
|
19152
|
-
var
|
|
19153
|
-
var
|
|
19337
|
+
var import_react16 = __toESM(require_react(), 1);
|
|
19338
|
+
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
19154
19339
|
var LS_PROJECT_KEY = "caretaker.taskView.selectedProjectId";
|
|
19155
19340
|
var LS_ARCHIVED_KEY = "caretaker.taskView.showArchived";
|
|
19156
19341
|
function loadSavedProjectId() {
|
|
@@ -19241,15 +19426,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19241
19426
|
}
|
|
19242
19427
|
var PAGE_SIZE = 20;
|
|
19243
19428
|
function ProjectsTab({ agents }) {
|
|
19244
|
-
const [projects, setProjects] = (0,
|
|
19245
|
-
const [selectedProjectId, setSelectedProjectId] = (0,
|
|
19246
|
-
const [tasks, setTasks] = (0,
|
|
19247
|
-
const [selectedTaskId, setSelectedTaskId] = (0,
|
|
19248
|
-
const [taskMessages, setTaskMessages] = (0,
|
|
19249
|
-
const [view, setView] = (0,
|
|
19250
|
-
const [page, setPage] = (0,
|
|
19251
|
-
const [isNewTaskOpen, setIsNewTaskOpen] = (0,
|
|
19252
|
-
const [newTask, setNewTask] = (0,
|
|
19429
|
+
const [projects, setProjects] = (0, import_react16.useState)([]);
|
|
19430
|
+
const [selectedProjectId, setSelectedProjectId] = (0, import_react16.useState)(loadSavedProjectId);
|
|
19431
|
+
const [tasks, setTasks] = (0, import_react16.useState)([]);
|
|
19432
|
+
const [selectedTaskId, setSelectedTaskId] = (0, import_react16.useState)(null);
|
|
19433
|
+
const [taskMessages, setTaskMessages] = (0, import_react16.useState)([]);
|
|
19434
|
+
const [view, setView] = (0, import_react16.useState)("list");
|
|
19435
|
+
const [page, setPage] = (0, import_react16.useState)(0);
|
|
19436
|
+
const [isNewTaskOpen, setIsNewTaskOpen] = (0, import_react16.useState)(false);
|
|
19437
|
+
const [newTask, setNewTask] = (0, import_react16.useState)({
|
|
19253
19438
|
title: "",
|
|
19254
19439
|
objective: "",
|
|
19255
19440
|
checklistText: "",
|
|
@@ -19258,19 +19443,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19258
19443
|
plannerAgentId: "",
|
|
19259
19444
|
reviewerAgentId: ""
|
|
19260
19445
|
});
|
|
19261
|
-
const [composerText, setComposerText] = (0,
|
|
19262
|
-
const [isSending, setIsSending] = (0,
|
|
19263
|
-
const [showArchived, setShowArchived] = (0,
|
|
19264
|
-
const [pendingConfirm, setPendingConfirm] = (0,
|
|
19265
|
-
const [taskError, setTaskError] = (0,
|
|
19266
|
-
const threadIntervalRef = (0,
|
|
19267
|
-
(0,
|
|
19446
|
+
const [composerText, setComposerText] = (0, import_react16.useState)("");
|
|
19447
|
+
const [isSending, setIsSending] = (0, import_react16.useState)(false);
|
|
19448
|
+
const [showArchived, setShowArchived] = (0, import_react16.useState)(loadShowArchived);
|
|
19449
|
+
const [pendingConfirm, setPendingConfirm] = (0, import_react16.useState)(null);
|
|
19450
|
+
const [taskError, setTaskError] = (0, import_react16.useState)(null);
|
|
19451
|
+
const threadIntervalRef = (0, import_react16.useRef)(null);
|
|
19452
|
+
(0, import_react16.useEffect)(() => {
|
|
19268
19453
|
fetchProjects();
|
|
19269
19454
|
return () => {
|
|
19270
19455
|
stopThreadPolling();
|
|
19271
19456
|
};
|
|
19272
19457
|
}, []);
|
|
19273
|
-
(0,
|
|
19458
|
+
(0, import_react16.useEffect)(() => {
|
|
19274
19459
|
if (projects.length > 0 && selectedProjectId === null) {
|
|
19275
19460
|
setSelectedProjectId(projects[0].id);
|
|
19276
19461
|
}
|
|
@@ -19281,13 +19466,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19281
19466
|
setSelectedProjectId(null);
|
|
19282
19467
|
}
|
|
19283
19468
|
}, [projects]);
|
|
19284
|
-
(0,
|
|
19469
|
+
(0, import_react16.useEffect)(() => {
|
|
19285
19470
|
saveProjectId(selectedProjectId);
|
|
19286
19471
|
}, [selectedProjectId]);
|
|
19287
|
-
(0,
|
|
19472
|
+
(0, import_react16.useEffect)(() => {
|
|
19288
19473
|
saveShowArchived(showArchived);
|
|
19289
19474
|
}, [showArchived]);
|
|
19290
|
-
(0,
|
|
19475
|
+
(0, import_react16.useEffect)(() => {
|
|
19291
19476
|
if (selectedProjectId !== null) {
|
|
19292
19477
|
fetchTasks(selectedProjectId);
|
|
19293
19478
|
setView("list");
|
|
@@ -19299,7 +19484,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19299
19484
|
setTasks([]);
|
|
19300
19485
|
}
|
|
19301
19486
|
}, [selectedProjectId, showArchived]);
|
|
19302
|
-
(0,
|
|
19487
|
+
(0, import_react16.useEffect)(() => {
|
|
19303
19488
|
if (selectedTaskId !== null) {
|
|
19304
19489
|
fetchTaskMessages(selectedTaskId);
|
|
19305
19490
|
startThreadPolling(selectedTaskId);
|
|
@@ -19472,7 +19657,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19472
19657
|
const cancelPendingAction = () => {
|
|
19473
19658
|
setPendingConfirm(null);
|
|
19474
19659
|
};
|
|
19475
|
-
(0,
|
|
19660
|
+
(0, import_react16.useEffect)(() => {
|
|
19476
19661
|
if (!pendingConfirm) return;
|
|
19477
19662
|
function handleKeyDown(event) {
|
|
19478
19663
|
if (event.key === "Escape") {
|
|
@@ -19482,7 +19667,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19482
19667
|
window.addEventListener("keydown", handleKeyDown);
|
|
19483
19668
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
19484
19669
|
}, [pendingConfirm]);
|
|
19485
|
-
(0,
|
|
19670
|
+
(0, import_react16.useEffect)(() => {
|
|
19486
19671
|
if (!taskError) return;
|
|
19487
19672
|
const t = setTimeout(() => setTaskError(null), 5e3);
|
|
19488
19673
|
return () => clearTimeout(t);
|
|
@@ -19613,16 +19798,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19613
19798
|
const selectedProject = projects.find((p) => p.id === selectedProjectId);
|
|
19614
19799
|
const selectedTask = tasks.find((t) => t.id === selectedTaskId);
|
|
19615
19800
|
const selectedProjectAgentName = agents.find((a) => a.id === selectedProject?.agentId)?.name || "Default Agent";
|
|
19616
|
-
const
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
|
|
19620
|
-
|
|
19621
|
-
|
|
19622
|
-
|
|
19623
|
-
|
|
19624
|
-
|
|
19625
|
-
|
|
19801
|
+
const taskAgentLabels = (0, import_react16.useMemo)(() => {
|
|
19802
|
+
if (!selectedTask) return void 0;
|
|
19803
|
+
const agentLabelFor = (agentId) => {
|
|
19804
|
+
const a = agents.find((x) => x.id === agentId);
|
|
19805
|
+
return a ? `${a.name} \xB7 ${a.model}` : void 0;
|
|
19806
|
+
};
|
|
19807
|
+
const developerId = selectedTask.agentId || selectedProject?.agentId || agents[0]?.id;
|
|
19808
|
+
return {
|
|
19809
|
+
developer: agentLabelFor(developerId),
|
|
19810
|
+
planner: agentLabelFor(selectedTask.plannerAgentId || selectedProject?.plannerAgentId || developerId),
|
|
19811
|
+
reviewer: agentLabelFor(selectedTask.reviewerAgentId || selectedProject?.reviewerAgentId || developerId)
|
|
19812
|
+
};
|
|
19813
|
+
}, [
|
|
19814
|
+
selectedTask?.agentId,
|
|
19815
|
+
selectedTask?.plannerAgentId,
|
|
19816
|
+
selectedTask?.reviewerAgentId,
|
|
19817
|
+
selectedProject?.agentId,
|
|
19818
|
+
selectedProject?.plannerAgentId,
|
|
19819
|
+
selectedProject?.reviewerAgentId,
|
|
19820
|
+
selectedTask,
|
|
19821
|
+
agents
|
|
19822
|
+
]);
|
|
19626
19823
|
const reviewRound = selectedTask ? taskMessages.filter((m) => m.messageType === "review").length + 1 : 1;
|
|
19627
19824
|
const isActiveLike = selectedTask ? selectedTask.status === "active" || selectedTask.status === "reviewing" || selectedTask.status === "planning" : false;
|
|
19628
19825
|
const statusColor = (status) => {
|
|
@@ -19647,8 +19844,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19647
19844
|
const safePage = Math.min(page, totalPages - 1);
|
|
19648
19845
|
const pageStart = safePage * PAGE_SIZE;
|
|
19649
19846
|
const pageTasks = tasks.slice(pageStart, pageStart + PAGE_SIZE);
|
|
19650
|
-
return /* @__PURE__ */ (0,
|
|
19651
|
-
/* @__PURE__ */ (0,
|
|
19847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "app", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
19848
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("main", { className: "app__chat-pane", style: { flex: 1, display: "flex", flexDirection: "column", background: "var(--vscode-editor-background)" }, children: projects.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: "No projects registered. Create one from the Settings panel to get started." }) }) : selectedProject ? view === "list" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19652
19849
|
TaskListView,
|
|
19653
19850
|
{
|
|
19654
19851
|
projects,
|
|
@@ -19670,7 +19867,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19670
19867
|
onArchive: handleArchiveFromList,
|
|
19671
19868
|
statusColor
|
|
19672
19869
|
}
|
|
19673
|
-
) : view === "log" && selectedTask ? /* @__PURE__ */ (0,
|
|
19870
|
+
) : view === "log" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19674
19871
|
TaskLogView,
|
|
19675
19872
|
{
|
|
19676
19873
|
task: selectedTask,
|
|
@@ -19687,7 +19884,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19687
19884
|
onToggleStatus: handleToggleTaskStatus,
|
|
19688
19885
|
statusColor
|
|
19689
19886
|
}
|
|
19690
|
-
) : view === "edit" && selectedTask ? /* @__PURE__ */ (0,
|
|
19887
|
+
) : view === "edit" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19691
19888
|
TaskEditView,
|
|
19692
19889
|
{
|
|
19693
19890
|
task: selectedTask,
|
|
@@ -19705,11 +19902,11 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19705
19902
|
onOpenLog: () => setView("log"),
|
|
19706
19903
|
statusColor
|
|
19707
19904
|
}
|
|
19708
|
-
) : /* @__PURE__ */ (0,
|
|
19709
|
-
/* @__PURE__ */ (0,
|
|
19710
|
-
/* @__PURE__ */ (0,
|
|
19905
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "app__empty-state", children: [
|
|
19906
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: "Task not found. Go back to the list." }),
|
|
19907
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "settings-panel__back-btn", onClick: backToList, style: { marginTop: "12px" }, children: "\u2190 Back to list" })
|
|
19711
19908
|
] }) : null }),
|
|
19712
|
-
isNewTaskOpen && /* @__PURE__ */ (0,
|
|
19909
|
+
isNewTaskOpen && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19713
19910
|
"div",
|
|
19714
19911
|
{
|
|
19715
19912
|
style: {
|
|
@@ -19724,7 +19921,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19724
19921
|
justifyContent: "center",
|
|
19725
19922
|
zIndex: 999
|
|
19726
19923
|
},
|
|
19727
|
-
children: /* @__PURE__ */ (0,
|
|
19924
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
19728
19925
|
"form",
|
|
19729
19926
|
{
|
|
19730
19927
|
onSubmit: handleCreateTask,
|
|
@@ -19735,14 +19932,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19735
19932
|
background: "var(--vscode-sideBar-background)"
|
|
19736
19933
|
},
|
|
19737
19934
|
children: [
|
|
19738
|
-
/* @__PURE__ */ (0,
|
|
19739
|
-
/* @__PURE__ */ (0,
|
|
19740
|
-
/* @__PURE__ */ (0,
|
|
19935
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "confirm__header", children: [
|
|
19936
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { fontSize: "18px", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Wrench, { size: 18 }) }),
|
|
19937
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "confirm__prompt", style: { fontSize: "14px" }, children: "Create New Task" })
|
|
19741
19938
|
] }),
|
|
19742
|
-
/* @__PURE__ */ (0,
|
|
19743
|
-
/* @__PURE__ */ (0,
|
|
19939
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: [
|
|
19940
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
19744
19941
|
"Task Title",
|
|
19745
|
-
/* @__PURE__ */ (0,
|
|
19942
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19746
19943
|
"input",
|
|
19747
19944
|
{
|
|
19748
19945
|
type: "text",
|
|
@@ -19762,9 +19959,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19762
19959
|
}
|
|
19763
19960
|
)
|
|
19764
19961
|
] }),
|
|
19765
|
-
/* @__PURE__ */ (0,
|
|
19962
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
19766
19963
|
"Objective (Extended markdown goal description)",
|
|
19767
|
-
/* @__PURE__ */ (0,
|
|
19964
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19768
19965
|
"textarea",
|
|
19769
19966
|
{
|
|
19770
19967
|
required: true,
|
|
@@ -19785,9 +19982,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19785
19982
|
}
|
|
19786
19983
|
)
|
|
19787
19984
|
] }),
|
|
19788
|
-
/* @__PURE__ */ (0,
|
|
19985
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
19789
19986
|
"Checklist Items (One item per line)",
|
|
19790
|
-
/* @__PURE__ */ (0,
|
|
19987
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19791
19988
|
"textarea",
|
|
19792
19989
|
{
|
|
19793
19990
|
placeholder: "Create route handler\nWrite unit tests\nUpdate documentation",
|
|
@@ -19807,9 +20004,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19807
20004
|
}
|
|
19808
20005
|
)
|
|
19809
20006
|
] }),
|
|
19810
|
-
/* @__PURE__ */ (0,
|
|
20007
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
19811
20008
|
"Assigned Agent (optional \u2014 overrides project default)",
|
|
19812
|
-
/* @__PURE__ */ (0,
|
|
20009
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
19813
20010
|
"select",
|
|
19814
20011
|
{
|
|
19815
20012
|
value: newTask.agentId,
|
|
@@ -19824,8 +20021,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19824
20021
|
outline: "none"
|
|
19825
20022
|
},
|
|
19826
20023
|
children: [
|
|
19827
|
-
/* @__PURE__ */ (0,
|
|
19828
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20024
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
|
|
20025
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
|
|
19829
20026
|
a.name,
|
|
19830
20027
|
" (",
|
|
19831
20028
|
a.provider,
|
|
@@ -19835,9 +20032,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19835
20032
|
}
|
|
19836
20033
|
)
|
|
19837
20034
|
] }),
|
|
19838
|
-
/* @__PURE__ */ (0,
|
|
20035
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
19839
20036
|
"Planner Agent Override (optional)",
|
|
19840
|
-
/* @__PURE__ */ (0,
|
|
20037
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
19841
20038
|
"select",
|
|
19842
20039
|
{
|
|
19843
20040
|
value: newTask.plannerAgentId,
|
|
@@ -19852,8 +20049,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19852
20049
|
outline: "none"
|
|
19853
20050
|
},
|
|
19854
20051
|
children: [
|
|
19855
|
-
/* @__PURE__ */ (0,
|
|
19856
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20052
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
|
|
20053
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
|
|
19857
20054
|
a.name,
|
|
19858
20055
|
" (",
|
|
19859
20056
|
a.provider,
|
|
@@ -19863,9 +20060,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19863
20060
|
}
|
|
19864
20061
|
)
|
|
19865
20062
|
] }),
|
|
19866
|
-
/* @__PURE__ */ (0,
|
|
20063
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
19867
20064
|
"Reviewer Agent Override (optional)",
|
|
19868
|
-
/* @__PURE__ */ (0,
|
|
20065
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
19869
20066
|
"select",
|
|
19870
20067
|
{
|
|
19871
20068
|
value: newTask.reviewerAgentId,
|
|
@@ -19880,8 +20077,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19880
20077
|
outline: "none"
|
|
19881
20078
|
},
|
|
19882
20079
|
children: [
|
|
19883
|
-
/* @__PURE__ */ (0,
|
|
19884
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20080
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
|
|
20081
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
|
|
19885
20082
|
a.name,
|
|
19886
20083
|
" (",
|
|
19887
20084
|
a.provider,
|
|
@@ -19891,8 +20088,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19891
20088
|
}
|
|
19892
20089
|
)
|
|
19893
20090
|
] }),
|
|
19894
|
-
/* @__PURE__ */ (0,
|
|
19895
|
-
/* @__PURE__ */ (0,
|
|
20091
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "12px", display: "flex", alignItems: "center", gap: "6px", cursor: "pointer", marginTop: "4px" }, children: [
|
|
20092
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19896
20093
|
"input",
|
|
19897
20094
|
{
|
|
19898
20095
|
type: "checkbox",
|
|
@@ -19901,24 +20098,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19901
20098
|
style: { cursor: "pointer" }
|
|
19902
20099
|
}
|
|
19903
20100
|
),
|
|
19904
|
-
/* @__PURE__ */ (0,
|
|
20101
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Start active immediately (Heartbeat loop claims it)" })
|
|
19905
20102
|
] })
|
|
19906
20103
|
] }),
|
|
19907
|
-
/* @__PURE__ */ (0,
|
|
19908
|
-
/* @__PURE__ */ (0,
|
|
19909
|
-
/* @__PURE__ */ (0,
|
|
20104
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "confirm__buttons", style: { justifyContent: "flex-end", marginTop: "10px" }, children: [
|
|
20105
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", className: "confirm__btn", onClick: () => setIsNewTaskOpen(false), children: "Cancel" }),
|
|
20106
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "submit", className: "confirm__btn confirm__btn--primary", children: "Create Task" })
|
|
19910
20107
|
] })
|
|
19911
20108
|
]
|
|
19912
20109
|
}
|
|
19913
20110
|
)
|
|
19914
20111
|
}
|
|
19915
20112
|
),
|
|
19916
|
-
pendingConfirm && /* @__PURE__ */ (0,
|
|
19917
|
-
/* @__PURE__ */ (0,
|
|
19918
|
-
/* @__PURE__ */ (0,
|
|
19919
|
-
/* @__PURE__ */ (0,
|
|
19920
|
-
/* @__PURE__ */ (0,
|
|
19921
|
-
/* @__PURE__ */ (0,
|
|
20113
|
+
pendingConfirm && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "app__confirm-overlay", onClick: cancelPendingAction, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
|
|
20114
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "app__confirm-title", children: pendingConfirm.type === "delete" ? "Delete task" : pendingConfirm.type === "archive" ? "Archive task" : "Discard worktree" }),
|
|
20115
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "app__confirm-message", children: pendingConfirm.type === "delete" ? `Permanently delete task #${pendingConfirm.task.id} "${pendingConfirm.task.title}"? This removes the task and all its messages from the store. This action cannot be undone.` : pendingConfirm.type === "archive" ? `Archive task #${pendingConfirm.task.id} "${pendingConfirm.task.title}"? It will be hidden from the list and excluded from the scheduler. You can unarchive it later by enabling "Show archived".` : `Discard the worktree for task #${pendingConfirm.task.id}? Pending changes are committed to branch ${pendingConfirm.task.branch}; the branch is kept.` }),
|
|
20116
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "app__confirm-buttons", children: [
|
|
20117
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "app__confirm-btn", onClick: cancelPendingAction, children: "Cancel" }),
|
|
20118
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19922
20119
|
"button",
|
|
19923
20120
|
{
|
|
19924
20121
|
className: `app__confirm-btn ${pendingConfirm.type === "delete" ? "app__confirm-btn--danger" : ""}`,
|
|
@@ -19928,7 +20125,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19928
20125
|
)
|
|
19929
20126
|
] })
|
|
19930
20127
|
] }) }),
|
|
19931
|
-
taskError && /* @__PURE__ */ (0,
|
|
20128
|
+
taskError && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "app__error-banner", onClick: () => setTaskError(null), title: "Click to dismiss", children: taskError })
|
|
19932
20129
|
] });
|
|
19933
20130
|
}
|
|
19934
20131
|
function TaskListView({
|
|
@@ -19951,10 +20148,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19951
20148
|
onArchive,
|
|
19952
20149
|
statusColor
|
|
19953
20150
|
}) {
|
|
19954
|
-
return /* @__PURE__ */ (0,
|
|
19955
|
-
/* @__PURE__ */ (0,
|
|
19956
|
-
/* @__PURE__ */ (0,
|
|
19957
|
-
/* @__PURE__ */ (0,
|
|
20151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
20152
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "task-view__header", children: [
|
|
20153
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
20154
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19958
20155
|
"select",
|
|
19959
20156
|
{
|
|
19960
20157
|
className: "task-view__project-filter",
|
|
@@ -19971,17 +20168,17 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19971
20168
|
outline: "none",
|
|
19972
20169
|
cursor: "pointer"
|
|
19973
20170
|
},
|
|
19974
|
-
children: projects.map((p) => /* @__PURE__ */ (0,
|
|
20171
|
+
children: projects.map((p) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: p.id, children: p.name }, p.id))
|
|
19975
20172
|
}
|
|
19976
20173
|
),
|
|
19977
|
-
/* @__PURE__ */ (0,
|
|
20174
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: [
|
|
19978
20175
|
"Agent: ",
|
|
19979
20176
|
agentName
|
|
19980
20177
|
] })
|
|
19981
20178
|
] }),
|
|
19982
|
-
/* @__PURE__ */ (0,
|
|
19983
|
-
/* @__PURE__ */ (0,
|
|
19984
|
-
/* @__PURE__ */ (0,
|
|
20179
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
20180
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: "task-view__archived-toggle", children: [
|
|
20181
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19985
20182
|
"input",
|
|
19986
20183
|
{
|
|
19987
20184
|
type: "checkbox",
|
|
@@ -19992,42 +20189,42 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
19992
20189
|
),
|
|
19993
20190
|
"Show archived"
|
|
19994
20191
|
] }),
|
|
19995
|
-
/* @__PURE__ */ (0,
|
|
20192
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "app__new-chat-btn", onClick: onNewTask, style: { padding: "4px 10px", fontSize: "11px" }, children: "+ New Task" })
|
|
19996
20193
|
] })
|
|
19997
20194
|
] }),
|
|
19998
|
-
/* @__PURE__ */ (0,
|
|
20195
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { flex: 1, overflowY: "auto", padding: "0 16px 16px" }, children: allTasksCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
|
|
19999
20196
|
"No tasks created for ",
|
|
20000
20197
|
project.name,
|
|
20001
20198
|
'. Click "+ New Task" to start.'
|
|
20002
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
20003
|
-
/* @__PURE__ */ (0,
|
|
20004
|
-
/* @__PURE__ */ (0,
|
|
20005
|
-
/* @__PURE__ */ (0,
|
|
20006
|
-
/* @__PURE__ */ (0,
|
|
20007
|
-
/* @__PURE__ */ (0,
|
|
20008
|
-
/* @__PURE__ */ (0,
|
|
20009
|
-
/* @__PURE__ */ (0,
|
|
20010
|
-
/* @__PURE__ */ (0,
|
|
20011
|
-
/* @__PURE__ */ (0,
|
|
20199
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("table", { className: "task-table", children: [
|
|
20200
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("tr", { children: [
|
|
20201
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "60px" }, children: "#" }),
|
|
20202
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", children: "Title" }),
|
|
20203
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "90px" }, children: "Status" }),
|
|
20204
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "100px" }, children: "Agent" }),
|
|
20205
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "120px" }, children: "Checklist" }),
|
|
20206
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "180px" }, children: "Branch" }),
|
|
20207
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "150px" }, children: "Updated" }),
|
|
20208
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: "task-table__th", style: { width: "70px" } })
|
|
20012
20209
|
] }) }),
|
|
20013
|
-
/* @__PURE__ */ (0,
|
|
20210
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tbody", { children: tasks.map((task) => {
|
|
20014
20211
|
const completedCount = task.checklist.filter((c) => c.status === "done").length;
|
|
20015
20212
|
const totalCount = task.checklist.length;
|
|
20016
20213
|
const isArchived = !!task.archived;
|
|
20017
20214
|
const updated = new Date(task.updatedAt);
|
|
20018
20215
|
const updatedStr = isNaN(updated.getTime()) ? task.updatedAt : updated.toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
|
|
20019
|
-
return /* @__PURE__ */ (0,
|
|
20216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20020
20217
|
"tr",
|
|
20021
20218
|
{
|
|
20022
20219
|
className: `task-table__row${isArchived ? " task-table__row--archived" : ""}`,
|
|
20023
20220
|
onClick: () => onOpenLog(task),
|
|
20024
20221
|
children: [
|
|
20025
|
-
/* @__PURE__ */ (0,
|
|
20026
|
-
/* @__PURE__ */ (0,
|
|
20027
|
-
isArchived && /* @__PURE__ */ (0,
|
|
20222
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td task-table__td--mono", children: task.id }),
|
|
20223
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "task-table__title", children: [
|
|
20224
|
+
isArchived && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Archive, { size: 11 }),
|
|
20028
20225
|
task.title
|
|
20029
20226
|
] }) }),
|
|
20030
|
-
/* @__PURE__ */ (0,
|
|
20227
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20031
20228
|
"span",
|
|
20032
20229
|
{
|
|
20033
20230
|
className: "task-table__badge",
|
|
@@ -20035,28 +20232,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20035
20232
|
children: task.status
|
|
20036
20233
|
}
|
|
20037
20234
|
) }),
|
|
20038
|
-
/* @__PURE__ */ (0,
|
|
20039
|
-
/* @__PURE__ */ (0,
|
|
20040
|
-
/* @__PURE__ */ (0,
|
|
20235
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", style: { fontSize: "11px" }, children: task.agentId ? agents.find((a) => a.id === task.agentId)?.name || task.agentId : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { opacity: 0.4 }, children: "default" }) }),
|
|
20236
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", children: totalCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "task-table__progress", children: [
|
|
20237
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "task-table__progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20041
20238
|
"span",
|
|
20042
20239
|
{
|
|
20043
20240
|
className: "task-table__progress-fill",
|
|
20044
20241
|
style: { width: `${completedCount / totalCount * 100}%` }
|
|
20045
20242
|
}
|
|
20046
20243
|
) }),
|
|
20047
|
-
/* @__PURE__ */ (0,
|
|
20244
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "task-table__progress-text", children: [
|
|
20048
20245
|
completedCount,
|
|
20049
20246
|
"/",
|
|
20050
20247
|
totalCount
|
|
20051
20248
|
] })
|
|
20052
|
-
] }) : /* @__PURE__ */ (0,
|
|
20053
|
-
/* @__PURE__ */ (0,
|
|
20054
|
-
/* @__PURE__ */ (0,
|
|
20055
|
-
/* @__PURE__ */ (0,
|
|
20056
|
-
] }) : /* @__PURE__ */ (0,
|
|
20057
|
-
/* @__PURE__ */ (0,
|
|
20058
|
-
/* @__PURE__ */ (0,
|
|
20059
|
-
/* @__PURE__ */ (0,
|
|
20249
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
|
|
20250
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", children: task.branch ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "task-table__branch", children: [
|
|
20251
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GitBranch, { size: 11 }),
|
|
20252
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { children: task.branch })
|
|
20253
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
|
|
20254
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td task-table__td--muted", children: updatedStr }),
|
|
20255
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "inline-flex", gap: "2px" }, children: [
|
|
20256
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20060
20257
|
"button",
|
|
20061
20258
|
{
|
|
20062
20259
|
className: "task-table__edit-btn",
|
|
@@ -20066,10 +20263,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20066
20263
|
},
|
|
20067
20264
|
title: task.archived ? "Unarchive task" : "Archive task",
|
|
20068
20265
|
"aria-label": task.archived ? "Unarchive task" : "Archive task",
|
|
20069
|
-
children: /* @__PURE__ */ (0,
|
|
20266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Archive, { size: 13 })
|
|
20070
20267
|
}
|
|
20071
20268
|
),
|
|
20072
|
-
/* @__PURE__ */ (0,
|
|
20269
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20073
20270
|
"button",
|
|
20074
20271
|
{
|
|
20075
20272
|
className: "task-table__edit-btn",
|
|
@@ -20079,7 +20276,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20079
20276
|
},
|
|
20080
20277
|
title: "Edit task",
|
|
20081
20278
|
"aria-label": "Edit task",
|
|
20082
|
-
children: /* @__PURE__ */ (0,
|
|
20279
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Pencil, { size: 13 })
|
|
20083
20280
|
}
|
|
20084
20281
|
)
|
|
20085
20282
|
] }) })
|
|
@@ -20089,8 +20286,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20089
20286
|
);
|
|
20090
20287
|
}) })
|
|
20091
20288
|
] }) }),
|
|
20092
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
20093
|
-
/* @__PURE__ */ (0,
|
|
20289
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "task-table__pagination", children: [
|
|
20290
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20094
20291
|
"button",
|
|
20095
20292
|
{
|
|
20096
20293
|
className: "task-table__page-btn",
|
|
@@ -20099,13 +20296,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20099
20296
|
children: "\u2039 Prev"
|
|
20100
20297
|
}
|
|
20101
20298
|
),
|
|
20102
|
-
/* @__PURE__ */ (0,
|
|
20299
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "task-table__page-info", children: [
|
|
20103
20300
|
"Page ",
|
|
20104
20301
|
page + 1,
|
|
20105
20302
|
" of ",
|
|
20106
20303
|
totalPages
|
|
20107
20304
|
] }),
|
|
20108
|
-
/* @__PURE__ */ (0,
|
|
20305
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20109
20306
|
"button",
|
|
20110
20307
|
{
|
|
20111
20308
|
className: "task-table__page-btn",
|
|
@@ -20134,19 +20331,20 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20134
20331
|
}) {
|
|
20135
20332
|
const completedCount = task.checklist.filter((c) => c.status === "done").length;
|
|
20136
20333
|
const totalCount = task.checklist.length;
|
|
20137
|
-
|
|
20138
|
-
|
|
20139
|
-
|
|
20140
|
-
|
|
20141
|
-
/* @__PURE__ */ (0,
|
|
20142
|
-
|
|
20334
|
+
const chatItems = (0, import_react16.useMemo)(() => taskMessagesToChatItems(taskMessages, agentLabels), [taskMessages, agentLabels]);
|
|
20335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
20336
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "12px 14px" }, children: [
|
|
20337
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
20338
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowLeft, { size: 13 }) }),
|
|
20339
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "app__chat-header-info", children: [
|
|
20340
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
|
|
20143
20341
|
"Task #",
|
|
20144
20342
|
task.id,
|
|
20145
20343
|
": ",
|
|
20146
20344
|
task.title
|
|
20147
20345
|
] }),
|
|
20148
|
-
/* @__PURE__ */ (0,
|
|
20149
|
-
/* @__PURE__ */ (0,
|
|
20346
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: [
|
|
20347
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20150
20348
|
"span",
|
|
20151
20349
|
{
|
|
20152
20350
|
className: `agent-status-dot agent-status-dot--active ${isActiveLike ? "agent-status-dot--pulsing" : ""}`,
|
|
@@ -20157,24 +20355,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20157
20355
|
] })
|
|
20158
20356
|
] })
|
|
20159
20357
|
] }),
|
|
20160
|
-
/* @__PURE__ */ (0,
|
|
20161
|
-
task.status !== "done" && /* @__PURE__ */ (0,
|
|
20358
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
20359
|
+
task.status !== "done" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20162
20360
|
"button",
|
|
20163
20361
|
{
|
|
20164
20362
|
className: "confirm__btn confirm__btn--primary",
|
|
20165
20363
|
onClick: () => onToggleStatus(task),
|
|
20166
20364
|
title: isActiveLike ? "Pause this task (aborts the running agent)" : "Activate this task",
|
|
20167
20365
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
20168
|
-
children: isActiveLike ? /* @__PURE__ */ (0,
|
|
20169
|
-
/* @__PURE__ */ (0,
|
|
20366
|
+
children: isActiveLike ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
20367
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Pause, { size: 12 }),
|
|
20170
20368
|
" Pause"
|
|
20171
|
-
] }) : /* @__PURE__ */ (0,
|
|
20172
|
-
/* @__PURE__ */ (0,
|
|
20369
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
20370
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Play, { size: 12 }),
|
|
20173
20371
|
" Activate"
|
|
20174
20372
|
] })
|
|
20175
20373
|
}
|
|
20176
20374
|
),
|
|
20177
|
-
/* @__PURE__ */ (0,
|
|
20375
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20178
20376
|
"span",
|
|
20179
20377
|
{
|
|
20180
20378
|
className: "task-table__badge",
|
|
@@ -20184,8 +20382,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20184
20382
|
)
|
|
20185
20383
|
] })
|
|
20186
20384
|
] }),
|
|
20187
|
-
/* @__PURE__ */ (0,
|
|
20188
|
-
/* @__PURE__ */ (0,
|
|
20385
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "row" }, children: [
|
|
20386
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20189
20387
|
"aside",
|
|
20190
20388
|
{
|
|
20191
20389
|
style: {
|
|
@@ -20198,19 +20396,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20198
20396
|
background: "var(--vscode-sideBar-background, rgba(0,0,0,0.1))"
|
|
20199
20397
|
},
|
|
20200
20398
|
children: [
|
|
20201
|
-
/* @__PURE__ */ (0,
|
|
20202
|
-
/* @__PURE__ */ (0,
|
|
20203
|
-
totalCount > 0 && /* @__PURE__ */ (0,
|
|
20399
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { padding: "10px 12px", borderBottom: "1px solid var(--vscode-panel-border, rgba(255,255,255,0.05))" }, children: [
|
|
20400
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: 0, fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
|
|
20401
|
+
totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { fontSize: "10px", opacity: 0.5, marginTop: "2px" }, children: [
|
|
20204
20402
|
completedCount,
|
|
20205
20403
|
"/",
|
|
20206
20404
|
totalCount,
|
|
20207
20405
|
" done"
|
|
20208
20406
|
] })
|
|
20209
20407
|
] }),
|
|
20210
|
-
/* @__PURE__ */ (0,
|
|
20408
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { padding: "8px 10px", display: "flex", flexDirection: "column", gap: "4px" }, children: totalCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { fontSize: "11px", opacity: 0.4, padding: "8px 4px" }, children: "No checklist items." }) : (task.checklist || []).map((item) => {
|
|
20211
20409
|
const isDone = item.status === "done";
|
|
20212
20410
|
const isInProgress = item.status === "in_progress";
|
|
20213
|
-
return /* @__PURE__ */ (0,
|
|
20411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20214
20412
|
"label",
|
|
20215
20413
|
{
|
|
20216
20414
|
style: {
|
|
@@ -20227,7 +20425,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20227
20425
|
},
|
|
20228
20426
|
title: isInProgress ? "In progress" : isDone ? "Done" : "Pending",
|
|
20229
20427
|
children: [
|
|
20230
|
-
/* @__PURE__ */ (0,
|
|
20428
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20231
20429
|
"input",
|
|
20232
20430
|
{
|
|
20233
20431
|
type: "checkbox",
|
|
@@ -20236,7 +20434,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20236
20434
|
style: { marginTop: "2px", cursor: "pointer", flexShrink: 0 }
|
|
20237
20435
|
}
|
|
20238
20436
|
),
|
|
20239
|
-
/* @__PURE__ */ (0,
|
|
20437
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { wordBreak: "break-word" }, children: item.text })
|
|
20240
20438
|
]
|
|
20241
20439
|
},
|
|
20242
20440
|
item.id
|
|
@@ -20245,10 +20443,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20245
20443
|
]
|
|
20246
20444
|
}
|
|
20247
20445
|
),
|
|
20248
|
-
/* @__PURE__ */ (0,
|
|
20249
|
-
taskMessages.length === 0 ? /* @__PURE__ */ (0,
|
|
20250
|
-
/* @__PURE__ */ (0,
|
|
20251
|
-
/* @__PURE__ */ (0,
|
|
20446
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
|
|
20447
|
+
taskMessages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "messages messages--empty", children: "No messages in this execution yet. Agent will start on next tick." }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MessageList, { items: chatItems, sessionId: null }),
|
|
20448
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("form", { className: "composer", onSubmit: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "flex-end" }, children: [
|
|
20449
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20252
20450
|
"textarea",
|
|
20253
20451
|
{
|
|
20254
20452
|
className: "composer__input",
|
|
@@ -20264,7 +20462,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20264
20462
|
style: { flex: 1, minHeight: "44px" }
|
|
20265
20463
|
}
|
|
20266
20464
|
),
|
|
20267
|
-
/* @__PURE__ */ (0,
|
|
20465
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20268
20466
|
"button",
|
|
20269
20467
|
{
|
|
20270
20468
|
type: "submit",
|
|
@@ -20296,12 +20494,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20296
20494
|
statusColor
|
|
20297
20495
|
}) {
|
|
20298
20496
|
const isRunning = task.status === "active" || task.status === "reviewing" || task.status === "planning";
|
|
20299
|
-
const [draftTitle, setDraftTitle] = (0,
|
|
20300
|
-
const [draftObjective, setDraftObjective] = (0,
|
|
20301
|
-
const [lastTaskId, setLastTaskId] = (0,
|
|
20497
|
+
const [draftTitle, setDraftTitle] = (0, import_react16.useState)(task.title);
|
|
20498
|
+
const [draftObjective, setDraftObjective] = (0, import_react16.useState)(task.objective);
|
|
20499
|
+
const [lastTaskId, setLastTaskId] = (0, import_react16.useState)(task.id);
|
|
20302
20500
|
const trimmedTitle = draftTitle.trim();
|
|
20303
20501
|
const isDirty = trimmedTitle !== task.title.trim() || draftObjective.trim() !== task.objective.trim();
|
|
20304
|
-
(0,
|
|
20502
|
+
(0, import_react16.useEffect)(() => {
|
|
20305
20503
|
if (task.id !== lastTaskId) {
|
|
20306
20504
|
setDraftTitle(task.title);
|
|
20307
20505
|
setDraftObjective(task.objective);
|
|
@@ -20316,16 +20514,16 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20316
20514
|
setDraftTitle(task.title);
|
|
20317
20515
|
setDraftObjective(task.objective);
|
|
20318
20516
|
};
|
|
20319
|
-
return /* @__PURE__ */ (0,
|
|
20320
|
-
/* @__PURE__ */ (0,
|
|
20321
|
-
/* @__PURE__ */ (0,
|
|
20322
|
-
/* @__PURE__ */ (0,
|
|
20323
|
-
/* @__PURE__ */ (0,
|
|
20324
|
-
/* @__PURE__ */ (0,
|
|
20517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%", overflowY: "auto" }, children: [
|
|
20518
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "task-view__sub-header", style: { padding: "12px 14px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
20519
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
20520
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowLeft, { size: 13 }) }),
|
|
20521
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("h3", { style: { margin: 0, fontSize: "15px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
20522
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { style: { opacity: 0.6 }, children: [
|
|
20325
20523
|
"Task #",
|
|
20326
20524
|
task.id
|
|
20327
20525
|
] }),
|
|
20328
|
-
/* @__PURE__ */ (0,
|
|
20526
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20329
20527
|
"input",
|
|
20330
20528
|
{
|
|
20331
20529
|
value: draftTitle,
|
|
@@ -20346,7 +20544,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20346
20544
|
}
|
|
20347
20545
|
)
|
|
20348
20546
|
] }),
|
|
20349
|
-
/* @__PURE__ */ (0,
|
|
20547
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20350
20548
|
"span",
|
|
20351
20549
|
{
|
|
20352
20550
|
className: "task-table__badge",
|
|
@@ -20355,8 +20553,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20355
20553
|
}
|
|
20356
20554
|
)
|
|
20357
20555
|
] }),
|
|
20358
|
-
/* @__PURE__ */ (0,
|
|
20359
|
-
/* @__PURE__ */ (0,
|
|
20556
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "inline-flex", gap: "6px" }, children: [
|
|
20557
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20360
20558
|
"button",
|
|
20361
20559
|
{
|
|
20362
20560
|
className: "confirm__btn",
|
|
@@ -20366,7 +20564,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20366
20564
|
children: "View Log"
|
|
20367
20565
|
}
|
|
20368
20566
|
),
|
|
20369
|
-
task.worktreePath && /* @__PURE__ */ (0,
|
|
20567
|
+
task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20370
20568
|
"button",
|
|
20371
20569
|
{
|
|
20372
20570
|
className: "confirm__btn",
|
|
@@ -20374,12 +20572,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20374
20572
|
title: `Commit pending changes to ${task.branch} and remove the worktree`,
|
|
20375
20573
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
20376
20574
|
children: [
|
|
20377
|
-
/* @__PURE__ */ (0,
|
|
20575
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GitBranch, { size: 12 }),
|
|
20378
20576
|
" Discard worktree"
|
|
20379
20577
|
]
|
|
20380
20578
|
}
|
|
20381
20579
|
),
|
|
20382
|
-
/* @__PURE__ */ (0,
|
|
20580
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20383
20581
|
"button",
|
|
20384
20582
|
{
|
|
20385
20583
|
className: "confirm__btn",
|
|
@@ -20387,28 +20585,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20387
20585
|
title: task.archived ? "Unarchive this task" : "Archive this task (hides it from the list, excludes from scheduler)",
|
|
20388
20586
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
20389
20587
|
children: [
|
|
20390
|
-
/* @__PURE__ */ (0,
|
|
20588
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Archive, { size: 12 }),
|
|
20391
20589
|
" ",
|
|
20392
20590
|
task.archived ? "Unarchive" : "Archive"
|
|
20393
20591
|
]
|
|
20394
20592
|
}
|
|
20395
20593
|
),
|
|
20396
|
-
/* @__PURE__ */ (0,
|
|
20594
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20397
20595
|
"button",
|
|
20398
20596
|
{
|
|
20399
20597
|
className: "confirm__btn confirm__btn--primary",
|
|
20400
20598
|
onClick: () => onToggleStatus(task),
|
|
20401
20599
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
20402
|
-
children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0,
|
|
20403
|
-
/* @__PURE__ */ (0,
|
|
20600
|
+
children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
20601
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Pause, { size: 12 }),
|
|
20404
20602
|
" Pause"
|
|
20405
|
-
] }) : /* @__PURE__ */ (0,
|
|
20406
|
-
/* @__PURE__ */ (0,
|
|
20603
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
20604
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Play, { size: 12 }),
|
|
20407
20605
|
" Activate"
|
|
20408
20606
|
] })
|
|
20409
20607
|
}
|
|
20410
20608
|
),
|
|
20411
|
-
/* @__PURE__ */ (0,
|
|
20609
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20412
20610
|
"button",
|
|
20413
20611
|
{
|
|
20414
20612
|
className: "confirm__btn",
|
|
@@ -20416,22 +20614,22 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20416
20614
|
title: "Permanently delete this task and all its messages",
|
|
20417
20615
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px", color: "#ef4444" },
|
|
20418
20616
|
children: [
|
|
20419
|
-
/* @__PURE__ */ (0,
|
|
20617
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Trash2, { size: 12 }),
|
|
20420
20618
|
" Delete"
|
|
20421
20619
|
]
|
|
20422
20620
|
}
|
|
20423
20621
|
)
|
|
20424
20622
|
] })
|
|
20425
20623
|
] }),
|
|
20426
|
-
/* @__PURE__ */ (0,
|
|
20427
|
-
task.branch && /* @__PURE__ */ (0,
|
|
20428
|
-
/* @__PURE__ */ (0,
|
|
20429
|
-
/* @__PURE__ */ (0,
|
|
20430
|
-
!task.worktreePath && /* @__PURE__ */ (0,
|
|
20624
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { padding: "16px", maxWidth: "720px" }, children: [
|
|
20625
|
+
task.branch && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "6px", fontSize: "11px", opacity: 0.75 }, children: [
|
|
20626
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(GitBranch, { size: 12 }),
|
|
20627
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("code", { style: { fontFamily: "monospace" }, children: task.branch }),
|
|
20628
|
+
!task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { opacity: 0.6 }, children: "(worktree removed)" })
|
|
20431
20629
|
] }),
|
|
20432
|
-
/* @__PURE__ */ (0,
|
|
20433
|
-
/* @__PURE__ */ (0,
|
|
20434
|
-
/* @__PURE__ */ (0,
|
|
20630
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
20631
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Objective" }),
|
|
20632
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20435
20633
|
"textarea",
|
|
20436
20634
|
{
|
|
20437
20635
|
value: draftObjective,
|
|
@@ -20455,8 +20653,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20455
20653
|
}
|
|
20456
20654
|
}
|
|
20457
20655
|
),
|
|
20458
|
-
isDirty && /* @__PURE__ */ (0,
|
|
20459
|
-
/* @__PURE__ */ (0,
|
|
20656
|
+
isDirty && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center", marginTop: "8px" }, children: [
|
|
20657
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20460
20658
|
"button",
|
|
20461
20659
|
{
|
|
20462
20660
|
className: "confirm__btn confirm__btn--primary",
|
|
@@ -20469,13 +20667,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20469
20667
|
children: "Save"
|
|
20470
20668
|
}
|
|
20471
20669
|
),
|
|
20472
|
-
/* @__PURE__ */ (0,
|
|
20473
|
-
isRunning && /* @__PURE__ */ (0,
|
|
20670
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "confirm__btn", onClick: resetDraft, style: { padding: "3px 10px", fontSize: "10px" }, children: "Cancel" }),
|
|
20671
|
+
isRunning && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: "Applies from the next cycle." })
|
|
20474
20672
|
] })
|
|
20475
20673
|
] }),
|
|
20476
|
-
/* @__PURE__ */ (0,
|
|
20477
|
-
/* @__PURE__ */ (0,
|
|
20478
|
-
/* @__PURE__ */ (0,
|
|
20674
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
20675
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Assigned Agent" }),
|
|
20676
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20479
20677
|
"select",
|
|
20480
20678
|
{
|
|
20481
20679
|
value: task.agentId || "",
|
|
@@ -20495,8 +20693,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20495
20693
|
},
|
|
20496
20694
|
title: isRunning ? "Pause the task before changing its agent" : "Choose which agent runs this task",
|
|
20497
20695
|
children: [
|
|
20498
|
-
/* @__PURE__ */ (0,
|
|
20499
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20696
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
|
|
20697
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
|
|
20500
20698
|
a.name,
|
|
20501
20699
|
" (",
|
|
20502
20700
|
a.provider,
|
|
@@ -20506,9 +20704,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20506
20704
|
}
|
|
20507
20705
|
)
|
|
20508
20706
|
] }),
|
|
20509
|
-
/* @__PURE__ */ (0,
|
|
20510
|
-
/* @__PURE__ */ (0,
|
|
20511
|
-
/* @__PURE__ */ (0,
|
|
20707
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
20708
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Planner Agent" }),
|
|
20709
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20512
20710
|
"select",
|
|
20513
20711
|
{
|
|
20514
20712
|
value: task.plannerAgentId || "",
|
|
@@ -20517,8 +20715,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20517
20715
|
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 },
|
|
20518
20716
|
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.",
|
|
20519
20717
|
children: [
|
|
20520
|
-
/* @__PURE__ */ (0,
|
|
20521
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20718
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
|
|
20719
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
|
|
20522
20720
|
a.name,
|
|
20523
20721
|
" (",
|
|
20524
20722
|
a.provider,
|
|
@@ -20528,9 +20726,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20528
20726
|
}
|
|
20529
20727
|
)
|
|
20530
20728
|
] }),
|
|
20531
|
-
/* @__PURE__ */ (0,
|
|
20532
|
-
/* @__PURE__ */ (0,
|
|
20533
|
-
/* @__PURE__ */ (0,
|
|
20729
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
20730
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Reviewer Agent" }),
|
|
20731
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20534
20732
|
"select",
|
|
20535
20733
|
{
|
|
20536
20734
|
value: task.reviewerAgentId || "",
|
|
@@ -20539,8 +20737,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20539
20737
|
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 },
|
|
20540
20738
|
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.",
|
|
20541
20739
|
children: [
|
|
20542
|
-
/* @__PURE__ */ (0,
|
|
20543
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20740
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "Project default" }),
|
|
20741
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
|
|
20544
20742
|
a.name,
|
|
20545
20743
|
" (",
|
|
20546
20744
|
a.provider,
|
|
@@ -20550,31 +20748,31 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20550
20748
|
}
|
|
20551
20749
|
)
|
|
20552
20750
|
] }),
|
|
20553
|
-
/* @__PURE__ */ (0,
|
|
20554
|
-
/* @__PURE__ */ (0,
|
|
20555
|
-
/* @__PURE__ */ (0,
|
|
20751
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
20752
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Phases" }),
|
|
20753
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { display: "flex", gap: "12px" }, children: [
|
|
20556
20754
|
{ flag: "planningEnabled", label: "Planning phase", value: task.planningEnabled },
|
|
20557
20755
|
{ flag: "reviewEnabled", label: "Review at DONE", value: task.reviewEnabled },
|
|
20558
20756
|
{ flag: "sddEnabled", label: "SDD mode (.md specs)", value: task.sddEnabled }
|
|
20559
|
-
].map(({ flag, label, value }) => /* @__PURE__ */ (0,
|
|
20757
|
+
].map(({ flag, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", flex: 1 }, children: [
|
|
20560
20758
|
label,
|
|
20561
|
-
/* @__PURE__ */ (0,
|
|
20759
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20562
20760
|
"select",
|
|
20563
20761
|
{
|
|
20564
20762
|
value: value === true ? "on" : value === false ? "off" : "inherit",
|
|
20565
20763
|
onChange: (e) => onSetFlag(task, flag, e.target.value === "inherit" ? null : e.target.value === "on"),
|
|
20566
20764
|
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" },
|
|
20567
20765
|
children: [
|
|
20568
|
-
/* @__PURE__ */ (0,
|
|
20569
|
-
/* @__PURE__ */ (0,
|
|
20570
|
-
/* @__PURE__ */ (0,
|
|
20766
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "inherit", children: "Project default" }),
|
|
20767
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "on", children: "On" }),
|
|
20768
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "off", children: "Off" })
|
|
20571
20769
|
]
|
|
20572
20770
|
}
|
|
20573
20771
|
)
|
|
20574
20772
|
] }, flag)) }),
|
|
20575
|
-
/* @__PURE__ */ (0,
|
|
20773
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", marginTop: "12px", maxWidth: "260px" }, children: [
|
|
20576
20774
|
"Max run seconds per cycle",
|
|
20577
|
-
/* @__PURE__ */ (0,
|
|
20775
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20578
20776
|
"input",
|
|
20579
20777
|
{
|
|
20580
20778
|
type: "number",
|
|
@@ -20597,7 +20795,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20597
20795
|
)
|
|
20598
20796
|
] })
|
|
20599
20797
|
] }),
|
|
20600
|
-
task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0,
|
|
20798
|
+
task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20601
20799
|
"div",
|
|
20602
20800
|
{
|
|
20603
20801
|
style: {
|
|
@@ -20610,19 +20808,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20610
20808
|
fontSize: "12px"
|
|
20611
20809
|
},
|
|
20612
20810
|
children: [
|
|
20613
|
-
/* @__PURE__ */ (0,
|
|
20614
|
-
/* @__PURE__ */ (0,
|
|
20811
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("strong", { children: [
|
|
20812
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TriangleAlert, { size: 13 }),
|
|
20615
20813
|
" Blocked Reason:"
|
|
20616
20814
|
] }),
|
|
20617
|
-
/* @__PURE__ */ (0,
|
|
20815
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { style: { margin: "4px 0 0 0" }, children: task.blockedReason })
|
|
20618
20816
|
]
|
|
20619
20817
|
}
|
|
20620
20818
|
),
|
|
20621
|
-
/* @__PURE__ */ (0,
|
|
20622
|
-
/* @__PURE__ */ (0,
|
|
20623
|
-
/* @__PURE__ */ (0,
|
|
20819
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { children: [
|
|
20820
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { style: { margin: "0 0 8px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
|
|
20821
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: (task.checklist || []).map((item) => {
|
|
20624
20822
|
const isDone = item.status === "done";
|
|
20625
|
-
return /* @__PURE__ */ (0,
|
|
20823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
20626
20824
|
"label",
|
|
20627
20825
|
{
|
|
20628
20826
|
style: {
|
|
@@ -20639,7 +20837,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20639
20837
|
opacity: isDone ? 0.6 : 1
|
|
20640
20838
|
},
|
|
20641
20839
|
children: [
|
|
20642
|
-
/* @__PURE__ */ (0,
|
|
20840
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20643
20841
|
"input",
|
|
20644
20842
|
{
|
|
20645
20843
|
type: "checkbox",
|
|
@@ -20648,7 +20846,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20648
20846
|
style: { marginTop: "2px", cursor: "pointer" }
|
|
20649
20847
|
}
|
|
20650
20848
|
),
|
|
20651
|
-
/* @__PURE__ */ (0,
|
|
20849
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: item.text })
|
|
20652
20850
|
]
|
|
20653
20851
|
},
|
|
20654
20852
|
item.id
|
|
@@ -20660,7 +20858,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20660
20858
|
}
|
|
20661
20859
|
|
|
20662
20860
|
// src/useVoice.ts
|
|
20663
|
-
var
|
|
20861
|
+
var import_react17 = __toESM(require_react(), 1);
|
|
20664
20862
|
function canCapture() {
|
|
20665
20863
|
return typeof window !== "undefined" && typeof MediaRecorder !== "undefined" && !!navigator.mediaDevices?.getUserMedia;
|
|
20666
20864
|
}
|
|
@@ -20685,37 +20883,37 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20685
20883
|
const { voice, chatStatus, pendingConfirmCount, items, onTranscript } = opts;
|
|
20686
20884
|
const available = !!voice && voice.enabled && voice.configured && canCapture();
|
|
20687
20885
|
const canSpeak = !!voice?.canSpeak;
|
|
20688
|
-
const [phase, setPhase] = (0,
|
|
20689
|
-
const [mode, setMode] = (0,
|
|
20690
|
-
const [error, setError] = (0,
|
|
20691
|
-
const phaseRef = (0,
|
|
20886
|
+
const [phase, setPhase] = (0, import_react17.useState)("idle");
|
|
20887
|
+
const [mode, setMode] = (0, import_react17.useState)("dictate");
|
|
20888
|
+
const [error, setError] = (0, import_react17.useState)(null);
|
|
20889
|
+
const phaseRef = (0, import_react17.useRef)(phase);
|
|
20692
20890
|
phaseRef.current = phase;
|
|
20693
|
-
const modeRef = (0,
|
|
20891
|
+
const modeRef = (0, import_react17.useRef)(mode);
|
|
20694
20892
|
modeRef.current = mode;
|
|
20695
|
-
const onTranscriptRef = (0,
|
|
20893
|
+
const onTranscriptRef = (0, import_react17.useRef)(onTranscript);
|
|
20696
20894
|
onTranscriptRef.current = onTranscript;
|
|
20697
|
-
const itemsRef = (0,
|
|
20895
|
+
const itemsRef = (0, import_react17.useRef)(items);
|
|
20698
20896
|
itemsRef.current = items;
|
|
20699
|
-
const chatStatusRef = (0,
|
|
20897
|
+
const chatStatusRef = (0, import_react17.useRef)(chatStatus);
|
|
20700
20898
|
chatStatusRef.current = chatStatus;
|
|
20701
|
-
const streamRef = (0,
|
|
20702
|
-
const recorderRef = (0,
|
|
20703
|
-
const chunksRef = (0,
|
|
20704
|
-
const vadRef = (0,
|
|
20705
|
-
const audioRef = (0,
|
|
20706
|
-
const idleTimerRef = (0,
|
|
20707
|
-
const heardSpeechRef = (0,
|
|
20708
|
-
const sawStreamingRef = (0,
|
|
20709
|
-
const cursorRef = (0,
|
|
20710
|
-
const queueRef = (0,
|
|
20711
|
-
const apply = (0,
|
|
20899
|
+
const streamRef = (0, import_react17.useRef)(null);
|
|
20900
|
+
const recorderRef = (0, import_react17.useRef)(null);
|
|
20901
|
+
const chunksRef = (0, import_react17.useRef)([]);
|
|
20902
|
+
const vadRef = (0, import_react17.useRef)(null);
|
|
20903
|
+
const audioRef = (0, import_react17.useRef)(null);
|
|
20904
|
+
const idleTimerRef = (0, import_react17.useRef)(null);
|
|
20905
|
+
const heardSpeechRef = (0, import_react17.useRef)(false);
|
|
20906
|
+
const sawStreamingRef = (0, import_react17.useRef)(false);
|
|
20907
|
+
const cursorRef = (0, import_react17.useRef)(0);
|
|
20908
|
+
const queueRef = (0, import_react17.useRef)([]);
|
|
20909
|
+
const apply = (0, import_react17.useCallback)((event) => {
|
|
20712
20910
|
setPhase((current) => nextPhase(current, event));
|
|
20713
20911
|
}, []);
|
|
20714
20912
|
const clearIdleTimer = () => {
|
|
20715
20913
|
if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
|
|
20716
20914
|
idleTimerRef.current = null;
|
|
20717
20915
|
};
|
|
20718
|
-
const teardownCapture = (0,
|
|
20916
|
+
const teardownCapture = (0, import_react17.useCallback)(() => {
|
|
20719
20917
|
clearIdleTimer();
|
|
20720
20918
|
try {
|
|
20721
20919
|
vadRef.current?.destroy();
|
|
@@ -20732,14 +20930,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20732
20930
|
chunksRef.current = [];
|
|
20733
20931
|
heardSpeechRef.current = false;
|
|
20734
20932
|
}, []);
|
|
20735
|
-
const stopPlayback = (0,
|
|
20933
|
+
const stopPlayback = (0, import_react17.useCallback)(() => {
|
|
20736
20934
|
if (audioRef.current) {
|
|
20737
20935
|
audioRef.current.pause();
|
|
20738
20936
|
audioRef.current.src = "";
|
|
20739
20937
|
audioRef.current = null;
|
|
20740
20938
|
}
|
|
20741
20939
|
}, []);
|
|
20742
|
-
const fail = (0,
|
|
20940
|
+
const fail = (0, import_react17.useCallback)(
|
|
20743
20941
|
(message) => {
|
|
20744
20942
|
teardownCapture();
|
|
20745
20943
|
stopPlayback();
|
|
@@ -20748,7 +20946,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20748
20946
|
},
|
|
20749
20947
|
[apply, teardownCapture, stopPlayback]
|
|
20750
20948
|
);
|
|
20751
|
-
const finishRecording = (0,
|
|
20949
|
+
const finishRecording = (0, import_react17.useCallback)(() => {
|
|
20752
20950
|
const recorder = recorderRef.current;
|
|
20753
20951
|
if (!recorder || recorder.state === "inactive") return;
|
|
20754
20952
|
recorder.onstop = async () => {
|
|
@@ -20777,7 +20975,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20777
20975
|
};
|
|
20778
20976
|
recorder.stop();
|
|
20779
20977
|
}, [apply, fail, teardownCapture]);
|
|
20780
|
-
const startRecording = (0,
|
|
20978
|
+
const startRecording = (0, import_react17.useCallback)(async () => {
|
|
20781
20979
|
setError(null);
|
|
20782
20980
|
chunksRef.current = [];
|
|
20783
20981
|
heardSpeechRef.current = false;
|
|
@@ -20822,7 +21020,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20822
21020
|
fail(`Microphone unavailable: ${err}`);
|
|
20823
21021
|
}
|
|
20824
21022
|
}, [apply, fail, finishRecording, teardownCapture]);
|
|
20825
|
-
const speakReply = (0,
|
|
21023
|
+
const speakReply = (0, import_react17.useCallback)(async () => {
|
|
20826
21024
|
const text = queueRef.current.shift();
|
|
20827
21025
|
if (!text) {
|
|
20828
21026
|
apply({
|
|
@@ -20866,10 +21064,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20866
21064
|
fail(`Synthesis failed: ${err}`);
|
|
20867
21065
|
}
|
|
20868
21066
|
}, [apply, fail]);
|
|
20869
|
-
(0,
|
|
21067
|
+
(0, import_react17.useEffect)(() => {
|
|
20870
21068
|
if (chatStatus === "streaming") sawStreamingRef.current = true;
|
|
20871
21069
|
}, [chatStatus]);
|
|
20872
|
-
(0,
|
|
21070
|
+
(0, import_react17.useEffect)(() => {
|
|
20873
21071
|
if (modeRef.current !== "conversation") return;
|
|
20874
21072
|
if (phaseRef.current === "idle") return;
|
|
20875
21073
|
const { texts, cursor } = takeFinalizedBubbles(items, cursorRef.current);
|
|
@@ -20878,7 +21076,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20878
21076
|
queueRef.current.push(...texts);
|
|
20879
21077
|
apply({ kind: "speechQueued", mode: "conversation", canSpeak });
|
|
20880
21078
|
}, [items, canSpeak, apply]);
|
|
20881
|
-
(0,
|
|
21079
|
+
(0, import_react17.useEffect)(() => {
|
|
20882
21080
|
if (phase !== "awaiting") return;
|
|
20883
21081
|
if (chatStatus === "error") {
|
|
20884
21082
|
apply({ kind: "failed", mode: "conversation" });
|
|
@@ -20900,8 +21098,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20900
21098
|
pendingSpeech: queueRef.current.length
|
|
20901
21099
|
});
|
|
20902
21100
|
}, [phase, chatStatus, pendingConfirmCount, canSpeak, apply]);
|
|
20903
|
-
const prevPhase = (0,
|
|
20904
|
-
(0,
|
|
21101
|
+
const prevPhase = (0, import_react17.useRef)("idle");
|
|
21102
|
+
(0, import_react17.useEffect)(() => {
|
|
20905
21103
|
const from = prevPhase.current;
|
|
20906
21104
|
prevPhase.current = phase;
|
|
20907
21105
|
if (from === phase) return;
|
|
@@ -20913,14 +21111,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20913
21111
|
queueRef.current = [];
|
|
20914
21112
|
}
|
|
20915
21113
|
}, [phase, startRecording, speakReply, teardownCapture, stopPlayback]);
|
|
20916
|
-
(0,
|
|
21114
|
+
(0, import_react17.useEffect)(
|
|
20917
21115
|
() => () => {
|
|
20918
21116
|
teardownCapture();
|
|
20919
21117
|
stopPlayback();
|
|
20920
21118
|
},
|
|
20921
21119
|
[teardownCapture, stopPlayback]
|
|
20922
21120
|
);
|
|
20923
|
-
const toggle = (0,
|
|
21121
|
+
const toggle = (0, import_react17.useCallback)(() => {
|
|
20924
21122
|
if (!available) return;
|
|
20925
21123
|
const current = phaseRef.current;
|
|
20926
21124
|
if (current === "idle") {
|
|
@@ -20934,7 +21132,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20934
21132
|
}
|
|
20935
21133
|
apply({ kind: "userStop", mode: modeRef.current });
|
|
20936
21134
|
}, [available, apply, finishRecording]);
|
|
20937
|
-
const changeMode = (0,
|
|
21135
|
+
const changeMode = (0, import_react17.useCallback)(
|
|
20938
21136
|
(next) => {
|
|
20939
21137
|
apply({ kind: "userStop", mode: modeRef.current });
|
|
20940
21138
|
setMode(next);
|
|
@@ -20945,7 +21143,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20945
21143
|
}
|
|
20946
21144
|
|
|
20947
21145
|
// src/App.tsx
|
|
20948
|
-
var
|
|
21146
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
20949
21147
|
function closeStreamingAssistant2(items) {
|
|
20950
21148
|
const last = items[items.length - 1];
|
|
20951
21149
|
if (!last || last.kind !== "assistant" || !last.streaming) return items;
|
|
@@ -21107,34 +21305,35 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21107
21305
|
}
|
|
21108
21306
|
}
|
|
21109
21307
|
function App({ postMessage, layout = "compact" }) {
|
|
21110
|
-
const [chatState, dispatch] = (0,
|
|
21308
|
+
const [chatState, dispatch] = (0, import_react18.useReducer)(reducer, {
|
|
21111
21309
|
items: [],
|
|
21112
21310
|
status: "idle",
|
|
21113
21311
|
errorText: null,
|
|
21114
21312
|
pendingConfirms: [],
|
|
21115
21313
|
contextUsage: null
|
|
21116
21314
|
});
|
|
21117
|
-
const [agents, setAgents] = (0,
|
|
21118
|
-
const [sessions, setSessions] = (0,
|
|
21119
|
-
const [selectedAgentId, setSelectedAgentId] = (0,
|
|
21120
|
-
const [selectedSessionId, setSelectedSessionId] = (0,
|
|
21121
|
-
const [showSessions, setShowSessions] = (0,
|
|
21122
|
-
const [showAllAgents, setShowAllAgents] = (0,
|
|
21123
|
-
const [pendingDelete, setPendingDelete] = (0,
|
|
21124
|
-
const [activeScreen, setActiveScreen] = (0,
|
|
21125
|
-
const [settingsData, setSettingsData] = (0,
|
|
21126
|
-
const [modelsResult, setModelsResult] = (0,
|
|
21127
|
-
const [refreshingSourceId, setRefreshingSourceId] = (0,
|
|
21128
|
-
const [refreshOutcome, setRefreshOutcome] = (0,
|
|
21129
|
-
const [mcpAuthOutcome, setMcpAuthOutcome] = (0,
|
|
21130
|
-
const [taskRuns, setTaskRuns] = (0,
|
|
21131
|
-
const [voiceConfig, setVoiceConfig] = (0,
|
|
21132
|
-
const [
|
|
21133
|
-
const [
|
|
21134
|
-
(0,
|
|
21315
|
+
const [agents, setAgents] = (0, import_react18.useState)([]);
|
|
21316
|
+
const [sessions, setSessions] = (0, import_react18.useState)([]);
|
|
21317
|
+
const [selectedAgentId, setSelectedAgentId] = (0, import_react18.useState)(null);
|
|
21318
|
+
const [selectedSessionId, setSelectedSessionId] = (0, import_react18.useState)(null);
|
|
21319
|
+
const [showSessions, setShowSessions] = (0, import_react18.useState)(false);
|
|
21320
|
+
const [showAllAgents, setShowAllAgents] = (0, import_react18.useState)(false);
|
|
21321
|
+
const [pendingDelete, setPendingDelete] = (0, import_react18.useState)(null);
|
|
21322
|
+
const [activeScreen, setActiveScreen] = (0, import_react18.useState)("chat");
|
|
21323
|
+
const [settingsData, setSettingsData] = (0, import_react18.useState)(null);
|
|
21324
|
+
const [modelsResult, setModelsResult] = (0, import_react18.useState)(null);
|
|
21325
|
+
const [refreshingSourceId, setRefreshingSourceId] = (0, import_react18.useState)(null);
|
|
21326
|
+
const [refreshOutcome, setRefreshOutcome] = (0, import_react18.useState)(null);
|
|
21327
|
+
const [mcpAuthOutcome, setMcpAuthOutcome] = (0, import_react18.useState)(null);
|
|
21328
|
+
const [taskRuns, setTaskRuns] = (0, import_react18.useState)({});
|
|
21329
|
+
const [voiceConfig, setVoiceConfig] = (0, import_react18.useState)(null);
|
|
21330
|
+
const [sttCatalogResult, setSttCatalogResult] = (0, import_react18.useState)(null);
|
|
21331
|
+
const [ttsCatalogResult, setTtsCatalogResult] = (0, import_react18.useState)(null);
|
|
21332
|
+
const [composerDraft, setComposerDraft] = (0, import_react18.useState)("");
|
|
21333
|
+
(0, import_react18.useEffect)(() => {
|
|
21135
21334
|
postMessage({ type: "webviewReady" });
|
|
21136
21335
|
}, []);
|
|
21137
|
-
(0,
|
|
21336
|
+
(0, import_react18.useEffect)(() => {
|
|
21138
21337
|
function handle(event) {
|
|
21139
21338
|
const msg = event.data;
|
|
21140
21339
|
if (!msg || typeof msg !== "object" || !("type" in msg)) return;
|
|
@@ -21192,7 +21391,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21192
21391
|
setModelsResult(msg.result);
|
|
21193
21392
|
return;
|
|
21194
21393
|
case "voiceModelsFetched":
|
|
21195
|
-
|
|
21394
|
+
if (msg.target === "tts") setTtsCatalogResult(msg.result);
|
|
21395
|
+
else setSttCatalogResult(msg.result);
|
|
21196
21396
|
return;
|
|
21197
21397
|
case "refreshingPlugin":
|
|
21198
21398
|
setRefreshingSourceId(msg.sourceId);
|
|
@@ -21241,13 +21441,17 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21241
21441
|
if (voice2) msg.voice = true;
|
|
21242
21442
|
postMessage(msg);
|
|
21243
21443
|
};
|
|
21244
|
-
const onConfirm = (id, decision) => {
|
|
21444
|
+
const onConfirm = (0, import_react18.useCallback)((id, decision) => {
|
|
21245
21445
|
dispatch({ kind: "permission-resolved", id });
|
|
21246
21446
|
postMessage({ type: "permission_response", id, decision });
|
|
21247
|
-
};
|
|
21447
|
+
}, [postMessage]);
|
|
21248
21448
|
const onAbort = () => {
|
|
21249
21449
|
postMessage({ type: "abort" });
|
|
21250
21450
|
};
|
|
21451
|
+
const confirmCards = (0, import_react18.useMemo)(
|
|
21452
|
+
() => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ConfirmCard, { pending: p, onDecide: onConfirm }, p.id)),
|
|
21453
|
+
[chatState.pendingConfirms, onConfirm]
|
|
21454
|
+
);
|
|
21251
21455
|
const onSelectAgent = (agentId) => {
|
|
21252
21456
|
if (!agentId) return;
|
|
21253
21457
|
setSelectedAgentId(agentId);
|
|
@@ -21285,7 +21489,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21285
21489
|
const cancelDeleteSession = () => {
|
|
21286
21490
|
setPendingDelete(null);
|
|
21287
21491
|
};
|
|
21288
|
-
(0,
|
|
21492
|
+
(0, import_react18.useEffect)(() => {
|
|
21289
21493
|
if (!pendingDelete) return;
|
|
21290
21494
|
function handleKeyDown(event) {
|
|
21291
21495
|
if (event.key === "Escape") {
|
|
@@ -21300,7 +21504,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21300
21504
|
setShowSessions(!showSessions);
|
|
21301
21505
|
}
|
|
21302
21506
|
};
|
|
21303
|
-
(0,
|
|
21507
|
+
(0, import_react18.useEffect)(() => {
|
|
21304
21508
|
function handleClickOutside(event) {
|
|
21305
21509
|
const target = event.target;
|
|
21306
21510
|
if (showSessions && !target.closest(".app__sessions-dropdown")) {
|
|
@@ -21314,18 +21518,18 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21314
21518
|
const selectedAgentName = agents.find((a) => a.id === selectedAgentId)?.name;
|
|
21315
21519
|
const activeAgent = agents.find((a) => a.id === selectedAgentId);
|
|
21316
21520
|
if (activeScreen === "projects" && layout === "sidebar") {
|
|
21317
|
-
return /* @__PURE__ */ (0,
|
|
21318
|
-
/* @__PURE__ */ (0,
|
|
21319
|
-
/* @__PURE__ */ (0,
|
|
21320
|
-
/* @__PURE__ */ (0,
|
|
21321
|
-
/* @__PURE__ */ (0,
|
|
21521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app", style: { height: "100%" }, children: [
|
|
21522
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__header-row", children: [
|
|
21523
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__logo-title-wrapper", onClick: () => setActiveScreen("chat"), style: { cursor: "pointer" }, children: [
|
|
21524
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
|
|
21525
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Caretaker" })
|
|
21322
21526
|
] }),
|
|
21323
|
-
/* @__PURE__ */ (0,
|
|
21324
|
-
/* @__PURE__ */ (0,
|
|
21325
|
-
/* @__PURE__ */ (0,
|
|
21527
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__controls", children: [
|
|
21528
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "app__sessions-btn", onClick: () => setActiveScreen("chat"), children: [
|
|
21529
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MessageSquare, { size: 13 }),
|
|
21326
21530
|
" Chat"
|
|
21327
21531
|
] }),
|
|
21328
|
-
/* @__PURE__ */ (0,
|
|
21532
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
21329
21533
|
"button",
|
|
21330
21534
|
{
|
|
21331
21535
|
className: "app__settings-btn",
|
|
@@ -21335,25 +21539,26 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21335
21539
|
},
|
|
21336
21540
|
title: "Caretaker Settings",
|
|
21337
21541
|
children: [
|
|
21338
|
-
/* @__PURE__ */ (0,
|
|
21542
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Settings, { size: 13 }),
|
|
21339
21543
|
" Settings"
|
|
21340
21544
|
]
|
|
21341
21545
|
}
|
|
21342
21546
|
)
|
|
21343
21547
|
] })
|
|
21344
21548
|
] }) }),
|
|
21345
|
-
/* @__PURE__ */ (0,
|
|
21549
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ProjectsTab, { agents }) })
|
|
21346
21550
|
] });
|
|
21347
21551
|
}
|
|
21348
21552
|
if (activeScreen === "settings") {
|
|
21349
|
-
return /* @__PURE__ */ (0,
|
|
21553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: `app ${layout === "sidebar" ? "app--settings-centered" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21350
21554
|
SettingsPanel,
|
|
21351
21555
|
{
|
|
21352
21556
|
layout,
|
|
21353
21557
|
postMessage,
|
|
21354
21558
|
settingsData,
|
|
21355
21559
|
modelsResult,
|
|
21356
|
-
|
|
21560
|
+
sttCatalogResult,
|
|
21561
|
+
ttsCatalogResult,
|
|
21357
21562
|
setModelsResult,
|
|
21358
21563
|
refreshingSourceId,
|
|
21359
21564
|
refreshOutcome,
|
|
@@ -21365,43 +21570,43 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21365
21570
|
}
|
|
21366
21571
|
) });
|
|
21367
21572
|
}
|
|
21368
|
-
const deleteOverlay = pendingDelete && /* @__PURE__ */ (0,
|
|
21369
|
-
/* @__PURE__ */ (0,
|
|
21370
|
-
/* @__PURE__ */ (0,
|
|
21573
|
+
const deleteOverlay = pendingDelete && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__confirm-overlay", onClick: cancelDeleteSession, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
|
|
21574
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__confirm-title", children: "Delete conversation" }),
|
|
21575
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "app__confirm-message", children: [
|
|
21371
21576
|
"Delete conversation \u201C",
|
|
21372
21577
|
pendingDelete.title,
|
|
21373
21578
|
"\u201D? This cannot be undone."
|
|
21374
21579
|
] }),
|
|
21375
|
-
/* @__PURE__ */ (0,
|
|
21376
|
-
/* @__PURE__ */ (0,
|
|
21377
|
-
/* @__PURE__ */ (0,
|
|
21580
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__confirm-buttons", children: [
|
|
21581
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "app__confirm-btn", onClick: cancelDeleteSession, children: "Cancel" }),
|
|
21582
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "app__confirm-btn app__confirm-btn--danger", onClick: confirmDeleteSession, children: "Delete" })
|
|
21378
21583
|
] })
|
|
21379
21584
|
] }) });
|
|
21380
21585
|
if (layout === "sidebar") {
|
|
21381
|
-
return /* @__PURE__ */ (0,
|
|
21382
|
-
/* @__PURE__ */ (0,
|
|
21383
|
-
/* @__PURE__ */ (0,
|
|
21384
|
-
/* @__PURE__ */ (0,
|
|
21385
|
-
/* @__PURE__ */ (0,
|
|
21586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app app--with-sidebar", children: [
|
|
21587
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("aside", { className: "app__sidebar", children: [
|
|
21588
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-header", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__logo-title-wrapper", children: [
|
|
21589
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
|
|
21590
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Caretaker" })
|
|
21386
21591
|
] }) }),
|
|
21387
|
-
/* @__PURE__ */ (0,
|
|
21388
|
-
/* @__PURE__ */ (0,
|
|
21389
|
-
/* @__PURE__ */ (0,
|
|
21390
|
-
/* @__PURE__ */ (0,
|
|
21592
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sidebar-content", children: [
|
|
21593
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sidebar-section", children: [
|
|
21594
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-section-title", children: "Agents" }),
|
|
21595
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-agents-list", children: selectedAgentId && !showAllAgents ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
21391
21596
|
"button",
|
|
21392
21597
|
{
|
|
21393
21598
|
className: "app__sidebar-agent-item app__sidebar-agent-item--collapsed-active",
|
|
21394
21599
|
onClick: () => setShowAllAgents(true),
|
|
21395
21600
|
title: "Switch Agent",
|
|
21396
21601
|
children: [
|
|
21397
|
-
/* @__PURE__ */ (0,
|
|
21398
|
-
/* @__PURE__ */ (0,
|
|
21399
|
-
/* @__PURE__ */ (0,
|
|
21602
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "agent-status-dot agent-status-dot--active" }),
|
|
21603
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__sidebar-agent-name", children: activeAgent?.name || selectedAgentId }),
|
|
21604
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronDown, { className: "app__sidebar-chevron", size: 10 })
|
|
21400
21605
|
]
|
|
21401
21606
|
}
|
|
21402
|
-
) : /* @__PURE__ */ (0,
|
|
21607
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: `app__sidebar-agents-list-expanded ${selectedAgentId ? "app__sidebar-agents-list-expanded--has-active" : ""}`, children: agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-empty-text", children: "No agents found" }) : agents.map((agent) => {
|
|
21403
21608
|
const isSelected = selectedAgentId === agent.id;
|
|
21404
|
-
return /* @__PURE__ */ (0,
|
|
21609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
21405
21610
|
"button",
|
|
21406
21611
|
{
|
|
21407
21612
|
className: `app__sidebar-agent-item ${isSelected ? "app__sidebar-agent-item--active" : ""}`,
|
|
@@ -21413,19 +21618,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21413
21618
|
}
|
|
21414
21619
|
},
|
|
21415
21620
|
children: [
|
|
21416
|
-
/* @__PURE__ */ (0,
|
|
21417
|
-
/* @__PURE__ */ (0,
|
|
21418
|
-
isSelected && /* @__PURE__ */ (0,
|
|
21621
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: `agent-status-dot ${isSelected ? "agent-status-dot--active" : ""}` }),
|
|
21622
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__sidebar-agent-name", children: agent.name }),
|
|
21623
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronUp, { className: "app__sidebar-chevron app__sidebar-chevron--up", size: 10 })
|
|
21419
21624
|
]
|
|
21420
21625
|
},
|
|
21421
21626
|
agent.id
|
|
21422
21627
|
);
|
|
21423
21628
|
}) }) })
|
|
21424
21629
|
] }),
|
|
21425
|
-
selectedAgentId && /* @__PURE__ */ (0,
|
|
21426
|
-
/* @__PURE__ */ (0,
|
|
21427
|
-
/* @__PURE__ */ (0,
|
|
21428
|
-
/* @__PURE__ */ (0,
|
|
21630
|
+
selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sidebar-section", children: [
|
|
21631
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sidebar-section-header", children: [
|
|
21632
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__sidebar-section-title", children: "Conversations" }),
|
|
21633
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21429
21634
|
"button",
|
|
21430
21635
|
{
|
|
21431
21636
|
className: "app__sidebar-new-chat-btn",
|
|
@@ -21435,15 +21640,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21435
21640
|
}
|
|
21436
21641
|
)
|
|
21437
21642
|
] }),
|
|
21438
|
-
/* @__PURE__ */ (0,
|
|
21643
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-sessions-list", children: sessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sidebar-empty-text", children: "No conversations yet" }) : sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
21439
21644
|
"div",
|
|
21440
21645
|
{
|
|
21441
21646
|
className: `app__sidebar-session-item ${selectedSessionId === session.id ? "app__sidebar-session-item--active" : ""}`,
|
|
21442
21647
|
onClick: () => onSelectSession(session.id),
|
|
21443
21648
|
children: [
|
|
21444
|
-
/* @__PURE__ */ (0,
|
|
21445
|
-
/* @__PURE__ */ (0,
|
|
21446
|
-
/* @__PURE__ */ (0,
|
|
21649
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__sidebar-session-icon", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MessageSquare, { size: 13 }) }),
|
|
21650
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__sidebar-session-title", title: session.title, children: session.title }),
|
|
21651
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21447
21652
|
"button",
|
|
21448
21653
|
{
|
|
21449
21654
|
className: "app__sidebar-session-delete",
|
|
@@ -21452,7 +21657,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21452
21657
|
e.stopPropagation();
|
|
21453
21658
|
onDeleteSession(session.id, session.title);
|
|
21454
21659
|
},
|
|
21455
|
-
children: /* @__PURE__ */ (0,
|
|
21660
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Trash2, { size: 12 })
|
|
21456
21661
|
}
|
|
21457
21662
|
)
|
|
21458
21663
|
]
|
|
@@ -21461,8 +21666,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21461
21666
|
)) })
|
|
21462
21667
|
] })
|
|
21463
21668
|
] }),
|
|
21464
|
-
/* @__PURE__ */ (0,
|
|
21465
|
-
/* @__PURE__ */ (0,
|
|
21669
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sidebar-footer", style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
21670
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21466
21671
|
"button",
|
|
21467
21672
|
{
|
|
21468
21673
|
className: "app__sidebar-settings-btn",
|
|
@@ -21470,13 +21675,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21470
21675
|
setActiveScreen("projects");
|
|
21471
21676
|
},
|
|
21472
21677
|
title: "Projects & Autonomous Tasks",
|
|
21473
|
-
children: /* @__PURE__ */ (0,
|
|
21474
|
-
/* @__PURE__ */ (0,
|
|
21678
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
|
|
21679
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FolderKanban, { size: 13 }),
|
|
21475
21680
|
" Projects"
|
|
21476
21681
|
] })
|
|
21477
21682
|
}
|
|
21478
21683
|
),
|
|
21479
|
-
/* @__PURE__ */ (0,
|
|
21684
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
21480
21685
|
"button",
|
|
21481
21686
|
{
|
|
21482
21687
|
className: "app__sidebar-settings-btn",
|
|
@@ -21486,37 +21691,37 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21486
21691
|
},
|
|
21487
21692
|
title: "Caretaker Settings",
|
|
21488
21693
|
children: [
|
|
21489
|
-
/* @__PURE__ */ (0,
|
|
21490
|
-
/* @__PURE__ */ (0,
|
|
21694
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Settings, { className: "app__settings-icon", size: 14 }),
|
|
21695
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Settings" })
|
|
21491
21696
|
]
|
|
21492
21697
|
}
|
|
21493
21698
|
)
|
|
21494
21699
|
] })
|
|
21495
21700
|
] }),
|
|
21496
|
-
/* @__PURE__ */ (0,
|
|
21497
|
-
/* @__PURE__ */ (0,
|
|
21498
|
-
/* @__PURE__ */ (0,
|
|
21499
|
-
/* @__PURE__ */ (0,
|
|
21500
|
-
/* @__PURE__ */ (0,
|
|
21701
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("main", { className: "app__chat-pane", children: selectedAgentId ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
21702
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("header", { className: "app__chat-header", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__chat-header-info", children: [
|
|
21703
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { className: "app__chat-header-title", children: selectedAgentName }),
|
|
21704
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "app__chat-header-status", children: [
|
|
21705
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: `agent-status-dot agent-status-dot--active ${chatState.status === "streaming" ? "agent-status-dot--pulsing" : ""}` }),
|
|
21501
21706
|
chatState.status === "streaming" ? "Streaming response..." : "Ready"
|
|
21502
21707
|
] })
|
|
21503
21708
|
] }) }),
|
|
21504
|
-
/* @__PURE__ */ (0,
|
|
21709
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21505
21710
|
MessageList,
|
|
21506
21711
|
{
|
|
21507
21712
|
items: chatState.items,
|
|
21508
21713
|
sessionId: selectedSessionId,
|
|
21509
21714
|
isStreaming: chatState.status === "streaming",
|
|
21510
21715
|
agentName: selectedAgentName,
|
|
21511
|
-
trailing:
|
|
21716
|
+
trailing: confirmCards
|
|
21512
21717
|
}
|
|
21513
21718
|
),
|
|
21514
|
-
(chatState.errorText || voice.error) && /* @__PURE__ */ (0,
|
|
21515
|
-
/* @__PURE__ */ (0,
|
|
21719
|
+
(chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__error", children: [
|
|
21720
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TriangleAlert, { size: 14 }),
|
|
21516
21721
|
" ",
|
|
21517
21722
|
chatState.errorText || voice.error
|
|
21518
21723
|
] }),
|
|
21519
|
-
/* @__PURE__ */ (0,
|
|
21724
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21520
21725
|
Composer,
|
|
21521
21726
|
{
|
|
21522
21727
|
disabled: composerDisabled,
|
|
@@ -21535,30 +21740,30 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21535
21740
|
onValueChange: setComposerDraft
|
|
21536
21741
|
}
|
|
21537
21742
|
)
|
|
21538
|
-
] }) : /* @__PURE__ */ (0,
|
|
21743
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: "Select an agent from the sidebar to start chatting" }) }) }),
|
|
21539
21744
|
deleteOverlay
|
|
21540
21745
|
] });
|
|
21541
21746
|
}
|
|
21542
|
-
return /* @__PURE__ */ (0,
|
|
21543
|
-
/* @__PURE__ */ (0,
|
|
21544
|
-
/* @__PURE__ */ (0,
|
|
21545
|
-
/* @__PURE__ */ (0,
|
|
21546
|
-
/* @__PURE__ */ (0,
|
|
21747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app", children: [
|
|
21748
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__header-row", children: [
|
|
21749
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__logo-title-wrapper", children: [
|
|
21750
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
|
|
21751
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Caretaker" })
|
|
21547
21752
|
] }),
|
|
21548
|
-
/* @__PURE__ */ (0,
|
|
21549
|
-
/* @__PURE__ */ (0,
|
|
21753
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__controls", children: [
|
|
21754
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__agent-select-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
21550
21755
|
"select",
|
|
21551
21756
|
{
|
|
21552
21757
|
className: "app__agent-select",
|
|
21553
21758
|
value: selectedAgentId ?? "",
|
|
21554
21759
|
onChange: (e) => onSelectAgent(e.target.value),
|
|
21555
21760
|
children: [
|
|
21556
|
-
/* @__PURE__ */ (0,
|
|
21557
|
-
agents.map((agent) => /* @__PURE__ */ (0,
|
|
21761
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
|
|
21762
|
+
agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
|
|
21558
21763
|
]
|
|
21559
21764
|
}
|
|
21560
21765
|
) }),
|
|
21561
|
-
/* @__PURE__ */ (0,
|
|
21766
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
21562
21767
|
"button",
|
|
21563
21768
|
{
|
|
21564
21769
|
className: "app__sessions-btn",
|
|
@@ -21566,13 +21771,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21566
21771
|
disabled: !selectedAgentId,
|
|
21567
21772
|
title: "View conversations",
|
|
21568
21773
|
children: [
|
|
21569
|
-
/* @__PURE__ */ (0,
|
|
21774
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MessageSquare, { size: 13 }),
|
|
21570
21775
|
" ",
|
|
21571
21776
|
sessions.length
|
|
21572
21777
|
]
|
|
21573
21778
|
}
|
|
21574
21779
|
),
|
|
21575
|
-
/* @__PURE__ */ (0,
|
|
21780
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21576
21781
|
"button",
|
|
21577
21782
|
{
|
|
21578
21783
|
className: "app__new-chat-btn",
|
|
@@ -21582,7 +21787,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21582
21787
|
children: "+ New"
|
|
21583
21788
|
}
|
|
21584
21789
|
),
|
|
21585
|
-
/* @__PURE__ */ (0,
|
|
21790
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21586
21791
|
"button",
|
|
21587
21792
|
{
|
|
21588
21793
|
className: "app__settings-btn",
|
|
@@ -21591,24 +21796,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21591
21796
|
postMessage({ type: "getSettingsData" });
|
|
21592
21797
|
},
|
|
21593
21798
|
title: "Caretaker Settings",
|
|
21594
|
-
children: /* @__PURE__ */ (0,
|
|
21799
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Settings, { className: "app__settings-icon", size: 14 })
|
|
21595
21800
|
}
|
|
21596
21801
|
)
|
|
21597
21802
|
] })
|
|
21598
21803
|
] }) }),
|
|
21599
|
-
showSessions && sessions.length > 0 && /* @__PURE__ */ (0,
|
|
21600
|
-
/* @__PURE__ */ (0,
|
|
21804
|
+
showSessions && sessions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sessions-dropdown", children: [
|
|
21805
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sessions-title", children: [
|
|
21601
21806
|
"Conversations for ",
|
|
21602
21807
|
selectedAgentName
|
|
21603
21808
|
] }),
|
|
21604
|
-
/* @__PURE__ */ (0,
|
|
21809
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sessions-list", children: sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
21605
21810
|
"div",
|
|
21606
21811
|
{
|
|
21607
21812
|
className: `app__session-item ${selectedSessionId === session.id ? "app__session-item--active" : ""}`,
|
|
21608
21813
|
onClick: () => onSelectSession(session.id),
|
|
21609
21814
|
children: [
|
|
21610
|
-
/* @__PURE__ */ (0,
|
|
21611
|
-
/* @__PURE__ */ (0,
|
|
21815
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "app__session-item-title", children: session.title }),
|
|
21816
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21612
21817
|
"button",
|
|
21613
21818
|
{
|
|
21614
21819
|
className: "app__session-item-delete",
|
|
@@ -21617,7 +21822,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21617
21822
|
e.stopPropagation();
|
|
21618
21823
|
onDeleteSession(session.id, session.title);
|
|
21619
21824
|
},
|
|
21620
|
-
children: /* @__PURE__ */ (0,
|
|
21825
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Trash2, { size: 12 })
|
|
21621
21826
|
}
|
|
21622
21827
|
)
|
|
21623
21828
|
]
|
|
@@ -21625,27 +21830,27 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21625
21830
|
session.id
|
|
21626
21831
|
)) })
|
|
21627
21832
|
] }),
|
|
21628
|
-
showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0,
|
|
21629
|
-
/* @__PURE__ */ (0,
|
|
21630
|
-
/* @__PURE__ */ (0,
|
|
21833
|
+
showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__sessions-dropdown app__sessions-dropdown--empty", children: [
|
|
21834
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__sessions-title", children: "No conversations yet" }),
|
|
21835
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "app__sessions-empty", children: "Start a new chat to create a conversation" })
|
|
21631
21836
|
] }),
|
|
21632
|
-
!selectedAgentId && /* @__PURE__ */ (0,
|
|
21633
|
-
/* @__PURE__ */ (0,
|
|
21837
|
+
!selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: "Select an agent to start chatting" }) }),
|
|
21838
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21634
21839
|
MessageList,
|
|
21635
21840
|
{
|
|
21636
21841
|
items: chatState.items,
|
|
21637
21842
|
sessionId: selectedSessionId,
|
|
21638
21843
|
isStreaming: chatState.status === "streaming",
|
|
21639
21844
|
agentName: selectedAgentName,
|
|
21640
|
-
trailing:
|
|
21845
|
+
trailing: confirmCards
|
|
21641
21846
|
}
|
|
21642
21847
|
),
|
|
21643
|
-
(chatState.errorText || voice.error) && /* @__PURE__ */ (0,
|
|
21644
|
-
/* @__PURE__ */ (0,
|
|
21848
|
+
(chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "app__error", children: [
|
|
21849
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TriangleAlert, { size: 14 }),
|
|
21645
21850
|
" ",
|
|
21646
21851
|
chatState.errorText || voice.error
|
|
21647
21852
|
] }),
|
|
21648
|
-
/* @__PURE__ */ (0,
|
|
21853
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
21649
21854
|
Composer,
|
|
21650
21855
|
{
|
|
21651
21856
|
disabled: composerDisabled,
|
|
@@ -21669,12 +21874,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21669
21874
|
}
|
|
21670
21875
|
|
|
21671
21876
|
// src/standalone.tsx
|
|
21672
|
-
var
|
|
21877
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
21673
21878
|
function StandaloneApp() {
|
|
21674
|
-
const [ws, setWs] = (0,
|
|
21675
|
-
const [connected, setConnected] = (0,
|
|
21676
|
-
const [error, setError] = (0,
|
|
21677
|
-
(0,
|
|
21879
|
+
const [ws, setWs] = (0, import_react19.useState)(null);
|
|
21880
|
+
const [connected, setConnected] = (0, import_react19.useState)(false);
|
|
21881
|
+
const [error, setError] = (0, import_react19.useState)(null);
|
|
21882
|
+
(0, import_react19.useEffect)(() => {
|
|
21678
21883
|
let active = true;
|
|
21679
21884
|
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
|
21680
21885
|
const socket = new WebSocket(`${protocol}//${window.location.host}/api/ws`);
|
|
@@ -21720,7 +21925,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21720
21925
|
}
|
|
21721
21926
|
};
|
|
21722
21927
|
if (error) {
|
|
21723
|
-
return /* @__PURE__ */ (0,
|
|
21928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: {
|
|
21724
21929
|
display: "flex",
|
|
21725
21930
|
flexDirection: "column",
|
|
21726
21931
|
alignItems: "center",
|
|
@@ -21732,9 +21937,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21732
21937
|
padding: "20px",
|
|
21733
21938
|
textAlign: "center"
|
|
21734
21939
|
}, children: [
|
|
21735
|
-
/* @__PURE__ */ (0,
|
|
21736
|
-
/* @__PURE__ */ (0,
|
|
21737
|
-
/* @__PURE__ */ (0,
|
|
21940
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { style: { color: "#ff6b6b" }, children: "Caretaker Connection Failed" }),
|
|
21941
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: error }),
|
|
21942
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21738
21943
|
"button",
|
|
21739
21944
|
{
|
|
21740
21945
|
onClick: () => setWs(null),
|
|
@@ -21753,7 +21958,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21753
21958
|
] });
|
|
21754
21959
|
}
|
|
21755
21960
|
if (!connected) {
|
|
21756
|
-
return /* @__PURE__ */ (0,
|
|
21961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: {
|
|
21757
21962
|
display: "flex",
|
|
21758
21963
|
flexDirection: "column",
|
|
21759
21964
|
alignItems: "center",
|
|
@@ -21763,7 +21968,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21763
21968
|
background: "#1e1e1e",
|
|
21764
21969
|
color: "#f1f1f1"
|
|
21765
21970
|
}, children: [
|
|
21766
|
-
/* @__PURE__ */ (0,
|
|
21971
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: {
|
|
21767
21972
|
border: "4px solid rgba(255,255,255,0.1)",
|
|
21768
21973
|
width: "36px",
|
|
21769
21974
|
height: "36px",
|
|
@@ -21772,8 +21977,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21772
21977
|
animation: "spin 1s linear infinite",
|
|
21773
21978
|
marginBottom: "16px"
|
|
21774
21979
|
} }),
|
|
21775
|
-
/* @__PURE__ */ (0,
|
|
21776
|
-
/* @__PURE__ */ (0,
|
|
21980
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Connecting to Caretaker server..." }),
|
|
21981
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("style", { children: `
|
|
21777
21982
|
@keyframes spin {
|
|
21778
21983
|
0% { transform: rotate(0deg); }
|
|
21779
21984
|
100% { transform: rotate(360deg); }
|
|
@@ -21781,12 +21986,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21781
21986
|
` })
|
|
21782
21987
|
] });
|
|
21783
21988
|
}
|
|
21784
|
-
return /* @__PURE__ */ (0,
|
|
21989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(App, { postMessage, layout: "sidebar" });
|
|
21785
21990
|
}
|
|
21786
21991
|
var rootEl = document.getElementById("root");
|
|
21787
21992
|
if (!rootEl) throw new Error("#root not found");
|
|
21788
21993
|
(0, import_client.createRoot)(rootEl).render(
|
|
21789
|
-
/* @__PURE__ */ (0,
|
|
21994
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react19.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StandaloneApp, {}) })
|
|
21790
21995
|
);
|
|
21791
21996
|
})();
|
|
21792
21997
|
/*! Bundled license information:
|