Skip to content

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

Merge dev into fix/212-group-reaction-keys

Fei241101c6bca653d9
diff --cc ds-bot/client.js
index 73dada99,0172de84..ebcbce7f
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@@ -4174,13 -4284,24 +4284,24 @@@ function TriggerCell({ node, sessionId
if (source.failed !== void 0 || source.resumed === true || source.stopped === true) return null;
const room2 = roster.roomsById[sessionId];
const poster = roster.byId[source.senderSessionId] ?? { id: source.senderSessionId, name: source.senderName ?? t("a Bot"), color: "gray" };
- return (0, import_react6.createElement)(GroupMessage, { bot: poster, text: stripHeader(contentText(data.content)), room: room2, roster, actions, msgKey: `${sessionId}:post:${data.seq ?? node.key}`, useUi });
+ const file = source.length === void 0 ? void 0 : (data.content ?? []).find((block) => block?.type === "file")?.attachment;
+ const text = stripHeader(contentText(data.content));
+ return (0, import_react7.createElement)(GroupMessage, {
+ bot: poster,
+ text: file ? stripLongNote(text) : text,
+ room: room2,
+ roster,
+ actions,
- msgKey: `${sessionId}:${data.turn}:post`,
++ msgKey: `${sessionId}:post:${data.seq ?? node.key}`,
+ useUi,
+ whole: file ? { length: source.length, load: () => actions.fileText(file) } : void 0
+ });
}
if (source.role === "report") {
- return (0, import_react6.createElement)(GroupEvent, { prefix: t("Replies from"), room: roster.roomsById[source.roomId], name: t("a group chat"), roster, actions });
+ return (0, import_react7.createElement)(GroupEvent, { prefix: t("Replies from"), room: roster.roomsById[source.roomId], name: t("a group chat"), roster, actions });
}
- if (source.role === "resume" || source.resumed === true) return (0, import_react6.createElement)("div", { className: "bt-event" }, t("Picked up its work after a restart"));
- if (source.role === "retry" || source.retried === true) return (0, import_react6.createElement)("div", { className: "bt-event" }, t("Asked to make the tool call it wrote as text"));
+ if (source.role === "resume" || source.resumed === true) return (0, import_react7.createElement)("div", { className: "bt-event" }, t("Picked up its work after a restart"));
+ if (source.role === "retry" || source.retried === true) return (0, import_react7.createElement)("div", { className: "bt-event" }, t("Asked to make the tool call it wrote as text"));
const run = relayed ? commRunOf(
order.split(",").filter(Boolean).map(Number),
Object.fromEntries(peers.split(",").filter(Boolean).map((pair) => [Number(pair.slice(0, pair.indexOf(":"))), pair.slice(pair.indexOf(":") + 1)])),
diff --cc ds-bot/src/client/cells.js
index e16c9ea6,da5159fe..24c00cad
--- a/ds-bot/src/client/cells.js
+++ b/ds-bot/src/client/cells.js
@@@ -356,8 -377,13 +377,14 @@@ export function TriggerCell({ node, ses
if (source.failed !== undefined || source.resumed === true || source.stopped === true) return null
const room = roster.roomsById[sessionId]
const poster = roster.byId[source.senderSessionId] ?? { id: source.senderSessionId, name: source.senderName ?? t('a Bot'), color: 'gray' }
+ // A post past what a message holds came as a file, with its start only.
+ const file = source.length === undefined ? undefined : (data.content ?? []).find(block => block?.type === 'file')?.attachment
+ const text = stripHeader(contentText(data.content))
+ // A trigger's data carries no turn; its event seq is the one durable name of this post.
- return h(GroupMessage, { bot: poster, text: stripHeader(contentText(data.content)), room, roster, actions, msgKey: `${sessionId}:post:${data.seq ?? node.key}`, useUi })
+ return h(GroupMessage, {
- bot: poster, text: file ? stripLongNote(text) : text, room, roster, actions, msgKey: `${sessionId}:${data.turn}:post`, useUi,
++ bot: poster, text: file ? stripLongNote(text) : text, room, roster, actions, msgKey: `${sessionId}:post:${data.seq ?? node.key}`, useUi,
+ whole: file ? { length: source.length, load: () => actions.fileText(file) } : undefined,
+ })
}
if (source.role === 'report') {
return h(GroupEvent, { prefix: t('Replies from'), room: roster.roomsById[source.roomId], name: t('a group chat'), roster, actions })