@hyperwindmill/caretaker-cli 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/web/scheduler/memory_extract.d.ts +55 -0
- package/dist/cli/web/scheduler/memory_extract.d.ts.map +1 -0
- package/dist/cli/web/scheduler/memory_extract.js +112 -0
- package/dist/cli/web/scheduler/memory_sweep.d.ts +68 -0
- package/dist/cli/web/scheduler/memory_sweep.d.ts.map +1 -0
- package/dist/cli/web/scheduler/memory_sweep.js +329 -0
- package/dist/cli/web/scheduler/task_review.d.ts +3 -0
- package/dist/cli/web/scheduler/task_review.d.ts.map +1 -1
- package/dist/cli/web/scheduler/task_review.js +1 -0
- package/dist/cli/web/scheduler/task_strategy.d.ts.map +1 -1
- package/dist/cli/web/scheduler/task_strategy.js +4 -0
- package/dist/cli/web/scheduler.d.ts.map +1 -1
- package/dist/cli/web/scheduler.js +5 -0
- package/dist/cli/web/server.d.ts.map +1 -1
- package/dist/cli/web/server.js +6 -1
- package/dist/harness/claude_code_runner.d.ts.map +1 -1
- package/dist/harness/claude_code_runner.js +5 -0
- package/dist/harness/loop.d.ts +9 -0
- package/dist/harness/loop.d.ts.map +1 -1
- package/dist/harness/loop.js +10 -0
- package/dist/harness/memory_recall.d.ts +23 -0
- package/dist/harness/memory_recall.d.ts.map +1 -0
- package/dist/harness/memory_recall.js +70 -0
- package/dist/harness/tools/builtin/index.d.ts +2 -1
- package/dist/harness/tools/builtin/index.d.ts.map +1 -1
- package/dist/harness/tools/builtin/index.js +4 -1
- package/dist/harness/tools/builtin/memory_tools.d.ts +3 -0
- package/dist/harness/tools/builtin/memory_tools.d.ts.map +1 -0
- package/dist/harness/tools/builtin/memory_tools.js +60 -0
- package/dist/harness/tools/resolve.d.ts.map +1 -1
- package/dist/harness/tools/resolve.js +15 -0
- package/dist/harness/tools/types.d.ts +6 -0
- package/dist/harness/tools/types.d.ts.map +1 -1
- package/dist/lib/project_resolve.d.ts +5 -0
- package/dist/lib/project_resolve.d.ts.map +1 -0
- package/dist/lib/project_resolve.js +23 -0
- package/dist/mcp/builtin_server.d.ts +1 -0
- package/dist/mcp/builtin_server.d.ts.map +1 -1
- package/dist/mcp/builtin_server.js +6 -5
- package/dist/store/db.d.ts +66 -0
- package/dist/store/db.d.ts.map +1 -1
- package/dist/store/db.js +68 -0
- package/dist/tui/agents.js +5 -2
- package/dist/webview/standalone.js +557 -415
- package/dist/webview/standalone.js.map +4 -4
- package/package.json +3 -3
|
@@ -12755,11 +12755,11 @@
|
|
|
12755
12755
|
});
|
|
12756
12756
|
|
|
12757
12757
|
// src/standalone.tsx
|
|
12758
|
-
var
|
|
12758
|
+
var import_react21 = __toESM(require_react(), 1);
|
|
12759
12759
|
var import_client = __toESM(require_client(), 1);
|
|
12760
12760
|
|
|
12761
12761
|
// src/App.tsx
|
|
12762
|
-
var
|
|
12762
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
12763
12763
|
|
|
12764
12764
|
// src/MessageList.tsx
|
|
12765
12765
|
var import_react4 = __toESM(require_react(), 1);
|
|
@@ -15911,7 +15911,7 @@ ${text}</tr>
|
|
|
15911
15911
|
}
|
|
15912
15912
|
|
|
15913
15913
|
// src/SettingsPanel.tsx
|
|
15914
|
-
var
|
|
15914
|
+
var import_react17 = __toESM(require_react(), 1);
|
|
15915
15915
|
|
|
15916
15916
|
// src/ProvidersTab.tsx
|
|
15917
15917
|
var import_react6 = __toESM(require_react(), 1);
|
|
@@ -19768,8 +19768,133 @@ ${text}</tr>
|
|
|
19768
19768
|
] });
|
|
19769
19769
|
}
|
|
19770
19770
|
|
|
19771
|
-
// src/
|
|
19771
|
+
// src/MemoryTab.tsx
|
|
19772
|
+
var import_react16 = __toESM(require_react(), 1);
|
|
19773
|
+
|
|
19774
|
+
// src/memory_tab_utils.ts
|
|
19775
|
+
function buildMemoryConfig(form) {
|
|
19776
|
+
const agentId = form.agentId.trim();
|
|
19777
|
+
if (!form.enabled || !agentId) return void 0;
|
|
19778
|
+
const out = { agentId };
|
|
19779
|
+
const sweep = Number.parseInt(form.sweepMinutes, 10);
|
|
19780
|
+
if (Number.isFinite(sweep) && sweep > 0) out.sweepMinutes = sweep;
|
|
19781
|
+
const min = Number.parseInt(form.minNewMessages, 10);
|
|
19782
|
+
if (Number.isFinite(min) && min > 0) out.minNewMessages = min;
|
|
19783
|
+
return out;
|
|
19784
|
+
}
|
|
19785
|
+
function memorySignature(m) {
|
|
19786
|
+
if (!m) return "";
|
|
19787
|
+
return JSON.stringify([m.agentId ?? "", m.sweepMinutes ?? "", m.minNewMessages ?? ""]);
|
|
19788
|
+
}
|
|
19789
|
+
|
|
19790
|
+
// src/MemoryTab.tsx
|
|
19772
19791
|
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
19792
|
+
function MemoryTab({ config, agents, onSave }) {
|
|
19793
|
+
const current = config.memory;
|
|
19794
|
+
const [enabled, setEnabled] = (0, import_react16.useState)(!!current);
|
|
19795
|
+
const [agentId, setAgentId] = (0, import_react16.useState)(current?.agentId ?? "");
|
|
19796
|
+
const [sweepMinutes, setSweepMinutes] = (0, import_react16.useState)(
|
|
19797
|
+
current?.sweepMinutes === void 0 ? "" : String(current.sweepMinutes)
|
|
19798
|
+
);
|
|
19799
|
+
const [minNewMessages, setMinNewMessages] = (0, import_react16.useState)(
|
|
19800
|
+
current?.minNewMessages === void 0 ? "" : String(current.minNewMessages)
|
|
19801
|
+
);
|
|
19802
|
+
const [saveState, setSaveState] = (0, import_react16.useState)("idle");
|
|
19803
|
+
const pendingSave = (0, import_react16.useRef)(null);
|
|
19804
|
+
(0, import_react16.useEffect)(() => {
|
|
19805
|
+
if (saveState !== "saving" || pendingSave.current === null) return;
|
|
19806
|
+
if (memorySignature(config.memory) !== pendingSave.current)
|
|
19807
|
+
return;
|
|
19808
|
+
setSaveState("saved");
|
|
19809
|
+
}, [config.memory, saveState]);
|
|
19810
|
+
(0, import_react16.useEffect)(() => {
|
|
19811
|
+
if (saveState !== "saved") return;
|
|
19812
|
+
const t = setTimeout(() => setSaveState("idle"), 2e3);
|
|
19813
|
+
return () => clearTimeout(t);
|
|
19814
|
+
}, [saveState]);
|
|
19815
|
+
const selectedAgent = agents.find((a) => a.id === agentId);
|
|
19816
|
+
const missingAgent = enabled && !selectedAgent;
|
|
19817
|
+
const save = () => {
|
|
19818
|
+
const memory = buildMemoryConfig({ enabled, agentId, sweepMinutes, minNewMessages });
|
|
19819
|
+
pendingSave.current = memorySignature(memory);
|
|
19820
|
+
setSaveState("saving");
|
|
19821
|
+
const next = { ...config };
|
|
19822
|
+
if (memory) next.memory = memory;
|
|
19823
|
+
else delete next.memory;
|
|
19824
|
+
onSave(next);
|
|
19825
|
+
};
|
|
19826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "glass-form", children: [
|
|
19827
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { children: "Memory" }),
|
|
19828
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "glass-form__body", children: [
|
|
19829
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group form-group--checkbox", children: [
|
|
19830
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { htmlFor: "memory-enabled", children: [
|
|
19831
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19832
|
+
"input",
|
|
19833
|
+
{
|
|
19834
|
+
id: "memory-enabled",
|
|
19835
|
+
type: "checkbox",
|
|
19836
|
+
checked: enabled,
|
|
19837
|
+
onChange: (e) => setEnabled(e.target.checked)
|
|
19838
|
+
}
|
|
19839
|
+
),
|
|
19840
|
+
"Enable memory"
|
|
19841
|
+
] }),
|
|
19842
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: "A background sweep keeps a rolling summary of every chat session. It runs only while the web server (or the desktop app) is up, like the rest of the scheduler." })
|
|
19843
|
+
] }),
|
|
19844
|
+
enabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
19845
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group", children: [
|
|
19846
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: "memory-agent", children: "Memory agent" }),
|
|
19847
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { id: "memory-agent", value: agentId, onChange: (e) => setAgentId(e.target.value), children: [
|
|
19848
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "\u2014 select an agent \u2014" }),
|
|
19849
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
|
|
19850
|
+
a.name,
|
|
19851
|
+
" \xB7 ",
|
|
19852
|
+
a.model
|
|
19853
|
+
] }, a.id))
|
|
19854
|
+
] }),
|
|
19855
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: "The agent whose identity (system prompt, provider, model) runs the summarize calls \u2014 every provider works, Claude Code included. Calls are always fresh one-shot conversations, never the agent's own sessions. A lean dedicated agent (short system prompt, no plugins) keeps them cheap." }),
|
|
19856
|
+
missingAgent && agentId && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { className: "form-error", children: "This agent no longer exists \u2014 pick another." })
|
|
19857
|
+
] }),
|
|
19858
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group", children: [
|
|
19859
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: "memory-sweep-minutes", children: "Sweep interval (minutes)" }),
|
|
19860
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19861
|
+
"input",
|
|
19862
|
+
{
|
|
19863
|
+
id: "memory-sweep-minutes",
|
|
19864
|
+
type: "number",
|
|
19865
|
+
min: 1,
|
|
19866
|
+
placeholder: "5",
|
|
19867
|
+
value: sweepMinutes,
|
|
19868
|
+
onChange: (e) => setSweepMinutes(e.target.value)
|
|
19869
|
+
}
|
|
19870
|
+
)
|
|
19871
|
+
] }),
|
|
19872
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group", children: [
|
|
19873
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: "memory-min-new", children: "Min new messages per session" }),
|
|
19874
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19875
|
+
"input",
|
|
19876
|
+
{
|
|
19877
|
+
id: "memory-min-new",
|
|
19878
|
+
type: "number",
|
|
19879
|
+
min: 1,
|
|
19880
|
+
placeholder: "4",
|
|
19881
|
+
value: minNewMessages,
|
|
19882
|
+
onChange: (e) => setMinNewMessages(e.target.value)
|
|
19883
|
+
}
|
|
19884
|
+
),
|
|
19885
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: "A session is re-summarized only once it accumulated at least this many new messages since the last pass." })
|
|
19886
|
+
] })
|
|
19887
|
+
] })
|
|
19888
|
+
] }),
|
|
19889
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-actions", children: [
|
|
19890
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: save, disabled: enabled && !agentId, children: "Save" }),
|
|
19891
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { role: "status", "aria-live": "polite", className: "form-save-state", children: saveState === "saving" ? "Saving\u2026" : saveState === "saved" ? "Saved \u2713" : "" })
|
|
19892
|
+
] })
|
|
19893
|
+
] });
|
|
19894
|
+
}
|
|
19895
|
+
|
|
19896
|
+
// src/SettingsPanel.tsx
|
|
19897
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
19773
19898
|
function SettingsPanel({
|
|
19774
19899
|
layout = "compact",
|
|
19775
19900
|
postMessage,
|
|
@@ -19786,16 +19911,16 @@ ${text}</tr>
|
|
|
19786
19911
|
taskRuns = {},
|
|
19787
19912
|
onClose
|
|
19788
19913
|
}) {
|
|
19789
|
-
const [activeTab, setActiveTab] = (0,
|
|
19914
|
+
const [activeTab, setActiveTab] = (0, import_react17.useState)("providers");
|
|
19790
19915
|
if (!settingsData) {
|
|
19791
|
-
return /* @__PURE__ */ (0,
|
|
19792
|
-
/* @__PURE__ */ (0,
|
|
19793
|
-
/* @__PURE__ */ (0,
|
|
19916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "settings-panel settings-panel--loading", children: [
|
|
19917
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, children: [
|
|
19918
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowLeft, { size: 14 }),
|
|
19794
19919
|
" Back to Chat"
|
|
19795
19920
|
] }),
|
|
19796
|
-
/* @__PURE__ */ (0,
|
|
19797
|
-
/* @__PURE__ */ (0,
|
|
19798
|
-
/* @__PURE__ */ (0,
|
|
19921
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "settings-panel__loading-spinner", children: [
|
|
19922
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "spinner" }),
|
|
19923
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Loading configurations..." })
|
|
19799
19924
|
] })
|
|
19800
19925
|
] });
|
|
19801
19926
|
}
|
|
@@ -19803,7 +19928,7 @@ ${text}</tr>
|
|
|
19803
19928
|
const renderTabContent = () => {
|
|
19804
19929
|
switch (activeTab) {
|
|
19805
19930
|
case "providers":
|
|
19806
|
-
return /* @__PURE__ */ (0,
|
|
19931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19807
19932
|
ProvidersTab,
|
|
19808
19933
|
{
|
|
19809
19934
|
config,
|
|
@@ -19812,7 +19937,7 @@ ${text}</tr>
|
|
|
19812
19937
|
}
|
|
19813
19938
|
);
|
|
19814
19939
|
case "projects":
|
|
19815
|
-
return /* @__PURE__ */ (0,
|
|
19940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19816
19941
|
ProjectsTabSettings,
|
|
19817
19942
|
{
|
|
19818
19943
|
config,
|
|
@@ -19821,7 +19946,7 @@ ${text}</tr>
|
|
|
19821
19946
|
}
|
|
19822
19947
|
);
|
|
19823
19948
|
case "agents":
|
|
19824
|
-
return /* @__PURE__ */ (0,
|
|
19949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19825
19950
|
AgentsTab,
|
|
19826
19951
|
{
|
|
19827
19952
|
config,
|
|
@@ -19835,7 +19960,7 @@ ${text}</tr>
|
|
|
19835
19960
|
}
|
|
19836
19961
|
);
|
|
19837
19962
|
case "plugins":
|
|
19838
|
-
return /* @__PURE__ */ (0,
|
|
19963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19839
19964
|
PluginsTab,
|
|
19840
19965
|
{
|
|
19841
19966
|
pluginsFile,
|
|
@@ -19846,7 +19971,7 @@ ${text}</tr>
|
|
|
19846
19971
|
}
|
|
19847
19972
|
);
|
|
19848
19973
|
case "mcp":
|
|
19849
|
-
return /* @__PURE__ */ (0,
|
|
19974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19850
19975
|
McpTab,
|
|
19851
19976
|
{
|
|
19852
19977
|
mcpServersFile,
|
|
@@ -19856,7 +19981,7 @@ ${text}</tr>
|
|
|
19856
19981
|
}
|
|
19857
19982
|
);
|
|
19858
19983
|
case "services":
|
|
19859
|
-
return /* @__PURE__ */ (0,
|
|
19984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19860
19985
|
ServicesTab,
|
|
19861
19986
|
{
|
|
19862
19987
|
config,
|
|
@@ -19866,7 +19991,7 @@ ${text}</tr>
|
|
|
19866
19991
|
}
|
|
19867
19992
|
);
|
|
19868
19993
|
case "voice":
|
|
19869
|
-
return /* @__PURE__ */ (0,
|
|
19994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19870
19995
|
VoiceTab,
|
|
19871
19996
|
{
|
|
19872
19997
|
config,
|
|
@@ -19876,18 +20001,27 @@ ${text}</tr>
|
|
|
19876
20001
|
ttsCatalogResult
|
|
19877
20002
|
}
|
|
19878
20003
|
);
|
|
20004
|
+
case "memory":
|
|
20005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
20006
|
+
MemoryTab,
|
|
20007
|
+
{
|
|
20008
|
+
config,
|
|
20009
|
+
agents,
|
|
20010
|
+
onSave: (updatedConfig) => postMessage({ type: "saveConfig", config: updatedConfig })
|
|
20011
|
+
}
|
|
20012
|
+
);
|
|
19879
20013
|
}
|
|
19880
20014
|
};
|
|
19881
|
-
return /* @__PURE__ */ (0,
|
|
19882
|
-
/* @__PURE__ */ (0,
|
|
19883
|
-
/* @__PURE__ */ (0,
|
|
19884
|
-
/* @__PURE__ */ (0,
|
|
20015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "settings-panel", children: [
|
|
20016
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { className: "settings-panel__header", children: [
|
|
20017
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, title: "Go back to chat", children: [
|
|
20018
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowLeft, { size: 14 }),
|
|
19885
20019
|
" Chat"
|
|
19886
20020
|
] }),
|
|
19887
|
-
/* @__PURE__ */ (0,
|
|
20021
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { className: "settings-panel__title", children: "Caretaker Config" })
|
|
19888
20022
|
] }),
|
|
19889
|
-
/* @__PURE__ */ (0,
|
|
19890
|
-
/* @__PURE__ */ (0,
|
|
20023
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: "settings-panel__tabs", children: [
|
|
20024
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19891
20025
|
"button",
|
|
19892
20026
|
{
|
|
19893
20027
|
className: `settings-panel__tab-btn ${activeTab === "providers" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19895,7 +20029,7 @@ ${text}</tr>
|
|
|
19895
20029
|
children: "Providers"
|
|
19896
20030
|
}
|
|
19897
20031
|
),
|
|
19898
|
-
layout === "sidebar" && /* @__PURE__ */ (0,
|
|
20032
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19899
20033
|
"button",
|
|
19900
20034
|
{
|
|
19901
20035
|
className: `settings-panel__tab-btn ${activeTab === "projects" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19903,7 +20037,7 @@ ${text}</tr>
|
|
|
19903
20037
|
children: "Projects"
|
|
19904
20038
|
}
|
|
19905
20039
|
),
|
|
19906
|
-
/* @__PURE__ */ (0,
|
|
20040
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19907
20041
|
"button",
|
|
19908
20042
|
{
|
|
19909
20043
|
className: `settings-panel__tab-btn ${activeTab === "agents" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19911,7 +20045,7 @@ ${text}</tr>
|
|
|
19911
20045
|
children: "Agents"
|
|
19912
20046
|
}
|
|
19913
20047
|
),
|
|
19914
|
-
/* @__PURE__ */ (0,
|
|
20048
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19915
20049
|
"button",
|
|
19916
20050
|
{
|
|
19917
20051
|
className: `settings-panel__tab-btn ${activeTab === "plugins" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19919,7 +20053,7 @@ ${text}</tr>
|
|
|
19919
20053
|
children: "Plugins"
|
|
19920
20054
|
}
|
|
19921
20055
|
),
|
|
19922
|
-
/* @__PURE__ */ (0,
|
|
20056
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19923
20057
|
"button",
|
|
19924
20058
|
{
|
|
19925
20059
|
className: `settings-panel__tab-btn ${activeTab === "mcp" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19927,7 +20061,7 @@ ${text}</tr>
|
|
|
19927
20061
|
children: "MCP"
|
|
19928
20062
|
}
|
|
19929
20063
|
),
|
|
19930
|
-
layout === "sidebar" && /* @__PURE__ */ (0,
|
|
20064
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19931
20065
|
"button",
|
|
19932
20066
|
{
|
|
19933
20067
|
className: `settings-panel__tab-btn ${activeTab === "services" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19935,22 +20069,30 @@ ${text}</tr>
|
|
|
19935
20069
|
children: "Services"
|
|
19936
20070
|
}
|
|
19937
20071
|
),
|
|
19938
|
-
layout === "sidebar" && /* @__PURE__ */ (0,
|
|
20072
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19939
20073
|
"button",
|
|
19940
20074
|
{
|
|
19941
20075
|
className: `settings-panel__tab-btn ${activeTab === "voice" ? "settings-panel__tab-btn--active" : ""}`,
|
|
19942
20076
|
onClick: () => setActiveTab("voice"),
|
|
19943
20077
|
children: "Voice"
|
|
19944
20078
|
}
|
|
20079
|
+
),
|
|
20080
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
20081
|
+
"button",
|
|
20082
|
+
{
|
|
20083
|
+
className: `settings-panel__tab-btn ${activeTab === "memory" ? "settings-panel__tab-btn--active" : ""}`,
|
|
20084
|
+
onClick: () => setActiveTab("memory"),
|
|
20085
|
+
children: "Memory"
|
|
20086
|
+
}
|
|
19945
20087
|
)
|
|
19946
20088
|
] }),
|
|
19947
|
-
/* @__PURE__ */ (0,
|
|
20089
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("main", { className: "settings-panel__content", children: renderTabContent() })
|
|
19948
20090
|
] });
|
|
19949
20091
|
}
|
|
19950
20092
|
|
|
19951
20093
|
// src/ProjectsTab.tsx
|
|
19952
|
-
var
|
|
19953
|
-
var
|
|
20094
|
+
var import_react18 = __toESM(require_react(), 1);
|
|
20095
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
19954
20096
|
var LS_PROJECT_KEY = "caretaker.taskView.selectedProjectId";
|
|
19955
20097
|
var LS_ARCHIVED_KEY = "caretaker.taskView.showArchived";
|
|
19956
20098
|
function loadSavedProjectId() {
|
|
@@ -20039,15 +20181,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20039
20181
|
}
|
|
20040
20182
|
var PAGE_SIZE = 20;
|
|
20041
20183
|
function ProjectsTab({ agents }) {
|
|
20042
|
-
const [projects, setProjects] = (0,
|
|
20043
|
-
const [selectedProjectId, setSelectedProjectId] = (0,
|
|
20044
|
-
const [tasks, setTasks] = (0,
|
|
20045
|
-
const [selectedTaskId, setSelectedTaskId] = (0,
|
|
20046
|
-
const [taskMessages, setTaskMessages] = (0,
|
|
20047
|
-
const [view, setView] = (0,
|
|
20048
|
-
const [page, setPage] = (0,
|
|
20049
|
-
const [isNewTaskOpen, setIsNewTaskOpen] = (0,
|
|
20050
|
-
const [newTask, setNewTask] = (0,
|
|
20184
|
+
const [projects, setProjects] = (0, import_react18.useState)([]);
|
|
20185
|
+
const [selectedProjectId, setSelectedProjectId] = (0, import_react18.useState)(loadSavedProjectId);
|
|
20186
|
+
const [tasks, setTasks] = (0, import_react18.useState)([]);
|
|
20187
|
+
const [selectedTaskId, setSelectedTaskId] = (0, import_react18.useState)(null);
|
|
20188
|
+
const [taskMessages, setTaskMessages] = (0, import_react18.useState)([]);
|
|
20189
|
+
const [view, setView] = (0, import_react18.useState)("list");
|
|
20190
|
+
const [page, setPage] = (0, import_react18.useState)(0);
|
|
20191
|
+
const [isNewTaskOpen, setIsNewTaskOpen] = (0, import_react18.useState)(false);
|
|
20192
|
+
const [newTask, setNewTask] = (0, import_react18.useState)({
|
|
20051
20193
|
title: "",
|
|
20052
20194
|
objective: "",
|
|
20053
20195
|
checklistText: "",
|
|
@@ -20056,19 +20198,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20056
20198
|
plannerAgentId: "",
|
|
20057
20199
|
reviewerAgentId: ""
|
|
20058
20200
|
});
|
|
20059
|
-
const [composerText, setComposerText] = (0,
|
|
20060
|
-
const [isSending, setIsSending] = (0,
|
|
20061
|
-
const [showArchived, setShowArchived] = (0,
|
|
20062
|
-
const [pendingConfirm, setPendingConfirm] = (0,
|
|
20063
|
-
const [taskError, setTaskError] = (0,
|
|
20064
|
-
const threadIntervalRef = (0,
|
|
20065
|
-
(0,
|
|
20201
|
+
const [composerText, setComposerText] = (0, import_react18.useState)("");
|
|
20202
|
+
const [isSending, setIsSending] = (0, import_react18.useState)(false);
|
|
20203
|
+
const [showArchived, setShowArchived] = (0, import_react18.useState)(loadShowArchived);
|
|
20204
|
+
const [pendingConfirm, setPendingConfirm] = (0, import_react18.useState)(null);
|
|
20205
|
+
const [taskError, setTaskError] = (0, import_react18.useState)(null);
|
|
20206
|
+
const threadIntervalRef = (0, import_react18.useRef)(null);
|
|
20207
|
+
(0, import_react18.useEffect)(() => {
|
|
20066
20208
|
fetchProjects();
|
|
20067
20209
|
return () => {
|
|
20068
20210
|
stopThreadPolling();
|
|
20069
20211
|
};
|
|
20070
20212
|
}, []);
|
|
20071
|
-
(0,
|
|
20213
|
+
(0, import_react18.useEffect)(() => {
|
|
20072
20214
|
if (projects.length > 0 && selectedProjectId === null) {
|
|
20073
20215
|
setSelectedProjectId(projects[0].id);
|
|
20074
20216
|
}
|
|
@@ -20079,13 +20221,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20079
20221
|
setSelectedProjectId(null);
|
|
20080
20222
|
}
|
|
20081
20223
|
}, [projects]);
|
|
20082
|
-
(0,
|
|
20224
|
+
(0, import_react18.useEffect)(() => {
|
|
20083
20225
|
saveProjectId(selectedProjectId);
|
|
20084
20226
|
}, [selectedProjectId]);
|
|
20085
|
-
(0,
|
|
20227
|
+
(0, import_react18.useEffect)(() => {
|
|
20086
20228
|
saveShowArchived(showArchived);
|
|
20087
20229
|
}, [showArchived]);
|
|
20088
|
-
(0,
|
|
20230
|
+
(0, import_react18.useEffect)(() => {
|
|
20089
20231
|
if (selectedProjectId !== null) {
|
|
20090
20232
|
fetchTasks(selectedProjectId);
|
|
20091
20233
|
setView("list");
|
|
@@ -20097,7 +20239,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20097
20239
|
setTasks([]);
|
|
20098
20240
|
}
|
|
20099
20241
|
}, [selectedProjectId, showArchived]);
|
|
20100
|
-
(0,
|
|
20242
|
+
(0, import_react18.useEffect)(() => {
|
|
20101
20243
|
if (selectedTaskId !== null) {
|
|
20102
20244
|
fetchTaskMessages(selectedTaskId);
|
|
20103
20245
|
startThreadPolling(selectedTaskId);
|
|
@@ -20270,7 +20412,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20270
20412
|
const cancelPendingAction = () => {
|
|
20271
20413
|
setPendingConfirm(null);
|
|
20272
20414
|
};
|
|
20273
|
-
(0,
|
|
20415
|
+
(0, import_react18.useEffect)(() => {
|
|
20274
20416
|
if (!pendingConfirm) return;
|
|
20275
20417
|
function handleKeyDown(event) {
|
|
20276
20418
|
if (event.key === "Escape") {
|
|
@@ -20280,7 +20422,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20280
20422
|
window.addEventListener("keydown", handleKeyDown);
|
|
20281
20423
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
20282
20424
|
}, [pendingConfirm]);
|
|
20283
|
-
(0,
|
|
20425
|
+
(0, import_react18.useEffect)(() => {
|
|
20284
20426
|
if (!taskError) return;
|
|
20285
20427
|
const t = setTimeout(() => setTaskError(null), 5e3);
|
|
20286
20428
|
return () => clearTimeout(t);
|
|
@@ -20411,7 +20553,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20411
20553
|
const selectedProject = projects.find((p) => p.id === selectedProjectId);
|
|
20412
20554
|
const selectedTask = tasks.find((t) => t.id === selectedTaskId);
|
|
20413
20555
|
const selectedProjectAgentName = agents.find((a) => a.id === selectedProject?.agentId)?.name || "Default Agent";
|
|
20414
|
-
const taskAgentLabels = (0,
|
|
20556
|
+
const taskAgentLabels = (0, import_react18.useMemo)(() => {
|
|
20415
20557
|
if (!selectedTask) return void 0;
|
|
20416
20558
|
const agentLabelFor = (agentId) => {
|
|
20417
20559
|
const a = agents.find((x) => x.id === agentId);
|
|
@@ -20457,8 +20599,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20457
20599
|
const safePage = Math.min(page, totalPages - 1);
|
|
20458
20600
|
const pageStart = safePage * PAGE_SIZE;
|
|
20459
20601
|
const pageTasks = tasks.slice(pageStart, pageStart + PAGE_SIZE);
|
|
20460
|
-
return /* @__PURE__ */ (0,
|
|
20461
|
-
/* @__PURE__ */ (0,
|
|
20602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
20603
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("main", { className: "app__chat-pane", style: { flex: 1, display: "flex", flexDirection: "column", background: "var(--vscode-editor-background)" }, children: projects.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "No projects registered. Create one from the Settings panel to get started." }) }) : selectedProject ? view === "list" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20462
20604
|
TaskListView,
|
|
20463
20605
|
{
|
|
20464
20606
|
projects,
|
|
@@ -20480,7 +20622,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20480
20622
|
onArchive: handleArchiveFromList,
|
|
20481
20623
|
statusColor
|
|
20482
20624
|
}
|
|
20483
|
-
) : view === "log" && selectedTask ? /* @__PURE__ */ (0,
|
|
20625
|
+
) : view === "log" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20484
20626
|
TaskLogView,
|
|
20485
20627
|
{
|
|
20486
20628
|
task: selectedTask,
|
|
@@ -20497,7 +20639,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20497
20639
|
onToggleStatus: handleToggleTaskStatus,
|
|
20498
20640
|
statusColor
|
|
20499
20641
|
}
|
|
20500
|
-
) : view === "edit" && selectedTask ? /* @__PURE__ */ (0,
|
|
20642
|
+
) : view === "edit" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20501
20643
|
TaskEditView,
|
|
20502
20644
|
{
|
|
20503
20645
|
task: selectedTask,
|
|
@@ -20515,11 +20657,11 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20515
20657
|
onOpenLog: () => setView("log"),
|
|
20516
20658
|
statusColor
|
|
20517
20659
|
}
|
|
20518
|
-
) : /* @__PURE__ */ (0,
|
|
20519
|
-
/* @__PURE__ */ (0,
|
|
20520
|
-
/* @__PURE__ */ (0,
|
|
20660
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__empty-state", children: [
|
|
20661
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Task not found. Go back to the list." }),
|
|
20662
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "settings-panel__back-btn", onClick: backToList, style: { marginTop: "12px" }, children: "\u2190 Back to list" })
|
|
20521
20663
|
] }) : null }),
|
|
20522
|
-
isNewTaskOpen && /* @__PURE__ */ (0,
|
|
20664
|
+
isNewTaskOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20523
20665
|
"div",
|
|
20524
20666
|
{
|
|
20525
20667
|
style: {
|
|
@@ -20534,7 +20676,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20534
20676
|
justifyContent: "center",
|
|
20535
20677
|
zIndex: 999
|
|
20536
20678
|
},
|
|
20537
|
-
children: /* @__PURE__ */ (0,
|
|
20679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20538
20680
|
"form",
|
|
20539
20681
|
{
|
|
20540
20682
|
onSubmit: handleCreateTask,
|
|
@@ -20545,14 +20687,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20545
20687
|
background: "var(--vscode-sideBar-background)"
|
|
20546
20688
|
},
|
|
20547
20689
|
children: [
|
|
20548
|
-
/* @__PURE__ */ (0,
|
|
20549
|
-
/* @__PURE__ */ (0,
|
|
20550
|
-
/* @__PURE__ */ (0,
|
|
20690
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "confirm__header", children: [
|
|
20691
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "18px", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Wrench, { size: 18 }) }),
|
|
20692
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "confirm__prompt", style: { fontSize: "14px" }, children: "Create New Task" })
|
|
20551
20693
|
] }),
|
|
20552
|
-
/* @__PURE__ */ (0,
|
|
20553
|
-
/* @__PURE__ */ (0,
|
|
20694
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: [
|
|
20695
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20554
20696
|
"Task Title",
|
|
20555
|
-
/* @__PURE__ */ (0,
|
|
20697
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20556
20698
|
"input",
|
|
20557
20699
|
{
|
|
20558
20700
|
type: "text",
|
|
@@ -20572,9 +20714,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20572
20714
|
}
|
|
20573
20715
|
)
|
|
20574
20716
|
] }),
|
|
20575
|
-
/* @__PURE__ */ (0,
|
|
20717
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20576
20718
|
"Objective (Extended markdown goal description)",
|
|
20577
|
-
/* @__PURE__ */ (0,
|
|
20719
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20578
20720
|
"textarea",
|
|
20579
20721
|
{
|
|
20580
20722
|
required: true,
|
|
@@ -20595,9 +20737,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20595
20737
|
}
|
|
20596
20738
|
)
|
|
20597
20739
|
] }),
|
|
20598
|
-
/* @__PURE__ */ (0,
|
|
20740
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20599
20741
|
"Checklist Items (One item per line)",
|
|
20600
|
-
/* @__PURE__ */ (0,
|
|
20742
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20601
20743
|
"textarea",
|
|
20602
20744
|
{
|
|
20603
20745
|
placeholder: "Create route handler\nWrite unit tests\nUpdate documentation",
|
|
@@ -20617,9 +20759,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20617
20759
|
}
|
|
20618
20760
|
)
|
|
20619
20761
|
] }),
|
|
20620
|
-
/* @__PURE__ */ (0,
|
|
20762
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20621
20763
|
"Assigned Agent (optional \u2014 overrides project default)",
|
|
20622
|
-
/* @__PURE__ */ (0,
|
|
20764
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20623
20765
|
"select",
|
|
20624
20766
|
{
|
|
20625
20767
|
value: newTask.agentId,
|
|
@@ -20634,8 +20776,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20634
20776
|
outline: "none"
|
|
20635
20777
|
},
|
|
20636
20778
|
children: [
|
|
20637
|
-
/* @__PURE__ */ (0,
|
|
20638
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20779
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
20780
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
20639
20781
|
a.name,
|
|
20640
20782
|
" (",
|
|
20641
20783
|
a.provider,
|
|
@@ -20645,9 +20787,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20645
20787
|
}
|
|
20646
20788
|
)
|
|
20647
20789
|
] }),
|
|
20648
|
-
/* @__PURE__ */ (0,
|
|
20790
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20649
20791
|
"Planner Agent Override (optional)",
|
|
20650
|
-
/* @__PURE__ */ (0,
|
|
20792
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20651
20793
|
"select",
|
|
20652
20794
|
{
|
|
20653
20795
|
value: newTask.plannerAgentId,
|
|
@@ -20662,8 +20804,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20662
20804
|
outline: "none"
|
|
20663
20805
|
},
|
|
20664
20806
|
children: [
|
|
20665
|
-
/* @__PURE__ */ (0,
|
|
20666
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20807
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
20808
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
20667
20809
|
a.name,
|
|
20668
20810
|
" (",
|
|
20669
20811
|
a.provider,
|
|
@@ -20673,9 +20815,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20673
20815
|
}
|
|
20674
20816
|
)
|
|
20675
20817
|
] }),
|
|
20676
|
-
/* @__PURE__ */ (0,
|
|
20818
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20677
20819
|
"Reviewer Agent Override (optional)",
|
|
20678
|
-
/* @__PURE__ */ (0,
|
|
20820
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20679
20821
|
"select",
|
|
20680
20822
|
{
|
|
20681
20823
|
value: newTask.reviewerAgentId,
|
|
@@ -20690,8 +20832,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20690
20832
|
outline: "none"
|
|
20691
20833
|
},
|
|
20692
20834
|
children: [
|
|
20693
|
-
/* @__PURE__ */ (0,
|
|
20694
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20835
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
20836
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
20695
20837
|
a.name,
|
|
20696
20838
|
" (",
|
|
20697
20839
|
a.provider,
|
|
@@ -20701,8 +20843,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20701
20843
|
}
|
|
20702
20844
|
)
|
|
20703
20845
|
] }),
|
|
20704
|
-
/* @__PURE__ */ (0,
|
|
20705
|
-
/* @__PURE__ */ (0,
|
|
20846
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "12px", display: "flex", alignItems: "center", gap: "6px", cursor: "pointer", marginTop: "4px" }, children: [
|
|
20847
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20706
20848
|
"input",
|
|
20707
20849
|
{
|
|
20708
20850
|
type: "checkbox",
|
|
@@ -20711,24 +20853,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20711
20853
|
style: { cursor: "pointer" }
|
|
20712
20854
|
}
|
|
20713
20855
|
),
|
|
20714
|
-
/* @__PURE__ */ (0,
|
|
20856
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Start active immediately (Heartbeat loop claims it)" })
|
|
20715
20857
|
] })
|
|
20716
20858
|
] }),
|
|
20717
|
-
/* @__PURE__ */ (0,
|
|
20718
|
-
/* @__PURE__ */ (0,
|
|
20719
|
-
/* @__PURE__ */ (0,
|
|
20859
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "confirm__buttons", style: { justifyContent: "flex-end", marginTop: "10px" }, children: [
|
|
20860
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "confirm__btn", onClick: () => setIsNewTaskOpen(false), children: "Cancel" }),
|
|
20861
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "submit", className: "confirm__btn confirm__btn--primary", children: "Create Task" })
|
|
20720
20862
|
] })
|
|
20721
20863
|
]
|
|
20722
20864
|
}
|
|
20723
20865
|
)
|
|
20724
20866
|
}
|
|
20725
20867
|
),
|
|
20726
|
-
pendingConfirm && /* @__PURE__ */ (0,
|
|
20727
|
-
/* @__PURE__ */ (0,
|
|
20728
|
-
/* @__PURE__ */ (0,
|
|
20729
|
-
/* @__PURE__ */ (0,
|
|
20730
|
-
/* @__PURE__ */ (0,
|
|
20731
|
-
/* @__PURE__ */ (0,
|
|
20868
|
+
pendingConfirm && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__confirm-overlay", onClick: cancelPendingAction, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
|
|
20869
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__confirm-title", children: pendingConfirm.type === "delete" ? "Delete task" : pendingConfirm.type === "archive" ? "Archive task" : "Discard worktree" }),
|
|
20870
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "app__confirm-message", children: pendingConfirm.type === "delete" ? `Permanently delete task #${pendingConfirm.task.id} "${pendingConfirm.task.title}"? This removes the task and all its messages from the store. This action cannot be undone.` : pendingConfirm.type === "archive" ? `Archive task #${pendingConfirm.task.id} "${pendingConfirm.task.title}"? It will be hidden from the list and excluded from the scheduler. You can unarchive it later by enabling "Show archived".` : `Discard the worktree for task #${pendingConfirm.task.id}? Pending changes are committed to branch ${pendingConfirm.task.branch}; the branch is kept.` }),
|
|
20871
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__confirm-buttons", children: [
|
|
20872
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "app__confirm-btn", onClick: cancelPendingAction, children: "Cancel" }),
|
|
20873
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20732
20874
|
"button",
|
|
20733
20875
|
{
|
|
20734
20876
|
className: `app__confirm-btn ${pendingConfirm.type === "delete" ? "app__confirm-btn--danger" : ""}`,
|
|
@@ -20738,7 +20880,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20738
20880
|
)
|
|
20739
20881
|
] })
|
|
20740
20882
|
] }) }),
|
|
20741
|
-
taskError && /* @__PURE__ */ (0,
|
|
20883
|
+
taskError && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__error-banner", onClick: () => setTaskError(null), title: "Click to dismiss", children: taskError })
|
|
20742
20884
|
] });
|
|
20743
20885
|
}
|
|
20744
20886
|
function TaskListView({
|
|
@@ -20761,10 +20903,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20761
20903
|
onArchive,
|
|
20762
20904
|
statusColor
|
|
20763
20905
|
}) {
|
|
20764
|
-
return /* @__PURE__ */ (0,
|
|
20765
|
-
/* @__PURE__ */ (0,
|
|
20766
|
-
/* @__PURE__ */ (0,
|
|
20767
|
-
/* @__PURE__ */ (0,
|
|
20906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
20907
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-view__header", children: [
|
|
20908
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
20909
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20768
20910
|
"select",
|
|
20769
20911
|
{
|
|
20770
20912
|
className: "task-view__project-filter",
|
|
@@ -20781,17 +20923,17 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20781
20923
|
outline: "none",
|
|
20782
20924
|
cursor: "pointer"
|
|
20783
20925
|
},
|
|
20784
|
-
children: projects.map((p) => /* @__PURE__ */ (0,
|
|
20926
|
+
children: projects.map((p) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: p.id, children: p.name }, p.id))
|
|
20785
20927
|
}
|
|
20786
20928
|
),
|
|
20787
|
-
/* @__PURE__ */ (0,
|
|
20929
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: [
|
|
20788
20930
|
"Agent: ",
|
|
20789
20931
|
agentName
|
|
20790
20932
|
] })
|
|
20791
20933
|
] }),
|
|
20792
|
-
/* @__PURE__ */ (0,
|
|
20793
|
-
/* @__PURE__ */ (0,
|
|
20794
|
-
/* @__PURE__ */ (0,
|
|
20934
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
20935
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "task-view__archived-toggle", children: [
|
|
20936
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20795
20937
|
"input",
|
|
20796
20938
|
{
|
|
20797
20939
|
type: "checkbox",
|
|
@@ -20802,42 +20944,42 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20802
20944
|
),
|
|
20803
20945
|
"Show archived"
|
|
20804
20946
|
] }),
|
|
20805
|
-
/* @__PURE__ */ (0,
|
|
20947
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "app__new-chat-btn", onClick: onNewTask, style: { padding: "4px 10px", fontSize: "11px" }, children: "+ New Task" })
|
|
20806
20948
|
] })
|
|
20807
20949
|
] }),
|
|
20808
|
-
/* @__PURE__ */ (0,
|
|
20950
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { flex: 1, overflowY: "auto", padding: "0 16px 16px" }, children: allTasksCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
20809
20951
|
"No tasks created for ",
|
|
20810
20952
|
project.name,
|
|
20811
20953
|
'. Click "+ New Task" to start.'
|
|
20812
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
20813
|
-
/* @__PURE__ */ (0,
|
|
20814
|
-
/* @__PURE__ */ (0,
|
|
20815
|
-
/* @__PURE__ */ (0,
|
|
20816
|
-
/* @__PURE__ */ (0,
|
|
20817
|
-
/* @__PURE__ */ (0,
|
|
20818
|
-
/* @__PURE__ */ (0,
|
|
20819
|
-
/* @__PURE__ */ (0,
|
|
20820
|
-
/* @__PURE__ */ (0,
|
|
20821
|
-
/* @__PURE__ */ (0,
|
|
20954
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("table", { className: "task-table", children: [
|
|
20955
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("tr", { children: [
|
|
20956
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "60px" }, children: "#" }),
|
|
20957
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", children: "Title" }),
|
|
20958
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "90px" }, children: "Status" }),
|
|
20959
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "100px" }, children: "Agent" }),
|
|
20960
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "120px" }, children: "Checklist" }),
|
|
20961
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "180px" }, children: "Branch" }),
|
|
20962
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "150px" }, children: "Updated" }),
|
|
20963
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "70px" } })
|
|
20822
20964
|
] }) }),
|
|
20823
|
-
/* @__PURE__ */ (0,
|
|
20965
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tbody", { children: tasks.map((task) => {
|
|
20824
20966
|
const completedCount = task.checklist.filter((c) => c.status === "done").length;
|
|
20825
20967
|
const totalCount = task.checklist.length;
|
|
20826
20968
|
const isArchived = !!task.archived;
|
|
20827
20969
|
const updated = new Date(task.updatedAt);
|
|
20828
20970
|
const updatedStr = isNaN(updated.getTime()) ? task.updatedAt : updated.toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
|
|
20829
|
-
return /* @__PURE__ */ (0,
|
|
20971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20830
20972
|
"tr",
|
|
20831
20973
|
{
|
|
20832
20974
|
className: `task-table__row${isArchived ? " task-table__row--archived" : ""}`,
|
|
20833
20975
|
onClick: () => onOpenLog(task),
|
|
20834
20976
|
children: [
|
|
20835
|
-
/* @__PURE__ */ (0,
|
|
20836
|
-
/* @__PURE__ */ (0,
|
|
20837
|
-
isArchived && /* @__PURE__ */ (0,
|
|
20977
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td task-table__td--mono", children: task.id }),
|
|
20978
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__title", children: [
|
|
20979
|
+
isArchived && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Archive, { size: 11 }),
|
|
20838
20980
|
task.title
|
|
20839
20981
|
] }) }),
|
|
20840
|
-
/* @__PURE__ */ (0,
|
|
20982
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20841
20983
|
"span",
|
|
20842
20984
|
{
|
|
20843
20985
|
className: "task-table__badge",
|
|
@@ -20845,28 +20987,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20845
20987
|
children: task.status
|
|
20846
20988
|
}
|
|
20847
20989
|
) }),
|
|
20848
|
-
/* @__PURE__ */ (0,
|
|
20849
|
-
/* @__PURE__ */ (0,
|
|
20850
|
-
/* @__PURE__ */ (0,
|
|
20990
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", style: { fontSize: "11px" }, children: task.agentId ? agents.find((a) => a.id === task.agentId)?.name || task.agentId : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { opacity: 0.4 }, children: "default" }) }),
|
|
20991
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: totalCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-table__progress", children: [
|
|
20992
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "task-table__progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20851
20993
|
"span",
|
|
20852
20994
|
{
|
|
20853
20995
|
className: "task-table__progress-fill",
|
|
20854
20996
|
style: { width: `${completedCount / totalCount * 100}%` }
|
|
20855
20997
|
}
|
|
20856
20998
|
) }),
|
|
20857
|
-
/* @__PURE__ */ (0,
|
|
20999
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__progress-text", children: [
|
|
20858
21000
|
completedCount,
|
|
20859
21001
|
"/",
|
|
20860
21002
|
totalCount
|
|
20861
21003
|
] })
|
|
20862
|
-
] }) : /* @__PURE__ */ (0,
|
|
20863
|
-
/* @__PURE__ */ (0,
|
|
20864
|
-
/* @__PURE__ */ (0,
|
|
20865
|
-
/* @__PURE__ */ (0,
|
|
20866
|
-
] }) : /* @__PURE__ */ (0,
|
|
20867
|
-
/* @__PURE__ */ (0,
|
|
20868
|
-
/* @__PURE__ */ (0,
|
|
20869
|
-
/* @__PURE__ */ (0,
|
|
21004
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
|
|
21005
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: task.branch ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__branch", children: [
|
|
21006
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GitBranch, { size: 11 }),
|
|
21007
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: task.branch })
|
|
21008
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
|
|
21009
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td task-table__td--muted", children: updatedStr }),
|
|
21010
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "inline-flex", gap: "2px" }, children: [
|
|
21011
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20870
21012
|
"button",
|
|
20871
21013
|
{
|
|
20872
21014
|
className: "task-table__edit-btn",
|
|
@@ -20876,10 +21018,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20876
21018
|
},
|
|
20877
21019
|
title: task.archived ? "Unarchive task" : "Archive task",
|
|
20878
21020
|
"aria-label": task.archived ? "Unarchive task" : "Archive task",
|
|
20879
|
-
children: /* @__PURE__ */ (0,
|
|
21021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Archive, { size: 13 })
|
|
20880
21022
|
}
|
|
20881
21023
|
),
|
|
20882
|
-
/* @__PURE__ */ (0,
|
|
21024
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20883
21025
|
"button",
|
|
20884
21026
|
{
|
|
20885
21027
|
className: "task-table__edit-btn",
|
|
@@ -20889,7 +21031,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20889
21031
|
},
|
|
20890
21032
|
title: "Edit task",
|
|
20891
21033
|
"aria-label": "Edit task",
|
|
20892
|
-
children: /* @__PURE__ */ (0,
|
|
21034
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pencil, { size: 13 })
|
|
20893
21035
|
}
|
|
20894
21036
|
)
|
|
20895
21037
|
] }) })
|
|
@@ -20899,8 +21041,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20899
21041
|
);
|
|
20900
21042
|
}) })
|
|
20901
21043
|
] }) }),
|
|
20902
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
20903
|
-
/* @__PURE__ */ (0,
|
|
21044
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-table__pagination", children: [
|
|
21045
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20904
21046
|
"button",
|
|
20905
21047
|
{
|
|
20906
21048
|
className: "task-table__page-btn",
|
|
@@ -20909,13 +21051,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20909
21051
|
children: "\u2039 Prev"
|
|
20910
21052
|
}
|
|
20911
21053
|
),
|
|
20912
|
-
/* @__PURE__ */ (0,
|
|
21054
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__page-info", children: [
|
|
20913
21055
|
"Page ",
|
|
20914
21056
|
page + 1,
|
|
20915
21057
|
" of ",
|
|
20916
21058
|
totalPages
|
|
20917
21059
|
] }),
|
|
20918
|
-
/* @__PURE__ */ (0,
|
|
21060
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20919
21061
|
"button",
|
|
20920
21062
|
{
|
|
20921
21063
|
className: "task-table__page-btn",
|
|
@@ -20944,20 +21086,20 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20944
21086
|
}) {
|
|
20945
21087
|
const completedCount = task.checklist.filter((c) => c.status === "done").length;
|
|
20946
21088
|
const totalCount = task.checklist.length;
|
|
20947
|
-
const chatItems = (0,
|
|
20948
|
-
return /* @__PURE__ */ (0,
|
|
20949
|
-
/* @__PURE__ */ (0,
|
|
20950
|
-
/* @__PURE__ */ (0,
|
|
20951
|
-
/* @__PURE__ */ (0,
|
|
20952
|
-
/* @__PURE__ */ (0,
|
|
20953
|
-
/* @__PURE__ */ (0,
|
|
21089
|
+
const chatItems = (0, import_react18.useMemo)(() => taskMessagesToChatItems(taskMessages, agentLabels), [taskMessages, agentLabels]);
|
|
21090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
21091
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "12px 14px" }, children: [
|
|
21092
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
21093
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ArrowLeft, { size: 13 }) }),
|
|
21094
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__chat-header-info", children: [
|
|
21095
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
|
|
20954
21096
|
"Task #",
|
|
20955
21097
|
task.id,
|
|
20956
21098
|
": ",
|
|
20957
21099
|
task.title
|
|
20958
21100
|
] }),
|
|
20959
|
-
/* @__PURE__ */ (0,
|
|
20960
|
-
/* @__PURE__ */ (0,
|
|
21101
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: [
|
|
21102
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20961
21103
|
"span",
|
|
20962
21104
|
{
|
|
20963
21105
|
className: `agent-status-dot agent-status-dot--active ${isActiveLike ? "agent-status-dot--pulsing" : ""}`,
|
|
@@ -20968,24 +21110,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20968
21110
|
] })
|
|
20969
21111
|
] })
|
|
20970
21112
|
] }),
|
|
20971
|
-
/* @__PURE__ */ (0,
|
|
20972
|
-
task.status !== "done" && /* @__PURE__ */ (0,
|
|
21113
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
21114
|
+
task.status !== "done" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20973
21115
|
"button",
|
|
20974
21116
|
{
|
|
20975
21117
|
className: "confirm__btn confirm__btn--primary",
|
|
20976
21118
|
onClick: () => onToggleStatus(task),
|
|
20977
21119
|
title: isActiveLike ? "Pause this task (aborts the running agent)" : "Activate this task",
|
|
20978
21120
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
20979
|
-
children: isActiveLike ? /* @__PURE__ */ (0,
|
|
20980
|
-
/* @__PURE__ */ (0,
|
|
21121
|
+
children: isActiveLike ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
21122
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pause, { size: 12 }),
|
|
20981
21123
|
" Pause"
|
|
20982
|
-
] }) : /* @__PURE__ */ (0,
|
|
20983
|
-
/* @__PURE__ */ (0,
|
|
21124
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
21125
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Play, { size: 12 }),
|
|
20984
21126
|
" Activate"
|
|
20985
21127
|
] })
|
|
20986
21128
|
}
|
|
20987
21129
|
),
|
|
20988
|
-
/* @__PURE__ */ (0,
|
|
21130
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20989
21131
|
"span",
|
|
20990
21132
|
{
|
|
20991
21133
|
className: "task-table__badge",
|
|
@@ -20995,8 +21137,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20995
21137
|
)
|
|
20996
21138
|
] })
|
|
20997
21139
|
] }),
|
|
20998
|
-
/* @__PURE__ */ (0,
|
|
20999
|
-
/* @__PURE__ */ (0,
|
|
21140
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "row" }, children: [
|
|
21141
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21000
21142
|
"aside",
|
|
21001
21143
|
{
|
|
21002
21144
|
style: {
|
|
@@ -21009,19 +21151,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21009
21151
|
background: "var(--vscode-sideBar-background, rgba(0,0,0,0.1))"
|
|
21010
21152
|
},
|
|
21011
21153
|
children: [
|
|
21012
|
-
/* @__PURE__ */ (0,
|
|
21013
|
-
/* @__PURE__ */ (0,
|
|
21014
|
-
totalCount > 0 && /* @__PURE__ */ (0,
|
|
21154
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { padding: "10px 12px", borderBottom: "1px solid var(--vscode-panel-border, rgba(255,255,255,0.05))" }, children: [
|
|
21155
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: 0, fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
|
|
21156
|
+
totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { fontSize: "10px", opacity: 0.5, marginTop: "2px" }, children: [
|
|
21015
21157
|
completedCount,
|
|
21016
21158
|
"/",
|
|
21017
21159
|
totalCount,
|
|
21018
21160
|
" done"
|
|
21019
21161
|
] })
|
|
21020
21162
|
] }),
|
|
21021
|
-
/* @__PURE__ */ (0,
|
|
21163
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { padding: "8px 10px", display: "flex", flexDirection: "column", gap: "4px" }, children: totalCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "11px", opacity: 0.4, padding: "8px 4px" }, children: "No checklist items." }) : (task.checklist || []).map((item) => {
|
|
21022
21164
|
const isDone = item.status === "done";
|
|
21023
21165
|
const isInProgress = item.status === "in_progress";
|
|
21024
|
-
return /* @__PURE__ */ (0,
|
|
21166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21025
21167
|
"label",
|
|
21026
21168
|
{
|
|
21027
21169
|
style: {
|
|
@@ -21038,7 +21180,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21038
21180
|
},
|
|
21039
21181
|
title: isInProgress ? "In progress" : isDone ? "Done" : "Pending",
|
|
21040
21182
|
children: [
|
|
21041
|
-
/* @__PURE__ */ (0,
|
|
21183
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21042
21184
|
"input",
|
|
21043
21185
|
{
|
|
21044
21186
|
type: "checkbox",
|
|
@@ -21047,7 +21189,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21047
21189
|
style: { marginTop: "2px", cursor: "pointer", flexShrink: 0 }
|
|
21048
21190
|
}
|
|
21049
21191
|
),
|
|
21050
|
-
/* @__PURE__ */ (0,
|
|
21192
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { wordBreak: "break-word" }, children: item.text })
|
|
21051
21193
|
]
|
|
21052
21194
|
},
|
|
21053
21195
|
item.id
|
|
@@ -21056,10 +21198,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21056
21198
|
]
|
|
21057
21199
|
}
|
|
21058
21200
|
),
|
|
21059
|
-
/* @__PURE__ */ (0,
|
|
21060
|
-
taskMessages.length === 0 ? /* @__PURE__ */ (0,
|
|
21061
|
-
/* @__PURE__ */ (0,
|
|
21062
|
-
/* @__PURE__ */ (0,
|
|
21201
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
|
|
21202
|
+
taskMessages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "messages messages--empty", children: "No messages in this execution yet. Agent will start on next tick." }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MessageList, { items: chatItems, sessionId: null, compact: true }),
|
|
21203
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("form", { className: "composer", onSubmit: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "flex-end" }, children: [
|
|
21204
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21063
21205
|
"textarea",
|
|
21064
21206
|
{
|
|
21065
21207
|
className: "composer__input",
|
|
@@ -21075,7 +21217,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21075
21217
|
style: { flex: 1, minHeight: "44px" }
|
|
21076
21218
|
}
|
|
21077
21219
|
),
|
|
21078
|
-
/* @__PURE__ */ (0,
|
|
21220
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21079
21221
|
"button",
|
|
21080
21222
|
{
|
|
21081
21223
|
type: "submit",
|
|
@@ -21107,12 +21249,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21107
21249
|
statusColor
|
|
21108
21250
|
}) {
|
|
21109
21251
|
const isRunning = task.status === "active" || task.status === "reviewing" || task.status === "planning";
|
|
21110
|
-
const [draftTitle, setDraftTitle] = (0,
|
|
21111
|
-
const [draftObjective, setDraftObjective] = (0,
|
|
21112
|
-
const [lastTaskId, setLastTaskId] = (0,
|
|
21252
|
+
const [draftTitle, setDraftTitle] = (0, import_react18.useState)(task.title);
|
|
21253
|
+
const [draftObjective, setDraftObjective] = (0, import_react18.useState)(task.objective);
|
|
21254
|
+
const [lastTaskId, setLastTaskId] = (0, import_react18.useState)(task.id);
|
|
21113
21255
|
const trimmedTitle = draftTitle.trim();
|
|
21114
21256
|
const isDirty = trimmedTitle !== task.title.trim() || draftObjective.trim() !== task.objective.trim();
|
|
21115
|
-
(0,
|
|
21257
|
+
(0, import_react18.useEffect)(() => {
|
|
21116
21258
|
if (task.id !== lastTaskId) {
|
|
21117
21259
|
setDraftTitle(task.title);
|
|
21118
21260
|
setDraftObjective(task.objective);
|
|
@@ -21127,16 +21269,16 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21127
21269
|
setDraftTitle(task.title);
|
|
21128
21270
|
setDraftObjective(task.objective);
|
|
21129
21271
|
};
|
|
21130
|
-
return /* @__PURE__ */ (0,
|
|
21131
|
-
/* @__PURE__ */ (0,
|
|
21132
|
-
/* @__PURE__ */ (0,
|
|
21133
|
-
/* @__PURE__ */ (0,
|
|
21134
|
-
/* @__PURE__ */ (0,
|
|
21135
|
-
/* @__PURE__ */ (0,
|
|
21272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%", overflowY: "auto" }, children: [
|
|
21273
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-view__sub-header", style: { padding: "12px 14px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
21274
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
21275
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "settings-panel__back-btn", onClick: onBack, title: "Back to task list", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ArrowLeft, { size: 13 }) }),
|
|
21276
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("h3", { style: { margin: 0, fontSize: "15px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
21277
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: { opacity: 0.6 }, children: [
|
|
21136
21278
|
"Task #",
|
|
21137
21279
|
task.id
|
|
21138
21280
|
] }),
|
|
21139
|
-
/* @__PURE__ */ (0,
|
|
21281
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21140
21282
|
"input",
|
|
21141
21283
|
{
|
|
21142
21284
|
value: draftTitle,
|
|
@@ -21157,7 +21299,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21157
21299
|
}
|
|
21158
21300
|
)
|
|
21159
21301
|
] }),
|
|
21160
|
-
/* @__PURE__ */ (0,
|
|
21302
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21161
21303
|
"span",
|
|
21162
21304
|
{
|
|
21163
21305
|
className: "task-table__badge",
|
|
@@ -21166,8 +21308,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21166
21308
|
}
|
|
21167
21309
|
)
|
|
21168
21310
|
] }),
|
|
21169
|
-
/* @__PURE__ */ (0,
|
|
21170
|
-
/* @__PURE__ */ (0,
|
|
21311
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "inline-flex", gap: "6px" }, children: [
|
|
21312
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21171
21313
|
"button",
|
|
21172
21314
|
{
|
|
21173
21315
|
className: "confirm__btn",
|
|
@@ -21177,7 +21319,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21177
21319
|
children: "View Log"
|
|
21178
21320
|
}
|
|
21179
21321
|
),
|
|
21180
|
-
task.worktreePath && /* @__PURE__ */ (0,
|
|
21322
|
+
task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21181
21323
|
"button",
|
|
21182
21324
|
{
|
|
21183
21325
|
className: "confirm__btn",
|
|
@@ -21185,12 +21327,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21185
21327
|
title: `Commit pending changes to ${task.branch} and remove the worktree`,
|
|
21186
21328
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
21187
21329
|
children: [
|
|
21188
|
-
/* @__PURE__ */ (0,
|
|
21330
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GitBranch, { size: 12 }),
|
|
21189
21331
|
" Discard worktree"
|
|
21190
21332
|
]
|
|
21191
21333
|
}
|
|
21192
21334
|
),
|
|
21193
|
-
/* @__PURE__ */ (0,
|
|
21335
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21194
21336
|
"button",
|
|
21195
21337
|
{
|
|
21196
21338
|
className: "confirm__btn",
|
|
@@ -21198,28 +21340,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21198
21340
|
title: task.archived ? "Unarchive this task" : "Archive this task (hides it from the list, excludes from scheduler)",
|
|
21199
21341
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
21200
21342
|
children: [
|
|
21201
|
-
/* @__PURE__ */ (0,
|
|
21343
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Archive, { size: 12 }),
|
|
21202
21344
|
" ",
|
|
21203
21345
|
task.archived ? "Unarchive" : "Archive"
|
|
21204
21346
|
]
|
|
21205
21347
|
}
|
|
21206
21348
|
),
|
|
21207
|
-
/* @__PURE__ */ (0,
|
|
21349
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21208
21350
|
"button",
|
|
21209
21351
|
{
|
|
21210
21352
|
className: "confirm__btn confirm__btn--primary",
|
|
21211
21353
|
onClick: () => onToggleStatus(task),
|
|
21212
21354
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
21213
|
-
children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0,
|
|
21214
|
-
/* @__PURE__ */ (0,
|
|
21355
|
+
children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
21356
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pause, { size: 12 }),
|
|
21215
21357
|
" Pause"
|
|
21216
|
-
] }) : /* @__PURE__ */ (0,
|
|
21217
|
-
/* @__PURE__ */ (0,
|
|
21358
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
21359
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Play, { size: 12 }),
|
|
21218
21360
|
" Activate"
|
|
21219
21361
|
] })
|
|
21220
21362
|
}
|
|
21221
21363
|
),
|
|
21222
|
-
/* @__PURE__ */ (0,
|
|
21364
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21223
21365
|
"button",
|
|
21224
21366
|
{
|
|
21225
21367
|
className: "confirm__btn",
|
|
@@ -21227,22 +21369,22 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21227
21369
|
title: "Permanently delete this task and all its messages",
|
|
21228
21370
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px", color: "#ef4444" },
|
|
21229
21371
|
children: [
|
|
21230
|
-
/* @__PURE__ */ (0,
|
|
21372
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Trash2, { size: 12 }),
|
|
21231
21373
|
" Delete"
|
|
21232
21374
|
]
|
|
21233
21375
|
}
|
|
21234
21376
|
)
|
|
21235
21377
|
] })
|
|
21236
21378
|
] }),
|
|
21237
|
-
/* @__PURE__ */ (0,
|
|
21238
|
-
task.branch && /* @__PURE__ */ (0,
|
|
21239
|
-
/* @__PURE__ */ (0,
|
|
21240
|
-
/* @__PURE__ */ (0,
|
|
21241
|
-
!task.worktreePath && /* @__PURE__ */ (0,
|
|
21379
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { padding: "16px", maxWidth: "720px" }, children: [
|
|
21380
|
+
task.branch && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "6px", fontSize: "11px", opacity: 0.75 }, children: [
|
|
21381
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GitBranch, { size: 12 }),
|
|
21382
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { style: { fontFamily: "monospace" }, children: task.branch }),
|
|
21383
|
+
!task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { opacity: 0.6 }, children: "(worktree removed)" })
|
|
21242
21384
|
] }),
|
|
21243
|
-
/* @__PURE__ */ (0,
|
|
21244
|
-
/* @__PURE__ */ (0,
|
|
21245
|
-
/* @__PURE__ */ (0,
|
|
21385
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
21386
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Objective" }),
|
|
21387
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21246
21388
|
"textarea",
|
|
21247
21389
|
{
|
|
21248
21390
|
value: draftObjective,
|
|
@@ -21266,8 +21408,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21266
21408
|
}
|
|
21267
21409
|
}
|
|
21268
21410
|
),
|
|
21269
|
-
isDirty && /* @__PURE__ */ (0,
|
|
21270
|
-
/* @__PURE__ */ (0,
|
|
21411
|
+
isDirty && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center", marginTop: "8px" }, children: [
|
|
21412
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21271
21413
|
"button",
|
|
21272
21414
|
{
|
|
21273
21415
|
className: "confirm__btn confirm__btn--primary",
|
|
@@ -21280,13 +21422,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21280
21422
|
children: "Save"
|
|
21281
21423
|
}
|
|
21282
21424
|
),
|
|
21283
|
-
/* @__PURE__ */ (0,
|
|
21284
|
-
isRunning && /* @__PURE__ */ (0,
|
|
21425
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "confirm__btn", onClick: resetDraft, style: { padding: "3px 10px", fontSize: "10px" }, children: "Cancel" }),
|
|
21426
|
+
isRunning && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: "Applies from the next cycle." })
|
|
21285
21427
|
] })
|
|
21286
21428
|
] }),
|
|
21287
|
-
/* @__PURE__ */ (0,
|
|
21288
|
-
/* @__PURE__ */ (0,
|
|
21289
|
-
/* @__PURE__ */ (0,
|
|
21429
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
21430
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Assigned Agent" }),
|
|
21431
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21290
21432
|
"select",
|
|
21291
21433
|
{
|
|
21292
21434
|
value: task.agentId || "",
|
|
@@ -21306,8 +21448,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21306
21448
|
},
|
|
21307
21449
|
title: isRunning ? "Pause the task before changing its agent" : "Choose which agent runs this task",
|
|
21308
21450
|
children: [
|
|
21309
|
-
/* @__PURE__ */ (0,
|
|
21310
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
21451
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
21452
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
21311
21453
|
a.name,
|
|
21312
21454
|
" (",
|
|
21313
21455
|
a.provider,
|
|
@@ -21317,9 +21459,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21317
21459
|
}
|
|
21318
21460
|
)
|
|
21319
21461
|
] }),
|
|
21320
|
-
/* @__PURE__ */ (0,
|
|
21321
|
-
/* @__PURE__ */ (0,
|
|
21322
|
-
/* @__PURE__ */ (0,
|
|
21462
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
21463
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Planner Agent" }),
|
|
21464
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21323
21465
|
"select",
|
|
21324
21466
|
{
|
|
21325
21467
|
value: task.plannerAgentId || "",
|
|
@@ -21328,8 +21470,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21328
21470
|
style: { background: "var(--vscode-input-background, #252526)", color: "var(--vscode-input-foreground)", border: "1px solid var(--vscode-input-border, #3c3c3c)", borderRadius: "4px", padding: "6px 8px", fontSize: "12px", outline: "none", width: "100%", cursor: isRunning ? "not-allowed" : "pointer", opacity: isRunning ? 0.6 : 1 },
|
|
21329
21471
|
title: isRunning ? "Pause the task before changing its planner" : "Agent that runs the planning phase (read-only). Unset: falls back to the project planner, then the developer.",
|
|
21330
21472
|
children: [
|
|
21331
|
-
/* @__PURE__ */ (0,
|
|
21332
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
21473
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
21474
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
21333
21475
|
a.name,
|
|
21334
21476
|
" (",
|
|
21335
21477
|
a.provider,
|
|
@@ -21339,9 +21481,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21339
21481
|
}
|
|
21340
21482
|
)
|
|
21341
21483
|
] }),
|
|
21342
|
-
/* @__PURE__ */ (0,
|
|
21343
|
-
/* @__PURE__ */ (0,
|
|
21344
|
-
/* @__PURE__ */ (0,
|
|
21484
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
21485
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Reviewer Agent" }),
|
|
21486
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21345
21487
|
"select",
|
|
21346
21488
|
{
|
|
21347
21489
|
value: task.reviewerAgentId || "",
|
|
@@ -21350,8 +21492,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21350
21492
|
style: { background: "var(--vscode-input-background, #252526)", color: "var(--vscode-input-foreground)", border: "1px solid var(--vscode-input-border, #3c3c3c)", borderRadius: "4px", padding: "6px 8px", fontSize: "12px", outline: "none", width: "100%", cursor: isRunning ? "not-allowed" : "pointer", opacity: isRunning ? 0.6 : 1 },
|
|
21351
21493
|
title: isRunning ? "Pause the task before changing its reviewer" : "Agent that reviews the branch at DONE. Unset: falls back to the project reviewer, then the developer.",
|
|
21352
21494
|
children: [
|
|
21353
|
-
/* @__PURE__ */ (0,
|
|
21354
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
21495
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
21496
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
21355
21497
|
a.name,
|
|
21356
21498
|
" (",
|
|
21357
21499
|
a.provider,
|
|
@@ -21361,31 +21503,31 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21361
21503
|
}
|
|
21362
21504
|
)
|
|
21363
21505
|
] }),
|
|
21364
|
-
/* @__PURE__ */ (0,
|
|
21365
|
-
/* @__PURE__ */ (0,
|
|
21366
|
-
/* @__PURE__ */ (0,
|
|
21506
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
21507
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 6px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Phases" }),
|
|
21508
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { display: "flex", gap: "12px" }, children: [
|
|
21367
21509
|
{ flag: "planningEnabled", label: "Planning phase", value: task.planningEnabled },
|
|
21368
21510
|
{ flag: "reviewEnabled", label: "Review at DONE", value: task.reviewEnabled },
|
|
21369
21511
|
{ flag: "sddEnabled", label: "SDD mode (.md specs)", value: task.sddEnabled }
|
|
21370
|
-
].map(({ flag, label, value }) => /* @__PURE__ */ (0,
|
|
21512
|
+
].map(({ flag, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", flex: 1 }, children: [
|
|
21371
21513
|
label,
|
|
21372
|
-
/* @__PURE__ */ (0,
|
|
21514
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21373
21515
|
"select",
|
|
21374
21516
|
{
|
|
21375
21517
|
value: value === true ? "on" : value === false ? "off" : "inherit",
|
|
21376
21518
|
onChange: (e) => onSetFlag(task, flag, e.target.value === "inherit" ? null : e.target.value === "on"),
|
|
21377
21519
|
style: { background: "var(--vscode-input-background, #252526)", color: "var(--vscode-input-foreground)", border: "1px solid var(--vscode-input-border, #3c3c3c)", borderRadius: "4px", padding: "6px 8px", fontSize: "12px", outline: "none" },
|
|
21378
21520
|
children: [
|
|
21379
|
-
/* @__PURE__ */ (0,
|
|
21380
|
-
/* @__PURE__ */ (0,
|
|
21381
|
-
/* @__PURE__ */ (0,
|
|
21521
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "inherit", children: "Project default" }),
|
|
21522
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "on", children: "On" }),
|
|
21523
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "off", children: "Off" })
|
|
21382
21524
|
]
|
|
21383
21525
|
}
|
|
21384
21526
|
)
|
|
21385
21527
|
] }, flag)) }),
|
|
21386
|
-
/* @__PURE__ */ (0,
|
|
21528
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", marginTop: "12px", maxWidth: "260px" }, children: [
|
|
21387
21529
|
"Max run seconds per cycle",
|
|
21388
|
-
/* @__PURE__ */ (0,
|
|
21530
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21389
21531
|
"input",
|
|
21390
21532
|
{
|
|
21391
21533
|
type: "number",
|
|
@@ -21408,7 +21550,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21408
21550
|
)
|
|
21409
21551
|
] })
|
|
21410
21552
|
] }),
|
|
21411
|
-
task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0,
|
|
21553
|
+
task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21412
21554
|
"div",
|
|
21413
21555
|
{
|
|
21414
21556
|
style: {
|
|
@@ -21421,19 +21563,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21421
21563
|
fontSize: "12px"
|
|
21422
21564
|
},
|
|
21423
21565
|
children: [
|
|
21424
|
-
/* @__PURE__ */ (0,
|
|
21425
|
-
/* @__PURE__ */ (0,
|
|
21566
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("strong", { children: [
|
|
21567
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TriangleAlert, { size: 13 }),
|
|
21426
21568
|
" Blocked Reason:"
|
|
21427
21569
|
] }),
|
|
21428
|
-
/* @__PURE__ */ (0,
|
|
21570
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { style: { margin: "4px 0 0 0" }, children: task.blockedReason })
|
|
21429
21571
|
]
|
|
21430
21572
|
}
|
|
21431
21573
|
),
|
|
21432
|
-
/* @__PURE__ */ (0,
|
|
21433
|
-
/* @__PURE__ */ (0,
|
|
21434
|
-
/* @__PURE__ */ (0,
|
|
21574
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
21575
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: "0 0 8px 0", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
|
|
21576
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: (task.checklist || []).map((item) => {
|
|
21435
21577
|
const isDone = item.status === "done";
|
|
21436
|
-
return /* @__PURE__ */ (0,
|
|
21578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21437
21579
|
"label",
|
|
21438
21580
|
{
|
|
21439
21581
|
style: {
|
|
@@ -21450,7 +21592,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21450
21592
|
opacity: isDone ? 0.6 : 1
|
|
21451
21593
|
},
|
|
21452
21594
|
children: [
|
|
21453
|
-
/* @__PURE__ */ (0,
|
|
21595
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21454
21596
|
"input",
|
|
21455
21597
|
{
|
|
21456
21598
|
type: "checkbox",
|
|
@@ -21459,7 +21601,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21459
21601
|
style: { marginTop: "2px", cursor: "pointer" }
|
|
21460
21602
|
}
|
|
21461
21603
|
),
|
|
21462
|
-
/* @__PURE__ */ (0,
|
|
21604
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: item.text })
|
|
21463
21605
|
]
|
|
21464
21606
|
},
|
|
21465
21607
|
item.id
|
|
@@ -21471,7 +21613,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21471
21613
|
}
|
|
21472
21614
|
|
|
21473
21615
|
// src/useVoice.ts
|
|
21474
|
-
var
|
|
21616
|
+
var import_react19 = __toESM(require_react(), 1);
|
|
21475
21617
|
function canCapture() {
|
|
21476
21618
|
return typeof window !== "undefined" && typeof MediaRecorder !== "undefined" && !!navigator.mediaDevices?.getUserMedia;
|
|
21477
21619
|
}
|
|
@@ -21496,37 +21638,37 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21496
21638
|
const { voice, chatStatus, pendingConfirmCount, items, onTranscript } = opts;
|
|
21497
21639
|
const available = !!voice && voice.enabled && voice.configured && canCapture();
|
|
21498
21640
|
const canSpeak = !!voice?.canSpeak;
|
|
21499
|
-
const [phase, setPhase] = (0,
|
|
21500
|
-
const [mode, setMode] = (0,
|
|
21501
|
-
const [error, setError] = (0,
|
|
21502
|
-
const phaseRef = (0,
|
|
21641
|
+
const [phase, setPhase] = (0, import_react19.useState)("idle");
|
|
21642
|
+
const [mode, setMode] = (0, import_react19.useState)("dictate");
|
|
21643
|
+
const [error, setError] = (0, import_react19.useState)(null);
|
|
21644
|
+
const phaseRef = (0, import_react19.useRef)(phase);
|
|
21503
21645
|
phaseRef.current = phase;
|
|
21504
|
-
const modeRef = (0,
|
|
21646
|
+
const modeRef = (0, import_react19.useRef)(mode);
|
|
21505
21647
|
modeRef.current = mode;
|
|
21506
|
-
const onTranscriptRef = (0,
|
|
21648
|
+
const onTranscriptRef = (0, import_react19.useRef)(onTranscript);
|
|
21507
21649
|
onTranscriptRef.current = onTranscript;
|
|
21508
|
-
const itemsRef = (0,
|
|
21650
|
+
const itemsRef = (0, import_react19.useRef)(items);
|
|
21509
21651
|
itemsRef.current = items;
|
|
21510
|
-
const chatStatusRef = (0,
|
|
21652
|
+
const chatStatusRef = (0, import_react19.useRef)(chatStatus);
|
|
21511
21653
|
chatStatusRef.current = chatStatus;
|
|
21512
|
-
const streamRef = (0,
|
|
21513
|
-
const recorderRef = (0,
|
|
21514
|
-
const chunksRef = (0,
|
|
21515
|
-
const vadRef = (0,
|
|
21516
|
-
const audioRef = (0,
|
|
21517
|
-
const idleTimerRef = (0,
|
|
21518
|
-
const heardSpeechRef = (0,
|
|
21519
|
-
const sawStreamingRef = (0,
|
|
21520
|
-
const cursorRef = (0,
|
|
21521
|
-
const queueRef = (0,
|
|
21522
|
-
const apply = (0,
|
|
21654
|
+
const streamRef = (0, import_react19.useRef)(null);
|
|
21655
|
+
const recorderRef = (0, import_react19.useRef)(null);
|
|
21656
|
+
const chunksRef = (0, import_react19.useRef)([]);
|
|
21657
|
+
const vadRef = (0, import_react19.useRef)(null);
|
|
21658
|
+
const audioRef = (0, import_react19.useRef)(null);
|
|
21659
|
+
const idleTimerRef = (0, import_react19.useRef)(null);
|
|
21660
|
+
const heardSpeechRef = (0, import_react19.useRef)(false);
|
|
21661
|
+
const sawStreamingRef = (0, import_react19.useRef)(false);
|
|
21662
|
+
const cursorRef = (0, import_react19.useRef)(0);
|
|
21663
|
+
const queueRef = (0, import_react19.useRef)([]);
|
|
21664
|
+
const apply = (0, import_react19.useCallback)((event) => {
|
|
21523
21665
|
setPhase((current) => nextPhase(current, event));
|
|
21524
21666
|
}, []);
|
|
21525
21667
|
const clearIdleTimer = () => {
|
|
21526
21668
|
if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
|
|
21527
21669
|
idleTimerRef.current = null;
|
|
21528
21670
|
};
|
|
21529
|
-
const teardownCapture = (0,
|
|
21671
|
+
const teardownCapture = (0, import_react19.useCallback)(() => {
|
|
21530
21672
|
clearIdleTimer();
|
|
21531
21673
|
try {
|
|
21532
21674
|
vadRef.current?.destroy();
|
|
@@ -21543,14 +21685,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21543
21685
|
chunksRef.current = [];
|
|
21544
21686
|
heardSpeechRef.current = false;
|
|
21545
21687
|
}, []);
|
|
21546
|
-
const stopPlayback = (0,
|
|
21688
|
+
const stopPlayback = (0, import_react19.useCallback)(() => {
|
|
21547
21689
|
if (audioRef.current) {
|
|
21548
21690
|
audioRef.current.pause();
|
|
21549
21691
|
audioRef.current.src = "";
|
|
21550
21692
|
audioRef.current = null;
|
|
21551
21693
|
}
|
|
21552
21694
|
}, []);
|
|
21553
|
-
const fail = (0,
|
|
21695
|
+
const fail = (0, import_react19.useCallback)(
|
|
21554
21696
|
(message) => {
|
|
21555
21697
|
teardownCapture();
|
|
21556
21698
|
stopPlayback();
|
|
@@ -21559,7 +21701,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21559
21701
|
},
|
|
21560
21702
|
[apply, teardownCapture, stopPlayback]
|
|
21561
21703
|
);
|
|
21562
|
-
const finishRecording = (0,
|
|
21704
|
+
const finishRecording = (0, import_react19.useCallback)(() => {
|
|
21563
21705
|
const recorder = recorderRef.current;
|
|
21564
21706
|
if (!recorder || recorder.state === "inactive") return;
|
|
21565
21707
|
recorder.onstop = async () => {
|
|
@@ -21588,7 +21730,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21588
21730
|
};
|
|
21589
21731
|
recorder.stop();
|
|
21590
21732
|
}, [apply, fail, teardownCapture]);
|
|
21591
|
-
const startRecording = (0,
|
|
21733
|
+
const startRecording = (0, import_react19.useCallback)(async () => {
|
|
21592
21734
|
setError(null);
|
|
21593
21735
|
chunksRef.current = [];
|
|
21594
21736
|
heardSpeechRef.current = false;
|
|
@@ -21633,7 +21775,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21633
21775
|
fail(`Microphone unavailable: ${err}`);
|
|
21634
21776
|
}
|
|
21635
21777
|
}, [apply, fail, finishRecording, teardownCapture]);
|
|
21636
|
-
const speakReply = (0,
|
|
21778
|
+
const speakReply = (0, import_react19.useCallback)(async () => {
|
|
21637
21779
|
const text = queueRef.current.shift();
|
|
21638
21780
|
if (!text) {
|
|
21639
21781
|
apply({
|
|
@@ -21677,10 +21819,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21677
21819
|
fail(`Synthesis failed: ${err}`);
|
|
21678
21820
|
}
|
|
21679
21821
|
}, [apply, fail]);
|
|
21680
|
-
(0,
|
|
21822
|
+
(0, import_react19.useEffect)(() => {
|
|
21681
21823
|
if (chatStatus === "streaming") sawStreamingRef.current = true;
|
|
21682
21824
|
}, [chatStatus]);
|
|
21683
|
-
(0,
|
|
21825
|
+
(0, import_react19.useEffect)(() => {
|
|
21684
21826
|
if (modeRef.current !== "conversation") return;
|
|
21685
21827
|
if (phaseRef.current === "idle") return;
|
|
21686
21828
|
const { texts, cursor } = takeFinalizedBubbles(items, cursorRef.current);
|
|
@@ -21689,7 +21831,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21689
21831
|
queueRef.current.push(...texts);
|
|
21690
21832
|
apply({ kind: "speechQueued", mode: "conversation", canSpeak });
|
|
21691
21833
|
}, [items, canSpeak, apply]);
|
|
21692
|
-
(0,
|
|
21834
|
+
(0, import_react19.useEffect)(() => {
|
|
21693
21835
|
if (phase !== "awaiting") return;
|
|
21694
21836
|
if (chatStatus === "error") {
|
|
21695
21837
|
apply({ kind: "failed", mode: "conversation" });
|
|
@@ -21711,8 +21853,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21711
21853
|
pendingSpeech: queueRef.current.length
|
|
21712
21854
|
});
|
|
21713
21855
|
}, [phase, chatStatus, pendingConfirmCount, canSpeak, apply]);
|
|
21714
|
-
const prevPhase = (0,
|
|
21715
|
-
(0,
|
|
21856
|
+
const prevPhase = (0, import_react19.useRef)("idle");
|
|
21857
|
+
(0, import_react19.useEffect)(() => {
|
|
21716
21858
|
const from = prevPhase.current;
|
|
21717
21859
|
prevPhase.current = phase;
|
|
21718
21860
|
if (from === phase) return;
|
|
@@ -21724,14 +21866,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21724
21866
|
queueRef.current = [];
|
|
21725
21867
|
}
|
|
21726
21868
|
}, [phase, startRecording, speakReply, teardownCapture, stopPlayback]);
|
|
21727
|
-
(0,
|
|
21869
|
+
(0, import_react19.useEffect)(
|
|
21728
21870
|
() => () => {
|
|
21729
21871
|
teardownCapture();
|
|
21730
21872
|
stopPlayback();
|
|
21731
21873
|
},
|
|
21732
21874
|
[teardownCapture, stopPlayback]
|
|
21733
21875
|
);
|
|
21734
|
-
const toggle = (0,
|
|
21876
|
+
const toggle = (0, import_react19.useCallback)(() => {
|
|
21735
21877
|
if (!available) return;
|
|
21736
21878
|
const current = phaseRef.current;
|
|
21737
21879
|
if (current === "idle") {
|
|
@@ -21745,7 +21887,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21745
21887
|
}
|
|
21746
21888
|
apply({ kind: "userStop", mode: modeRef.current });
|
|
21747
21889
|
}, [available, apply, finishRecording]);
|
|
21748
|
-
const changeMode = (0,
|
|
21890
|
+
const changeMode = (0, import_react19.useCallback)(
|
|
21749
21891
|
(next) => {
|
|
21750
21892
|
apply({ kind: "userStop", mode: modeRef.current });
|
|
21751
21893
|
setMode(next);
|
|
@@ -21756,7 +21898,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21756
21898
|
}
|
|
21757
21899
|
|
|
21758
21900
|
// src/App.tsx
|
|
21759
|
-
var
|
|
21901
|
+
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
21760
21902
|
function closeStreamingAssistant2(items) {
|
|
21761
21903
|
const last = items[items.length - 1];
|
|
21762
21904
|
if (!last || last.kind !== "assistant" || !last.streaming) return items;
|
|
@@ -21918,35 +22060,35 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21918
22060
|
}
|
|
21919
22061
|
}
|
|
21920
22062
|
function App({ postMessage, layout = "compact" }) {
|
|
21921
|
-
const [chatState, dispatch] = (0,
|
|
22063
|
+
const [chatState, dispatch] = (0, import_react20.useReducer)(reducer, {
|
|
21922
22064
|
items: [],
|
|
21923
22065
|
status: "idle",
|
|
21924
22066
|
errorText: null,
|
|
21925
22067
|
pendingConfirms: [],
|
|
21926
22068
|
contextUsage: null
|
|
21927
22069
|
});
|
|
21928
|
-
const [agents, setAgents] = (0,
|
|
21929
|
-
const [sessions, setSessions] = (0,
|
|
21930
|
-
const [selectedAgentId, setSelectedAgentId] = (0,
|
|
21931
|
-
const [selectedSessionId, setSelectedSessionId] = (0,
|
|
21932
|
-
const [showSessions, setShowSessions] = (0,
|
|
21933
|
-
const [showAllAgents, setShowAllAgents] = (0,
|
|
21934
|
-
const [pendingDelete, setPendingDelete] = (0,
|
|
21935
|
-
const [activeScreen, setActiveScreen] = (0,
|
|
21936
|
-
const [settingsData, setSettingsData] = (0,
|
|
21937
|
-
const [modelsResult, setModelsResult] = (0,
|
|
21938
|
-
const [refreshingSourceId, setRefreshingSourceId] = (0,
|
|
21939
|
-
const [refreshOutcome, setRefreshOutcome] = (0,
|
|
21940
|
-
const [mcpAuthOutcome, setMcpAuthOutcome] = (0,
|
|
21941
|
-
const [taskRuns, setTaskRuns] = (0,
|
|
21942
|
-
const [voiceConfig, setVoiceConfig] = (0,
|
|
21943
|
-
const [sttCatalogResult, setSttCatalogResult] = (0,
|
|
21944
|
-
const [ttsCatalogResult, setTtsCatalogResult] = (0,
|
|
21945
|
-
const [composerDraft, setComposerDraft] = (0,
|
|
21946
|
-
(0,
|
|
22070
|
+
const [agents, setAgents] = (0, import_react20.useState)([]);
|
|
22071
|
+
const [sessions, setSessions] = (0, import_react20.useState)([]);
|
|
22072
|
+
const [selectedAgentId, setSelectedAgentId] = (0, import_react20.useState)(null);
|
|
22073
|
+
const [selectedSessionId, setSelectedSessionId] = (0, import_react20.useState)(null);
|
|
22074
|
+
const [showSessions, setShowSessions] = (0, import_react20.useState)(false);
|
|
22075
|
+
const [showAllAgents, setShowAllAgents] = (0, import_react20.useState)(false);
|
|
22076
|
+
const [pendingDelete, setPendingDelete] = (0, import_react20.useState)(null);
|
|
22077
|
+
const [activeScreen, setActiveScreen] = (0, import_react20.useState)("chat");
|
|
22078
|
+
const [settingsData, setSettingsData] = (0, import_react20.useState)(null);
|
|
22079
|
+
const [modelsResult, setModelsResult] = (0, import_react20.useState)(null);
|
|
22080
|
+
const [refreshingSourceId, setRefreshingSourceId] = (0, import_react20.useState)(null);
|
|
22081
|
+
const [refreshOutcome, setRefreshOutcome] = (0, import_react20.useState)(null);
|
|
22082
|
+
const [mcpAuthOutcome, setMcpAuthOutcome] = (0, import_react20.useState)(null);
|
|
22083
|
+
const [taskRuns, setTaskRuns] = (0, import_react20.useState)({});
|
|
22084
|
+
const [voiceConfig, setVoiceConfig] = (0, import_react20.useState)(null);
|
|
22085
|
+
const [sttCatalogResult, setSttCatalogResult] = (0, import_react20.useState)(null);
|
|
22086
|
+
const [ttsCatalogResult, setTtsCatalogResult] = (0, import_react20.useState)(null);
|
|
22087
|
+
const [composerDraft, setComposerDraft] = (0, import_react20.useState)("");
|
|
22088
|
+
(0, import_react20.useEffect)(() => {
|
|
21947
22089
|
postMessage({ type: "webviewReady" });
|
|
21948
22090
|
}, []);
|
|
21949
|
-
(0,
|
|
22091
|
+
(0, import_react20.useEffect)(() => {
|
|
21950
22092
|
function handle(event) {
|
|
21951
22093
|
const msg = event.data;
|
|
21952
22094
|
if (!msg || typeof msg !== "object" || !("type" in msg)) return;
|
|
@@ -22054,15 +22196,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22054
22196
|
if (voice2) msg.voice = true;
|
|
22055
22197
|
postMessage(msg);
|
|
22056
22198
|
};
|
|
22057
|
-
const onConfirm = (0,
|
|
22199
|
+
const onConfirm = (0, import_react20.useCallback)((id, decision) => {
|
|
22058
22200
|
dispatch({ kind: "permission-resolved", id });
|
|
22059
22201
|
postMessage({ type: "permission_response", id, decision });
|
|
22060
22202
|
}, [postMessage]);
|
|
22061
22203
|
const onAbort = () => {
|
|
22062
22204
|
postMessage({ type: "abort" });
|
|
22063
22205
|
};
|
|
22064
|
-
const confirmCards = (0,
|
|
22065
|
-
() => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0,
|
|
22206
|
+
const confirmCards = (0, import_react20.useMemo)(
|
|
22207
|
+
() => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ConfirmCard, { pending: p, onDecide: onConfirm }, p.id)),
|
|
22066
22208
|
[chatState.pendingConfirms, onConfirm]
|
|
22067
22209
|
);
|
|
22068
22210
|
const onSelectAgent = (agentId) => {
|
|
@@ -22102,7 +22244,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22102
22244
|
const cancelDeleteSession = () => {
|
|
22103
22245
|
setPendingDelete(null);
|
|
22104
22246
|
};
|
|
22105
|
-
(0,
|
|
22247
|
+
(0, import_react20.useEffect)(() => {
|
|
22106
22248
|
if (!pendingDelete) return;
|
|
22107
22249
|
function handleKeyDown(event) {
|
|
22108
22250
|
if (event.key === "Escape") {
|
|
@@ -22117,7 +22259,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22117
22259
|
setShowSessions(!showSessions);
|
|
22118
22260
|
}
|
|
22119
22261
|
};
|
|
22120
|
-
(0,
|
|
22262
|
+
(0, import_react20.useEffect)(() => {
|
|
22121
22263
|
function handleClickOutside(event) {
|
|
22122
22264
|
const target = event.target;
|
|
22123
22265
|
if (showSessions && !target.closest(".app__sessions-dropdown")) {
|
|
@@ -22131,18 +22273,18 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22131
22273
|
const selectedAgentName = agents.find((a) => a.id === selectedAgentId)?.name;
|
|
22132
22274
|
const activeAgent = agents.find((a) => a.id === selectedAgentId);
|
|
22133
22275
|
if (activeScreen === "projects" && layout === "sidebar") {
|
|
22134
|
-
return /* @__PURE__ */ (0,
|
|
22135
|
-
/* @__PURE__ */ (0,
|
|
22136
|
-
/* @__PURE__ */ (0,
|
|
22137
|
-
/* @__PURE__ */ (0,
|
|
22138
|
-
/* @__PURE__ */ (0,
|
|
22276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app", style: { height: "100%" }, children: [
|
|
22277
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__header-row", children: [
|
|
22278
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__logo-title-wrapper", onClick: () => setActiveScreen("chat"), style: { cursor: "pointer" }, children: [
|
|
22279
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
|
|
22280
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Caretaker" })
|
|
22139
22281
|
] }),
|
|
22140
|
-
/* @__PURE__ */ (0,
|
|
22141
|
-
/* @__PURE__ */ (0,
|
|
22142
|
-
/* @__PURE__ */ (0,
|
|
22282
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__controls", children: [
|
|
22283
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "app__sessions-btn", onClick: () => setActiveScreen("chat"), children: [
|
|
22284
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageSquare, { size: 13 }),
|
|
22143
22285
|
" Chat"
|
|
22144
22286
|
] }),
|
|
22145
|
-
/* @__PURE__ */ (0,
|
|
22287
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22146
22288
|
"button",
|
|
22147
22289
|
{
|
|
22148
22290
|
className: "app__settings-btn",
|
|
@@ -22152,18 +22294,18 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22152
22294
|
},
|
|
22153
22295
|
title: "Caretaker Settings",
|
|
22154
22296
|
children: [
|
|
22155
|
-
/* @__PURE__ */ (0,
|
|
22297
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Settings, { size: 13 }),
|
|
22156
22298
|
" Settings"
|
|
22157
22299
|
]
|
|
22158
22300
|
}
|
|
22159
22301
|
)
|
|
22160
22302
|
] })
|
|
22161
22303
|
] }) }),
|
|
22162
|
-
/* @__PURE__ */ (0,
|
|
22304
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ProjectsTab, { agents }) })
|
|
22163
22305
|
] });
|
|
22164
22306
|
}
|
|
22165
22307
|
if (activeScreen === "settings") {
|
|
22166
|
-
return /* @__PURE__ */ (0,
|
|
22308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: `app ${layout === "sidebar" ? "app--settings-centered" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22167
22309
|
SettingsPanel,
|
|
22168
22310
|
{
|
|
22169
22311
|
layout,
|
|
@@ -22183,43 +22325,43 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22183
22325
|
}
|
|
22184
22326
|
) });
|
|
22185
22327
|
}
|
|
22186
|
-
const deleteOverlay = pendingDelete && /* @__PURE__ */ (0,
|
|
22187
|
-
/* @__PURE__ */ (0,
|
|
22188
|
-
/* @__PURE__ */ (0,
|
|
22328
|
+
const deleteOverlay = pendingDelete && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__confirm-overlay", onClick: cancelDeleteSession, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__confirm-dialog", onClick: (e) => e.stopPropagation(), children: [
|
|
22329
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__confirm-title", children: "Delete conversation" }),
|
|
22330
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "app__confirm-message", children: [
|
|
22189
22331
|
"Delete conversation \u201C",
|
|
22190
22332
|
pendingDelete.title,
|
|
22191
22333
|
"\u201D? This cannot be undone."
|
|
22192
22334
|
] }),
|
|
22193
|
-
/* @__PURE__ */ (0,
|
|
22194
|
-
/* @__PURE__ */ (0,
|
|
22195
|
-
/* @__PURE__ */ (0,
|
|
22335
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__confirm-buttons", children: [
|
|
22336
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "app__confirm-btn", onClick: cancelDeleteSession, children: "Cancel" }),
|
|
22337
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "app__confirm-btn app__confirm-btn--danger", onClick: confirmDeleteSession, children: "Delete" })
|
|
22196
22338
|
] })
|
|
22197
22339
|
] }) });
|
|
22198
22340
|
if (layout === "sidebar") {
|
|
22199
|
-
return /* @__PURE__ */ (0,
|
|
22200
|
-
/* @__PURE__ */ (0,
|
|
22201
|
-
/* @__PURE__ */ (0,
|
|
22202
|
-
/* @__PURE__ */ (0,
|
|
22203
|
-
/* @__PURE__ */ (0,
|
|
22341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app app--with-sidebar", children: [
|
|
22342
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("aside", { className: "app__sidebar", children: [
|
|
22343
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-header", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__logo-title-wrapper", children: [
|
|
22344
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
|
|
22345
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Caretaker" })
|
|
22204
22346
|
] }) }),
|
|
22205
|
-
/* @__PURE__ */ (0,
|
|
22206
|
-
/* @__PURE__ */ (0,
|
|
22207
|
-
/* @__PURE__ */ (0,
|
|
22208
|
-
/* @__PURE__ */ (0,
|
|
22347
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-content", children: [
|
|
22348
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-section", children: [
|
|
22349
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-section-title", children: "Agents" }),
|
|
22350
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-agents-list", children: selectedAgentId && !showAllAgents ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22209
22351
|
"button",
|
|
22210
22352
|
{
|
|
22211
22353
|
className: "app__sidebar-agent-item app__sidebar-agent-item--collapsed-active",
|
|
22212
22354
|
onClick: () => setShowAllAgents(true),
|
|
22213
22355
|
title: "Switch Agent",
|
|
22214
22356
|
children: [
|
|
22215
|
-
/* @__PURE__ */ (0,
|
|
22216
|
-
/* @__PURE__ */ (0,
|
|
22217
|
-
/* @__PURE__ */ (0,
|
|
22357
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "agent-status-dot agent-status-dot--active" }),
|
|
22358
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-agent-name", children: activeAgent?.name || selectedAgentId }),
|
|
22359
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronDown, { className: "app__sidebar-chevron", size: 10 })
|
|
22218
22360
|
]
|
|
22219
22361
|
}
|
|
22220
|
-
) : /* @__PURE__ */ (0,
|
|
22362
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: `app__sidebar-agents-list-expanded ${selectedAgentId ? "app__sidebar-agents-list-expanded--has-active" : ""}`, children: agents.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-empty-text", children: "No agents found" }) : agents.map((agent) => {
|
|
22221
22363
|
const isSelected = selectedAgentId === agent.id;
|
|
22222
|
-
return /* @__PURE__ */ (0,
|
|
22364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22223
22365
|
"button",
|
|
22224
22366
|
{
|
|
22225
22367
|
className: `app__sidebar-agent-item ${isSelected ? "app__sidebar-agent-item--active" : ""}`,
|
|
@@ -22231,19 +22373,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22231
22373
|
}
|
|
22232
22374
|
},
|
|
22233
22375
|
children: [
|
|
22234
|
-
/* @__PURE__ */ (0,
|
|
22235
|
-
/* @__PURE__ */ (0,
|
|
22236
|
-
isSelected && /* @__PURE__ */ (0,
|
|
22376
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: `agent-status-dot ${isSelected ? "agent-status-dot--active" : ""}` }),
|
|
22377
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-agent-name", children: agent.name }),
|
|
22378
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronUp, { className: "app__sidebar-chevron app__sidebar-chevron--up", size: 10 })
|
|
22237
22379
|
]
|
|
22238
22380
|
},
|
|
22239
22381
|
agent.id
|
|
22240
22382
|
);
|
|
22241
22383
|
}) }) })
|
|
22242
22384
|
] }),
|
|
22243
|
-
selectedAgentId && /* @__PURE__ */ (0,
|
|
22244
|
-
/* @__PURE__ */ (0,
|
|
22245
|
-
/* @__PURE__ */ (0,
|
|
22246
|
-
/* @__PURE__ */ (0,
|
|
22385
|
+
selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-section", children: [
|
|
22386
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-section-header", children: [
|
|
22387
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-section-title", children: "Conversations" }),
|
|
22388
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22247
22389
|
"button",
|
|
22248
22390
|
{
|
|
22249
22391
|
className: "app__sidebar-new-chat-btn",
|
|
@@ -22253,15 +22395,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22253
22395
|
}
|
|
22254
22396
|
)
|
|
22255
22397
|
] }),
|
|
22256
|
-
/* @__PURE__ */ (0,
|
|
22398
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-sessions-list", children: sessions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-empty-text", children: "No conversations yet" }) : sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22257
22399
|
"div",
|
|
22258
22400
|
{
|
|
22259
22401
|
className: `app__sidebar-session-item ${selectedSessionId === session.id ? "app__sidebar-session-item--active" : ""}`,
|
|
22260
22402
|
onClick: () => onSelectSession(session.id),
|
|
22261
22403
|
children: [
|
|
22262
|
-
/* @__PURE__ */ (0,
|
|
22263
|
-
/* @__PURE__ */ (0,
|
|
22264
|
-
/* @__PURE__ */ (0,
|
|
22404
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-session-icon", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageSquare, { size: 13 }) }),
|
|
22405
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-session-title", title: session.title, children: session.title }),
|
|
22406
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22265
22407
|
"button",
|
|
22266
22408
|
{
|
|
22267
22409
|
className: "app__sidebar-session-delete",
|
|
@@ -22270,7 +22412,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22270
22412
|
e.stopPropagation();
|
|
22271
22413
|
onDeleteSession(session.id, session.title);
|
|
22272
22414
|
},
|
|
22273
|
-
children: /* @__PURE__ */ (0,
|
|
22415
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Trash2, { size: 12 })
|
|
22274
22416
|
}
|
|
22275
22417
|
)
|
|
22276
22418
|
]
|
|
@@ -22279,8 +22421,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22279
22421
|
)) })
|
|
22280
22422
|
] })
|
|
22281
22423
|
] }),
|
|
22282
|
-
/* @__PURE__ */ (0,
|
|
22283
|
-
/* @__PURE__ */ (0,
|
|
22424
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-footer", style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
22425
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22284
22426
|
"button",
|
|
22285
22427
|
{
|
|
22286
22428
|
className: "app__sidebar-settings-btn",
|
|
@@ -22288,13 +22430,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22288
22430
|
setActiveScreen("projects");
|
|
22289
22431
|
},
|
|
22290
22432
|
title: "Projects & Autonomous Tasks",
|
|
22291
|
-
children: /* @__PURE__ */ (0,
|
|
22292
|
-
/* @__PURE__ */ (0,
|
|
22433
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
|
|
22434
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FolderKanban, { size: 13 }),
|
|
22293
22435
|
" Projects"
|
|
22294
22436
|
] })
|
|
22295
22437
|
}
|
|
22296
22438
|
),
|
|
22297
|
-
/* @__PURE__ */ (0,
|
|
22439
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22298
22440
|
"button",
|
|
22299
22441
|
{
|
|
22300
22442
|
className: "app__sidebar-settings-btn",
|
|
@@ -22304,22 +22446,22 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22304
22446
|
},
|
|
22305
22447
|
title: "Caretaker Settings",
|
|
22306
22448
|
children: [
|
|
22307
|
-
/* @__PURE__ */ (0,
|
|
22308
|
-
/* @__PURE__ */ (0,
|
|
22449
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Settings, { className: "app__settings-icon", size: 14 }),
|
|
22450
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Settings" })
|
|
22309
22451
|
]
|
|
22310
22452
|
}
|
|
22311
22453
|
)
|
|
22312
22454
|
] })
|
|
22313
22455
|
] }),
|
|
22314
|
-
/* @__PURE__ */ (0,
|
|
22315
|
-
/* @__PURE__ */ (0,
|
|
22316
|
-
/* @__PURE__ */ (0,
|
|
22317
|
-
/* @__PURE__ */ (0,
|
|
22318
|
-
/* @__PURE__ */ (0,
|
|
22456
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("main", { className: "app__chat-pane", children: selectedAgentId ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
22457
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("header", { className: "app__chat-header", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__chat-header-info", children: [
|
|
22458
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { className: "app__chat-header-title", children: selectedAgentName }),
|
|
22459
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "app__chat-header-status", children: [
|
|
22460
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: `agent-status-dot agent-status-dot--active ${chatState.status === "streaming" ? "agent-status-dot--pulsing" : ""}` }),
|
|
22319
22461
|
chatState.status === "streaming" ? "Streaming response..." : "Ready"
|
|
22320
22462
|
] })
|
|
22321
22463
|
] }) }),
|
|
22322
|
-
/* @__PURE__ */ (0,
|
|
22464
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22323
22465
|
MessageList,
|
|
22324
22466
|
{
|
|
22325
22467
|
items: chatState.items,
|
|
@@ -22329,12 +22471,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22329
22471
|
trailing: confirmCards
|
|
22330
22472
|
}
|
|
22331
22473
|
),
|
|
22332
|
-
(chatState.errorText || voice.error) && /* @__PURE__ */ (0,
|
|
22333
|
-
/* @__PURE__ */ (0,
|
|
22474
|
+
(chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__error", children: [
|
|
22475
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TriangleAlert, { size: 14 }),
|
|
22334
22476
|
" ",
|
|
22335
22477
|
chatState.errorText || voice.error
|
|
22336
22478
|
] }),
|
|
22337
|
-
/* @__PURE__ */ (0,
|
|
22479
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22338
22480
|
Composer,
|
|
22339
22481
|
{
|
|
22340
22482
|
disabled: composerDisabled,
|
|
@@ -22353,30 +22495,30 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22353
22495
|
onValueChange: setComposerDraft
|
|
22354
22496
|
}
|
|
22355
22497
|
)
|
|
22356
|
-
] }) : /* @__PURE__ */ (0,
|
|
22498
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Select an agent from the sidebar to start chatting" }) }) }),
|
|
22357
22499
|
deleteOverlay
|
|
22358
22500
|
] });
|
|
22359
22501
|
}
|
|
22360
|
-
return /* @__PURE__ */ (0,
|
|
22361
|
-
/* @__PURE__ */ (0,
|
|
22362
|
-
/* @__PURE__ */ (0,
|
|
22363
|
-
/* @__PURE__ */ (0,
|
|
22364
|
-
/* @__PURE__ */ (0,
|
|
22502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app", children: [
|
|
22503
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__header-row", children: [
|
|
22504
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__logo-title-wrapper", children: [
|
|
22505
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
|
|
22506
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Caretaker" })
|
|
22365
22507
|
] }),
|
|
22366
|
-
/* @__PURE__ */ (0,
|
|
22367
|
-
/* @__PURE__ */ (0,
|
|
22508
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__controls", children: [
|
|
22509
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__agent-select-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22368
22510
|
"select",
|
|
22369
22511
|
{
|
|
22370
22512
|
className: "app__agent-select",
|
|
22371
22513
|
value: selectedAgentId ?? "",
|
|
22372
22514
|
onChange: (e) => onSelectAgent(e.target.value),
|
|
22373
22515
|
children: [
|
|
22374
|
-
/* @__PURE__ */ (0,
|
|
22375
|
-
agents.map((agent) => /* @__PURE__ */ (0,
|
|
22516
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
|
|
22517
|
+
agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
|
|
22376
22518
|
]
|
|
22377
22519
|
}
|
|
22378
22520
|
) }),
|
|
22379
|
-
/* @__PURE__ */ (0,
|
|
22521
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22380
22522
|
"button",
|
|
22381
22523
|
{
|
|
22382
22524
|
className: "app__sessions-btn",
|
|
@@ -22384,13 +22526,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22384
22526
|
disabled: !selectedAgentId,
|
|
22385
22527
|
title: "View conversations",
|
|
22386
22528
|
children: [
|
|
22387
|
-
/* @__PURE__ */ (0,
|
|
22529
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageSquare, { size: 13 }),
|
|
22388
22530
|
" ",
|
|
22389
22531
|
sessions.length
|
|
22390
22532
|
]
|
|
22391
22533
|
}
|
|
22392
22534
|
),
|
|
22393
|
-
/* @__PURE__ */ (0,
|
|
22535
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22394
22536
|
"button",
|
|
22395
22537
|
{
|
|
22396
22538
|
className: "app__new-chat-btn",
|
|
@@ -22400,7 +22542,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22400
22542
|
children: "+ New"
|
|
22401
22543
|
}
|
|
22402
22544
|
),
|
|
22403
|
-
/* @__PURE__ */ (0,
|
|
22545
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22404
22546
|
"button",
|
|
22405
22547
|
{
|
|
22406
22548
|
className: "app__settings-btn",
|
|
@@ -22409,24 +22551,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22409
22551
|
postMessage({ type: "getSettingsData" });
|
|
22410
22552
|
},
|
|
22411
22553
|
title: "Caretaker Settings",
|
|
22412
|
-
children: /* @__PURE__ */ (0,
|
|
22554
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Settings, { className: "app__settings-icon", size: 14 })
|
|
22413
22555
|
}
|
|
22414
22556
|
)
|
|
22415
22557
|
] })
|
|
22416
22558
|
] }) }),
|
|
22417
|
-
showSessions && sessions.length > 0 && /* @__PURE__ */ (0,
|
|
22418
|
-
/* @__PURE__ */ (0,
|
|
22559
|
+
showSessions && sessions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sessions-dropdown", children: [
|
|
22560
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sessions-title", children: [
|
|
22419
22561
|
"Conversations for ",
|
|
22420
22562
|
selectedAgentName
|
|
22421
22563
|
] }),
|
|
22422
|
-
/* @__PURE__ */ (0,
|
|
22564
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sessions-list", children: sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22423
22565
|
"div",
|
|
22424
22566
|
{
|
|
22425
22567
|
className: `app__session-item ${selectedSessionId === session.id ? "app__session-item--active" : ""}`,
|
|
22426
22568
|
onClick: () => onSelectSession(session.id),
|
|
22427
22569
|
children: [
|
|
22428
|
-
/* @__PURE__ */ (0,
|
|
22429
|
-
/* @__PURE__ */ (0,
|
|
22570
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__session-item-title", children: session.title }),
|
|
22571
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22430
22572
|
"button",
|
|
22431
22573
|
{
|
|
22432
22574
|
className: "app__session-item-delete",
|
|
@@ -22435,7 +22577,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22435
22577
|
e.stopPropagation();
|
|
22436
22578
|
onDeleteSession(session.id, session.title);
|
|
22437
22579
|
},
|
|
22438
|
-
children: /* @__PURE__ */ (0,
|
|
22580
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Trash2, { size: 12 })
|
|
22439
22581
|
}
|
|
22440
22582
|
)
|
|
22441
22583
|
]
|
|
@@ -22443,12 +22585,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22443
22585
|
session.id
|
|
22444
22586
|
)) })
|
|
22445
22587
|
] }),
|
|
22446
|
-
showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0,
|
|
22447
|
-
/* @__PURE__ */ (0,
|
|
22448
|
-
/* @__PURE__ */ (0,
|
|
22588
|
+
showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sessions-dropdown app__sessions-dropdown--empty", children: [
|
|
22589
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sessions-title", children: "No conversations yet" }),
|
|
22590
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "app__sessions-empty", children: "Start a new chat to create a conversation" })
|
|
22449
22591
|
] }),
|
|
22450
|
-
!selectedAgentId && /* @__PURE__ */ (0,
|
|
22451
|
-
/* @__PURE__ */ (0,
|
|
22592
|
+
!selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__empty-state", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "Select an agent to start chatting" }) }),
|
|
22593
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22452
22594
|
MessageList,
|
|
22453
22595
|
{
|
|
22454
22596
|
items: chatState.items,
|
|
@@ -22458,12 +22600,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22458
22600
|
trailing: confirmCards
|
|
22459
22601
|
}
|
|
22460
22602
|
),
|
|
22461
|
-
(chatState.errorText || voice.error) && /* @__PURE__ */ (0,
|
|
22462
|
-
/* @__PURE__ */ (0,
|
|
22603
|
+
(chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__error", children: [
|
|
22604
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TriangleAlert, { size: 14 }),
|
|
22463
22605
|
" ",
|
|
22464
22606
|
chatState.errorText || voice.error
|
|
22465
22607
|
] }),
|
|
22466
|
-
/* @__PURE__ */ (0,
|
|
22608
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22467
22609
|
Composer,
|
|
22468
22610
|
{
|
|
22469
22611
|
disabled: composerDisabled,
|
|
@@ -22487,12 +22629,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22487
22629
|
}
|
|
22488
22630
|
|
|
22489
22631
|
// src/standalone.tsx
|
|
22490
|
-
var
|
|
22632
|
+
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
22491
22633
|
function StandaloneApp() {
|
|
22492
|
-
const [ws, setWs] = (0,
|
|
22493
|
-
const [connected, setConnected] = (0,
|
|
22494
|
-
const [error, setError] = (0,
|
|
22495
|
-
(0,
|
|
22634
|
+
const [ws, setWs] = (0, import_react21.useState)(null);
|
|
22635
|
+
const [connected, setConnected] = (0, import_react21.useState)(false);
|
|
22636
|
+
const [error, setError] = (0, import_react21.useState)(null);
|
|
22637
|
+
(0, import_react21.useEffect)(() => {
|
|
22496
22638
|
let active = true;
|
|
22497
22639
|
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
|
22498
22640
|
const socket = new WebSocket(`${protocol}//${window.location.host}/api/ws`);
|
|
@@ -22538,7 +22680,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22538
22680
|
}
|
|
22539
22681
|
};
|
|
22540
22682
|
if (error) {
|
|
22541
|
-
return /* @__PURE__ */ (0,
|
|
22683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: {
|
|
22542
22684
|
display: "flex",
|
|
22543
22685
|
flexDirection: "column",
|
|
22544
22686
|
alignItems: "center",
|
|
@@ -22550,9 +22692,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22550
22692
|
padding: "20px",
|
|
22551
22693
|
textAlign: "center"
|
|
22552
22694
|
}, children: [
|
|
22553
|
-
/* @__PURE__ */ (0,
|
|
22554
|
-
/* @__PURE__ */ (0,
|
|
22555
|
-
/* @__PURE__ */ (0,
|
|
22695
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { style: { color: "#ff6b6b" }, children: "Caretaker Connection Failed" }),
|
|
22696
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: error }),
|
|
22697
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
22556
22698
|
"button",
|
|
22557
22699
|
{
|
|
22558
22700
|
onClick: () => setWs(null),
|
|
@@ -22571,7 +22713,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22571
22713
|
] });
|
|
22572
22714
|
}
|
|
22573
22715
|
if (!connected) {
|
|
22574
|
-
return /* @__PURE__ */ (0,
|
|
22716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: {
|
|
22575
22717
|
display: "flex",
|
|
22576
22718
|
flexDirection: "column",
|
|
22577
22719
|
alignItems: "center",
|
|
@@ -22581,7 +22723,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22581
22723
|
background: "#1e1e1e",
|
|
22582
22724
|
color: "#f1f1f1"
|
|
22583
22725
|
}, children: [
|
|
22584
|
-
/* @__PURE__ */ (0,
|
|
22726
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: {
|
|
22585
22727
|
border: "4px solid rgba(255,255,255,0.1)",
|
|
22586
22728
|
width: "36px",
|
|
22587
22729
|
height: "36px",
|
|
@@ -22590,8 +22732,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22590
22732
|
animation: "spin 1s linear infinite",
|
|
22591
22733
|
marginBottom: "16px"
|
|
22592
22734
|
} }),
|
|
22593
|
-
/* @__PURE__ */ (0,
|
|
22594
|
-
/* @__PURE__ */ (0,
|
|
22735
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Connecting to Caretaker server..." }),
|
|
22736
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("style", { children: `
|
|
22595
22737
|
@keyframes spin {
|
|
22596
22738
|
0% { transform: rotate(0deg); }
|
|
22597
22739
|
100% { transform: rotate(360deg); }
|
|
@@ -22599,12 +22741,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22599
22741
|
` })
|
|
22600
22742
|
] });
|
|
22601
22743
|
}
|
|
22602
|
-
return /* @__PURE__ */ (0,
|
|
22744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(App, { postMessage, layout: "sidebar" });
|
|
22603
22745
|
}
|
|
22604
22746
|
var rootEl = document.getElementById("root");
|
|
22605
22747
|
if (!rootEl) throw new Error("#root not found");
|
|
22606
22748
|
(0, import_client.createRoot)(rootEl).render(
|
|
22607
|
-
/* @__PURE__ */ (0,
|
|
22749
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StandaloneApp, {}) })
|
|
22608
22750
|
);
|
|
22609
22751
|
})();
|
|
22610
22752
|
/*! Bundled license information:
|