Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Merge remote-tracking branch 'origin/dev' into feat/791-group-goal

Fei241124dfbf0989b5
diff --cc app/package-lock.json
index db3b1b8f,4230a857..4315cb94
--- a/app/package-lock.json
+++ b/app/package-lock.json
@@@ -10,41 -10,40 +10,41 @@@
"license": "Apache-2.0",
"dependencies": {
"@deepseek-ai/cordis-plugin-group": "1.0.5",
+ "@deepseek-ai/cordis-plugin-include": "1.0.10",
- "@deepseek-ai/dsh": "0.2.1-rc.4",
- "@deepseek-ai/dsh-anonymous-user-id": "0.2.1-rc.4",
- "@deepseek-ai/dsh-app-boot": "0.2.1-rc.4",
- "@deepseek-ai/dsh-attachment": "0.2.1-rc.4",
- "@deepseek-ai/dsh-base": "0.2.1-rc.4",
- "@deepseek-ai/dsh-bash-local": "0.2.1-rc.4",
- "@deepseek-ai/dsh-client-store": "0.2.1-rc.4",
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.4",
- "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.4",
- "@deepseek-ai/dsh-compaction": "0.2.1-rc.4",
- "@deepseek-ai/dsh-deepseek-account": "0.2.1-rc.4",
- "@deepseek-ai/dsh-experimental-voice-input-bundle": "0.2.1-rc.4",
- "@deepseek-ai/dsh-fs": "0.2.1-rc.4",
- "@deepseek-ai/dsh-hook-protocol": "0.2.1-rc.4",
- "@deepseek-ai/dsh-jobs": "0.2.1-rc.4",
- "@deepseek-ai/dsh-llm-deepseek": "0.2.1-rc.4",
- "@deepseek-ai/dsh-output-retention": "0.2.1-rc.4",
- "@deepseek-ai/dsh-ptc-runtime": "0.2.1-rc.4",
- "@deepseek-ai/dsh-sandbox": "0.2.1-rc.4",
- "@deepseek-ai/dsh-scope": "0.2.1-rc.4",
- "@deepseek-ai/dsh-sdk-protocol": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-format": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-format-catalog": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-persistence": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-query": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-telemetry": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-title-llm": "0.2.1-rc.4",
- "@deepseek-ai/dsh-shell": "0.2.1-rc.4",
- "@deepseek-ai/dsh-skill-office": "0.2.1-rc.4",
- "@deepseek-ai/dsh-spill": "0.2.1-rc.4",
- "@deepseek-ai/dsh-tool-workspace-dependencies": "0.2.1-rc.4",
- "@deepseek-ai/dsh-util-time": "0.2.1-rc.4",
- "@deepseek-ai/dsh-util-workspace-path": "0.2.1-rc.4",
- "@deepseek-ai/dsh-workflow": "0.2.1-rc.4",
+ "@deepseek-ai/dsh": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-anonymous-user-id": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-app-boot": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-attachment": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-base": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-bash-local": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-client-store": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-compaction": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-deepseek-account": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-experimental-voice-input-bundle": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-fs": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-hook-protocol": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-jobs": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-llm-deepseek": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-output-retention": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-ptc-runtime": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-sandbox": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-scope": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-sdk-protocol": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-format": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-format-catalog": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-persistence": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-query": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-telemetry": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-title-llm": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-shell": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-skill-office": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-spill": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-tool-workspace-dependencies": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-util-time": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-util-workspace-path": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-workflow": "0.2.1-rc.5",
"@deepseek-ai/libreoffice-kit": "0.1.5",
"deep-view": "0.1.0",
"ds-bot": "file:../ds-bot",
diff --cc app/package.json
index 4e6e299c,f07cb261..cf4daa19
--- a/app/package.json
+++ b/app/package.json
@@@ -24,41 -24,40 +24,41 @@@
},
"dependencies": {
"@deepseek-ai/cordis-plugin-group": "1.0.5",
+ "@deepseek-ai/cordis-plugin-include": "1.0.10",
- "@deepseek-ai/dsh": "0.2.1-rc.4",
- "@deepseek-ai/dsh-anonymous-user-id": "0.2.1-rc.4",
- "@deepseek-ai/dsh-app-boot": "0.2.1-rc.4",
- "@deepseek-ai/dsh-attachment": "0.2.1-rc.4",
- "@deepseek-ai/dsh-base": "0.2.1-rc.4",
- "@deepseek-ai/dsh-bash-local": "0.2.1-rc.4",
- "@deepseek-ai/dsh-client-store": "0.2.1-rc.4",
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.4",
- "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.4",
- "@deepseek-ai/dsh-compaction": "0.2.1-rc.4",
- "@deepseek-ai/dsh-deepseek-account": "0.2.1-rc.4",
- "@deepseek-ai/dsh-experimental-voice-input-bundle": "0.2.1-rc.4",
- "@deepseek-ai/dsh-fs": "0.2.1-rc.4",
- "@deepseek-ai/dsh-hook-protocol": "0.2.1-rc.4",
- "@deepseek-ai/dsh-jobs": "0.2.1-rc.4",
- "@deepseek-ai/dsh-llm-deepseek": "0.2.1-rc.4",
- "@deepseek-ai/dsh-output-retention": "0.2.1-rc.4",
- "@deepseek-ai/dsh-ptc-runtime": "0.2.1-rc.4",
- "@deepseek-ai/dsh-sandbox": "0.2.1-rc.4",
- "@deepseek-ai/dsh-scope": "0.2.1-rc.4",
- "@deepseek-ai/dsh-sdk-protocol": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-format": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-format-catalog": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-persistence": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-query": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-telemetry": "0.2.1-rc.4",
- "@deepseek-ai/dsh-session-title-llm": "0.2.1-rc.4",
- "@deepseek-ai/dsh-shell": "0.2.1-rc.4",
- "@deepseek-ai/dsh-skill-office": "0.2.1-rc.4",
- "@deepseek-ai/dsh-spill": "0.2.1-rc.4",
- "@deepseek-ai/dsh-tool-workspace-dependencies": "0.2.1-rc.4",
- "@deepseek-ai/dsh-util-time": "0.2.1-rc.4",
- "@deepseek-ai/dsh-util-workspace-path": "0.2.1-rc.4",
- "@deepseek-ai/dsh-workflow": "0.2.1-rc.4",
+ "@deepseek-ai/dsh": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-anonymous-user-id": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-app-boot": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-attachment": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-base": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-bash-local": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-client-store": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-compaction": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-deepseek-account": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-experimental-voice-input-bundle": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-fs": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-hook-protocol": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-jobs": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-llm-deepseek": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-output-retention": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-ptc-runtime": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-sandbox": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-scope": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-sdk-protocol": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-format": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-format-catalog": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-persistence": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-query": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-telemetry": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-session-title-llm": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-shell": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-skill-office": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-spill": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-tool-workspace-dependencies": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-util-time": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-util-workspace-path": "0.2.1-rc.5",
+ "@deepseek-ai/dsh-workflow": "0.2.1-rc.5",
"@deepseek-ai/libreoffice-kit": "0.1.5",
"deep-view": "0.1.0",
"ds-bot": "file:../ds-bot",
diff --cc app/test/helpers/fake-app-boot.mjs
index 46682438,0ceb8634..b01f1f07
--- a/app/test/helpers/fake-app-boot.mjs
+++ b/app/test/helpers/fake-app-boot.mjs
@@@ -1,8 -1,6 +1,8 @@@
// The boot of the profile, as a test double: the version of DSH the app reports, and the
// parts of a profile the app asks for. The app's own main process never calls them.
+import { applyEntryPatches } from '@deepseek-ai/cordis-plugin-include'
+
- export const getDshRuntimeVersion = () => ({ release: { version: '0.2.1-rc.4' } })
+ export const getDshRuntimeVersion = () => ({ release: { version: '0.2.1-rc.5' } })
export const loadLayeredEnv = () => ({})
export const reportSkippedBundles = () => {}
export const initProfile = () => {}
diff --cc ds-bot/client.js
index 56548417,ed9aa339..af70fbce
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@@ -4930,16 -4420,16 +4942,16 @@@ var HANDOFF_CSS =
.bt-handoff .bt-q-foot{flex-wrap:wrap}
`;
- // ../../dsb-group-goal/ds-bot/node_modules/deep-view/src/react/ui.js
+ // node_modules/deep-view/src/react/ui.js
-var import_react8 = require("react");
-var FallbackMarkdown = ({ text }) => (0, import_react8.createElement)("span", null, String(text ?? ""));
-var ViewUi = (0, import_react8.createContext)({ t: (key) => key, Markdown: FallbackMarkdown });
-var useViewUi = () => (0, import_react8.useContext)(ViewUi);
+var import_react10 = require("react");
+var FallbackMarkdown = ({ text }) => (0, import_react10.createElement)("span", null, String(text ?? ""));
+var ViewUi = (0, import_react10.createContext)({ t: (key) => key, Markdown: FallbackMarkdown });
+var useViewUi = () => (0, import_react10.useContext)(ViewUi);
var lineIcon2 = (paths) => function LineIcon() {
- return (0, import_react8.createElement)(
+ return (0, import_react10.createElement)(
"svg",
{ width: 15, height: 15, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true },
- paths.map((d, index) => (0, import_react8.createElement)("path", { key: index, d }))
+ paths.map((d, index) => (0, import_react10.createElement)("path", { key: index, d }))
);
};
var DotsIcon2 = lineIcon2(["M5 10h.01M10 10h.01M15 10h.01"]);
@@@ -5898,8 -5388,8 +5910,8 @@@ function validateForm(node, values)
return { fields };
}
- // ../../dsb-group-goal/ds-bot/node_modules/deep-view/src/react/chart.js
+ // node_modules/deep-view/src/react/chart.js
-var import_react9 = require("react");
+var import_react11 = require("react");
var PALETTE = ["var(--dv-accent)", "var(--dv-ink-tangerine)", "var(--dv-ink-green)", "var(--dv-ink-violet)", "var(--dv-ink-sky)", "var(--dv-ink-rose)", "var(--dv-ink-yellow)", "var(--dv-ink-cyan)", "var(--dv-ink-magenta)"];
var colorAt = (index) => PALETTE[index % PALETTE.length];
var TICK = 10;
@@@ -6337,8 -5827,8 +6349,8 @@@ var CHART_CSS =
@media (prefers-reduced-motion:reduce){.dv-chart-mark,.dv-chart-dot{transition:none}.dv-chart-tip{animation:none}}
`;
- // ../../dsb-group-goal/ds-bot/node_modules/deep-view/src/react/frame.js
+ // node_modules/deep-view/src/react/frame.js
-var import_react10 = require("react");
+var import_react12 = require("react");
var THEME_VARS = [
["--view-ink", "--bt-ink", "--dv-ink"],
["--view-ink-2", "--bt-ink-2", "--dv-ink-2"],
@@@ -6419,8 -5909,8 +6431,8 @@@ var HTML_CSS =
.dv-view-frame-stopped{margin:0;font-size:13px;line-height:18px;color:var(--dv-ink-2)}
`;
- // ../../dsb-group-goal/ds-bot/node_modules/deep-view/src/react/card.js
+ // node_modules/deep-view/src/react/card.js
-var import_react11 = require("react");
+var import_react13 = require("react");
var mdLabels = (ui2) => ({ code: { copyLabel: ui2.t("Copy"), copiedLabel: ui2.t("Copied") }, footnotes: ui2.t("Footnotes") });
var TONES2 = ["good", "warn", "bad"];
var CALLOUT_TONES2 = ["info", "good", "warn", "bad"];
@@@ -8363,10 -7860,10 +8382,10 @@@ function BtwTurnTail({ turn, sessionId
}
// src/client/cells.js
-var import_react17 = require("react");
+var import_react19 = require("react");
var import_react_dom = require("react-dom");
var mdLabels3 = () => ({ code: { copyLabel: t("Copy"), copiedLabel: t("Copied") }, footnotes: t("Footnotes") });
- function Bubbles({ texts: texts2, roster, selfId, actions, streaming, sessionId, msgKey, useUi, lead, mentions, fold = FOLD_AT, whole }) {
+ function Bubbles({ texts: texts2, roster, selfId, actions, streaming, sessionId, msgKey, useUi, lead, mentions, fold = FOLD_AT, whole, time }) {
const onClick = (event) => {
const target = mentionTarget(event);
if (target === null) return;
@@@ -8396,7 -7893,8 +8415,8 @@@
lead: lead && last ? lead : null,
whole: last ? whole : void 0
});
- })
+ }),
- Number.isFinite(time) ? (0, import_react17.createElement)("div", { className: "bt-utime", title: clockLabel(time) }, messageClock(time)) : null
++ Number.isFinite(time) ? (0, import_react19.createElement)("div", { className: "bt-utime", title: clockLabel(time) }, messageClock(time)) : null
);
}
function FoldCodeCopy({ code, actions }) {
@@@ -8661,7 -8159,7 +8681,7 @@@ function AssistantCell({ node, groupPar
// time makes one Elapsed show settled + running.
...thinking !== void 0 ? { at: typeof thinking.time === "number" ? thinking.time - (ms ?? 0) : void 0 } : { ms }
}) : null,
- texts2.length ? (0, import_react19.createElement)(Bubbles, { texts: texts2, roster, selfId, actions, streaming: running, sessionId, msgKey: `${sessionId}:${data.turn}:${node.key ?? data.seq ?? ""}`, useUi, mentions, fold: FOLD_HUGE }) : null
- texts2.length ? (0, import_react17.createElement)(Bubbles, { texts: texts2, roster, selfId, actions, streaming: running, sessionId, msgKey: `${sessionId}:${data.turn}:${node.key ?? data.seq ?? ""}`, useUi, mentions, fold: FOLD_HUGE, time: speaker === void 0 ? data.time : void 0 }) : null
++ texts2.length ? (0, import_react19.createElement)(Bubbles, { texts: texts2, roster, selfId, actions, streaming: running, sessionId, msgKey: `${sessionId}:${data.turn}:${node.key ?? data.seq ?? ""}`, useUi, mentions, fold: FOLD_HUGE, time: speaker === void 0 ? data.time : void 0 }) : null
);
}
function EventLine({ prefix, bots, joiner = t("and"), onOpen, whole = false }) {
@@@ -12476,24 -11965,24 +12496,24 @@@ function ModelMenu({ bot, roster, actio
"data-missing": shown !== void 0 && !shown.served && models.length > 0 ? "" : void 0,
onClick: toggle
},
- (0, import_react25.createElement)(
+ (0, import_react26.createElement)(
"span",
{ className: "bt-model-copy" },
- (0, import_react25.createElement)("span", { className: "bt-model-name" }, shown?.name ?? t("Choose a model")),
- shown ? (0, import_react25.createElement)("span", { className: "bt-model-provider" }, shown.served || models.length === 0 ? !withEfforts || effortLabel === void 0 ? shown.provider : `${shown.provider} · ${effortLabel}` : t("{provider} · not available", { provider: shown.provider })) : null
+ (0, import_react26.createElement)("span", { className: "bt-model-name" }, shown?.name ?? t("Choose a model")),
- shown ? (0, import_react26.createElement)("span", { className: "bt-model-provider" }, shown.served || models.length === 0 ? effortLabel === void 0 ? shown.provider : `${shown.provider} · ${effortLabel}` : t("{provider} · not available", { provider: shown.provider })) : null
++ shown ? (0, import_react26.createElement)("span", { className: "bt-model-provider" }, shown.served || models.length === 0 ? !withEfforts || effortLabel === void 0 ? shown.provider : `${shown.provider} · ${effortLabel}` : t("{provider} · not available", { provider: shown.provider })) : null
),
- (0, import_react25.createElement)(Caret)
+ (0, import_react26.createElement)(Caret)
),
- shownPlace ? (0, import_react_dom6.createPortal)((0, import_react25.createElement)(
+ shownPlace ? (0, import_react_dom6.createPortal)((0, import_react26.createElement)(
"div",
{ ref: menu, className: `bt-menu bt-model-menu${shownPlace.bottom !== void 0 ? " bt-menu-up" : ""}`, role: "menu", "aria-label": t("Model for {name}", { name: bot.name }), style: shownPlace, "data-leaving": leaving || void 0 },
- models.length > 0 ? (0, import_react25.createElement)(ModelRows, { roster, current, onPick: pick2 }) : (0, import_react25.createElement)("div", { className: "bt-model-none" }, t("No models are set up in DeepSeek Harness yet.")),
- withEfforts && effortRows(reasoning).length > 0 ? (0, import_react25.createElement)(EffortRows, { reasoning, current: picked, onPick: pickEffort }) : null,
- manage ? (0, import_react25.createElement)("div", { className: "bt-menu-sep", role: "separator" }) : null,
- manage ? (0, import_react25.createElement)("button", { type: "button", role: "menuitem", onClick: () => {
+ models.length > 0 ? (0, import_react26.createElement)(ModelRows, { roster, current, onPick: pick2 }) : (0, import_react26.createElement)("div", { className: "bt-model-none" }, t("No models are set up in DeepSeek Harness yet.")),
- effortRows(reasoning).length > 0 ? (0, import_react26.createElement)(EffortRows, { reasoning, current: picked, onPick: pickEffort }) : null,
++ withEfforts && effortRows(reasoning).length > 0 ? (0, import_react26.createElement)(EffortRows, { reasoning, current: picked, onPick: pickEffort }) : null,
+ manage ? (0, import_react26.createElement)("div", { className: "bt-menu-sep", role: "separator" }) : null,
+ manage ? (0, import_react26.createElement)("button", { type: "button", role: "menuitem", onClick: () => {
close();
manage();
- } }, (0, import_react25.createElement)(SlidersIcon), (0, import_react25.createElement)("span", { className: "bt-menu-label" }, t("Models and providers…"))) : null
+ } }, (0, import_react26.createElement)(SlidersIcon), (0, import_react26.createElement)("span", { className: "bt-menu-label" }, t("Models and providers…"))) : null
), document.body) : null
);
}
@@@ -12883,11 -12372,15 +12903,15 @@@ function timingText(task)
return "";
}
}
- var nextText = (task) => task.status === "active" ? t("Next: {time}", { time: dayAndTime(Date.parse(task.scheduledAt)) }) : t("Finished");
+ var nextText = (task) => {
+ if (task.state === "overdue" || task.state === void 0 && task.status === "active" && Date.parse(task.scheduledAt) <= Date.now()) return t("Overdue: {time}", { time: dayAndTime(Date.parse(task.scheduledAt)) });
+ return task.status === "active" ? t("Next: {time}", { time: dayAndTime(Date.parse(task.scheduledAt)) }) : t("Finished");
+ };
-function TaskRow({ task, actions, onView, showBot, roster }) {
- const [confirming, setConfirming] = (0, import_react27.useState)(false);
- const [expanded, setExpanded] = (0, import_react27.useState)(false);
- const [busy, setBusy] = (0, import_react27.useState)(false);
- (0, import_react27.useEffect)(() => {
+function TaskRow2({ task, actions, onView, showBot, roster }) {
+ const [confirming, setConfirming] = (0, import_react28.useState)(false);
++ const [expanded, setExpanded] = (0, import_react28.useState)(false);
+ const [busy, setBusy] = (0, import_react28.useState)(false);
+ (0, import_react28.useEffect)(() => {
if (!confirming) return void 0;
const timer = setTimeout(() => setConfirming(false), 3e3);
return () => clearTimeout(timer);
@@@ -12901,19 -12394,19 +12925,19 @@@
void actions.scheduleDelete(task.sessionId, task.id).then(onView, () => setBusy(false));
};
const room2 = task.roomId ? roster.roomsById[task.roomId] : void 0;
- return (0, import_react27.createElement)(
+ return (0, import_react28.createElement)(
"div",
{ className: "bt-set-row bt-task", "data-done": task.status === "active" ? void 0 : "", "data-busy": busy || void 0 },
- showBot ? (0, import_react27.createElement)(BotAvatar, { bot: roster.byId[task.botId], size: 28, badge: false, live: false }) : null,
- (0, import_react27.createElement)(
+ showBot ? (0, import_react28.createElement)(BotAvatar, { bot: roster.byId[task.botId], size: 28, badge: false, live: false }) : null,
+ (0, import_react28.createElement)(
- "span",
- { className: "bt-set-copy" },
+ "button",
+ { type: "button", className: "bt-set-copy bt-task-copy", "aria-expanded": expanded || void 0, onClick: () => setExpanded((open) => !open) },
- (0, import_react27.createElement)("span", { className: "bt-task-title" }, task.title),
- (0, import_react27.createElement)("span", { className: "bt-set-hint" }, [timingText(task), room2 ? t("in {name}", { name: room2.name }) : ""].filter(Boolean).join(" · ")),
- task.prompt && task.prompt !== task.title ? (0, import_react27.createElement)("span", { className: "bt-task-prompt", "data-open": expanded || void 0 }, task.prompt) : null
+ (0, import_react28.createElement)("span", { className: "bt-task-title" }, task.title),
+ (0, import_react28.createElement)("span", { className: "bt-set-hint" }, [timingText(task), room2 ? t("in {name}", { name: room2.name }) : ""].filter(Boolean).join(" · ")),
- task.prompt && task.prompt !== task.title ? (0, import_react28.createElement)("span", { className: "bt-task-prompt" }, task.prompt) : null
++ task.prompt && task.prompt !== task.title ? (0, import_react28.createElement)("span", { className: "bt-task-prompt", "data-open": expanded || void 0 }, task.prompt) : null
),
- (0, import_react28.createElement)("span", { className: "bt-task-next" }, nextText(task)),
- (0, import_react27.createElement)("span", { className: "bt-task-next", "data-state": task.state === "overdue" ? "overdue" : void 0 }, nextText(task)),
- (0, import_react27.createElement)("button", {
++ (0, import_react28.createElement)("span", { className: "bt-task-next", "data-state": task.state === "overdue" ? "overdue" : void 0 }, nextText(task)),
+ (0, import_react28.createElement)("button", {
type: "button",
className: "bt-mini bt-task-remove",
"data-confirm": confirming || void 0,
@@@ -13045,24 -12538,30 +13069,30 @@@ function AutomationOff({ actions })
}
function SchedulesPage({ roster, actions, start }) {
const view = useSchedules(actions);
- const [adding, setAdding] = (0, import_react28.useState)(Boolean(start));
+ const owner = start?.startsWith("bot:") ? start.slice(4) : start?.startsWith("room:") ? start.slice(5) : null;
- const [adding, setAdding] = (0, import_react27.useState)(Boolean(start) && owner === null);
- if (view === null) return (0, import_react27.createElement)("div", { className: "bt-set-hint" }, t("Loading…"));
- if (!view.available) return (0, import_react27.createElement)(AutomationOff, { actions });
++ const [adding, setAdding] = (0, import_react28.useState)(Boolean(start) && owner === null);
+ if (view === null) return (0, import_react28.createElement)("div", { className: "bt-set-hint" }, t("Loading…"));
+ if (!view.available) return (0, import_react28.createElement)(AutomationOff, { actions });
const shown = (next) => {
publish(next);
setAdding(false);
};
const byChat = [
- ...roster.bots.map((bot) => [bot.id, (0, import_react27.createElement)(BotAvatar, { bot, size: 18, badge: false, live: false }), bot.name, view.tasks.filter((task) => task.botId === bot.id)]),
- ...roster.rooms.map((room2) => [room2.id, (0, import_react27.createElement)(RoomAvatar, { room: room2, roster, size: 18 }), room2.name, view.tasks.filter((task) => task.botId === void 0 && task.roomId === room2.id)])
+ ...roster.bots.map((bot) => [bot.id, (0, import_react28.createElement)(BotAvatar, { bot, size: 18, badge: false, live: false }), bot.name, view.tasks.filter((task) => task.botId === bot.id)]),
+ ...roster.rooms.map((room2) => [room2.id, (0, import_react28.createElement)(RoomAvatar, { room: room2, roster, size: 18 }), room2.name, view.tasks.filter((task) => task.botId === void 0 && task.roomId === room2.id)])
- ].filter(([, , , tasks]) => tasks.length > 0);
+ ].filter(([id, , , tasks]) => tasks.length > 0 && (owner === null || id === owner));
return [
- adding ? (0, import_react28.createElement)(TaskForm, { key: "form", roster, actions, start, onDone: shown, onCancel: () => setAdding(false) }) : (0, import_react28.createElement)("div", { key: "add", className: "bt-actions" }, (0, import_react28.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-with-icon", onClick: () => setAdding(true) }, (0, import_react28.createElement)(PlusIcon), t("New task"))),
- adding ? (0, import_react27.createElement)(TaskForm, { key: "form", roster, actions, start: owner ?? start, onDone: shown, onCancel: () => setAdding(false) }) : (0, import_react27.createElement)(
++ adding ? (0, import_react28.createElement)(TaskForm, { key: "form", roster, actions, start: owner ?? start, onDone: shown, onCancel: () => setAdding(false) }) : (0, import_react28.createElement)(
+ "div",
+ { key: "add", className: "bt-actions" },
- (0, import_react27.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-with-icon", onClick: () => setAdding(true) }, (0, import_react27.createElement)(PlusIcon), t("New task")),
- owner !== null ? (0, import_react27.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => actions.openSettings("schedules") }, t("Show all")) : null
++ (0, import_react28.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-with-icon", onClick: () => setAdding(true) }, (0, import_react28.createElement)(PlusIcon), t("New task")),
++ owner !== null ? (0, import_react28.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => actions.openSettings("schedules") }, t("Show all")) : null
+ ),
- byChat.length === 0 && !adding ? (0, import_react27.createElement)("div", { key: "none", className: "bt-set-card" }, (0, import_react27.createElement)("div", { className: "bt-set-row" }, (0, import_react27.createElement)("span", { className: "bt-set-hint" }, t("No scheduled tasks yet.")))) : byChat.map(([id, avatar, name, tasks]) => (0, import_react27.createElement)(
+ byChat.length === 0 && !adding ? (0, import_react28.createElement)("div", { key: "none", className: "bt-set-card" }, (0, import_react28.createElement)("div", { className: "bt-set-row" }, (0, import_react28.createElement)("span", { className: "bt-set-hint" }, t("No scheduled tasks yet.")))) : byChat.map(([id, avatar, name, tasks]) => (0, import_react28.createElement)(
"section",
{ key: id, className: "bt-set-section" },
- (0, import_react27.createElement)("h3", { className: "bt-task-head" }, avatar, name),
- (0, import_react27.createElement)("div", { className: "bt-set-card" }, tasks.map((task) => (0, import_react27.createElement)(TaskRow, { key: task.id, task, actions, roster, onView: publish })))
+ (0, import_react28.createElement)("h3", { className: "bt-task-head" }, avatar, name),
+ (0, import_react28.createElement)("div", { className: "bt-set-card" }, tasks.map((task) => (0, import_react28.createElement)(TaskRow2, { key: task.id, task, actions, roster, onView: publish })))
))
];
}
@@@ -13092,16 -12591,16 +13122,16 @@@ function BotSchedules({ bot, roster, ac
function ScheduleSummary({ bot, actions }) {
const view = useSchedules(actions);
const tasks = view?.available ? view.tasks.filter((task) => task.botId === bot.id && task.status === "active") : [];
- return (0, import_react27.createElement)(
+ return (0, import_react28.createElement)(
"div",
null,
- (0, import_react28.createElement)("div", { className: "bt-section-title" }, t("Scheduled tasks")),
- (0, import_react27.createElement)("div", { className: "bt-section-title" }, tasks.length === 0 ? t("Scheduled tasks") : t("Scheduled tasks · {count}", { count: tasks.length })),
- tasks.length === 0 ? (0, import_react27.createElement)("button", { type: "button", className: "bt-more", onClick: () => actions.openSettings("schedules", bot.id) }, view?.available === false ? t("Switch on Automation tasks on the Plugins page in Harness settings.") : t("No scheduled tasks yet. Add one")) : (0, import_react27.createElement)("div", { className: "bt-task-list" }, tasks.slice(0, 3).map((task) => (0, import_react27.createElement)(
++ (0, import_react28.createElement)("div", { className: "bt-section-title" }, tasks.length === 0 ? t("Scheduled tasks") : t("Scheduled tasks · {count}", { count: tasks.length })),
+ tasks.length === 0 ? (0, import_react28.createElement)("button", { type: "button", className: "bt-more", onClick: () => actions.openSettings("schedules", bot.id) }, view?.available === false ? t("Switch on Automation tasks on the Plugins page in Harness settings.") : t("No scheduled tasks yet. Add one")) : (0, import_react28.createElement)("div", { className: "bt-task-list" }, tasks.slice(0, 3).map((task) => (0, import_react28.createElement)(
"button",
- { key: task.id, type: "button", className: "bt-task-line", onClick: () => actions.openSettings("schedules") },
+ { key: task.id, type: "button", className: "bt-task-line", onClick: () => actions.openSettings("schedules", `bot:${bot.id}`) },
- (0, import_react27.createElement)(ClockIcon),
- (0, import_react27.createElement)("span", { className: "bt-task-line-title" }, task.title),
- (0, import_react27.createElement)("span", { className: "bt-task-line-when" }, timingText(task))
+ (0, import_react28.createElement)(ClockIcon),
+ (0, import_react28.createElement)("span", { className: "bt-task-line-title" }, task.title),
+ (0, import_react28.createElement)("span", { className: "bt-task-line-when" }, timingText(task))
)))
);
}
@@@ -17547,22 -17049,40 +17580,40 @@@ function GeneralPage({ roster, actions
)
)
),
- (0, import_react45.createElement)(SetRow, { label: t("Message layout") }, (0, import_react45.createElement)(Choice, { label: t("Message layout"), value: layoutOf(prefs), options: LAYOUTS, pick: (id) => run2(actions.setPrefs({ layout: id })) })),
+ (0, import_react46.createElement)(SetRow, { label: t("Message layout") }, (0, import_react46.createElement)(Choice, { label: t("Message layout"), value: layoutOf(prefs), options: LAYOUTS, pick: (id) => run2(actions.setPrefs({ layout: id })) })),
// The flat layout's text has a width of its own; the bubble width stays for the user's messages.
- layoutOf(prefs) === "flat" ? (0, import_react45.createElement)(SetRow, { label: t("Text width") }, (0, import_react45.createElement)(WidthSlider, { label: t("Text width"), value: flatWidthOf(prefs), save: (flatWidth) => run2(actions.setPrefs({ flatWidth })) })) : null,
- (0, import_react45.createElement)(SetRow, { label: t("Bubble width") }, (0, import_react45.createElement)(WidthSlider, { label: t("Bubble width"), value: widthOf(prefs), save: (width) => run2(actions.setPrefs({ width })) })),
- (0, import_react45.createElement)(SetRow, { label: t("Show thinking") }, (0, import_react45.createElement)(Switch, { label: t("Show thinking"), on: thinkingShown(prefs), onChange: (thinking) => run2(actions.setPrefs({ thinking })) }))
+ layoutOf(prefs) === "flat" ? (0, import_react46.createElement)(SetRow, { label: t("Text width") }, (0, import_react46.createElement)(WidthSlider, { label: t("Text width"), value: flatWidthOf(prefs), save: (flatWidth) => run2(actions.setPrefs({ flatWidth })) })) : null,
+ (0, import_react46.createElement)(SetRow, { label: t("Bubble width") }, (0, import_react46.createElement)(WidthSlider, { label: t("Bubble width"), value: widthOf(prefs), save: (width) => run2(actions.setPrefs({ width })) })),
+ (0, import_react46.createElement)(SetRow, { label: t("Show thinking") }, (0, import_react46.createElement)(Switch, { label: t("Show thinking"), on: thinkingShown(prefs), onChange: (thinking) => run2(actions.setPrefs({ thinking })) }))
),
- (0, import_react45.createElement)(
++ (0, import_react46.createElement)(
+ SetSection,
+ { key: "new", title: t("New Bots") },
- (0, import_react45.createElement)(
++ (0, import_react46.createElement)(
+ SetRow,
+ { label: t("Default model") },
- (0, import_react45.createElement)(ModelMenu, {
++ (0, import_react46.createElement)(ModelMenu, {
+ bot: { id: "new-bots", name: t("New Bots"), model: prefs.defaultBotModel },
+ roster,
+ actions,
+ run: run2,
+ wide: true,
+ withEfforts: false,
+ onPick: (ref) => run2(actions.setPrefs({ defaultBotModel: ref }))
+ }),
- prefs.defaultBotModel ? (0, import_react45.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.setPrefs({ defaultBotModel: null })) }, t("Reset")) : null
++ prefs.defaultBotModel ? (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.setPrefs({ defaultBotModel: null })) }, t("Reset")) : null
+ )
+ ),
- actions.setSurface ? (0, import_react45.createElement)(
+ actions.setSurface ? (0, import_react46.createElement)(
SetSection,
{ key: "mode", title: t("Mode") },
- (0, import_react45.createElement)(
+ (0, import_react46.createElement)(
SetRow,
{ label: t("Classic Agent mode") },
- (0, import_react45.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => actions.setSurface("agent") }, t("Switch"))
+ (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => actions.setSurface("agent") }, t("Switch"))
)
) : null,
- (0, import_react45.createElement)(LocationsSection, { key: "places", actions, run: run2 })
+ (0, import_react46.createElement)(LocationsSection, { key: "places", actions, run: run2 })
];
}
function LocationsSection({ actions, run: run2 }) {
@@@ -21037,12 -20530,12 +21088,12 @@@ function UserMessageCell({ node, sessio
const referenceLabels = data.referenceLabels ?? [];
const references = openFile && openSkill ? { openFile, openSkill } : void 0;
const steering = node.kind === "steering";
- const groupTime = roster.roomsById?.[sessionId] && Number.isFinite(data.time) ? messageClock(data.time) : void 0;
+ const sentAt = Number.isFinite(data.time) ? messageClock(data.time) : void 0;
const { shown, folded, control } = useFold(text, { markdown: false });
- const body = (0, import_react52.createElement)(UserText, { text: shown, bots: mentionableBots(roster, sessionId), referenceLabels, skillNames: data.skillNames ?? [], references, actions });
- const row = (0, import_react52.useRef)(null);
- const [toolsOpen, setToolsOpen] = (0, import_react52.useState)(false);
- (0, import_react52.useEffect)(() => {
+ const body = (0, import_react53.createElement)(UserText, { text: shown, bots: mentionableBots(roster, sessionId), referenceLabels, skillNames: data.skillNames ?? [], references, actions });
+ const row = (0, import_react53.useRef)(null);
+ const [toolsOpen, setToolsOpen] = (0, import_react53.useState)(false);
+ (0, import_react53.useEffect)(() => {
if (!toolsOpen) return void 0;
const onDown = (event) => {
if (!row.current?.contains(event.target)) setToolsOpen(false);
@@@ -21058,24 -20551,24 +21109,24 @@@
if (!noHover() || event.target instanceof Element && event.target.closest("a,button,input,textarea,select,pre,code,[role=button],[role=link]")) return;
setToolsOpen((value) => !value);
};
- return (0, import_react52.createElement)(
+ return (0, import_react53.createElement)(
"div",
{ ref: row, className: "bt-umsg", "data-steering": steering || void 0 },
- (0, import_react52.createElement)(
+ (0, import_react53.createElement)(
"div",
{ className: "bt-ustack" },
- attachments.length > 0 ? (0, import_react52.createElement)(Attachments, { attachments, renderMessageImages }) : null,
- text !== "" || rest.length > 0 ? (0, import_react52.createElement)(
+ attachments.length > 0 ? (0, import_react53.createElement)(Attachments, { attachments, renderMessageImages }) : null,
+ text !== "" || rest.length > 0 ? (0, import_react53.createElement)(
"div",
{ className: "bt-ubody", title: clock3(data.time), "data-folded": folded || void 0, onClick: tapTools },
- control ? (0, import_react52.createElement)("div", { className: "bt-fold-body" }, body) : body,
+ control ? (0, import_react53.createElement)("div", { className: "bt-fold-body" }, body) : body,
control,
- rest.map((block, index) => ui.JsonBlock ? (0, import_react52.createElement)(ui.JsonBlock, { key: index, label: t("Content"), payload: block }) : null)
+ rest.map((block, index) => ui.JsonBlock ? (0, import_react53.createElement)(ui.JsonBlock, { key: index, label: t("Content"), payload: block }) : null)
) : null,
- referenceLabels.length > 0 ? (0, import_react52.createElement)("div", { className: "bt-urefs" }, t("Referenced {labels}", { labels: referenceLabels.join(t(", ")) })) : null,
- sentAt ? (0, import_react52.createElement)("div", { className: "bt-utime", title: clockLabel(data.time) }, sentAt) : null
+ referenceLabels.length > 0 ? (0, import_react53.createElement)("div", { className: "bt-urefs" }, t("Referenced {labels}", { labels: referenceLabels.join(t(", ")) })) : null,
- groupTime ? (0, import_react53.createElement)("div", { className: "bt-utime", title: clockLabel(data.time) }, groupTime) : null
++ sentAt ? (0, import_react53.createElement)("div", { className: "bt-utime", title: clockLabel(data.time) }, sentAt) : null
),
- text === "" ? null : (0, import_react52.createElement)("div", { className: "bt-utools", "data-open": toolsOpen || void 0 }, (0, import_react52.createElement)(CopyButton, { text }))
+ text === "" ? null : (0, import_react53.createElement)("div", { className: "bt-utools", "data-open": toolsOpen || void 0 }, (0, import_react53.createElement)(CopyButton, { text }))
);
}
var USER_MESSAGE_CSS = `