@hyperwindmill/caretaker-cli 0.23.0 → 0.25.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/acp/index.d.ts +3 -0
- package/dist/acp/index.d.ts.map +1 -0
- package/dist/acp/index.js +2 -0
- package/dist/acp/install.d.ts +12 -0
- package/dist/acp/install.d.ts.map +1 -0
- package/dist/acp/install.js +110 -0
- package/dist/acp/registry.d.ts +10 -0
- package/dist/acp/registry.d.ts.map +1 -0
- package/dist/acp/registry.js +116 -0
- package/dist/cli/web/mcp_bridge.d.ts +7 -1
- package/dist/cli/web/mcp_bridge.d.ts.map +1 -1
- package/dist/cli/web/mcp_bridge.js +10 -6
- 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 +330 -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 +26 -0
- package/dist/cli/web/scheduler/task_roles.d.ts +1 -1
- package/dist/cli/web/scheduler/task_roles.d.ts.map +1 -1
- package/dist/cli/web/scheduler/task_roles.js +6 -6
- package/dist/cli/web/scheduler/task_strategy.d.ts.map +1 -1
- package/dist/cli/web/scheduler/task_strategy.js +27 -2
- 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 +1 -1
- package/dist/cli/web/server.d.ts.map +1 -1
- package/dist/cli/web/server.js +33 -6
- package/dist/harness/acp_policy.d.ts +41 -0
- package/dist/harness/acp_policy.d.ts.map +1 -0
- package/dist/harness/acp_policy.js +59 -0
- package/dist/harness/acp_pool.d.ts +33 -0
- package/dist/harness/acp_pool.d.ts.map +1 -0
- package/dist/harness/acp_pool.js +148 -0
- package/dist/harness/acp_runner.d.ts +4 -0
- package/dist/harness/acp_runner.d.ts.map +1 -0
- package/dist/harness/acp_runner.js +347 -0
- package/dist/harness/claude_code_runner.d.ts +2 -0
- package/dist/harness/claude_code_runner.d.ts.map +1 -1
- package/dist/harness/claude_code_runner.js +6 -1
- package/dist/harness/confirm_gate.d.ts +12 -0
- package/dist/harness/confirm_gate.d.ts.map +1 -0
- package/dist/harness/confirm_gate.js +33 -0
- package/dist/harness/index.d.ts +1 -0
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +1 -0
- package/dist/harness/loop.d.ts +12 -0
- package/dist/harness/loop.d.ts.map +1 -1
- package/dist/harness/loop.js +16 -0
- package/dist/harness/memory_recall.d.ts +28 -0
- package/dist/harness/memory_recall.d.ts.map +1 -0
- package/dist/harness/memory_recall.js +74 -0
- package/dist/harness/title.js +1 -1
- 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 +2 -0
- package/dist/mcp/builtin_server.d.ts.map +1 -1
- package/dist/mcp/builtin_server.js +9 -7
- package/dist/mcp/run_command_tool.d.ts +13 -0
- package/dist/mcp/run_command_tool.d.ts.map +1 -0
- package/dist/mcp/run_command_tool.js +51 -0
- package/dist/session/store.d.ts +1 -0
- package/dist/session/store.d.ts.map +1 -1
- package/dist/session/store.js +6 -0
- package/dist/session/types.d.ts +3 -0
- package/dist/session/types.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/tui/agents.js +62 -25
- package/dist/tui/chat.d.ts.map +1 -1
- package/dist/tui/chat.js +7 -8
- package/dist/tui/providers.d.ts.map +1 -1
- package/dist/tui/providers.js +116 -17
- package/dist/webview/standalone.css +18 -0
- package/dist/webview/standalone.css.map +2 -2
- package/dist/webview/standalone.js +792 -440
- package/dist/webview/standalone.js.map +4 -4
- package/package.json +8 -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,12 +15911,20 @@ ${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);
|
|
15918
15918
|
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
15919
|
-
function ProvidersTab({
|
|
15919
|
+
function ProvidersTab({
|
|
15920
|
+
config,
|
|
15921
|
+
agents,
|
|
15922
|
+
postMessage,
|
|
15923
|
+
acpRegistry = null,
|
|
15924
|
+
acpInstall = null,
|
|
15925
|
+
resetAcpInstall = () => {
|
|
15926
|
+
}
|
|
15927
|
+
}) {
|
|
15920
15928
|
const [editingProvider, setEditingProvider] = (0, import_react6.useState)(null);
|
|
15921
15929
|
const [isCreating, setIsCreating] = (0, import_react6.useState)(false);
|
|
15922
15930
|
const [name, setName] = (0, import_react6.useState)("");
|
|
@@ -15924,7 +15932,50 @@ ${text}</tr>
|
|
|
15924
15932
|
const [endpoint, setEndpoint] = (0, import_react6.useState)("");
|
|
15925
15933
|
const [apiKey, setApiKey] = (0, import_react6.useState)("");
|
|
15926
15934
|
const [command, setCommand] = (0, import_react6.useState)("");
|
|
15935
|
+
const [args, setArgs] = (0, import_react6.useState)("");
|
|
15936
|
+
const [presetId, setPresetId] = (0, import_react6.useState)("custom");
|
|
15937
|
+
const [selfLoaded, setSelfLoaded] = (0, import_react6.useState)([]);
|
|
15938
|
+
const [presetEnv, setPresetEnv] = (0, import_react6.useState)(void 0);
|
|
15939
|
+
const [installing, setInstalling] = (0, import_react6.useState)(false);
|
|
15927
15940
|
const [errorMsg, setErrorMsg] = (0, import_react6.useState)(null);
|
|
15941
|
+
const selectedPreset = acpRegistry?.ok ? acpRegistry.agents.find((a) => a.id === presetId) : null;
|
|
15942
|
+
(0, import_react6.useEffect)(() => {
|
|
15943
|
+
if (type === "acp" && acpRegistry === null) {
|
|
15944
|
+
postMessage({ type: "fetchAcpRegistry" });
|
|
15945
|
+
}
|
|
15946
|
+
}, [type, acpRegistry, postMessage]);
|
|
15947
|
+
(0, import_react6.useEffect)(() => {
|
|
15948
|
+
if (acpInstall?.agentId === presetId && acpInstall.result) {
|
|
15949
|
+
if (acpInstall.result.ok) {
|
|
15950
|
+
if (acpInstall.result.command) setCommand(acpInstall.result.command);
|
|
15951
|
+
setArgs((acpInstall.result.args ?? []).join(" "));
|
|
15952
|
+
if (acpInstall.result.env) setPresetEnv(acpInstall.result.env);
|
|
15953
|
+
setInstalling(false);
|
|
15954
|
+
} else {
|
|
15955
|
+
setErrorMsg(acpInstall.result.error || "Installation failed");
|
|
15956
|
+
setInstalling(false);
|
|
15957
|
+
}
|
|
15958
|
+
}
|
|
15959
|
+
}, [acpInstall, presetId]);
|
|
15960
|
+
const applyPreset = (id) => {
|
|
15961
|
+
setPresetId(id);
|
|
15962
|
+
if (id === "custom") {
|
|
15963
|
+
setSelfLoaded([]);
|
|
15964
|
+
setPresetEnv(void 0);
|
|
15965
|
+
return;
|
|
15966
|
+
}
|
|
15967
|
+
const preset = acpRegistry?.ok ? acpRegistry.agents.find((a) => a.id === id) : null;
|
|
15968
|
+
if (!preset || !preset.dist) return;
|
|
15969
|
+
setSelfLoaded(preset.selfLoadedContextFiles);
|
|
15970
|
+
setPresetEnv(preset.dist.env);
|
|
15971
|
+
if (preset.dist.kind === "binary") {
|
|
15972
|
+
setCommand("");
|
|
15973
|
+
setArgs("");
|
|
15974
|
+
} else {
|
|
15975
|
+
setCommand(preset.dist.command);
|
|
15976
|
+
setArgs(preset.dist.args.join(" "));
|
|
15977
|
+
}
|
|
15978
|
+
};
|
|
15928
15979
|
const startEdit = (provider) => {
|
|
15929
15980
|
setEditingProvider(provider);
|
|
15930
15981
|
setIsCreating(false);
|
|
@@ -15933,6 +15984,11 @@ ${text}</tr>
|
|
|
15933
15984
|
setEndpoint(provider.endpoint);
|
|
15934
15985
|
setApiKey(provider.apiKey || "");
|
|
15935
15986
|
setCommand(provider.command || "");
|
|
15987
|
+
setArgs((provider.args ?? []).join(" "));
|
|
15988
|
+
setPresetId("custom");
|
|
15989
|
+
setSelfLoaded(provider.selfLoadedContextFiles ?? []);
|
|
15990
|
+
setPresetEnv(provider.env);
|
|
15991
|
+
setInstalling(false);
|
|
15936
15992
|
setErrorMsg(null);
|
|
15937
15993
|
};
|
|
15938
15994
|
const startCreate = () => {
|
|
@@ -15943,11 +15999,20 @@ ${text}</tr>
|
|
|
15943
15999
|
setEndpoint("");
|
|
15944
16000
|
setApiKey("");
|
|
15945
16001
|
setCommand("");
|
|
16002
|
+
setArgs("");
|
|
16003
|
+
setPresetId("custom");
|
|
16004
|
+
setSelfLoaded([]);
|
|
16005
|
+
setPresetEnv(void 0);
|
|
16006
|
+
setInstalling(false);
|
|
15946
16007
|
setErrorMsg(null);
|
|
15947
16008
|
};
|
|
15948
16009
|
const cancelForm = () => {
|
|
15949
16010
|
setIsCreating(false);
|
|
15950
16011
|
setEditingProvider(null);
|
|
16012
|
+
setPresetId("custom");
|
|
16013
|
+
setSelfLoaded([]);
|
|
16014
|
+
setPresetEnv(void 0);
|
|
16015
|
+
setInstalling(false);
|
|
15951
16016
|
setErrorMsg(null);
|
|
15952
16017
|
};
|
|
15953
16018
|
const validateAndSave = () => {
|
|
@@ -15956,11 +16021,17 @@ ${text}</tr>
|
|
|
15956
16021
|
const trimmedApiKey = apiKey.trim();
|
|
15957
16022
|
const trimmedCommand = command.trim();
|
|
15958
16023
|
const isClaudeCode = type === "claude-code";
|
|
16024
|
+
const isAcp = type === "acp";
|
|
15959
16025
|
if (!trimmedName) {
|
|
15960
16026
|
setErrorMsg("Name is required.");
|
|
15961
16027
|
return;
|
|
15962
16028
|
}
|
|
15963
|
-
if (
|
|
16029
|
+
if (isAcp) {
|
|
16030
|
+
if (!trimmedCommand) {
|
|
16031
|
+
setErrorMsg("Command is required for ACP agents (e.g. npx or binary path).");
|
|
16032
|
+
return;
|
|
16033
|
+
}
|
|
16034
|
+
} else if (!isClaudeCode) {
|
|
15964
16035
|
if (!trimmedEndpoint) {
|
|
15965
16036
|
setErrorMsg("Endpoint is required.");
|
|
15966
16037
|
return;
|
|
@@ -15982,16 +16053,35 @@ ${text}</tr>
|
|
|
15982
16053
|
return;
|
|
15983
16054
|
}
|
|
15984
16055
|
const updatedProviders = [...config.providers];
|
|
15985
|
-
|
|
15986
|
-
|
|
15987
|
-
|
|
15988
|
-
|
|
15989
|
-
|
|
15990
|
-
|
|
15991
|
-
|
|
15992
|
-
|
|
15993
|
-
|
|
15994
|
-
|
|
16056
|
+
let newProv;
|
|
16057
|
+
if (isAcp) {
|
|
16058
|
+
const p = {
|
|
16059
|
+
name: trimmedName,
|
|
16060
|
+
type: "acp",
|
|
16061
|
+
endpoint: "",
|
|
16062
|
+
command: trimmedCommand
|
|
16063
|
+
};
|
|
16064
|
+
const argList = args.trim() ? args.trim().split(/\s+/) : [];
|
|
16065
|
+
if (argList.length) p.args = argList;
|
|
16066
|
+
const envToSave = presetEnv ?? editingProvider?.env;
|
|
16067
|
+
if (envToSave) p.env = envToSave;
|
|
16068
|
+
const selfLoadedToSave = selfLoaded.length ? selfLoaded : editingProvider?.selfLoadedContextFiles;
|
|
16069
|
+
if (selfLoadedToSave && selfLoadedToSave.length) p.selfLoadedContextFiles = selfLoadedToSave;
|
|
16070
|
+
newProv = p;
|
|
16071
|
+
} else if (isClaudeCode) {
|
|
16072
|
+
newProv = {
|
|
16073
|
+
name: trimmedName,
|
|
16074
|
+
type: "claude-code",
|
|
16075
|
+
endpoint: "",
|
|
16076
|
+
...trimmedCommand ? { command: trimmedCommand } : {}
|
|
16077
|
+
};
|
|
16078
|
+
} else {
|
|
16079
|
+
newProv = {
|
|
16080
|
+
name: trimmedName,
|
|
16081
|
+
endpoint: trimmedEndpoint,
|
|
16082
|
+
...trimmedApiKey ? { apiKey: trimmedApiKey } : {}
|
|
16083
|
+
};
|
|
16084
|
+
}
|
|
15995
16085
|
if (isCreating) {
|
|
15996
16086
|
updatedProviders.push(newProv);
|
|
15997
16087
|
} else if (editingProvider) {
|
|
@@ -16052,7 +16142,8 @@ ${text}</tr>
|
|
|
16052
16142
|
disabled: editingProvider !== null,
|
|
16053
16143
|
children: [
|
|
16054
16144
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "openai", children: "OpenAI-compatible endpoint" }),
|
|
16055
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "claude-code", children: "Claude Code (local CLI)" })
|
|
16145
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "claude-code", children: "Claude Code (local CLI)" }),
|
|
16146
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "acp", children: "External agent (ACP)" })
|
|
16056
16147
|
]
|
|
16057
16148
|
}
|
|
16058
16149
|
)
|
|
@@ -16064,14 +16155,82 @@ ${text}</tr>
|
|
|
16064
16155
|
{
|
|
16065
16156
|
id: "provider-name",
|
|
16066
16157
|
type: "text",
|
|
16067
|
-
placeholder: "e.g. Ollama, OpenRouter",
|
|
16158
|
+
placeholder: "e.g. Ollama, OpenRouter, ACP",
|
|
16068
16159
|
value: name,
|
|
16069
16160
|
onChange: (e) => setName(e.target.value),
|
|
16070
16161
|
disabled: editingProvider !== null
|
|
16071
16162
|
}
|
|
16072
16163
|
)
|
|
16073
16164
|
] }),
|
|
16074
|
-
type === "
|
|
16165
|
+
type === "acp" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
16166
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "form-group", children: [
|
|
16167
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { htmlFor: "acp-preset", children: "Agent" }),
|
|
16168
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
16169
|
+
"select",
|
|
16170
|
+
{
|
|
16171
|
+
id: "acp-preset",
|
|
16172
|
+
value: presetId,
|
|
16173
|
+
onChange: (e) => applyPreset(e.target.value),
|
|
16174
|
+
children: [
|
|
16175
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "custom", children: "Custom (manual command)" }),
|
|
16176
|
+
acpRegistry?.ok && acpRegistry.agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("option", { value: a.id, disabled: a.dist === null, children: [
|
|
16177
|
+
a.name,
|
|
16178
|
+
a.dist === null ? " (not available on this platform)" : ""
|
|
16179
|
+
] }, a.id))
|
|
16180
|
+
]
|
|
16181
|
+
}
|
|
16182
|
+
),
|
|
16183
|
+
acpRegistry && !acpRegistry.ok && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "form-error", children: [
|
|
16184
|
+
"Registry unavailable: ",
|
|
16185
|
+
acpRegistry.error,
|
|
16186
|
+
" \u2014 use Custom."
|
|
16187
|
+
] })
|
|
16188
|
+
] }),
|
|
16189
|
+
selectedPreset?.dist?.kind === "binary" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "form-group", children: [
|
|
16190
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
16191
|
+
"button",
|
|
16192
|
+
{
|
|
16193
|
+
type: "button",
|
|
16194
|
+
className: "btn btn--secondary",
|
|
16195
|
+
disabled: installing,
|
|
16196
|
+
onClick: () => {
|
|
16197
|
+
resetAcpInstall();
|
|
16198
|
+
setInstalling(true);
|
|
16199
|
+
postMessage({ type: "installAcpAgent", agentId: presetId });
|
|
16200
|
+
},
|
|
16201
|
+
children: installing ? "Installing\u2026" : "Install"
|
|
16202
|
+
}
|
|
16203
|
+
),
|
|
16204
|
+
acpInstall?.agentId === presetId && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("pre", { className: "install-log", children: acpInstall.lines.join("\n") })
|
|
16205
|
+
] }),
|
|
16206
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "form-group", children: [
|
|
16207
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { htmlFor: "provider-command", children: "Command" }),
|
|
16208
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
16209
|
+
"input",
|
|
16210
|
+
{
|
|
16211
|
+
id: "provider-command",
|
|
16212
|
+
type: "text",
|
|
16213
|
+
placeholder: selectedPreset?.dist?.kind === "binary" ? "filled by Install, or paste the binary path" : "npx",
|
|
16214
|
+
value: command,
|
|
16215
|
+
onChange: (e) => setCommand(e.target.value)
|
|
16216
|
+
}
|
|
16217
|
+
)
|
|
16218
|
+
] }),
|
|
16219
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "form-group", children: [
|
|
16220
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { htmlFor: "provider-args", children: "Arguments" }),
|
|
16221
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
16222
|
+
"input",
|
|
16223
|
+
{
|
|
16224
|
+
id: "provider-args",
|
|
16225
|
+
type: "text",
|
|
16226
|
+
placeholder: "@agentclientprotocol/claude-agent-acp",
|
|
16227
|
+
value: args,
|
|
16228
|
+
onChange: (e) => setArgs(e.target.value)
|
|
16229
|
+
}
|
|
16230
|
+
),
|
|
16231
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)", lineHeight: "1.4", margin: "4px 0 0" }, children: "Space-separated. Env vars can be added by editing caretaker.json." })
|
|
16232
|
+
] })
|
|
16233
|
+
] }) : type === "claude-code" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "form-group", children: [
|
|
16075
16234
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { htmlFor: "provider-command", children: "Command (Optional)" }),
|
|
16076
16235
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
16077
16236
|
"input",
|
|
@@ -16120,7 +16279,7 @@ ${text}</tr>
|
|
|
16120
16279
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "settings-list", children: config.providers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "empty-message", children: "No providers registered. Add one to connect your agents." }) : config.providers.map((prov) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "settings-card", children: [
|
|
16121
16280
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "settings-card__body", children: [
|
|
16122
16281
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "settings-card__title", children: prov.name }),
|
|
16123
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "settings-card__subtitle", children: prov.type === "claude-code" ? `Claude Code (local CLI)${prov.command ? ` \u2014 ${prov.command}` : ""}` : prov.endpoint }),
|
|
16282
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "settings-card__subtitle", children: prov.type === "acp" ? `External agent (ACP) \u2014 ${prov.command ?? ""} ${(prov.args ?? []).join(" ")}`.trim() : prov.type === "claude-code" ? `Claude Code (local CLI)${prov.command ? ` \u2014 ${prov.command}` : ""}` : prov.endpoint }),
|
|
16124
16283
|
prov.apiKey && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "settings-card__badge", children: "Key Configured" })
|
|
16125
16284
|
] }),
|
|
16126
16285
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "settings-card__actions", children: [
|
|
@@ -16997,6 +17156,7 @@ ${text}</tr>
|
|
|
16997
17156
|
const [maxTurns, setMaxTurns] = (0, import_react10.useState)(30);
|
|
16998
17157
|
const [workingDir, setWorkingDir] = (0, import_react10.useState)("");
|
|
16999
17158
|
const [permissionMode, setPermissionMode] = (0, import_react10.useState)("");
|
|
17159
|
+
const [acpMode, setAcpMode] = (0, import_react10.useState)("");
|
|
17000
17160
|
const [strictMcp, setStrictMcp] = (0, import_react10.useState)(false);
|
|
17001
17161
|
const [selectedTools, setSelectedTools] = (0, import_react10.useState)({});
|
|
17002
17162
|
const [confirmTools, setConfirmTools] = (0, import_react10.useState)({});
|
|
@@ -17006,6 +17166,8 @@ ${text}</tr>
|
|
|
17006
17166
|
const [errorMsg, setErrorMsg] = (0, import_react10.useState)(null);
|
|
17007
17167
|
const providerType = config.providers.find((p) => p.name === provider)?.type ?? "openai";
|
|
17008
17168
|
const isClaudeCode = providerType === "claude-code";
|
|
17169
|
+
const isAcp = providerType === "acp";
|
|
17170
|
+
const isExternalRunner = isClaudeCode || isAcp;
|
|
17009
17171
|
(0, import_react10.useEffect)(() => {
|
|
17010
17172
|
if (modelsResult) {
|
|
17011
17173
|
setFetchingModels(false);
|
|
@@ -17025,6 +17187,7 @@ ${text}</tr>
|
|
|
17025
17187
|
setMaxTurns(30);
|
|
17026
17188
|
setWorkingDir("");
|
|
17027
17189
|
setPermissionMode("");
|
|
17190
|
+
setAcpMode("");
|
|
17028
17191
|
setStrictMcp(false);
|
|
17029
17192
|
const initialTools = {};
|
|
17030
17193
|
availableTools.forEach((t) => {
|
|
@@ -17047,6 +17210,7 @@ ${text}</tr>
|
|
|
17047
17210
|
setMaxTurns(agent.maxTurns || 30);
|
|
17048
17211
|
setWorkingDir(agent.workingDir || "");
|
|
17049
17212
|
setPermissionMode(agent.permissionMode ?? "");
|
|
17213
|
+
setAcpMode(agent.acpMode ?? "");
|
|
17050
17214
|
setStrictMcp(agent.strictMcp ?? false);
|
|
17051
17215
|
const initialTools = {};
|
|
17052
17216
|
const initialConfirm = {};
|
|
@@ -17109,7 +17273,7 @@ ${text}</tr>
|
|
|
17109
17273
|
setErrorMsg("Provider is required.");
|
|
17110
17274
|
return;
|
|
17111
17275
|
}
|
|
17112
|
-
if (!trimmedModel) {
|
|
17276
|
+
if (!trimmedModel && !isAcp) {
|
|
17113
17277
|
setErrorMsg("Model is required.");
|
|
17114
17278
|
return;
|
|
17115
17279
|
}
|
|
@@ -17128,9 +17292,9 @@ ${text}</tr>
|
|
|
17128
17292
|
setErrorMsg(`An agent named "${trimmedName}" already exists.`);
|
|
17129
17293
|
return;
|
|
17130
17294
|
}
|
|
17131
|
-
const allowedToolsList =
|
|
17132
|
-
const confirmToolsList =
|
|
17133
|
-
const pluginsList =
|
|
17295
|
+
const allowedToolsList = isExternalRunner ? editingAgent?.allowedTools ?? [] : Object.keys(selectedTools).filter((t) => selectedTools[t]);
|
|
17296
|
+
const confirmToolsList = isExternalRunner ? editingAgent?.confirmTools ?? [] : Object.keys(confirmTools).filter((t) => selectedTools[t] && confirmTools[t]);
|
|
17297
|
+
const pluginsList = isExternalRunner ? editingAgent?.plugins ?? [] : Object.keys(selectedPlugins).filter((p) => selectedPlugins[p]);
|
|
17134
17298
|
const mcpServersList = Object.keys(selectedMcpServers).filter((s) => selectedMcpServers[s]);
|
|
17135
17299
|
const finalAgent = {
|
|
17136
17300
|
id: editingAgent ? editingAgent.id : `agent-${Math.random().toString(36).substring(2, 10)}`,
|
|
@@ -17145,6 +17309,7 @@ ${text}</tr>
|
|
|
17145
17309
|
maxTurns,
|
|
17146
17310
|
...trimmedWorkingDir ? { workingDir: trimmedWorkingDir } : {},
|
|
17147
17311
|
...isClaudeCode && permissionMode ? { permissionMode } : {},
|
|
17312
|
+
...isAcp && acpMode.trim() ? { acpMode: acpMode.trim() } : {},
|
|
17148
17313
|
...isClaudeCode && strictMcp ? { strictMcp: true } : {},
|
|
17149
17314
|
// Preserve plugin-managed properties
|
|
17150
17315
|
...editingAgent?.pluginId ? { pluginId: editingAgent.pluginId } : {},
|
|
@@ -17221,7 +17386,7 @@ ${text}</tr>
|
|
|
17221
17386
|
}
|
|
17222
17387
|
)
|
|
17223
17388
|
] }),
|
|
17224
|
-
!
|
|
17389
|
+
!isExternalRunner && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
|
|
17225
17390
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "agent-turns", children: "Max Turns" }),
|
|
17226
17391
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17227
17392
|
"input",
|
|
@@ -17239,7 +17404,7 @@ ${text}</tr>
|
|
|
17239
17404
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
|
|
17240
17405
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "agent-model", children: "Model" }),
|
|
17241
17406
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "input-with-action", children: [
|
|
17242
|
-
!
|
|
17407
|
+
!isExternalRunner && modelsResult?.ok ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
17243
17408
|
"select",
|
|
17244
17409
|
{
|
|
17245
17410
|
id: "agent-model",
|
|
@@ -17255,12 +17420,12 @@ ${text}</tr>
|
|
|
17255
17420
|
{
|
|
17256
17421
|
id: "agent-model",
|
|
17257
17422
|
type: "text",
|
|
17258
|
-
placeholder: isClaudeCode ? "sonnet | opus | haiku (or full model id)" : "e.g. claude-3-5-sonnet-latest",
|
|
17423
|
+
placeholder: isClaudeCode ? "sonnet | opus | haiku (or full model id)" : isAcp ? "optional \u2014 label shown in task threads" : "e.g. claude-3-5-sonnet-latest",
|
|
17259
17424
|
value: model,
|
|
17260
17425
|
onChange: (e) => setModel(e.target.value)
|
|
17261
17426
|
}
|
|
17262
17427
|
),
|
|
17263
|
-
!
|
|
17428
|
+
!isExternalRunner && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17264
17429
|
"button",
|
|
17265
17430
|
{
|
|
17266
17431
|
type: "button",
|
|
@@ -17323,6 +17488,25 @@ ${text}</tr>
|
|
|
17323
17488
|
] })
|
|
17324
17489
|
] })
|
|
17325
17490
|
] })
|
|
17491
|
+
) : isAcp ? (
|
|
17492
|
+
/* ACP agents own their tools and permissions; the native pickers don't apply. */
|
|
17493
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
17494
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group", children: [
|
|
17495
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: "agent-acp-mode", children: "Session mode (Optional)" }),
|
|
17496
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
17497
|
+
"input",
|
|
17498
|
+
{
|
|
17499
|
+
id: "agent-acp-mode",
|
|
17500
|
+
type: "text",
|
|
17501
|
+
placeholder: "e.g. acceptEdits | bypassPermissions (agent-specific)",
|
|
17502
|
+
value: acpMode,
|
|
17503
|
+
onChange: (e) => setAcpMode(e.target.value)
|
|
17504
|
+
}
|
|
17505
|
+
),
|
|
17506
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)", lineHeight: "1.4", margin: "4px 0 0" }, children: "Pins the agent to one of its own permission modes at session start (session/set_mode). Unknown modes are ignored with a warning; autonomous task runs ignore this." })
|
|
17507
|
+
] }),
|
|
17508
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { style: { fontSize: "11px", color: "var(--vscode-descriptionForeground)", lineHeight: "1.4", margin: "4px 0 0" }, children: "ACP agents use the agent's own tools and permission model. When the agent asks for permission, caretaker shows a confirmation card in interactive chats; unattended runs (scheduler, tasks) are auto-approved with the task policy applied." }) })
|
|
17509
|
+
] })
|
|
17326
17510
|
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
17327
17511
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "form-group form-group--chips", children: [
|
|
17328
17512
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { children: "Exposed Tools" }),
|
|
@@ -19768,13 +19952,141 @@ ${text}</tr>
|
|
|
19768
19952
|
] });
|
|
19769
19953
|
}
|
|
19770
19954
|
|
|
19771
|
-
// src/
|
|
19955
|
+
// src/MemoryTab.tsx
|
|
19956
|
+
var import_react16 = __toESM(require_react(), 1);
|
|
19957
|
+
|
|
19958
|
+
// src/memory_tab_utils.ts
|
|
19959
|
+
function buildMemoryConfig(form) {
|
|
19960
|
+
const agentId = form.agentId.trim();
|
|
19961
|
+
if (!form.enabled || !agentId) return void 0;
|
|
19962
|
+
const out = { agentId };
|
|
19963
|
+
const sweep = Number.parseInt(form.sweepMinutes, 10);
|
|
19964
|
+
if (Number.isFinite(sweep) && sweep > 0) out.sweepMinutes = sweep;
|
|
19965
|
+
const min = Number.parseInt(form.minNewMessages, 10);
|
|
19966
|
+
if (Number.isFinite(min) && min > 0) out.minNewMessages = min;
|
|
19967
|
+
return out;
|
|
19968
|
+
}
|
|
19969
|
+
function memorySignature(m) {
|
|
19970
|
+
if (!m) return "";
|
|
19971
|
+
return JSON.stringify([m.agentId ?? "", m.sweepMinutes ?? "", m.minNewMessages ?? ""]);
|
|
19972
|
+
}
|
|
19973
|
+
|
|
19974
|
+
// src/MemoryTab.tsx
|
|
19772
19975
|
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
19976
|
+
function MemoryTab({ config, agents, onSave }) {
|
|
19977
|
+
const current = config.memory;
|
|
19978
|
+
const [enabled, setEnabled] = (0, import_react16.useState)(!!current);
|
|
19979
|
+
const [agentId, setAgentId] = (0, import_react16.useState)(current?.agentId ?? "");
|
|
19980
|
+
const [sweepMinutes, setSweepMinutes] = (0, import_react16.useState)(
|
|
19981
|
+
current?.sweepMinutes === void 0 ? "" : String(current.sweepMinutes)
|
|
19982
|
+
);
|
|
19983
|
+
const [minNewMessages, setMinNewMessages] = (0, import_react16.useState)(
|
|
19984
|
+
current?.minNewMessages === void 0 ? "" : String(current.minNewMessages)
|
|
19985
|
+
);
|
|
19986
|
+
const [saveState, setSaveState] = (0, import_react16.useState)("idle");
|
|
19987
|
+
const pendingSave = (0, import_react16.useRef)(null);
|
|
19988
|
+
(0, import_react16.useEffect)(() => {
|
|
19989
|
+
if (saveState !== "saving" || pendingSave.current === null) return;
|
|
19990
|
+
if (memorySignature(config.memory) !== pendingSave.current)
|
|
19991
|
+
return;
|
|
19992
|
+
setSaveState("saved");
|
|
19993
|
+
}, [config.memory, saveState]);
|
|
19994
|
+
(0, import_react16.useEffect)(() => {
|
|
19995
|
+
if (saveState !== "saved") return;
|
|
19996
|
+
const t = setTimeout(() => setSaveState("idle"), 2e3);
|
|
19997
|
+
return () => clearTimeout(t);
|
|
19998
|
+
}, [saveState]);
|
|
19999
|
+
const selectedAgent = agents.find((a) => a.id === agentId);
|
|
20000
|
+
const missingAgent = enabled && !selectedAgent;
|
|
20001
|
+
const save = () => {
|
|
20002
|
+
const memory = buildMemoryConfig({ enabled, agentId, sweepMinutes, minNewMessages });
|
|
20003
|
+
pendingSave.current = memorySignature(memory);
|
|
20004
|
+
setSaveState("saving");
|
|
20005
|
+
const next = { ...config };
|
|
20006
|
+
if (memory) next.memory = memory;
|
|
20007
|
+
else delete next.memory;
|
|
20008
|
+
onSave(next);
|
|
20009
|
+
};
|
|
20010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "glass-form", children: [
|
|
20011
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h4", { children: "Memory" }),
|
|
20012
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "glass-form__body", children: [
|
|
20013
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group form-group--checkbox", children: [
|
|
20014
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { htmlFor: "memory-enabled", children: [
|
|
20015
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20016
|
+
"input",
|
|
20017
|
+
{
|
|
20018
|
+
id: "memory-enabled",
|
|
20019
|
+
type: "checkbox",
|
|
20020
|
+
checked: enabled,
|
|
20021
|
+
onChange: (e) => setEnabled(e.target.checked)
|
|
20022
|
+
}
|
|
20023
|
+
),
|
|
20024
|
+
"Enable memory"
|
|
20025
|
+
] }),
|
|
20026
|
+
/* @__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." })
|
|
20027
|
+
] }),
|
|
20028
|
+
enabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
20029
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group", children: [
|
|
20030
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: "memory-agent", children: "Memory agent" }),
|
|
20031
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { id: "memory-agent", value: agentId, onChange: (e) => setAgentId(e.target.value), children: [
|
|
20032
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "\u2014 select an agent \u2014" }),
|
|
20033
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: a.id, children: [
|
|
20034
|
+
a.name,
|
|
20035
|
+
" \xB7 ",
|
|
20036
|
+
a.model
|
|
20037
|
+
] }, a.id))
|
|
20038
|
+
] }),
|
|
20039
|
+
/* @__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." }),
|
|
20040
|
+
missingAgent && agentId && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { className: "form-error", children: "This agent no longer exists \u2014 pick another." })
|
|
20041
|
+
] }),
|
|
20042
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group", children: [
|
|
20043
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: "memory-sweep-minutes", children: "Sweep interval (minutes)" }),
|
|
20044
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20045
|
+
"input",
|
|
20046
|
+
{
|
|
20047
|
+
id: "memory-sweep-minutes",
|
|
20048
|
+
type: "number",
|
|
20049
|
+
min: 1,
|
|
20050
|
+
placeholder: "5",
|
|
20051
|
+
value: sweepMinutes,
|
|
20052
|
+
onChange: (e) => setSweepMinutes(e.target.value)
|
|
20053
|
+
}
|
|
20054
|
+
)
|
|
20055
|
+
] }),
|
|
20056
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-group", children: [
|
|
20057
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: "memory-min-new", children: "Min new messages per session" }),
|
|
20058
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
20059
|
+
"input",
|
|
20060
|
+
{
|
|
20061
|
+
id: "memory-min-new",
|
|
20062
|
+
type: "number",
|
|
20063
|
+
min: 1,
|
|
20064
|
+
placeholder: "4",
|
|
20065
|
+
value: minNewMessages,
|
|
20066
|
+
onChange: (e) => setMinNewMessages(e.target.value)
|
|
20067
|
+
}
|
|
20068
|
+
),
|
|
20069
|
+
/* @__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." })
|
|
20070
|
+
] })
|
|
20071
|
+
] })
|
|
20072
|
+
] }),
|
|
20073
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "form-actions", children: [
|
|
20074
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: save, disabled: enabled && !agentId, children: "Save" }),
|
|
20075
|
+
/* @__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" : "" })
|
|
20076
|
+
] })
|
|
20077
|
+
] });
|
|
20078
|
+
}
|
|
20079
|
+
|
|
20080
|
+
// src/SettingsPanel.tsx
|
|
20081
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
19773
20082
|
function SettingsPanel({
|
|
19774
20083
|
layout = "compact",
|
|
19775
20084
|
postMessage,
|
|
19776
20085
|
settingsData,
|
|
19777
20086
|
modelsResult,
|
|
20087
|
+
acpRegistry,
|
|
20088
|
+
acpInstall,
|
|
20089
|
+
resetAcpInstall,
|
|
19778
20090
|
sttCatalogResult,
|
|
19779
20091
|
ttsCatalogResult,
|
|
19780
20092
|
setModelsResult,
|
|
@@ -19786,16 +20098,16 @@ ${text}</tr>
|
|
|
19786
20098
|
taskRuns = {},
|
|
19787
20099
|
onClose
|
|
19788
20100
|
}) {
|
|
19789
|
-
const [activeTab, setActiveTab] = (0,
|
|
20101
|
+
const [activeTab, setActiveTab] = (0, import_react17.useState)("providers");
|
|
19790
20102
|
if (!settingsData) {
|
|
19791
|
-
return /* @__PURE__ */ (0,
|
|
19792
|
-
/* @__PURE__ */ (0,
|
|
19793
|
-
/* @__PURE__ */ (0,
|
|
20103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "settings-panel settings-panel--loading", children: [
|
|
20104
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, children: [
|
|
20105
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowLeft, { size: 14 }),
|
|
19794
20106
|
" Back to Chat"
|
|
19795
20107
|
] }),
|
|
19796
|
-
/* @__PURE__ */ (0,
|
|
19797
|
-
/* @__PURE__ */ (0,
|
|
19798
|
-
/* @__PURE__ */ (0,
|
|
20108
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "settings-panel__loading-spinner", children: [
|
|
20109
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "spinner" }),
|
|
20110
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Loading configurations..." })
|
|
19799
20111
|
] })
|
|
19800
20112
|
] });
|
|
19801
20113
|
}
|
|
@@ -19803,16 +20115,19 @@ ${text}</tr>
|
|
|
19803
20115
|
const renderTabContent = () => {
|
|
19804
20116
|
switch (activeTab) {
|
|
19805
20117
|
case "providers":
|
|
19806
|
-
return /* @__PURE__ */ (0,
|
|
20118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19807
20119
|
ProvidersTab,
|
|
19808
20120
|
{
|
|
19809
20121
|
config,
|
|
19810
20122
|
agents,
|
|
19811
|
-
postMessage
|
|
20123
|
+
postMessage,
|
|
20124
|
+
acpRegistry,
|
|
20125
|
+
acpInstall,
|
|
20126
|
+
resetAcpInstall
|
|
19812
20127
|
}
|
|
19813
20128
|
);
|
|
19814
20129
|
case "projects":
|
|
19815
|
-
return /* @__PURE__ */ (0,
|
|
20130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19816
20131
|
ProjectsTabSettings,
|
|
19817
20132
|
{
|
|
19818
20133
|
config,
|
|
@@ -19821,7 +20136,7 @@ ${text}</tr>
|
|
|
19821
20136
|
}
|
|
19822
20137
|
);
|
|
19823
20138
|
case "agents":
|
|
19824
|
-
return /* @__PURE__ */ (0,
|
|
20139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19825
20140
|
AgentsTab,
|
|
19826
20141
|
{
|
|
19827
20142
|
config,
|
|
@@ -19835,7 +20150,7 @@ ${text}</tr>
|
|
|
19835
20150
|
}
|
|
19836
20151
|
);
|
|
19837
20152
|
case "plugins":
|
|
19838
|
-
return /* @__PURE__ */ (0,
|
|
20153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19839
20154
|
PluginsTab,
|
|
19840
20155
|
{
|
|
19841
20156
|
pluginsFile,
|
|
@@ -19846,7 +20161,7 @@ ${text}</tr>
|
|
|
19846
20161
|
}
|
|
19847
20162
|
);
|
|
19848
20163
|
case "mcp":
|
|
19849
|
-
return /* @__PURE__ */ (0,
|
|
20164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19850
20165
|
McpTab,
|
|
19851
20166
|
{
|
|
19852
20167
|
mcpServersFile,
|
|
@@ -19856,7 +20171,7 @@ ${text}</tr>
|
|
|
19856
20171
|
}
|
|
19857
20172
|
);
|
|
19858
20173
|
case "services":
|
|
19859
|
-
return /* @__PURE__ */ (0,
|
|
20174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19860
20175
|
ServicesTab,
|
|
19861
20176
|
{
|
|
19862
20177
|
config,
|
|
@@ -19866,7 +20181,7 @@ ${text}</tr>
|
|
|
19866
20181
|
}
|
|
19867
20182
|
);
|
|
19868
20183
|
case "voice":
|
|
19869
|
-
return /* @__PURE__ */ (0,
|
|
20184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19870
20185
|
VoiceTab,
|
|
19871
20186
|
{
|
|
19872
20187
|
config,
|
|
@@ -19876,18 +20191,27 @@ ${text}</tr>
|
|
|
19876
20191
|
ttsCatalogResult
|
|
19877
20192
|
}
|
|
19878
20193
|
);
|
|
20194
|
+
case "memory":
|
|
20195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
20196
|
+
MemoryTab,
|
|
20197
|
+
{
|
|
20198
|
+
config,
|
|
20199
|
+
agents,
|
|
20200
|
+
onSave: (updatedConfig) => postMessage({ type: "saveConfig", config: updatedConfig })
|
|
20201
|
+
}
|
|
20202
|
+
);
|
|
19879
20203
|
}
|
|
19880
20204
|
};
|
|
19881
|
-
return /* @__PURE__ */ (0,
|
|
19882
|
-
/* @__PURE__ */ (0,
|
|
19883
|
-
/* @__PURE__ */ (0,
|
|
19884
|
-
/* @__PURE__ */ (0,
|
|
20205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "settings-panel", children: [
|
|
20206
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { className: "settings-panel__header", children: [
|
|
20207
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "settings-panel__back-btn", onClick: onClose, title: "Go back to chat", children: [
|
|
20208
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowLeft, { size: 14 }),
|
|
19885
20209
|
" Chat"
|
|
19886
20210
|
] }),
|
|
19887
|
-
/* @__PURE__ */ (0,
|
|
20211
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { className: "settings-panel__title", children: "Caretaker Config" })
|
|
19888
20212
|
] }),
|
|
19889
|
-
/* @__PURE__ */ (0,
|
|
19890
|
-
/* @__PURE__ */ (0,
|
|
20213
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: "settings-panel__tabs", children: [
|
|
20214
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19891
20215
|
"button",
|
|
19892
20216
|
{
|
|
19893
20217
|
className: `settings-panel__tab-btn ${activeTab === "providers" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19895,7 +20219,7 @@ ${text}</tr>
|
|
|
19895
20219
|
children: "Providers"
|
|
19896
20220
|
}
|
|
19897
20221
|
),
|
|
19898
|
-
layout === "sidebar" && /* @__PURE__ */ (0,
|
|
20222
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19899
20223
|
"button",
|
|
19900
20224
|
{
|
|
19901
20225
|
className: `settings-panel__tab-btn ${activeTab === "projects" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19903,7 +20227,7 @@ ${text}</tr>
|
|
|
19903
20227
|
children: "Projects"
|
|
19904
20228
|
}
|
|
19905
20229
|
),
|
|
19906
|
-
/* @__PURE__ */ (0,
|
|
20230
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19907
20231
|
"button",
|
|
19908
20232
|
{
|
|
19909
20233
|
className: `settings-panel__tab-btn ${activeTab === "agents" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19911,7 +20235,7 @@ ${text}</tr>
|
|
|
19911
20235
|
children: "Agents"
|
|
19912
20236
|
}
|
|
19913
20237
|
),
|
|
19914
|
-
/* @__PURE__ */ (0,
|
|
20238
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19915
20239
|
"button",
|
|
19916
20240
|
{
|
|
19917
20241
|
className: `settings-panel__tab-btn ${activeTab === "plugins" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19919,7 +20243,7 @@ ${text}</tr>
|
|
|
19919
20243
|
children: "Plugins"
|
|
19920
20244
|
}
|
|
19921
20245
|
),
|
|
19922
|
-
/* @__PURE__ */ (0,
|
|
20246
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19923
20247
|
"button",
|
|
19924
20248
|
{
|
|
19925
20249
|
className: `settings-panel__tab-btn ${activeTab === "mcp" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19927,7 +20251,7 @@ ${text}</tr>
|
|
|
19927
20251
|
children: "MCP"
|
|
19928
20252
|
}
|
|
19929
20253
|
),
|
|
19930
|
-
layout === "sidebar" && /* @__PURE__ */ (0,
|
|
20254
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19931
20255
|
"button",
|
|
19932
20256
|
{
|
|
19933
20257
|
className: `settings-panel__tab-btn ${activeTab === "services" ? "settings-panel__tab-btn--active" : ""}`,
|
|
@@ -19935,22 +20259,30 @@ ${text}</tr>
|
|
|
19935
20259
|
children: "Services"
|
|
19936
20260
|
}
|
|
19937
20261
|
),
|
|
19938
|
-
layout === "sidebar" && /* @__PURE__ */ (0,
|
|
20262
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19939
20263
|
"button",
|
|
19940
20264
|
{
|
|
19941
20265
|
className: `settings-panel__tab-btn ${activeTab === "voice" ? "settings-panel__tab-btn--active" : ""}`,
|
|
19942
20266
|
onClick: () => setActiveTab("voice"),
|
|
19943
20267
|
children: "Voice"
|
|
19944
20268
|
}
|
|
20269
|
+
),
|
|
20270
|
+
layout === "sidebar" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
20271
|
+
"button",
|
|
20272
|
+
{
|
|
20273
|
+
className: `settings-panel__tab-btn ${activeTab === "memory" ? "settings-panel__tab-btn--active" : ""}`,
|
|
20274
|
+
onClick: () => setActiveTab("memory"),
|
|
20275
|
+
children: "Memory"
|
|
20276
|
+
}
|
|
19945
20277
|
)
|
|
19946
20278
|
] }),
|
|
19947
|
-
/* @__PURE__ */ (0,
|
|
20279
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("main", { className: "settings-panel__content", children: renderTabContent() })
|
|
19948
20280
|
] });
|
|
19949
20281
|
}
|
|
19950
20282
|
|
|
19951
20283
|
// src/ProjectsTab.tsx
|
|
19952
|
-
var
|
|
19953
|
-
var
|
|
20284
|
+
var import_react18 = __toESM(require_react(), 1);
|
|
20285
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
19954
20286
|
var LS_PROJECT_KEY = "caretaker.taskView.selectedProjectId";
|
|
19955
20287
|
var LS_ARCHIVED_KEY = "caretaker.taskView.showArchived";
|
|
19956
20288
|
function loadSavedProjectId() {
|
|
@@ -20039,15 +20371,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20039
20371
|
}
|
|
20040
20372
|
var PAGE_SIZE = 20;
|
|
20041
20373
|
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,
|
|
20374
|
+
const [projects, setProjects] = (0, import_react18.useState)([]);
|
|
20375
|
+
const [selectedProjectId, setSelectedProjectId] = (0, import_react18.useState)(loadSavedProjectId);
|
|
20376
|
+
const [tasks, setTasks] = (0, import_react18.useState)([]);
|
|
20377
|
+
const [selectedTaskId, setSelectedTaskId] = (0, import_react18.useState)(null);
|
|
20378
|
+
const [taskMessages, setTaskMessages] = (0, import_react18.useState)([]);
|
|
20379
|
+
const [view, setView] = (0, import_react18.useState)("list");
|
|
20380
|
+
const [page, setPage] = (0, import_react18.useState)(0);
|
|
20381
|
+
const [isNewTaskOpen, setIsNewTaskOpen] = (0, import_react18.useState)(false);
|
|
20382
|
+
const [newTask, setNewTask] = (0, import_react18.useState)({
|
|
20051
20383
|
title: "",
|
|
20052
20384
|
objective: "",
|
|
20053
20385
|
checklistText: "",
|
|
@@ -20056,19 +20388,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20056
20388
|
plannerAgentId: "",
|
|
20057
20389
|
reviewerAgentId: ""
|
|
20058
20390
|
});
|
|
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,
|
|
20391
|
+
const [composerText, setComposerText] = (0, import_react18.useState)("");
|
|
20392
|
+
const [isSending, setIsSending] = (0, import_react18.useState)(false);
|
|
20393
|
+
const [showArchived, setShowArchived] = (0, import_react18.useState)(loadShowArchived);
|
|
20394
|
+
const [pendingConfirm, setPendingConfirm] = (0, import_react18.useState)(null);
|
|
20395
|
+
const [taskError, setTaskError] = (0, import_react18.useState)(null);
|
|
20396
|
+
const threadIntervalRef = (0, import_react18.useRef)(null);
|
|
20397
|
+
(0, import_react18.useEffect)(() => {
|
|
20066
20398
|
fetchProjects();
|
|
20067
20399
|
return () => {
|
|
20068
20400
|
stopThreadPolling();
|
|
20069
20401
|
};
|
|
20070
20402
|
}, []);
|
|
20071
|
-
(0,
|
|
20403
|
+
(0, import_react18.useEffect)(() => {
|
|
20072
20404
|
if (projects.length > 0 && selectedProjectId === null) {
|
|
20073
20405
|
setSelectedProjectId(projects[0].id);
|
|
20074
20406
|
}
|
|
@@ -20079,13 +20411,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20079
20411
|
setSelectedProjectId(null);
|
|
20080
20412
|
}
|
|
20081
20413
|
}, [projects]);
|
|
20082
|
-
(0,
|
|
20414
|
+
(0, import_react18.useEffect)(() => {
|
|
20083
20415
|
saveProjectId(selectedProjectId);
|
|
20084
20416
|
}, [selectedProjectId]);
|
|
20085
|
-
(0,
|
|
20417
|
+
(0, import_react18.useEffect)(() => {
|
|
20086
20418
|
saveShowArchived(showArchived);
|
|
20087
20419
|
}, [showArchived]);
|
|
20088
|
-
(0,
|
|
20420
|
+
(0, import_react18.useEffect)(() => {
|
|
20089
20421
|
if (selectedProjectId !== null) {
|
|
20090
20422
|
fetchTasks(selectedProjectId);
|
|
20091
20423
|
setView("list");
|
|
@@ -20097,7 +20429,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20097
20429
|
setTasks([]);
|
|
20098
20430
|
}
|
|
20099
20431
|
}, [selectedProjectId, showArchived]);
|
|
20100
|
-
(0,
|
|
20432
|
+
(0, import_react18.useEffect)(() => {
|
|
20101
20433
|
if (selectedTaskId !== null) {
|
|
20102
20434
|
fetchTaskMessages(selectedTaskId);
|
|
20103
20435
|
startThreadPolling(selectedTaskId);
|
|
@@ -20270,7 +20602,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20270
20602
|
const cancelPendingAction = () => {
|
|
20271
20603
|
setPendingConfirm(null);
|
|
20272
20604
|
};
|
|
20273
|
-
(0,
|
|
20605
|
+
(0, import_react18.useEffect)(() => {
|
|
20274
20606
|
if (!pendingConfirm) return;
|
|
20275
20607
|
function handleKeyDown(event) {
|
|
20276
20608
|
if (event.key === "Escape") {
|
|
@@ -20280,7 +20612,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20280
20612
|
window.addEventListener("keydown", handleKeyDown);
|
|
20281
20613
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
20282
20614
|
}, [pendingConfirm]);
|
|
20283
|
-
(0,
|
|
20615
|
+
(0, import_react18.useEffect)(() => {
|
|
20284
20616
|
if (!taskError) return;
|
|
20285
20617
|
const t = setTimeout(() => setTaskError(null), 5e3);
|
|
20286
20618
|
return () => clearTimeout(t);
|
|
@@ -20411,7 +20743,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20411
20743
|
const selectedProject = projects.find((p) => p.id === selectedProjectId);
|
|
20412
20744
|
const selectedTask = tasks.find((t) => t.id === selectedTaskId);
|
|
20413
20745
|
const selectedProjectAgentName = agents.find((a) => a.id === selectedProject?.agentId)?.name || "Default Agent";
|
|
20414
|
-
const taskAgentLabels = (0,
|
|
20746
|
+
const taskAgentLabels = (0, import_react18.useMemo)(() => {
|
|
20415
20747
|
if (!selectedTask) return void 0;
|
|
20416
20748
|
const agentLabelFor = (agentId) => {
|
|
20417
20749
|
const a = agents.find((x) => x.id === agentId);
|
|
@@ -20457,8 +20789,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20457
20789
|
const safePage = Math.min(page, totalPages - 1);
|
|
20458
20790
|
const pageStart = safePage * PAGE_SIZE;
|
|
20459
20791
|
const pageTasks = tasks.slice(pageStart, pageStart + PAGE_SIZE);
|
|
20460
|
-
return /* @__PURE__ */ (0,
|
|
20461
|
-
/* @__PURE__ */ (0,
|
|
20792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app", style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
20793
|
+
/* @__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
20794
|
TaskListView,
|
|
20463
20795
|
{
|
|
20464
20796
|
projects,
|
|
@@ -20480,7 +20812,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20480
20812
|
onArchive: handleArchiveFromList,
|
|
20481
20813
|
statusColor
|
|
20482
20814
|
}
|
|
20483
|
-
) : view === "log" && selectedTask ? /* @__PURE__ */ (0,
|
|
20815
|
+
) : view === "log" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20484
20816
|
TaskLogView,
|
|
20485
20817
|
{
|
|
20486
20818
|
task: selectedTask,
|
|
@@ -20497,7 +20829,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20497
20829
|
onToggleStatus: handleToggleTaskStatus,
|
|
20498
20830
|
statusColor
|
|
20499
20831
|
}
|
|
20500
|
-
) : view === "edit" && selectedTask ? /* @__PURE__ */ (0,
|
|
20832
|
+
) : view === "edit" && selectedTask ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20501
20833
|
TaskEditView,
|
|
20502
20834
|
{
|
|
20503
20835
|
task: selectedTask,
|
|
@@ -20515,11 +20847,11 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20515
20847
|
onOpenLog: () => setView("log"),
|
|
20516
20848
|
statusColor
|
|
20517
20849
|
}
|
|
20518
|
-
) : /* @__PURE__ */ (0,
|
|
20519
|
-
/* @__PURE__ */ (0,
|
|
20520
|
-
/* @__PURE__ */ (0,
|
|
20850
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__empty-state", children: [
|
|
20851
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Task not found. Go back to the list." }),
|
|
20852
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "settings-panel__back-btn", onClick: backToList, style: { marginTop: "12px" }, children: "\u2190 Back to list" })
|
|
20521
20853
|
] }) : null }),
|
|
20522
|
-
isNewTaskOpen && /* @__PURE__ */ (0,
|
|
20854
|
+
isNewTaskOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20523
20855
|
"div",
|
|
20524
20856
|
{
|
|
20525
20857
|
style: {
|
|
@@ -20534,7 +20866,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20534
20866
|
justifyContent: "center",
|
|
20535
20867
|
zIndex: 999
|
|
20536
20868
|
},
|
|
20537
|
-
children: /* @__PURE__ */ (0,
|
|
20869
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20538
20870
|
"form",
|
|
20539
20871
|
{
|
|
20540
20872
|
onSubmit: handleCreateTask,
|
|
@@ -20545,14 +20877,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20545
20877
|
background: "var(--vscode-sideBar-background)"
|
|
20546
20878
|
},
|
|
20547
20879
|
children: [
|
|
20548
|
-
/* @__PURE__ */ (0,
|
|
20549
|
-
/* @__PURE__ */ (0,
|
|
20550
|
-
/* @__PURE__ */ (0,
|
|
20880
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "confirm__header", children: [
|
|
20881
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "18px", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Wrench, { size: 18 }) }),
|
|
20882
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "confirm__prompt", style: { fontSize: "14px" }, children: "Create New Task" })
|
|
20551
20883
|
] }),
|
|
20552
|
-
/* @__PURE__ */ (0,
|
|
20553
|
-
/* @__PURE__ */ (0,
|
|
20884
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: [
|
|
20885
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20554
20886
|
"Task Title",
|
|
20555
|
-
/* @__PURE__ */ (0,
|
|
20887
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20556
20888
|
"input",
|
|
20557
20889
|
{
|
|
20558
20890
|
type: "text",
|
|
@@ -20572,9 +20904,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20572
20904
|
}
|
|
20573
20905
|
)
|
|
20574
20906
|
] }),
|
|
20575
|
-
/* @__PURE__ */ (0,
|
|
20907
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20576
20908
|
"Objective (Extended markdown goal description)",
|
|
20577
|
-
/* @__PURE__ */ (0,
|
|
20909
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20578
20910
|
"textarea",
|
|
20579
20911
|
{
|
|
20580
20912
|
required: true,
|
|
@@ -20595,9 +20927,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20595
20927
|
}
|
|
20596
20928
|
)
|
|
20597
20929
|
] }),
|
|
20598
|
-
/* @__PURE__ */ (0,
|
|
20930
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20599
20931
|
"Checklist Items (One item per line)",
|
|
20600
|
-
/* @__PURE__ */ (0,
|
|
20932
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20601
20933
|
"textarea",
|
|
20602
20934
|
{
|
|
20603
20935
|
placeholder: "Create route handler\nWrite unit tests\nUpdate documentation",
|
|
@@ -20617,9 +20949,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20617
20949
|
}
|
|
20618
20950
|
)
|
|
20619
20951
|
] }),
|
|
20620
|
-
/* @__PURE__ */ (0,
|
|
20952
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20621
20953
|
"Assigned Agent (optional \u2014 overrides project default)",
|
|
20622
|
-
/* @__PURE__ */ (0,
|
|
20954
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20623
20955
|
"select",
|
|
20624
20956
|
{
|
|
20625
20957
|
value: newTask.agentId,
|
|
@@ -20634,8 +20966,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20634
20966
|
outline: "none"
|
|
20635
20967
|
},
|
|
20636
20968
|
children: [
|
|
20637
|
-
/* @__PURE__ */ (0,
|
|
20638
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20969
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
20970
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
20639
20971
|
a.name,
|
|
20640
20972
|
" (",
|
|
20641
20973
|
a.provider,
|
|
@@ -20645,9 +20977,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20645
20977
|
}
|
|
20646
20978
|
)
|
|
20647
20979
|
] }),
|
|
20648
|
-
/* @__PURE__ */ (0,
|
|
20980
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20649
20981
|
"Planner Agent Override (optional)",
|
|
20650
|
-
/* @__PURE__ */ (0,
|
|
20982
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20651
20983
|
"select",
|
|
20652
20984
|
{
|
|
20653
20985
|
value: newTask.plannerAgentId,
|
|
@@ -20662,8 +20994,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20662
20994
|
outline: "none"
|
|
20663
20995
|
},
|
|
20664
20996
|
children: [
|
|
20665
|
-
/* @__PURE__ */ (0,
|
|
20666
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
20997
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
20998
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
20667
20999
|
a.name,
|
|
20668
21000
|
" (",
|
|
20669
21001
|
a.provider,
|
|
@@ -20673,9 +21005,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20673
21005
|
}
|
|
20674
21006
|
)
|
|
20675
21007
|
] }),
|
|
20676
|
-
/* @__PURE__ */ (0,
|
|
21008
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
20677
21009
|
"Reviewer Agent Override (optional)",
|
|
20678
|
-
/* @__PURE__ */ (0,
|
|
21010
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20679
21011
|
"select",
|
|
20680
21012
|
{
|
|
20681
21013
|
value: newTask.reviewerAgentId,
|
|
@@ -20690,8 +21022,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20690
21022
|
outline: "none"
|
|
20691
21023
|
},
|
|
20692
21024
|
children: [
|
|
20693
|
-
/* @__PURE__ */ (0,
|
|
20694
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
21025
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
21026
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
20695
21027
|
a.name,
|
|
20696
21028
|
" (",
|
|
20697
21029
|
a.provider,
|
|
@@ -20701,8 +21033,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20701
21033
|
}
|
|
20702
21034
|
)
|
|
20703
21035
|
] }),
|
|
20704
|
-
/* @__PURE__ */ (0,
|
|
20705
|
-
/* @__PURE__ */ (0,
|
|
21036
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "12px", display: "flex", alignItems: "center", gap: "6px", cursor: "pointer", marginTop: "4px" }, children: [
|
|
21037
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20706
21038
|
"input",
|
|
20707
21039
|
{
|
|
20708
21040
|
type: "checkbox",
|
|
@@ -20711,24 +21043,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20711
21043
|
style: { cursor: "pointer" }
|
|
20712
21044
|
}
|
|
20713
21045
|
),
|
|
20714
|
-
/* @__PURE__ */ (0,
|
|
21046
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Start active immediately (Heartbeat loop claims it)" })
|
|
20715
21047
|
] })
|
|
20716
21048
|
] }),
|
|
20717
|
-
/* @__PURE__ */ (0,
|
|
20718
|
-
/* @__PURE__ */ (0,
|
|
20719
|
-
/* @__PURE__ */ (0,
|
|
21049
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "confirm__buttons", style: { justifyContent: "flex-end", marginTop: "10px" }, children: [
|
|
21050
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "confirm__btn", onClick: () => setIsNewTaskOpen(false), children: "Cancel" }),
|
|
21051
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "submit", className: "confirm__btn confirm__btn--primary", children: "Create Task" })
|
|
20720
21052
|
] })
|
|
20721
21053
|
]
|
|
20722
21054
|
}
|
|
20723
21055
|
)
|
|
20724
21056
|
}
|
|
20725
21057
|
),
|
|
20726
|
-
pendingConfirm && /* @__PURE__ */ (0,
|
|
20727
|
-
/* @__PURE__ */ (0,
|
|
20728
|
-
/* @__PURE__ */ (0,
|
|
20729
|
-
/* @__PURE__ */ (0,
|
|
20730
|
-
/* @__PURE__ */ (0,
|
|
20731
|
-
/* @__PURE__ */ (0,
|
|
21058
|
+
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: [
|
|
21059
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__confirm-title", children: pendingConfirm.type === "delete" ? "Delete task" : pendingConfirm.type === "archive" ? "Archive task" : "Discard worktree" }),
|
|
21060
|
+
/* @__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.` }),
|
|
21061
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__confirm-buttons", children: [
|
|
21062
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "app__confirm-btn", onClick: cancelPendingAction, children: "Cancel" }),
|
|
21063
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20732
21064
|
"button",
|
|
20733
21065
|
{
|
|
20734
21066
|
className: `app__confirm-btn ${pendingConfirm.type === "delete" ? "app__confirm-btn--danger" : ""}`,
|
|
@@ -20738,7 +21070,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20738
21070
|
)
|
|
20739
21071
|
] })
|
|
20740
21072
|
] }) }),
|
|
20741
|
-
taskError && /* @__PURE__ */ (0,
|
|
21073
|
+
taskError && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "app__error-banner", onClick: () => setTaskError(null), title: "Click to dismiss", children: taskError })
|
|
20742
21074
|
] });
|
|
20743
21075
|
}
|
|
20744
21076
|
function TaskListView({
|
|
@@ -20761,10 +21093,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20761
21093
|
onArchive,
|
|
20762
21094
|
statusColor
|
|
20763
21095
|
}) {
|
|
20764
|
-
return /* @__PURE__ */ (0,
|
|
20765
|
-
/* @__PURE__ */ (0,
|
|
20766
|
-
/* @__PURE__ */ (0,
|
|
20767
|
-
/* @__PURE__ */ (0,
|
|
21096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
21097
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-view__header", children: [
|
|
21098
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
21099
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20768
21100
|
"select",
|
|
20769
21101
|
{
|
|
20770
21102
|
className: "task-view__project-filter",
|
|
@@ -20781,17 +21113,17 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20781
21113
|
outline: "none",
|
|
20782
21114
|
cursor: "pointer"
|
|
20783
21115
|
},
|
|
20784
|
-
children: projects.map((p) => /* @__PURE__ */ (0,
|
|
21116
|
+
children: projects.map((p) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: p.id, children: p.name }, p.id))
|
|
20785
21117
|
}
|
|
20786
21118
|
),
|
|
20787
|
-
/* @__PURE__ */ (0,
|
|
21119
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: [
|
|
20788
21120
|
"Agent: ",
|
|
20789
21121
|
agentName
|
|
20790
21122
|
] })
|
|
20791
21123
|
] }),
|
|
20792
|
-
/* @__PURE__ */ (0,
|
|
20793
|
-
/* @__PURE__ */ (0,
|
|
20794
|
-
/* @__PURE__ */ (0,
|
|
21124
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
21125
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "task-view__archived-toggle", children: [
|
|
21126
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20795
21127
|
"input",
|
|
20796
21128
|
{
|
|
20797
21129
|
type: "checkbox",
|
|
@@ -20802,42 +21134,42 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20802
21134
|
),
|
|
20803
21135
|
"Show archived"
|
|
20804
21136
|
] }),
|
|
20805
|
-
/* @__PURE__ */ (0,
|
|
21137
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "app__new-chat-btn", onClick: onNewTask, style: { padding: "4px 10px", fontSize: "11px" }, children: "+ New Task" })
|
|
20806
21138
|
] })
|
|
20807
21139
|
] }),
|
|
20808
|
-
/* @__PURE__ */ (0,
|
|
21140
|
+
/* @__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
21141
|
"No tasks created for ",
|
|
20810
21142
|
project.name,
|
|
20811
21143
|
'. 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,
|
|
21144
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("table", { className: "task-table", children: [
|
|
21145
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("tr", { children: [
|
|
21146
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "60px" }, children: "#" }),
|
|
21147
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", children: "Title" }),
|
|
21148
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "90px" }, children: "Status" }),
|
|
21149
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "100px" }, children: "Agent" }),
|
|
21150
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "120px" }, children: "Checklist" }),
|
|
21151
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "180px" }, children: "Branch" }),
|
|
21152
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "150px" }, children: "Updated" }),
|
|
21153
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "task-table__th", style: { width: "70px" } })
|
|
20822
21154
|
] }) }),
|
|
20823
|
-
/* @__PURE__ */ (0,
|
|
21155
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tbody", { children: tasks.map((task) => {
|
|
20824
21156
|
const completedCount = task.checklist.filter((c) => c.status === "done").length;
|
|
20825
21157
|
const totalCount = task.checklist.length;
|
|
20826
21158
|
const isArchived = !!task.archived;
|
|
20827
21159
|
const updated = new Date(task.updatedAt);
|
|
20828
21160
|
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,
|
|
21161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20830
21162
|
"tr",
|
|
20831
21163
|
{
|
|
20832
21164
|
className: `task-table__row${isArchived ? " task-table__row--archived" : ""}`,
|
|
20833
21165
|
onClick: () => onOpenLog(task),
|
|
20834
21166
|
children: [
|
|
20835
|
-
/* @__PURE__ */ (0,
|
|
20836
|
-
/* @__PURE__ */ (0,
|
|
20837
|
-
isArchived && /* @__PURE__ */ (0,
|
|
21167
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td task-table__td--mono", children: task.id }),
|
|
21168
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__title", children: [
|
|
21169
|
+
isArchived && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Archive, { size: 11 }),
|
|
20838
21170
|
task.title
|
|
20839
21171
|
] }) }),
|
|
20840
|
-
/* @__PURE__ */ (0,
|
|
21172
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20841
21173
|
"span",
|
|
20842
21174
|
{
|
|
20843
21175
|
className: "task-table__badge",
|
|
@@ -20845,28 +21177,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20845
21177
|
children: task.status
|
|
20846
21178
|
}
|
|
20847
21179
|
) }),
|
|
20848
|
-
/* @__PURE__ */ (0,
|
|
20849
|
-
/* @__PURE__ */ (0,
|
|
20850
|
-
/* @__PURE__ */ (0,
|
|
21180
|
+
/* @__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" }) }),
|
|
21181
|
+
/* @__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: [
|
|
21182
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "task-table__progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20851
21183
|
"span",
|
|
20852
21184
|
{
|
|
20853
21185
|
className: "task-table__progress-fill",
|
|
20854
21186
|
style: { width: `${completedCount / totalCount * 100}%` }
|
|
20855
21187
|
}
|
|
20856
21188
|
) }),
|
|
20857
|
-
/* @__PURE__ */ (0,
|
|
21189
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__progress-text", children: [
|
|
20858
21190
|
completedCount,
|
|
20859
21191
|
"/",
|
|
20860
21192
|
totalCount
|
|
20861
21193
|
] })
|
|
20862
|
-
] }) : /* @__PURE__ */ (0,
|
|
20863
|
-
/* @__PURE__ */ (0,
|
|
20864
|
-
/* @__PURE__ */ (0,
|
|
20865
|
-
/* @__PURE__ */ (0,
|
|
20866
|
-
] }) : /* @__PURE__ */ (0,
|
|
20867
|
-
/* @__PURE__ */ (0,
|
|
20868
|
-
/* @__PURE__ */ (0,
|
|
20869
|
-
/* @__PURE__ */ (0,
|
|
21194
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
|
|
21195
|
+
/* @__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: [
|
|
21196
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GitBranch, { size: 11 }),
|
|
21197
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { children: task.branch })
|
|
21198
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { opacity: 0.4, fontSize: "11px" }, children: "\u2014" }) }),
|
|
21199
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "task-table__td task-table__td--muted", children: updatedStr }),
|
|
21200
|
+
/* @__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: [
|
|
21201
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20870
21202
|
"button",
|
|
20871
21203
|
{
|
|
20872
21204
|
className: "task-table__edit-btn",
|
|
@@ -20876,10 +21208,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20876
21208
|
},
|
|
20877
21209
|
title: task.archived ? "Unarchive task" : "Archive task",
|
|
20878
21210
|
"aria-label": task.archived ? "Unarchive task" : "Archive task",
|
|
20879
|
-
children: /* @__PURE__ */ (0,
|
|
21211
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Archive, { size: 13 })
|
|
20880
21212
|
}
|
|
20881
21213
|
),
|
|
20882
|
-
/* @__PURE__ */ (0,
|
|
21214
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20883
21215
|
"button",
|
|
20884
21216
|
{
|
|
20885
21217
|
className: "task-table__edit-btn",
|
|
@@ -20889,7 +21221,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20889
21221
|
},
|
|
20890
21222
|
title: "Edit task",
|
|
20891
21223
|
"aria-label": "Edit task",
|
|
20892
|
-
children: /* @__PURE__ */ (0,
|
|
21224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pencil, { size: 13 })
|
|
20893
21225
|
}
|
|
20894
21226
|
)
|
|
20895
21227
|
] }) })
|
|
@@ -20899,8 +21231,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20899
21231
|
);
|
|
20900
21232
|
}) })
|
|
20901
21233
|
] }) }),
|
|
20902
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
20903
|
-
/* @__PURE__ */ (0,
|
|
21234
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-table__pagination", children: [
|
|
21235
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20904
21236
|
"button",
|
|
20905
21237
|
{
|
|
20906
21238
|
className: "task-table__page-btn",
|
|
@@ -20909,13 +21241,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20909
21241
|
children: "\u2039 Prev"
|
|
20910
21242
|
}
|
|
20911
21243
|
),
|
|
20912
|
-
/* @__PURE__ */ (0,
|
|
21244
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "task-table__page-info", children: [
|
|
20913
21245
|
"Page ",
|
|
20914
21246
|
page + 1,
|
|
20915
21247
|
" of ",
|
|
20916
21248
|
totalPages
|
|
20917
21249
|
] }),
|
|
20918
|
-
/* @__PURE__ */ (0,
|
|
21250
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20919
21251
|
"button",
|
|
20920
21252
|
{
|
|
20921
21253
|
className: "task-table__page-btn",
|
|
@@ -20944,20 +21276,20 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20944
21276
|
}) {
|
|
20945
21277
|
const completedCount = task.checklist.filter((c) => c.status === "done").length;
|
|
20946
21278
|
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,
|
|
21279
|
+
const chatItems = (0, import_react18.useMemo)(() => taskMessagesToChatItems(taskMessages, agentLabels), [taskMessages, agentLabels]);
|
|
21280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
21281
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("header", { className: "app__chat-header task-view__sub-header", style: { padding: "12px 14px" }, children: [
|
|
21282
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
21283
|
+
/* @__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 }) }),
|
|
21284
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "app__chat-header-info", children: [
|
|
21285
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("h3", { className: "app__chat-header-title", style: { fontSize: "13px", margin: 0 }, children: [
|
|
20954
21286
|
"Task #",
|
|
20955
21287
|
task.id,
|
|
20956
21288
|
": ",
|
|
20957
21289
|
task.title
|
|
20958
21290
|
] }),
|
|
20959
|
-
/* @__PURE__ */ (0,
|
|
20960
|
-
/* @__PURE__ */ (0,
|
|
21291
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "app__chat-header-status", style: { fontSize: "10px" }, children: [
|
|
21292
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20961
21293
|
"span",
|
|
20962
21294
|
{
|
|
20963
21295
|
className: `agent-status-dot agent-status-dot--active ${isActiveLike ? "agent-status-dot--pulsing" : ""}`,
|
|
@@ -20968,24 +21300,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20968
21300
|
] })
|
|
20969
21301
|
] })
|
|
20970
21302
|
] }),
|
|
20971
|
-
/* @__PURE__ */ (0,
|
|
20972
|
-
task.status !== "done" && /* @__PURE__ */ (0,
|
|
21303
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
21304
|
+
task.status !== "done" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20973
21305
|
"button",
|
|
20974
21306
|
{
|
|
20975
21307
|
className: "confirm__btn confirm__btn--primary",
|
|
20976
21308
|
onClick: () => onToggleStatus(task),
|
|
20977
21309
|
title: isActiveLike ? "Pause this task (aborts the running agent)" : "Activate this task",
|
|
20978
21310
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
20979
|
-
children: isActiveLike ? /* @__PURE__ */ (0,
|
|
20980
|
-
/* @__PURE__ */ (0,
|
|
21311
|
+
children: isActiveLike ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
21312
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pause, { size: 12 }),
|
|
20981
21313
|
" Pause"
|
|
20982
|
-
] }) : /* @__PURE__ */ (0,
|
|
20983
|
-
/* @__PURE__ */ (0,
|
|
21314
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
21315
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Play, { size: 12 }),
|
|
20984
21316
|
" Activate"
|
|
20985
21317
|
] })
|
|
20986
21318
|
}
|
|
20987
21319
|
),
|
|
20988
|
-
/* @__PURE__ */ (0,
|
|
21320
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20989
21321
|
"span",
|
|
20990
21322
|
{
|
|
20991
21323
|
className: "task-table__badge",
|
|
@@ -20995,8 +21327,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
20995
21327
|
)
|
|
20996
21328
|
] })
|
|
20997
21329
|
] }),
|
|
20998
|
-
/* @__PURE__ */ (0,
|
|
20999
|
-
/* @__PURE__ */ (0,
|
|
21330
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "row" }, children: [
|
|
21331
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21000
21332
|
"aside",
|
|
21001
21333
|
{
|
|
21002
21334
|
style: {
|
|
@@ -21009,19 +21341,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21009
21341
|
background: "var(--vscode-sideBar-background, rgba(0,0,0,0.1))"
|
|
21010
21342
|
},
|
|
21011
21343
|
children: [
|
|
21012
|
-
/* @__PURE__ */ (0,
|
|
21013
|
-
/* @__PURE__ */ (0,
|
|
21014
|
-
totalCount > 0 && /* @__PURE__ */ (0,
|
|
21344
|
+
/* @__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: [
|
|
21345
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h4", { style: { margin: 0, fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", opacity: 0.6 }, children: "Checklist" }),
|
|
21346
|
+
totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { fontSize: "10px", opacity: 0.5, marginTop: "2px" }, children: [
|
|
21015
21347
|
completedCount,
|
|
21016
21348
|
"/",
|
|
21017
21349
|
totalCount,
|
|
21018
21350
|
" done"
|
|
21019
21351
|
] })
|
|
21020
21352
|
] }),
|
|
21021
|
-
/* @__PURE__ */ (0,
|
|
21353
|
+
/* @__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
21354
|
const isDone = item.status === "done";
|
|
21023
21355
|
const isInProgress = item.status === "in_progress";
|
|
21024
|
-
return /* @__PURE__ */ (0,
|
|
21356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21025
21357
|
"label",
|
|
21026
21358
|
{
|
|
21027
21359
|
style: {
|
|
@@ -21038,7 +21370,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21038
21370
|
},
|
|
21039
21371
|
title: isInProgress ? "In progress" : isDone ? "Done" : "Pending",
|
|
21040
21372
|
children: [
|
|
21041
|
-
/* @__PURE__ */ (0,
|
|
21373
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21042
21374
|
"input",
|
|
21043
21375
|
{
|
|
21044
21376
|
type: "checkbox",
|
|
@@ -21047,7 +21379,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21047
21379
|
style: { marginTop: "2px", cursor: "pointer", flexShrink: 0 }
|
|
21048
21380
|
}
|
|
21049
21381
|
),
|
|
21050
|
-
/* @__PURE__ */ (0,
|
|
21382
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { wordBreak: "break-word" }, children: item.text })
|
|
21051
21383
|
]
|
|
21052
21384
|
},
|
|
21053
21385
|
item.id
|
|
@@ -21056,10 +21388,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21056
21388
|
]
|
|
21057
21389
|
}
|
|
21058
21390
|
),
|
|
21059
|
-
/* @__PURE__ */ (0,
|
|
21060
|
-
taskMessages.length === 0 ? /* @__PURE__ */ (0,
|
|
21061
|
-
/* @__PURE__ */ (0,
|
|
21062
|
-
/* @__PURE__ */ (0,
|
|
21391
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
|
|
21392
|
+
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 }),
|
|
21393
|
+
/* @__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: [
|
|
21394
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21063
21395
|
"textarea",
|
|
21064
21396
|
{
|
|
21065
21397
|
className: "composer__input",
|
|
@@ -21075,7 +21407,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21075
21407
|
style: { flex: 1, minHeight: "44px" }
|
|
21076
21408
|
}
|
|
21077
21409
|
),
|
|
21078
|
-
/* @__PURE__ */ (0,
|
|
21410
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21079
21411
|
"button",
|
|
21080
21412
|
{
|
|
21081
21413
|
type: "submit",
|
|
@@ -21107,12 +21439,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21107
21439
|
statusColor
|
|
21108
21440
|
}) {
|
|
21109
21441
|
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,
|
|
21442
|
+
const [draftTitle, setDraftTitle] = (0, import_react18.useState)(task.title);
|
|
21443
|
+
const [draftObjective, setDraftObjective] = (0, import_react18.useState)(task.objective);
|
|
21444
|
+
const [lastTaskId, setLastTaskId] = (0, import_react18.useState)(task.id);
|
|
21113
21445
|
const trimmedTitle = draftTitle.trim();
|
|
21114
21446
|
const isDirty = trimmedTitle !== task.title.trim() || draftObjective.trim() !== task.objective.trim();
|
|
21115
|
-
(0,
|
|
21447
|
+
(0, import_react18.useEffect)(() => {
|
|
21116
21448
|
if (task.id !== lastTaskId) {
|
|
21117
21449
|
setDraftTitle(task.title);
|
|
21118
21450
|
setDraftObjective(task.objective);
|
|
@@ -21127,16 +21459,16 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21127
21459
|
setDraftTitle(task.title);
|
|
21128
21460
|
setDraftObjective(task.objective);
|
|
21129
21461
|
};
|
|
21130
|
-
return /* @__PURE__ */ (0,
|
|
21131
|
-
/* @__PURE__ */ (0,
|
|
21132
|
-
/* @__PURE__ */ (0,
|
|
21133
|
-
/* @__PURE__ */ (0,
|
|
21134
|
-
/* @__PURE__ */ (0,
|
|
21135
|
-
/* @__PURE__ */ (0,
|
|
21462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, display: "flex", flexDirection: "column", height: "100%", overflowY: "auto" }, children: [
|
|
21463
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "task-view__sub-header", style: { padding: "12px 14px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
21464
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
21465
|
+
/* @__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 }) }),
|
|
21466
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("h3", { style: { margin: 0, fontSize: "15px", fontWeight: 700, display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
21467
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: { opacity: 0.6 }, children: [
|
|
21136
21468
|
"Task #",
|
|
21137
21469
|
task.id
|
|
21138
21470
|
] }),
|
|
21139
|
-
/* @__PURE__ */ (0,
|
|
21471
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21140
21472
|
"input",
|
|
21141
21473
|
{
|
|
21142
21474
|
value: draftTitle,
|
|
@@ -21157,7 +21489,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21157
21489
|
}
|
|
21158
21490
|
)
|
|
21159
21491
|
] }),
|
|
21160
|
-
/* @__PURE__ */ (0,
|
|
21492
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21161
21493
|
"span",
|
|
21162
21494
|
{
|
|
21163
21495
|
className: "task-table__badge",
|
|
@@ -21166,8 +21498,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21166
21498
|
}
|
|
21167
21499
|
)
|
|
21168
21500
|
] }),
|
|
21169
|
-
/* @__PURE__ */ (0,
|
|
21170
|
-
/* @__PURE__ */ (0,
|
|
21501
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "inline-flex", gap: "6px" }, children: [
|
|
21502
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21171
21503
|
"button",
|
|
21172
21504
|
{
|
|
21173
21505
|
className: "confirm__btn",
|
|
@@ -21177,7 +21509,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21177
21509
|
children: "View Log"
|
|
21178
21510
|
}
|
|
21179
21511
|
),
|
|
21180
|
-
task.worktreePath && /* @__PURE__ */ (0,
|
|
21512
|
+
task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21181
21513
|
"button",
|
|
21182
21514
|
{
|
|
21183
21515
|
className: "confirm__btn",
|
|
@@ -21185,12 +21517,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21185
21517
|
title: `Commit pending changes to ${task.branch} and remove the worktree`,
|
|
21186
21518
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
21187
21519
|
children: [
|
|
21188
|
-
/* @__PURE__ */ (0,
|
|
21520
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GitBranch, { size: 12 }),
|
|
21189
21521
|
" Discard worktree"
|
|
21190
21522
|
]
|
|
21191
21523
|
}
|
|
21192
21524
|
),
|
|
21193
|
-
/* @__PURE__ */ (0,
|
|
21525
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21194
21526
|
"button",
|
|
21195
21527
|
{
|
|
21196
21528
|
className: "confirm__btn",
|
|
@@ -21198,28 +21530,28 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21198
21530
|
title: task.archived ? "Unarchive this task" : "Archive this task (hides it from the list, excludes from scheduler)",
|
|
21199
21531
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px" },
|
|
21200
21532
|
children: [
|
|
21201
|
-
/* @__PURE__ */ (0,
|
|
21533
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Archive, { size: 12 }),
|
|
21202
21534
|
" ",
|
|
21203
21535
|
task.archived ? "Unarchive" : "Archive"
|
|
21204
21536
|
]
|
|
21205
21537
|
}
|
|
21206
21538
|
),
|
|
21207
|
-
/* @__PURE__ */ (0,
|
|
21539
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21208
21540
|
"button",
|
|
21209
21541
|
{
|
|
21210
21542
|
className: "confirm__btn confirm__btn--primary",
|
|
21211
21543
|
onClick: () => onToggleStatus(task),
|
|
21212
21544
|
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,
|
|
21545
|
+
children: task.status === "active" || task.status === "reviewing" || task.status === "planning" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
21546
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pause, { size: 12 }),
|
|
21215
21547
|
" Pause"
|
|
21216
|
-
] }) : /* @__PURE__ */ (0,
|
|
21217
|
-
/* @__PURE__ */ (0,
|
|
21548
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
21549
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Play, { size: 12 }),
|
|
21218
21550
|
" Activate"
|
|
21219
21551
|
] })
|
|
21220
21552
|
}
|
|
21221
21553
|
),
|
|
21222
|
-
/* @__PURE__ */ (0,
|
|
21554
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21223
21555
|
"button",
|
|
21224
21556
|
{
|
|
21225
21557
|
className: "confirm__btn",
|
|
@@ -21227,22 +21559,22 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21227
21559
|
title: "Permanently delete this task and all its messages",
|
|
21228
21560
|
style: { padding: "3px 10px", fontSize: "10px", display: "inline-flex", alignItems: "center", gap: "4px", color: "#ef4444" },
|
|
21229
21561
|
children: [
|
|
21230
|
-
/* @__PURE__ */ (0,
|
|
21562
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Trash2, { size: 12 }),
|
|
21231
21563
|
" Delete"
|
|
21232
21564
|
]
|
|
21233
21565
|
}
|
|
21234
21566
|
)
|
|
21235
21567
|
] })
|
|
21236
21568
|
] }),
|
|
21237
|
-
/* @__PURE__ */ (0,
|
|
21238
|
-
task.branch && /* @__PURE__ */ (0,
|
|
21239
|
-
/* @__PURE__ */ (0,
|
|
21240
|
-
/* @__PURE__ */ (0,
|
|
21241
|
-
!task.worktreePath && /* @__PURE__ */ (0,
|
|
21569
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { padding: "16px", maxWidth: "720px" }, children: [
|
|
21570
|
+
task.branch && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "6px", fontSize: "11px", opacity: 0.75 }, children: [
|
|
21571
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(GitBranch, { size: 12 }),
|
|
21572
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("code", { style: { fontFamily: "monospace" }, children: task.branch }),
|
|
21573
|
+
!task.worktreePath && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { opacity: 0.6 }, children: "(worktree removed)" })
|
|
21242
21574
|
] }),
|
|
21243
|
-
/* @__PURE__ */ (0,
|
|
21244
|
-
/* @__PURE__ */ (0,
|
|
21245
|
-
/* @__PURE__ */ (0,
|
|
21575
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
21576
|
+
/* @__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" }),
|
|
21577
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21246
21578
|
"textarea",
|
|
21247
21579
|
{
|
|
21248
21580
|
value: draftObjective,
|
|
@@ -21266,8 +21598,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21266
21598
|
}
|
|
21267
21599
|
}
|
|
21268
21600
|
),
|
|
21269
|
-
isDirty && /* @__PURE__ */ (0,
|
|
21270
|
-
/* @__PURE__ */ (0,
|
|
21601
|
+
isDirty && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", gap: "6px", alignItems: "center", marginTop: "8px" }, children: [
|
|
21602
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21271
21603
|
"button",
|
|
21272
21604
|
{
|
|
21273
21605
|
className: "confirm__btn confirm__btn--primary",
|
|
@@ -21280,13 +21612,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21280
21612
|
children: "Save"
|
|
21281
21613
|
}
|
|
21282
21614
|
),
|
|
21283
|
-
/* @__PURE__ */ (0,
|
|
21284
|
-
isRunning && /* @__PURE__ */ (0,
|
|
21615
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "confirm__btn", onClick: resetDraft, style: { padding: "3px 10px", fontSize: "10px" }, children: "Cancel" }),
|
|
21616
|
+
isRunning && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "10px", opacity: 0.6 }, children: "Applies from the next cycle." })
|
|
21285
21617
|
] })
|
|
21286
21618
|
] }),
|
|
21287
|
-
/* @__PURE__ */ (0,
|
|
21288
|
-
/* @__PURE__ */ (0,
|
|
21289
|
-
/* @__PURE__ */ (0,
|
|
21619
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
21620
|
+
/* @__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" }),
|
|
21621
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21290
21622
|
"select",
|
|
21291
21623
|
{
|
|
21292
21624
|
value: task.agentId || "",
|
|
@@ -21306,8 +21638,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21306
21638
|
},
|
|
21307
21639
|
title: isRunning ? "Pause the task before changing its agent" : "Choose which agent runs this task",
|
|
21308
21640
|
children: [
|
|
21309
|
-
/* @__PURE__ */ (0,
|
|
21310
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
21641
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
21642
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
21311
21643
|
a.name,
|
|
21312
21644
|
" (",
|
|
21313
21645
|
a.provider,
|
|
@@ -21317,9 +21649,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21317
21649
|
}
|
|
21318
21650
|
)
|
|
21319
21651
|
] }),
|
|
21320
|
-
/* @__PURE__ */ (0,
|
|
21321
|
-
/* @__PURE__ */ (0,
|
|
21322
|
-
/* @__PURE__ */ (0,
|
|
21652
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
21653
|
+
/* @__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" }),
|
|
21654
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21323
21655
|
"select",
|
|
21324
21656
|
{
|
|
21325
21657
|
value: task.plannerAgentId || "",
|
|
@@ -21328,8 +21660,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21328
21660
|
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
21661
|
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
21662
|
children: [
|
|
21331
|
-
/* @__PURE__ */ (0,
|
|
21332
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
21663
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
21664
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
21333
21665
|
a.name,
|
|
21334
21666
|
" (",
|
|
21335
21667
|
a.provider,
|
|
@@ -21339,9 +21671,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21339
21671
|
}
|
|
21340
21672
|
)
|
|
21341
21673
|
] }),
|
|
21342
|
-
/* @__PURE__ */ (0,
|
|
21343
|
-
/* @__PURE__ */ (0,
|
|
21344
|
-
/* @__PURE__ */ (0,
|
|
21674
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
21675
|
+
/* @__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" }),
|
|
21676
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21345
21677
|
"select",
|
|
21346
21678
|
{
|
|
21347
21679
|
value: task.reviewerAgentId || "",
|
|
@@ -21350,8 +21682,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21350
21682
|
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
21683
|
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
21684
|
children: [
|
|
21353
|
-
/* @__PURE__ */ (0,
|
|
21354
|
-
agents.map((a) => /* @__PURE__ */ (0,
|
|
21685
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "Project default" }),
|
|
21686
|
+
agents.map((a) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: a.id, children: [
|
|
21355
21687
|
a.name,
|
|
21356
21688
|
" (",
|
|
21357
21689
|
a.provider,
|
|
@@ -21361,31 +21693,31 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21361
21693
|
}
|
|
21362
21694
|
)
|
|
21363
21695
|
] }),
|
|
21364
|
-
/* @__PURE__ */ (0,
|
|
21365
|
-
/* @__PURE__ */ (0,
|
|
21366
|
-
/* @__PURE__ */ (0,
|
|
21696
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginBottom: "16px" }, children: [
|
|
21697
|
+
/* @__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" }),
|
|
21698
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { display: "flex", gap: "12px" }, children: [
|
|
21367
21699
|
{ flag: "planningEnabled", label: "Planning phase", value: task.planningEnabled },
|
|
21368
21700
|
{ flag: "reviewEnabled", label: "Review at DONE", value: task.reviewEnabled },
|
|
21369
21701
|
{ flag: "sddEnabled", label: "SDD mode (.md specs)", value: task.sddEnabled }
|
|
21370
|
-
].map(({ flag, label, value }) => /* @__PURE__ */ (0,
|
|
21702
|
+
].map(({ flag, label, value }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", flex: 1 }, children: [
|
|
21371
21703
|
label,
|
|
21372
|
-
/* @__PURE__ */ (0,
|
|
21704
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21373
21705
|
"select",
|
|
21374
21706
|
{
|
|
21375
21707
|
value: value === true ? "on" : value === false ? "off" : "inherit",
|
|
21376
21708
|
onChange: (e) => onSetFlag(task, flag, e.target.value === "inherit" ? null : e.target.value === "on"),
|
|
21377
21709
|
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
21710
|
children: [
|
|
21379
|
-
/* @__PURE__ */ (0,
|
|
21380
|
-
/* @__PURE__ */ (0,
|
|
21381
|
-
/* @__PURE__ */ (0,
|
|
21711
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "inherit", children: "Project default" }),
|
|
21712
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "on", children: "On" }),
|
|
21713
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "off", children: "Off" })
|
|
21382
21714
|
]
|
|
21383
21715
|
}
|
|
21384
21716
|
)
|
|
21385
21717
|
] }, flag)) }),
|
|
21386
|
-
/* @__PURE__ */ (0,
|
|
21718
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { style: { fontSize: "11px", display: "flex", flexDirection: "column", gap: "4px", marginTop: "12px", maxWidth: "260px" }, children: [
|
|
21387
21719
|
"Max run seconds per cycle",
|
|
21388
|
-
/* @__PURE__ */ (0,
|
|
21720
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21389
21721
|
"input",
|
|
21390
21722
|
{
|
|
21391
21723
|
type: "number",
|
|
@@ -21408,7 +21740,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21408
21740
|
)
|
|
21409
21741
|
] })
|
|
21410
21742
|
] }),
|
|
21411
|
-
task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0,
|
|
21743
|
+
task.status === "blocked" && task.blockedReason && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21412
21744
|
"div",
|
|
21413
21745
|
{
|
|
21414
21746
|
style: {
|
|
@@ -21421,19 +21753,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21421
21753
|
fontSize: "12px"
|
|
21422
21754
|
},
|
|
21423
21755
|
children: [
|
|
21424
|
-
/* @__PURE__ */ (0,
|
|
21425
|
-
/* @__PURE__ */ (0,
|
|
21756
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("strong", { children: [
|
|
21757
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TriangleAlert, { size: 13 }),
|
|
21426
21758
|
" Blocked Reason:"
|
|
21427
21759
|
] }),
|
|
21428
|
-
/* @__PURE__ */ (0,
|
|
21760
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { style: { margin: "4px 0 0 0" }, children: task.blockedReason })
|
|
21429
21761
|
]
|
|
21430
21762
|
}
|
|
21431
21763
|
),
|
|
21432
|
-
/* @__PURE__ */ (0,
|
|
21433
|
-
/* @__PURE__ */ (0,
|
|
21434
|
-
/* @__PURE__ */ (0,
|
|
21764
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
21765
|
+
/* @__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" }),
|
|
21766
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: (task.checklist || []).map((item) => {
|
|
21435
21767
|
const isDone = item.status === "done";
|
|
21436
|
-
return /* @__PURE__ */ (0,
|
|
21768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
21437
21769
|
"label",
|
|
21438
21770
|
{
|
|
21439
21771
|
style: {
|
|
@@ -21450,7 +21782,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21450
21782
|
opacity: isDone ? 0.6 : 1
|
|
21451
21783
|
},
|
|
21452
21784
|
children: [
|
|
21453
|
-
/* @__PURE__ */ (0,
|
|
21785
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
21454
21786
|
"input",
|
|
21455
21787
|
{
|
|
21456
21788
|
type: "checkbox",
|
|
@@ -21459,7 +21791,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21459
21791
|
style: { marginTop: "2px", cursor: "pointer" }
|
|
21460
21792
|
}
|
|
21461
21793
|
),
|
|
21462
|
-
/* @__PURE__ */ (0,
|
|
21794
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: item.text })
|
|
21463
21795
|
]
|
|
21464
21796
|
},
|
|
21465
21797
|
item.id
|
|
@@ -21471,7 +21803,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21471
21803
|
}
|
|
21472
21804
|
|
|
21473
21805
|
// src/useVoice.ts
|
|
21474
|
-
var
|
|
21806
|
+
var import_react19 = __toESM(require_react(), 1);
|
|
21475
21807
|
function canCapture() {
|
|
21476
21808
|
return typeof window !== "undefined" && typeof MediaRecorder !== "undefined" && !!navigator.mediaDevices?.getUserMedia;
|
|
21477
21809
|
}
|
|
@@ -21496,37 +21828,37 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21496
21828
|
const { voice, chatStatus, pendingConfirmCount, items, onTranscript } = opts;
|
|
21497
21829
|
const available = !!voice && voice.enabled && voice.configured && canCapture();
|
|
21498
21830
|
const canSpeak = !!voice?.canSpeak;
|
|
21499
|
-
const [phase, setPhase] = (0,
|
|
21500
|
-
const [mode, setMode] = (0,
|
|
21501
|
-
const [error, setError] = (0,
|
|
21502
|
-
const phaseRef = (0,
|
|
21831
|
+
const [phase, setPhase] = (0, import_react19.useState)("idle");
|
|
21832
|
+
const [mode, setMode] = (0, import_react19.useState)("dictate");
|
|
21833
|
+
const [error, setError] = (0, import_react19.useState)(null);
|
|
21834
|
+
const phaseRef = (0, import_react19.useRef)(phase);
|
|
21503
21835
|
phaseRef.current = phase;
|
|
21504
|
-
const modeRef = (0,
|
|
21836
|
+
const modeRef = (0, import_react19.useRef)(mode);
|
|
21505
21837
|
modeRef.current = mode;
|
|
21506
|
-
const onTranscriptRef = (0,
|
|
21838
|
+
const onTranscriptRef = (0, import_react19.useRef)(onTranscript);
|
|
21507
21839
|
onTranscriptRef.current = onTranscript;
|
|
21508
|
-
const itemsRef = (0,
|
|
21840
|
+
const itemsRef = (0, import_react19.useRef)(items);
|
|
21509
21841
|
itemsRef.current = items;
|
|
21510
|
-
const chatStatusRef = (0,
|
|
21842
|
+
const chatStatusRef = (0, import_react19.useRef)(chatStatus);
|
|
21511
21843
|
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,
|
|
21844
|
+
const streamRef = (0, import_react19.useRef)(null);
|
|
21845
|
+
const recorderRef = (0, import_react19.useRef)(null);
|
|
21846
|
+
const chunksRef = (0, import_react19.useRef)([]);
|
|
21847
|
+
const vadRef = (0, import_react19.useRef)(null);
|
|
21848
|
+
const audioRef = (0, import_react19.useRef)(null);
|
|
21849
|
+
const idleTimerRef = (0, import_react19.useRef)(null);
|
|
21850
|
+
const heardSpeechRef = (0, import_react19.useRef)(false);
|
|
21851
|
+
const sawStreamingRef = (0, import_react19.useRef)(false);
|
|
21852
|
+
const cursorRef = (0, import_react19.useRef)(0);
|
|
21853
|
+
const queueRef = (0, import_react19.useRef)([]);
|
|
21854
|
+
const apply = (0, import_react19.useCallback)((event) => {
|
|
21523
21855
|
setPhase((current) => nextPhase(current, event));
|
|
21524
21856
|
}, []);
|
|
21525
21857
|
const clearIdleTimer = () => {
|
|
21526
21858
|
if (idleTimerRef.current) clearTimeout(idleTimerRef.current);
|
|
21527
21859
|
idleTimerRef.current = null;
|
|
21528
21860
|
};
|
|
21529
|
-
const teardownCapture = (0,
|
|
21861
|
+
const teardownCapture = (0, import_react19.useCallback)(() => {
|
|
21530
21862
|
clearIdleTimer();
|
|
21531
21863
|
try {
|
|
21532
21864
|
vadRef.current?.destroy();
|
|
@@ -21543,14 +21875,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21543
21875
|
chunksRef.current = [];
|
|
21544
21876
|
heardSpeechRef.current = false;
|
|
21545
21877
|
}, []);
|
|
21546
|
-
const stopPlayback = (0,
|
|
21878
|
+
const stopPlayback = (0, import_react19.useCallback)(() => {
|
|
21547
21879
|
if (audioRef.current) {
|
|
21548
21880
|
audioRef.current.pause();
|
|
21549
21881
|
audioRef.current.src = "";
|
|
21550
21882
|
audioRef.current = null;
|
|
21551
21883
|
}
|
|
21552
21884
|
}, []);
|
|
21553
|
-
const fail = (0,
|
|
21885
|
+
const fail = (0, import_react19.useCallback)(
|
|
21554
21886
|
(message) => {
|
|
21555
21887
|
teardownCapture();
|
|
21556
21888
|
stopPlayback();
|
|
@@ -21559,7 +21891,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21559
21891
|
},
|
|
21560
21892
|
[apply, teardownCapture, stopPlayback]
|
|
21561
21893
|
);
|
|
21562
|
-
const finishRecording = (0,
|
|
21894
|
+
const finishRecording = (0, import_react19.useCallback)(() => {
|
|
21563
21895
|
const recorder = recorderRef.current;
|
|
21564
21896
|
if (!recorder || recorder.state === "inactive") return;
|
|
21565
21897
|
recorder.onstop = async () => {
|
|
@@ -21588,7 +21920,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21588
21920
|
};
|
|
21589
21921
|
recorder.stop();
|
|
21590
21922
|
}, [apply, fail, teardownCapture]);
|
|
21591
|
-
const startRecording = (0,
|
|
21923
|
+
const startRecording = (0, import_react19.useCallback)(async () => {
|
|
21592
21924
|
setError(null);
|
|
21593
21925
|
chunksRef.current = [];
|
|
21594
21926
|
heardSpeechRef.current = false;
|
|
@@ -21633,7 +21965,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21633
21965
|
fail(`Microphone unavailable: ${err}`);
|
|
21634
21966
|
}
|
|
21635
21967
|
}, [apply, fail, finishRecording, teardownCapture]);
|
|
21636
|
-
const speakReply = (0,
|
|
21968
|
+
const speakReply = (0, import_react19.useCallback)(async () => {
|
|
21637
21969
|
const text = queueRef.current.shift();
|
|
21638
21970
|
if (!text) {
|
|
21639
21971
|
apply({
|
|
@@ -21677,10 +22009,10 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21677
22009
|
fail(`Synthesis failed: ${err}`);
|
|
21678
22010
|
}
|
|
21679
22011
|
}, [apply, fail]);
|
|
21680
|
-
(0,
|
|
22012
|
+
(0, import_react19.useEffect)(() => {
|
|
21681
22013
|
if (chatStatus === "streaming") sawStreamingRef.current = true;
|
|
21682
22014
|
}, [chatStatus]);
|
|
21683
|
-
(0,
|
|
22015
|
+
(0, import_react19.useEffect)(() => {
|
|
21684
22016
|
if (modeRef.current !== "conversation") return;
|
|
21685
22017
|
if (phaseRef.current === "idle") return;
|
|
21686
22018
|
const { texts, cursor } = takeFinalizedBubbles(items, cursorRef.current);
|
|
@@ -21689,7 +22021,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21689
22021
|
queueRef.current.push(...texts);
|
|
21690
22022
|
apply({ kind: "speechQueued", mode: "conversation", canSpeak });
|
|
21691
22023
|
}, [items, canSpeak, apply]);
|
|
21692
|
-
(0,
|
|
22024
|
+
(0, import_react19.useEffect)(() => {
|
|
21693
22025
|
if (phase !== "awaiting") return;
|
|
21694
22026
|
if (chatStatus === "error") {
|
|
21695
22027
|
apply({ kind: "failed", mode: "conversation" });
|
|
@@ -21711,8 +22043,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21711
22043
|
pendingSpeech: queueRef.current.length
|
|
21712
22044
|
});
|
|
21713
22045
|
}, [phase, chatStatus, pendingConfirmCount, canSpeak, apply]);
|
|
21714
|
-
const prevPhase = (0,
|
|
21715
|
-
(0,
|
|
22046
|
+
const prevPhase = (0, import_react19.useRef)("idle");
|
|
22047
|
+
(0, import_react19.useEffect)(() => {
|
|
21716
22048
|
const from = prevPhase.current;
|
|
21717
22049
|
prevPhase.current = phase;
|
|
21718
22050
|
if (from === phase) return;
|
|
@@ -21724,14 +22056,14 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21724
22056
|
queueRef.current = [];
|
|
21725
22057
|
}
|
|
21726
22058
|
}, [phase, startRecording, speakReply, teardownCapture, stopPlayback]);
|
|
21727
|
-
(0,
|
|
22059
|
+
(0, import_react19.useEffect)(
|
|
21728
22060
|
() => () => {
|
|
21729
22061
|
teardownCapture();
|
|
21730
22062
|
stopPlayback();
|
|
21731
22063
|
},
|
|
21732
22064
|
[teardownCapture, stopPlayback]
|
|
21733
22065
|
);
|
|
21734
|
-
const toggle = (0,
|
|
22066
|
+
const toggle = (0, import_react19.useCallback)(() => {
|
|
21735
22067
|
if (!available) return;
|
|
21736
22068
|
const current = phaseRef.current;
|
|
21737
22069
|
if (current === "idle") {
|
|
@@ -21745,7 +22077,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21745
22077
|
}
|
|
21746
22078
|
apply({ kind: "userStop", mode: modeRef.current });
|
|
21747
22079
|
}, [available, apply, finishRecording]);
|
|
21748
|
-
const changeMode = (0,
|
|
22080
|
+
const changeMode = (0, import_react19.useCallback)(
|
|
21749
22081
|
(next) => {
|
|
21750
22082
|
apply({ kind: "userStop", mode: modeRef.current });
|
|
21751
22083
|
setMode(next);
|
|
@@ -21756,7 +22088,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21756
22088
|
}
|
|
21757
22089
|
|
|
21758
22090
|
// src/App.tsx
|
|
21759
|
-
var
|
|
22091
|
+
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
21760
22092
|
function closeStreamingAssistant2(items) {
|
|
21761
22093
|
const last = items[items.length - 1];
|
|
21762
22094
|
if (!last || last.kind !== "assistant" || !last.streaming) return items;
|
|
@@ -21918,35 +22250,37 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
21918
22250
|
}
|
|
21919
22251
|
}
|
|
21920
22252
|
function App({ postMessage, layout = "compact" }) {
|
|
21921
|
-
const [chatState, dispatch] = (0,
|
|
22253
|
+
const [chatState, dispatch] = (0, import_react20.useReducer)(reducer, {
|
|
21922
22254
|
items: [],
|
|
21923
22255
|
status: "idle",
|
|
21924
22256
|
errorText: null,
|
|
21925
22257
|
pendingConfirms: [],
|
|
21926
22258
|
contextUsage: null
|
|
21927
22259
|
});
|
|
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 [
|
|
21939
|
-
const [
|
|
21940
|
-
const [
|
|
21941
|
-
const [
|
|
21942
|
-
const [
|
|
21943
|
-
const [
|
|
21944
|
-
const [
|
|
21945
|
-
const [
|
|
21946
|
-
(0,
|
|
22260
|
+
const [agents, setAgents] = (0, import_react20.useState)([]);
|
|
22261
|
+
const [sessions, setSessions] = (0, import_react20.useState)([]);
|
|
22262
|
+
const [selectedAgentId, setSelectedAgentId] = (0, import_react20.useState)(null);
|
|
22263
|
+
const [selectedSessionId, setSelectedSessionId] = (0, import_react20.useState)(null);
|
|
22264
|
+
const [showSessions, setShowSessions] = (0, import_react20.useState)(false);
|
|
22265
|
+
const [showAllAgents, setShowAllAgents] = (0, import_react20.useState)(false);
|
|
22266
|
+
const [pendingDelete, setPendingDelete] = (0, import_react20.useState)(null);
|
|
22267
|
+
const [activeScreen, setActiveScreen] = (0, import_react20.useState)("chat");
|
|
22268
|
+
const [settingsData, setSettingsData] = (0, import_react20.useState)(null);
|
|
22269
|
+
const [modelsResult, setModelsResult] = (0, import_react20.useState)(null);
|
|
22270
|
+
const [acpRegistry, setAcpRegistry] = (0, import_react20.useState)(null);
|
|
22271
|
+
const [acpInstall, setAcpInstall] = (0, import_react20.useState)(null);
|
|
22272
|
+
const [refreshingSourceId, setRefreshingSourceId] = (0, import_react20.useState)(null);
|
|
22273
|
+
const [refreshOutcome, setRefreshOutcome] = (0, import_react20.useState)(null);
|
|
22274
|
+
const [mcpAuthOutcome, setMcpAuthOutcome] = (0, import_react20.useState)(null);
|
|
22275
|
+
const [taskRuns, setTaskRuns] = (0, import_react20.useState)({});
|
|
22276
|
+
const [voiceConfig, setVoiceConfig] = (0, import_react20.useState)(null);
|
|
22277
|
+
const [sttCatalogResult, setSttCatalogResult] = (0, import_react20.useState)(null);
|
|
22278
|
+
const [ttsCatalogResult, setTtsCatalogResult] = (0, import_react20.useState)(null);
|
|
22279
|
+
const [composerDraft, setComposerDraft] = (0, import_react20.useState)("");
|
|
22280
|
+
(0, import_react20.useEffect)(() => {
|
|
21947
22281
|
postMessage({ type: "webviewReady" });
|
|
21948
22282
|
}, []);
|
|
21949
|
-
(0,
|
|
22283
|
+
(0, import_react20.useEffect)(() => {
|
|
21950
22284
|
function handle(event) {
|
|
21951
22285
|
const msg = event.data;
|
|
21952
22286
|
if (!msg || typeof msg !== "object" || !("type" in msg)) return;
|
|
@@ -22003,6 +22337,21 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22003
22337
|
case "modelsFetched":
|
|
22004
22338
|
setModelsResult(msg.result);
|
|
22005
22339
|
return;
|
|
22340
|
+
case "acpRegistryFetched":
|
|
22341
|
+
setAcpRegistry(msg.result);
|
|
22342
|
+
return;
|
|
22343
|
+
case "acpInstallProgress":
|
|
22344
|
+
setAcpInstall(
|
|
22345
|
+
(prev) => prev && prev.agentId === msg.agentId ? { ...prev, lines: [...prev.lines, msg.line] } : { agentId: msg.agentId, lines: [msg.line] }
|
|
22346
|
+
);
|
|
22347
|
+
return;
|
|
22348
|
+
case "acpInstallResult":
|
|
22349
|
+
setAcpInstall((prev) => ({
|
|
22350
|
+
agentId: msg.agentId,
|
|
22351
|
+
lines: prev?.agentId === msg.agentId ? prev.lines : [],
|
|
22352
|
+
result: { ok: msg.ok, command: msg.command, args: msg.args, env: msg.env, error: msg.error }
|
|
22353
|
+
}));
|
|
22354
|
+
return;
|
|
22006
22355
|
case "voiceModelsFetched":
|
|
22007
22356
|
if (msg.target === "tts") setTtsCatalogResult(msg.result);
|
|
22008
22357
|
else setSttCatalogResult(msg.result);
|
|
@@ -22054,15 +22403,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22054
22403
|
if (voice2) msg.voice = true;
|
|
22055
22404
|
postMessage(msg);
|
|
22056
22405
|
};
|
|
22057
|
-
const onConfirm = (0,
|
|
22406
|
+
const onConfirm = (0, import_react20.useCallback)((id, decision) => {
|
|
22058
22407
|
dispatch({ kind: "permission-resolved", id });
|
|
22059
22408
|
postMessage({ type: "permission_response", id, decision });
|
|
22060
22409
|
}, [postMessage]);
|
|
22061
22410
|
const onAbort = () => {
|
|
22062
22411
|
postMessage({ type: "abort" });
|
|
22063
22412
|
};
|
|
22064
|
-
const confirmCards = (0,
|
|
22065
|
-
() => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0,
|
|
22413
|
+
const confirmCards = (0, import_react20.useMemo)(
|
|
22414
|
+
() => chatState.pendingConfirms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ConfirmCard, { pending: p, onDecide: onConfirm }, p.id)),
|
|
22066
22415
|
[chatState.pendingConfirms, onConfirm]
|
|
22067
22416
|
);
|
|
22068
22417
|
const onSelectAgent = (agentId) => {
|
|
@@ -22102,7 +22451,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22102
22451
|
const cancelDeleteSession = () => {
|
|
22103
22452
|
setPendingDelete(null);
|
|
22104
22453
|
};
|
|
22105
|
-
(0,
|
|
22454
|
+
(0, import_react20.useEffect)(() => {
|
|
22106
22455
|
if (!pendingDelete) return;
|
|
22107
22456
|
function handleKeyDown(event) {
|
|
22108
22457
|
if (event.key === "Escape") {
|
|
@@ -22117,7 +22466,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22117
22466
|
setShowSessions(!showSessions);
|
|
22118
22467
|
}
|
|
22119
22468
|
};
|
|
22120
|
-
(0,
|
|
22469
|
+
(0, import_react20.useEffect)(() => {
|
|
22121
22470
|
function handleClickOutside(event) {
|
|
22122
22471
|
const target = event.target;
|
|
22123
22472
|
if (showSessions && !target.closest(".app__sessions-dropdown")) {
|
|
@@ -22131,18 +22480,18 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22131
22480
|
const selectedAgentName = agents.find((a) => a.id === selectedAgentId)?.name;
|
|
22132
22481
|
const activeAgent = agents.find((a) => a.id === selectedAgentId);
|
|
22133
22482
|
if (activeScreen === "projects" && layout === "sidebar") {
|
|
22134
|
-
return /* @__PURE__ */ (0,
|
|
22135
|
-
/* @__PURE__ */ (0,
|
|
22136
|
-
/* @__PURE__ */ (0,
|
|
22137
|
-
/* @__PURE__ */ (0,
|
|
22138
|
-
/* @__PURE__ */ (0,
|
|
22483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app", style: { height: "100%" }, children: [
|
|
22484
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__header-row", children: [
|
|
22485
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__logo-title-wrapper", onClick: () => setActiveScreen("chat"), style: { cursor: "pointer" }, children: [
|
|
22486
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
|
|
22487
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Caretaker" })
|
|
22139
22488
|
] }),
|
|
22140
|
-
/* @__PURE__ */ (0,
|
|
22141
|
-
/* @__PURE__ */ (0,
|
|
22142
|
-
/* @__PURE__ */ (0,
|
|
22489
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__controls", children: [
|
|
22490
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "app__sessions-btn", onClick: () => setActiveScreen("chat"), children: [
|
|
22491
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageSquare, { size: 13 }),
|
|
22143
22492
|
" Chat"
|
|
22144
22493
|
] }),
|
|
22145
|
-
/* @__PURE__ */ (0,
|
|
22494
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22146
22495
|
"button",
|
|
22147
22496
|
{
|
|
22148
22497
|
className: "app__settings-btn",
|
|
@@ -22152,24 +22501,27 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22152
22501
|
},
|
|
22153
22502
|
title: "Caretaker Settings",
|
|
22154
22503
|
children: [
|
|
22155
|
-
/* @__PURE__ */ (0,
|
|
22504
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Settings, { size: 13 }),
|
|
22156
22505
|
" Settings"
|
|
22157
22506
|
]
|
|
22158
22507
|
}
|
|
22159
22508
|
)
|
|
22160
22509
|
] })
|
|
22161
22510
|
] }) }),
|
|
22162
|
-
/* @__PURE__ */ (0,
|
|
22511
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ProjectsTab, { agents }) })
|
|
22163
22512
|
] });
|
|
22164
22513
|
}
|
|
22165
22514
|
if (activeScreen === "settings") {
|
|
22166
|
-
return /* @__PURE__ */ (0,
|
|
22515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: `app ${layout === "sidebar" ? "app--settings-centered" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22167
22516
|
SettingsPanel,
|
|
22168
22517
|
{
|
|
22169
22518
|
layout,
|
|
22170
22519
|
postMessage,
|
|
22171
22520
|
settingsData,
|
|
22172
22521
|
modelsResult,
|
|
22522
|
+
acpRegistry,
|
|
22523
|
+
acpInstall,
|
|
22524
|
+
resetAcpInstall: () => setAcpInstall(null),
|
|
22173
22525
|
sttCatalogResult,
|
|
22174
22526
|
ttsCatalogResult,
|
|
22175
22527
|
setModelsResult,
|
|
@@ -22183,43 +22535,43 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22183
22535
|
}
|
|
22184
22536
|
) });
|
|
22185
22537
|
}
|
|
22186
|
-
const deleteOverlay = pendingDelete && /* @__PURE__ */ (0,
|
|
22187
|
-
/* @__PURE__ */ (0,
|
|
22188
|
-
/* @__PURE__ */ (0,
|
|
22538
|
+
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: [
|
|
22539
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__confirm-title", children: "Delete conversation" }),
|
|
22540
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "app__confirm-message", children: [
|
|
22189
22541
|
"Delete conversation \u201C",
|
|
22190
22542
|
pendingDelete.title,
|
|
22191
22543
|
"\u201D? This cannot be undone."
|
|
22192
22544
|
] }),
|
|
22193
|
-
/* @__PURE__ */ (0,
|
|
22194
|
-
/* @__PURE__ */ (0,
|
|
22195
|
-
/* @__PURE__ */ (0,
|
|
22545
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__confirm-buttons", children: [
|
|
22546
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "app__confirm-btn", onClick: cancelDeleteSession, children: "Cancel" }),
|
|
22547
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "app__confirm-btn app__confirm-btn--danger", onClick: confirmDeleteSession, children: "Delete" })
|
|
22196
22548
|
] })
|
|
22197
22549
|
] }) });
|
|
22198
22550
|
if (layout === "sidebar") {
|
|
22199
|
-
return /* @__PURE__ */ (0,
|
|
22200
|
-
/* @__PURE__ */ (0,
|
|
22201
|
-
/* @__PURE__ */ (0,
|
|
22202
|
-
/* @__PURE__ */ (0,
|
|
22203
|
-
/* @__PURE__ */ (0,
|
|
22551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app app--with-sidebar", children: [
|
|
22552
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("aside", { className: "app__sidebar", children: [
|
|
22553
|
+
/* @__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: [
|
|
22554
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
|
|
22555
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Caretaker" })
|
|
22204
22556
|
] }) }),
|
|
22205
|
-
/* @__PURE__ */ (0,
|
|
22206
|
-
/* @__PURE__ */ (0,
|
|
22207
|
-
/* @__PURE__ */ (0,
|
|
22208
|
-
/* @__PURE__ */ (0,
|
|
22557
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-content", children: [
|
|
22558
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-section", children: [
|
|
22559
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-section-title", children: "Agents" }),
|
|
22560
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sidebar-agents-list", children: selectedAgentId && !showAllAgents ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22209
22561
|
"button",
|
|
22210
22562
|
{
|
|
22211
22563
|
className: "app__sidebar-agent-item app__sidebar-agent-item--collapsed-active",
|
|
22212
22564
|
onClick: () => setShowAllAgents(true),
|
|
22213
22565
|
title: "Switch Agent",
|
|
22214
22566
|
children: [
|
|
22215
|
-
/* @__PURE__ */ (0,
|
|
22216
|
-
/* @__PURE__ */ (0,
|
|
22217
|
-
/* @__PURE__ */ (0,
|
|
22567
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "agent-status-dot agent-status-dot--active" }),
|
|
22568
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-agent-name", children: activeAgent?.name || selectedAgentId }),
|
|
22569
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronDown, { className: "app__sidebar-chevron", size: 10 })
|
|
22218
22570
|
]
|
|
22219
22571
|
}
|
|
22220
|
-
) : /* @__PURE__ */ (0,
|
|
22572
|
+
) : /* @__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
22573
|
const isSelected = selectedAgentId === agent.id;
|
|
22222
|
-
return /* @__PURE__ */ (0,
|
|
22574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22223
22575
|
"button",
|
|
22224
22576
|
{
|
|
22225
22577
|
className: `app__sidebar-agent-item ${isSelected ? "app__sidebar-agent-item--active" : ""}`,
|
|
@@ -22231,19 +22583,19 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22231
22583
|
}
|
|
22232
22584
|
},
|
|
22233
22585
|
children: [
|
|
22234
|
-
/* @__PURE__ */ (0,
|
|
22235
|
-
/* @__PURE__ */ (0,
|
|
22236
|
-
isSelected && /* @__PURE__ */ (0,
|
|
22586
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: `agent-status-dot ${isSelected ? "agent-status-dot--active" : ""}` }),
|
|
22587
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-agent-name", children: agent.name }),
|
|
22588
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronUp, { className: "app__sidebar-chevron app__sidebar-chevron--up", size: 10 })
|
|
22237
22589
|
]
|
|
22238
22590
|
},
|
|
22239
22591
|
agent.id
|
|
22240
22592
|
);
|
|
22241
22593
|
}) }) })
|
|
22242
22594
|
] }),
|
|
22243
|
-
selectedAgentId && /* @__PURE__ */ (0,
|
|
22244
|
-
/* @__PURE__ */ (0,
|
|
22245
|
-
/* @__PURE__ */ (0,
|
|
22246
|
-
/* @__PURE__ */ (0,
|
|
22595
|
+
selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-section", children: [
|
|
22596
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-section-header", children: [
|
|
22597
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-section-title", children: "Conversations" }),
|
|
22598
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22247
22599
|
"button",
|
|
22248
22600
|
{
|
|
22249
22601
|
className: "app__sidebar-new-chat-btn",
|
|
@@ -22253,15 +22605,15 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22253
22605
|
}
|
|
22254
22606
|
)
|
|
22255
22607
|
] }),
|
|
22256
|
-
/* @__PURE__ */ (0,
|
|
22608
|
+
/* @__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
22609
|
"div",
|
|
22258
22610
|
{
|
|
22259
22611
|
className: `app__sidebar-session-item ${selectedSessionId === session.id ? "app__sidebar-session-item--active" : ""}`,
|
|
22260
22612
|
onClick: () => onSelectSession(session.id),
|
|
22261
22613
|
children: [
|
|
22262
|
-
/* @__PURE__ */ (0,
|
|
22263
|
-
/* @__PURE__ */ (0,
|
|
22264
|
-
/* @__PURE__ */ (0,
|
|
22614
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-session-icon", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageSquare, { size: 13 }) }),
|
|
22615
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__sidebar-session-title", title: session.title, children: session.title }),
|
|
22616
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22265
22617
|
"button",
|
|
22266
22618
|
{
|
|
22267
22619
|
className: "app__sidebar-session-delete",
|
|
@@ -22270,7 +22622,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22270
22622
|
e.stopPropagation();
|
|
22271
22623
|
onDeleteSession(session.id, session.title);
|
|
22272
22624
|
},
|
|
22273
|
-
children: /* @__PURE__ */ (0,
|
|
22625
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Trash2, { size: 12 })
|
|
22274
22626
|
}
|
|
22275
22627
|
)
|
|
22276
22628
|
]
|
|
@@ -22279,8 +22631,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22279
22631
|
)) })
|
|
22280
22632
|
] })
|
|
22281
22633
|
] }),
|
|
22282
|
-
/* @__PURE__ */ (0,
|
|
22283
|
-
/* @__PURE__ */ (0,
|
|
22634
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sidebar-footer", style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
22635
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22284
22636
|
"button",
|
|
22285
22637
|
{
|
|
22286
22638
|
className: "app__sidebar-settings-btn",
|
|
@@ -22288,13 +22640,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22288
22640
|
setActiveScreen("projects");
|
|
22289
22641
|
},
|
|
22290
22642
|
title: "Projects & Autonomous Tasks",
|
|
22291
|
-
children: /* @__PURE__ */ (0,
|
|
22292
|
-
/* @__PURE__ */ (0,
|
|
22643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
|
|
22644
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FolderKanban, { size: 13 }),
|
|
22293
22645
|
" Projects"
|
|
22294
22646
|
] })
|
|
22295
22647
|
}
|
|
22296
22648
|
),
|
|
22297
|
-
/* @__PURE__ */ (0,
|
|
22649
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22298
22650
|
"button",
|
|
22299
22651
|
{
|
|
22300
22652
|
className: "app__sidebar-settings-btn",
|
|
@@ -22304,22 +22656,22 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22304
22656
|
},
|
|
22305
22657
|
title: "Caretaker Settings",
|
|
22306
22658
|
children: [
|
|
22307
|
-
/* @__PURE__ */ (0,
|
|
22308
|
-
/* @__PURE__ */ (0,
|
|
22659
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Settings, { className: "app__settings-icon", size: 14 }),
|
|
22660
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Settings" })
|
|
22309
22661
|
]
|
|
22310
22662
|
}
|
|
22311
22663
|
)
|
|
22312
22664
|
] })
|
|
22313
22665
|
] }),
|
|
22314
|
-
/* @__PURE__ */ (0,
|
|
22315
|
-
/* @__PURE__ */ (0,
|
|
22316
|
-
/* @__PURE__ */ (0,
|
|
22317
|
-
/* @__PURE__ */ (0,
|
|
22318
|
-
/* @__PURE__ */ (0,
|
|
22666
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("main", { className: "app__chat-pane", children: selectedAgentId ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
22667
|
+
/* @__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: [
|
|
22668
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { className: "app__chat-header-title", children: selectedAgentName }),
|
|
22669
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "app__chat-header-status", children: [
|
|
22670
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: `agent-status-dot agent-status-dot--active ${chatState.status === "streaming" ? "agent-status-dot--pulsing" : ""}` }),
|
|
22319
22671
|
chatState.status === "streaming" ? "Streaming response..." : "Ready"
|
|
22320
22672
|
] })
|
|
22321
22673
|
] }) }),
|
|
22322
|
-
/* @__PURE__ */ (0,
|
|
22674
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22323
22675
|
MessageList,
|
|
22324
22676
|
{
|
|
22325
22677
|
items: chatState.items,
|
|
@@ -22329,12 +22681,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22329
22681
|
trailing: confirmCards
|
|
22330
22682
|
}
|
|
22331
22683
|
),
|
|
22332
|
-
(chatState.errorText || voice.error) && /* @__PURE__ */ (0,
|
|
22333
|
-
/* @__PURE__ */ (0,
|
|
22684
|
+
(chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__error", children: [
|
|
22685
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TriangleAlert, { size: 14 }),
|
|
22334
22686
|
" ",
|
|
22335
22687
|
chatState.errorText || voice.error
|
|
22336
22688
|
] }),
|
|
22337
|
-
/* @__PURE__ */ (0,
|
|
22689
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22338
22690
|
Composer,
|
|
22339
22691
|
{
|
|
22340
22692
|
disabled: composerDisabled,
|
|
@@ -22353,30 +22705,30 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22353
22705
|
onValueChange: setComposerDraft
|
|
22354
22706
|
}
|
|
22355
22707
|
)
|
|
22356
|
-
] }) : /* @__PURE__ */ (0,
|
|
22708
|
+
] }) : /* @__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
22709
|
deleteOverlay
|
|
22358
22710
|
] });
|
|
22359
22711
|
}
|
|
22360
|
-
return /* @__PURE__ */ (0,
|
|
22361
|
-
/* @__PURE__ */ (0,
|
|
22362
|
-
/* @__PURE__ */ (0,
|
|
22363
|
-
/* @__PURE__ */ (0,
|
|
22364
|
-
/* @__PURE__ */ (0,
|
|
22712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app", children: [
|
|
22713
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("header", { className: "app__header", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__header-row", children: [
|
|
22714
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__logo-title-wrapper", children: [
|
|
22715
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: caretaker_cli_default, alt: "Caretaker", className: "app__logo" }),
|
|
22716
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Caretaker" })
|
|
22365
22717
|
] }),
|
|
22366
|
-
/* @__PURE__ */ (0,
|
|
22367
|
-
/* @__PURE__ */ (0,
|
|
22718
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__controls", children: [
|
|
22719
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__agent-select-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22368
22720
|
"select",
|
|
22369
22721
|
{
|
|
22370
22722
|
className: "app__agent-select",
|
|
22371
22723
|
value: selectedAgentId ?? "",
|
|
22372
22724
|
onChange: (e) => onSelectAgent(e.target.value),
|
|
22373
22725
|
children: [
|
|
22374
|
-
/* @__PURE__ */ (0,
|
|
22375
|
-
agents.map((agent) => /* @__PURE__ */ (0,
|
|
22726
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "", disabled: true, children: "-- Select Agent --" }),
|
|
22727
|
+
agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: agent.id, children: agent.name }, agent.id))
|
|
22376
22728
|
]
|
|
22377
22729
|
}
|
|
22378
22730
|
) }),
|
|
22379
|
-
/* @__PURE__ */ (0,
|
|
22731
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22380
22732
|
"button",
|
|
22381
22733
|
{
|
|
22382
22734
|
className: "app__sessions-btn",
|
|
@@ -22384,13 +22736,13 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22384
22736
|
disabled: !selectedAgentId,
|
|
22385
22737
|
title: "View conversations",
|
|
22386
22738
|
children: [
|
|
22387
|
-
/* @__PURE__ */ (0,
|
|
22739
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageSquare, { size: 13 }),
|
|
22388
22740
|
" ",
|
|
22389
22741
|
sessions.length
|
|
22390
22742
|
]
|
|
22391
22743
|
}
|
|
22392
22744
|
),
|
|
22393
|
-
/* @__PURE__ */ (0,
|
|
22745
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22394
22746
|
"button",
|
|
22395
22747
|
{
|
|
22396
22748
|
className: "app__new-chat-btn",
|
|
@@ -22400,7 +22752,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22400
22752
|
children: "+ New"
|
|
22401
22753
|
}
|
|
22402
22754
|
),
|
|
22403
|
-
/* @__PURE__ */ (0,
|
|
22755
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22404
22756
|
"button",
|
|
22405
22757
|
{
|
|
22406
22758
|
className: "app__settings-btn",
|
|
@@ -22409,24 +22761,24 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22409
22761
|
postMessage({ type: "getSettingsData" });
|
|
22410
22762
|
},
|
|
22411
22763
|
title: "Caretaker Settings",
|
|
22412
|
-
children: /* @__PURE__ */ (0,
|
|
22764
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Settings, { className: "app__settings-icon", size: 14 })
|
|
22413
22765
|
}
|
|
22414
22766
|
)
|
|
22415
22767
|
] })
|
|
22416
22768
|
] }) }),
|
|
22417
|
-
showSessions && sessions.length > 0 && /* @__PURE__ */ (0,
|
|
22418
|
-
/* @__PURE__ */ (0,
|
|
22769
|
+
showSessions && sessions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sessions-dropdown", children: [
|
|
22770
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sessions-title", children: [
|
|
22419
22771
|
"Conversations for ",
|
|
22420
22772
|
selectedAgentName
|
|
22421
22773
|
] }),
|
|
22422
|
-
/* @__PURE__ */ (0,
|
|
22774
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sessions-list", children: sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
22423
22775
|
"div",
|
|
22424
22776
|
{
|
|
22425
22777
|
className: `app__session-item ${selectedSessionId === session.id ? "app__session-item--active" : ""}`,
|
|
22426
22778
|
onClick: () => onSelectSession(session.id),
|
|
22427
22779
|
children: [
|
|
22428
|
-
/* @__PURE__ */ (0,
|
|
22429
|
-
/* @__PURE__ */ (0,
|
|
22780
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "app__session-item-title", children: session.title }),
|
|
22781
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22430
22782
|
"button",
|
|
22431
22783
|
{
|
|
22432
22784
|
className: "app__session-item-delete",
|
|
@@ -22435,7 +22787,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22435
22787
|
e.stopPropagation();
|
|
22436
22788
|
onDeleteSession(session.id, session.title);
|
|
22437
22789
|
},
|
|
22438
|
-
children: /* @__PURE__ */ (0,
|
|
22790
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Trash2, { size: 12 })
|
|
22439
22791
|
}
|
|
22440
22792
|
)
|
|
22441
22793
|
]
|
|
@@ -22443,12 +22795,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22443
22795
|
session.id
|
|
22444
22796
|
)) })
|
|
22445
22797
|
] }),
|
|
22446
|
-
showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0,
|
|
22447
|
-
/* @__PURE__ */ (0,
|
|
22448
|
-
/* @__PURE__ */ (0,
|
|
22798
|
+
showSessions && sessions.length === 0 && selectedAgentId && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__sessions-dropdown app__sessions-dropdown--empty", children: [
|
|
22799
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "app__sessions-title", children: "No conversations yet" }),
|
|
22800
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "app__sessions-empty", children: "Start a new chat to create a conversation" })
|
|
22449
22801
|
] }),
|
|
22450
|
-
!selectedAgentId && /* @__PURE__ */ (0,
|
|
22451
|
-
/* @__PURE__ */ (0,
|
|
22802
|
+
!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" }) }),
|
|
22803
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22452
22804
|
MessageList,
|
|
22453
22805
|
{
|
|
22454
22806
|
items: chatState.items,
|
|
@@ -22458,12 +22810,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22458
22810
|
trailing: confirmCards
|
|
22459
22811
|
}
|
|
22460
22812
|
),
|
|
22461
|
-
(chatState.errorText || voice.error) && /* @__PURE__ */ (0,
|
|
22462
|
-
/* @__PURE__ */ (0,
|
|
22813
|
+
(chatState.errorText || voice.error) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "app__error", children: [
|
|
22814
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TriangleAlert, { size: 14 }),
|
|
22463
22815
|
" ",
|
|
22464
22816
|
chatState.errorText || voice.error
|
|
22465
22817
|
] }),
|
|
22466
|
-
/* @__PURE__ */ (0,
|
|
22818
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
22467
22819
|
Composer,
|
|
22468
22820
|
{
|
|
22469
22821
|
disabled: composerDisabled,
|
|
@@ -22487,12 +22839,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22487
22839
|
}
|
|
22488
22840
|
|
|
22489
22841
|
// src/standalone.tsx
|
|
22490
|
-
var
|
|
22842
|
+
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
22491
22843
|
function StandaloneApp() {
|
|
22492
|
-
const [ws, setWs] = (0,
|
|
22493
|
-
const [connected, setConnected] = (0,
|
|
22494
|
-
const [error, setError] = (0,
|
|
22495
|
-
(0,
|
|
22844
|
+
const [ws, setWs] = (0, import_react21.useState)(null);
|
|
22845
|
+
const [connected, setConnected] = (0, import_react21.useState)(false);
|
|
22846
|
+
const [error, setError] = (0, import_react21.useState)(null);
|
|
22847
|
+
(0, import_react21.useEffect)(() => {
|
|
22496
22848
|
let active = true;
|
|
22497
22849
|
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
|
22498
22850
|
const socket = new WebSocket(`${protocol}//${window.location.host}/api/ws`);
|
|
@@ -22538,7 +22890,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22538
22890
|
}
|
|
22539
22891
|
};
|
|
22540
22892
|
if (error) {
|
|
22541
|
-
return /* @__PURE__ */ (0,
|
|
22893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: {
|
|
22542
22894
|
display: "flex",
|
|
22543
22895
|
flexDirection: "column",
|
|
22544
22896
|
alignItems: "center",
|
|
@@ -22550,9 +22902,9 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22550
22902
|
padding: "20px",
|
|
22551
22903
|
textAlign: "center"
|
|
22552
22904
|
}, children: [
|
|
22553
|
-
/* @__PURE__ */ (0,
|
|
22554
|
-
/* @__PURE__ */ (0,
|
|
22555
|
-
/* @__PURE__ */ (0,
|
|
22905
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { style: { color: "#ff6b6b" }, children: "Caretaker Connection Failed" }),
|
|
22906
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: error }),
|
|
22907
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
22556
22908
|
"button",
|
|
22557
22909
|
{
|
|
22558
22910
|
onClick: () => setWs(null),
|
|
@@ -22571,7 +22923,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22571
22923
|
] });
|
|
22572
22924
|
}
|
|
22573
22925
|
if (!connected) {
|
|
22574
|
-
return /* @__PURE__ */ (0,
|
|
22926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: {
|
|
22575
22927
|
display: "flex",
|
|
22576
22928
|
flexDirection: "column",
|
|
22577
22929
|
alignItems: "center",
|
|
@@ -22581,7 +22933,7 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22581
22933
|
background: "#1e1e1e",
|
|
22582
22934
|
color: "#f1f1f1"
|
|
22583
22935
|
}, children: [
|
|
22584
|
-
/* @__PURE__ */ (0,
|
|
22936
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: {
|
|
22585
22937
|
border: "4px solid rgba(255,255,255,0.1)",
|
|
22586
22938
|
width: "36px",
|
|
22587
22939
|
height: "36px",
|
|
@@ -22590,8 +22942,8 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22590
22942
|
animation: "spin 1s linear infinite",
|
|
22591
22943
|
marginBottom: "16px"
|
|
22592
22944
|
} }),
|
|
22593
|
-
/* @__PURE__ */ (0,
|
|
22594
|
-
/* @__PURE__ */ (0,
|
|
22945
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Connecting to Caretaker server..." }),
|
|
22946
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("style", { children: `
|
|
22595
22947
|
@keyframes spin {
|
|
22596
22948
|
0% { transform: rotate(0deg); }
|
|
22597
22949
|
100% { transform: rotate(360deg); }
|
|
@@ -22599,12 +22951,12 @@ ${msg.content}`, streaming: false, label: msg.agentLabel || labels?.reviewer });
|
|
|
22599
22951
|
` })
|
|
22600
22952
|
] });
|
|
22601
22953
|
}
|
|
22602
|
-
return /* @__PURE__ */ (0,
|
|
22954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(App, { postMessage, layout: "sidebar" });
|
|
22603
22955
|
}
|
|
22604
22956
|
var rootEl = document.getElementById("root");
|
|
22605
22957
|
if (!rootEl) throw new Error("#root not found");
|
|
22606
22958
|
(0, import_client.createRoot)(rootEl).render(
|
|
22607
|
-
/* @__PURE__ */ (0,
|
|
22959
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StandaloneApp, {}) })
|
|
22608
22960
|
);
|
|
22609
22961
|
})();
|
|
22610
22962
|
/*! Bundled license information:
|