Skip to content

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

Merge main into the whole event line branch

FeiZhuLulu9951106037c4
diff --cc ds-bot/client.js
index 2107c525,09068727..ca3bd51c
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@@ -3872,9 -3867,10 +3885,10 @@@ function EarlierParts({ sessionId, rost
case "event": {
if (row.role === "report") return (0, import_react6.createElement)(GroupEvent, { key, prefix: t("Replies from"), room: roster.roomsById[row.roomId], name: t("a group chat"), roster, actions });
const other = roster.byId[row.botId] ?? { id: row.botId, name: row.name ?? t("a Bot"), color: "gray" };
- return (0, import_react6.createElement)(EventLine, { key, prefix: row.role === "reply" ? t("Reply from") : t("Message from"), bots: [other], onOpen: () => {
+ const prefix = { stopped: t("Stopped by"), interrupt: t("Interrupt from"), reply: t("Reply from") }[row.role] ?? t("Message from");
+ return (0, import_react6.createElement)(EventLine, { key, prefix, bots: [other], onOpen: () => {
if (selfId && other.id) actions.openExchange(selfId, other.id);
- } });
+ }, whole: true });
}
default:
return null;
@@@ -3937,10 -3933,9 +3951,10 @@@ function TriggerCell({ node, sessionId
if (!bots.some((bot) => bot.id === peer.id)) bots.push(peer);
}
return (0, import_react6.createElement)(EventLine, {
- prefix: count > 1 ? t("{count} messages with", { count }) : t("Message from"),
+ prefix: source.role === "stopped" ? t("Stopped by") : source.role === "interrupt" ? t("Interrupt from") : count > 1 ? t("{count} messages with", { count }) : t("Message from"),
bots,
- onOpen: (bot) => actions.openExchange(selfId, bot.id)
+ onOpen: (bot) => actions.openExchange(selfId, bot.id),
+ whole: true
});
}
if (source.kind === "schedule") {
@@@ -4175,8 -4178,18 +4197,18 @@@ function ToolCell({ node, sessionId, us
case "message_bot": {
const target = findBot(arg("to")) ?? { name: arg("to") ?? "…", color: "gray" };
if (done && root.isError) return (0, import_react6.createElement)("div", { className: "bt-event" }, t("Couldn't message {name}", { name: target.name }));
- return (0, import_react6.createElement)(EventLine, { prefix: t("Messaged"), bots: [target], onOpen: (bot) => bot.id && actions.openExchange(self?.id ?? sessionId, bot.id) });
+ return (0, import_react6.createElement)(EventLine, { prefix: t("Messaged"), bots: [target], onOpen: (bot) => bot.id && actions.openExchange(self?.id ?? sessionId, bot.id), whole: true });
}
+ case "interrupt_bot": {
+ const target = findBot(arg("to")) ?? { name: arg("to") ?? "…", color: "gray" };
+ if (done && root.isError) return (0, import_react6.createElement)("div", { className: "bt-event" }, t("Couldn't interrupt {name}", { name: target.name }));
- return (0, import_react6.createElement)(EventLine, { prefix: t("Interrupted"), bots: [target], onOpen: (bot) => bot.id && actions.openExchange(roster.byId[sessionId]?.id ?? sessionId, bot.id) });
++ return (0, import_react6.createElement)(EventLine, { prefix: t("Interrupted"), bots: [target], onOpen: (bot) => bot.id && actions.openExchange(roster.byId[sessionId]?.id ?? sessionId, bot.id), whole: true });
+ }
+ case "stop_bot": {
+ const target = findBot(arg("bot")) ?? { name: arg("bot") ?? "…", color: "gray" };
+ if (done && root.isError) return (0, import_react6.createElement)("div", { className: "bt-event" }, t("Couldn't stop {name}", { name: target.name }));
- return (0, import_react6.createElement)(EventLine, { prefix: t("Stopped"), bots: [target], onOpen: (bot) => bot.id && actions.openExchange(roster.byId[sessionId]?.id ?? sessionId, bot.id) });
++ return (0, import_react6.createElement)(EventLine, { prefix: t("Stopped"), bots: [target], onOpen: (bot) => bot.id && actions.openExchange(roster.byId[sessionId]?.id ?? sessionId, bot.id), whole: true });
+ }
case "create_bot": {
const created = findBot(arg("name"));
if (!done || created === void 0) return null;
diff --cc ds-bot/src/client/cells.js
index 908b8a6c,58787053..1c93e507
--- a/ds-bot/src/client/cells.js
+++ b/ds-bot/src/client/cells.js
@@@ -252,7 -247,8 +252,8 @@@ function EarlierParts({ sessionId, rost
case 'event': {
if (row.role === 'report') return h(GroupEvent, { key, prefix: t('Replies from'), room: roster.roomsById[row.roomId], name: t('a group chat'), roster, actions })
const other = roster.byId[row.botId] ?? { id: row.botId, name: row.name ?? t('a Bot'), color: 'gray' }
- return h(EventLine, { key, prefix: row.role === 'reply' ? t('Reply from') : t('Message from'), bots: [other], onOpen: () => { if (selfId && other.id) actions.openExchange(selfId, other.id) }, whole: true })
+ const prefix = { stopped: t('Stopped by'), interrupt: t('Interrupt from'), reply: t('Reply from') }[row.role] ?? t('Message from')
- return h(EventLine, { key, prefix, bots: [other], onOpen: () => { if (selfId && other.id) actions.openExchange(selfId, other.id) } })
++ return h(EventLine, { key, prefix, bots: [other], onOpen: () => { if (selfId && other.id) actions.openExchange(selfId, other.id) }, whole: true })
}
default: return null
}
@@@ -326,10 -322,9 +327,10 @@@ export function TriggerCell({ node, ses
if (!bots.some(bot => bot.id === peer.id)) bots.push(peer)
}
return h(EventLine, {
- prefix: count > 1 ? t('{count} messages with', { count }) : t('Message from'),
+ prefix: source.role === 'stopped' ? t('Stopped by') : source.role === 'interrupt' ? t('Interrupt from') : count > 1 ? t('{count} messages with', { count }) : t('Message from'),
bots,
onOpen: bot => actions.openExchange(selfId, bot.id),
+ whole: true,
})
}
if (source.kind === 'schedule') {
@@@ -550,7 -553,17 +559,17 @@@ export function ToolCell({ node, sessio
case 'message_bot': {
const target = findBot(arg('to')) ?? { name: arg('to') ?? '…', color: 'gray' }
if (done && root.isError) return h('div', { className: 'bt-event' }, t("Couldn't message {name}", { name: target.name }))
- return h(EventLine, { prefix: t('Messaged'), bots: [target], onOpen: bot => bot.id && actions.openExchange(self?.id ?? sessionId, bot.id) })
+ return h(EventLine, { prefix: t('Messaged'), bots: [target], onOpen: bot => bot.id && actions.openExchange(self?.id ?? sessionId, bot.id), whole: true })
+ }
+ case 'interrupt_bot': {
+ const target = findBot(arg('to')) ?? { name: arg('to') ?? '…', color: 'gray' }
+ if (done && root.isError) return h('div', { className: 'bt-event' }, t("Couldn't interrupt {name}", { name: target.name }))
- return h(EventLine, { prefix: t('Interrupted'), bots: [target], onOpen: bot => bot.id && actions.openExchange(roster.byId[sessionId]?.id ?? sessionId, bot.id) })
++ return h(EventLine, { prefix: t('Interrupted'), bots: [target], onOpen: bot => bot.id && actions.openExchange(roster.byId[sessionId]?.id ?? sessionId, bot.id), whole: true })
+ }
+ case 'stop_bot': {
+ const target = findBot(arg('bot')) ?? { name: arg('bot') ?? '…', color: 'gray' }
+ if (done && root.isError) return h('div', { className: 'bt-event' }, t("Couldn't stop {name}", { name: target.name }))
- return h(EventLine, { prefix: t('Stopped'), bots: [target], onOpen: bot => bot.id && actions.openExchange(roster.byId[sessionId]?.id ?? sessionId, bot.id) })
++ return h(EventLine, { prefix: t('Stopped'), bots: [target], onOpen: bot => bot.id && actions.openExchange(roster.byId[sessionId]?.id ?? sessionId, bot.id), whole: true })
}
case 'create_bot': {
const created = findBot(arg('name'))