Skip to content

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

Merge branch 'dev' of https://github.com/Fei2411/DS-Bot into feat/592-group-stop-all

AdamPlatin123d2f72cede37f
diff --cc ds-bot/client.js
index 2c958eb4,6d5969a5..7e8905c4
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@@ -1634,9 -1657,9 +1658,10 @@@ function teamActions({ call: call2, aft
dismissQuestion: (sessionId) => after(call2("dismiss-question", { sessionId })),
answerView: (sessionId, viewId, action, values) => after(call2("view-reply", { sessionId: partFor(sessionId), viewId, action, values })),
dismissView: (sessionId) => after(call2("dismiss-view", { sessionId: partFor(sessionId) })),
+ deleteBtw: (sessionId, cardId) => after(call2("btw-delete", { sessionId, cardId })),
answerApproval: (id, choice) => after(call2("approval-answer", { id, choice })),
stopMemberWork: (roomId, botId) => after(call2("stop-member-work", { roomId, botId })),
+ stopRoomWork: (roomId) => after(call2("stop-room-work", { roomId })),
// Values go out in these requests and never come back in a response.
secretSet: (payload) => after(call2("secret-set", payload)),
secretAllow: (requestId) => after(call2("secret-allow", { requestId })),
@@@ -16036,15 -16332,6 +16340,15 @@@ function useFitWidth(inner, key)
}, [key]);
return width;
}
+function StopRoomWork({ roomId, actions }) {
- const [stopping, setStopping] = (0, import_react41.useState)(false);
++ const [stopping, setStopping] = (0, import_react42.useState)(false);
+ const stop = () => {
+ setStopping(true);
+ void Promise.resolve(actions.stopRoomWork(roomId)).catch((error) => actions.reportError(error, "stop")).finally(() => setStopping(false));
+ };
+ const label = t("Stop all work in this group");
- return (0, import_react41.createElement)("button", { type: "button", className: "bt-mw-stop", "aria-label": label, title: label, disabled: stopping, onClick: stop }, (0, import_react41.createElement)(StopIcon));
++ return (0, import_react42.createElement)("button", { type: "button", className: "bt-mw-stop", "aria-label": label, title: label, disabled: stopping, onClick: stop }, (0, import_react42.createElement)(StopIcon));
+}
function MemberDock({ sessionId, useRoster, useWork, actions }) {
const roster = useRoster((value) => value);
const work = useWork((value) => value);
@@@ -16057,29 -16344,24 +16361,29 @@@
const faces = model.faces.map((face) => ({ ...face, bot: roster.byId[face.id] })).filter((face) => face.bot);
const label = [model.waiting, model.doing].filter(Boolean).join(" · ");
const open = () => model.open.details ? actions.showDetails(model.open.details) : actions.openSession(model.open.session);
- return (0, import_react41.createElement)(
+ return (0, import_react42.createElement)(
"div",
{ className: "bt-mw-dock", "data-leaving": leaving || void 0 },
- (0, import_react41.createElement)(
+ (0, import_react42.createElement)(
- "button",
- { type: "button", className: "bt-mw-pill", "aria-label": label, onClick: open, disabled: leaving, style: width ? { width } : void 0 },
+ "span",
+ { className: "bt-mw-pair", "data-stop": model.stop ? true : void 0 },
- (0, import_react41.createElement)(
+ (0, import_react42.createElement)(
- "span",
- { ref: inner, className: "bt-mw-pill-in" },
- (0, import_react42.createElement)("span", { className: "bt-mw-faces", "aria-hidden": true }, faces.map((face) => (0, import_react42.createElement)(Face, { key: face.id, ...face }))),
+ "button",
+ { type: "button", className: "bt-mw-pill", "aria-label": label, onClick: open, disabled: leaving, style: width ? { width } : void 0 },
- (0, import_react41.createElement)(
+ (0, import_react42.createElement)(
"span",
- { key: label, className: "bt-mw-label", "aria-hidden": true },
- model.waiting ? (0, import_react42.createElement)("span", { className: "bt-mw-ask" }, model.waiting) : null,
- model.waiting && model.doing ? (0, import_react42.createElement)("span", { className: "bt-mw-dot" }, "·") : null,
- model.doing ? (0, import_react42.createElement)("span", { className: "bt-mw-doing" }, (0, import_react42.createElement)(Shimmer, null, model.doing)) : null
+ { ref: inner, className: "bt-mw-pill-in" },
- (0, import_react41.createElement)("span", { className: "bt-mw-faces", "aria-hidden": true }, faces.map((face) => (0, import_react41.createElement)(Face, { key: face.id, ...face }))),
- (0, import_react41.createElement)(
++ (0, import_react42.createElement)("span", { className: "bt-mw-faces", "aria-hidden": true }, faces.map((face) => (0, import_react42.createElement)(Face, { key: face.id, ...face }))),
++ (0, import_react42.createElement)(
+ "span",
+ { key: label, className: "bt-mw-label", "aria-hidden": true },
- model.waiting ? (0, import_react41.createElement)("span", { className: "bt-mw-ask" }, model.waiting) : null,
- model.waiting && model.doing ? (0, import_react41.createElement)("span", { className: "bt-mw-dot" }, "·") : null,
- model.doing ? (0, import_react41.createElement)("span", { className: "bt-mw-doing" }, (0, import_react41.createElement)(Shimmer, null, model.doing)) : null
++ model.waiting ? (0, import_react42.createElement)("span", { className: "bt-mw-ask" }, model.waiting) : null,
++ model.waiting && model.doing ? (0, import_react42.createElement)("span", { className: "bt-mw-dot" }, "·") : null,
++ model.doing ? (0, import_react42.createElement)("span", { className: "bt-mw-doing" }, (0, import_react42.createElement)(Shimmer, null, model.doing)) : null
+ )
)
- )
+ ),
- model.stop ? (0, import_react41.createElement)(StopRoomWork, { roomId: model.stop, actions }) : null
++ model.stop ? (0, import_react42.createElement)(StopRoomWork, { roomId: model.stop, actions }) : null
)
);
}
@@@ -17037,12 -17313,12 +17341,12 @@@ function BrowserView({ bot, tabId, leav
"aria-label": page.loading ? t("Stop") : t("Reload"),
title: page.loading ? t("Stop") : t("Reload"),
onClick: () => actions.browserCommand(tabId, page.loading ? "stop" : "reload")
- }, (0, import_react43.createElement)(page.loading ? StopIcon2 : ReloadIcon)),
- (0, import_react43.createElement)(
- }, (0, import_react44.createElement)(page.loading ? StopIcon : ReloadIcon)),
++ }, (0, import_react44.createElement)(page.loading ? StopIcon2 : ReloadIcon)),
+ (0, import_react44.createElement)(
"form",
{ className: "bt-browser-address", onSubmit: go, "data-editing": editing || void 0 },
- (0, import_react43.createElement)("span", { className: "bt-browser-scheme", "aria-hidden": true }, (0, import_react43.createElement)(secure && !editing ? LockIcon2 : GlobeIcon2)),
- (0, import_react43.createElement)("input", {
+ (0, import_react44.createElement)("span", { className: "bt-browser-scheme", "aria-hidden": true }, (0, import_react44.createElement)(secure && !editing ? LockIcon2 : GlobeIcon2)),
+ (0, import_react44.createElement)("input", {
ref: input,
type: "text",
spellCheck: false,
diff --cc ds-bot/src/client/team-actions.js
index 5d1b83b8,1f476244..f67b07b7
--- a/ds-bot/src/client/team-actions.js
+++ b/ds-bot/src/client/team-actions.js
@@@ -97,9 -101,9 +101,10 @@@ export function teamActions({ call, aft
dismissQuestion: sessionId => after(call('dismiss-question', { sessionId })),
answerView: (sessionId, viewId, action, values) => after(call('view-reply', { sessionId: partFor(sessionId), viewId, action, values })),
dismissView: sessionId => after(call('dismiss-view', { sessionId: partFor(sessionId) })),
+ deleteBtw: (sessionId, cardId) => after(call('btw-delete', { sessionId, cardId })),
answerApproval: (id, choice) => after(call('approval-answer', { id, choice })),
stopMemberWork: (roomId, botId) => after(call('stop-member-work', { roomId, botId })),
+ stopRoomWork: roomId => after(call('stop-room-work', { roomId })),
// Values go out in these requests and never come back in a response.
secretSet: payload => after(call('secret-set', payload)),
secretAllow: requestId => after(call('secret-allow', { requestId })),