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/ui-redesign

Fei2411f1d07b212ad4
diff --cc ds-bot/client.js
index 846c01e9,24d0962b..69884b13
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@@ -8727,70 -8774,15 +8815,15 @@@ function GroupReplies({ sessionId, call
stackReplies(replies).map(({ reply, index, texts: texts2, time, duration }) => {
const bot = roster.byId[reply.botId] ?? { id: reply.botId, name: reply.name, color: reply.color ?? "gray" };
if (reply.kind === "user") {
- return (0, import_react17.createElement)("div", { key: `user-${index}`, className: "bt-urow" }, (0, import_react17.createElement)(
+ return (0, import_react17.createElement)(
"div",
- { className: "bt-ububble" },
- (0, import_react17.createElement)(import_dsh_client_ui_primitives.MarkdownText, { text: reply.text, labels: mdLabels3(), variant: "compact" }),
+ { key: `user-${index}`, className: "bt-urow" },
+ (0, import_react17.createElement)("div", { className: "bt-ububble" }, (0, import_react17.createElement)(import_dsh_client_ui_primitives.MarkdownText, { text: reply.text, labels: mdLabels3(), variant: "compact" })),
Number.isFinite(time) ? (0, import_react17.createElement)("div", { className: "bt-utime", title: clockLabel(time) }, messageClock(time)) : null
- ));
+ );
}
- if (reply.kind === "failed") {
- return (0, import_react17.createElement)(
- "div",
- { key: `${reply.botId}-${index}`, className: "bt-event bt-event-error", role: "status", title: [reply.code, reply.status, reply.text].filter(Boolean).join(" · ") },
- t("{name} could not answer: {reason}", { name: bot.name, reason: failureLabel(reply.code, reply.text) })
- );
- }
- if (reply.kind === "lookup") {
- return (0, import_react17.createElement)(
- "div",
- { key: `${reply.botId}-${index}`, className: "bt-event" },
- reply.text ? t("{name} looked up its own chat for “{text}”", { name: bot.name, text: reply.text }) : t("{name} looked up its own chat", { name: bot.name })
- );
- }
- if (reply.kind === "missed") {
- return (0, import_react17.createElement)("div", { key: `${reply.botId}-${index}`, className: "bt-event" }, t("{name} didn't answer in time", { name: bot.name }));
- }
- if (reply.kind === "admin-passed") {
- return (0, import_react17.createElement)(
- "div",
- { key: `${reply.botId}-${index}`, className: "bt-event" },
- t("{name} did not answer or call anyone; call a member with @Name", { name: bot.name })
- );
- }
- if (reply.kind === "paused") {
- return (0, import_react17.createElement)(
- "div",
- { key: `paused-${index}`, className: "bt-event" },
- t("Paused after {count} Bot relays. Waiting: {names}", { count: reply.count, names: (reply.names ?? []).join(t(" and ")) })
- );
- }
- if (reply.kind === "resumed") {
- return (0, import_react17.createElement)("div", { key: `${reply.botId}-${index}`, className: "bt-event" }, t("{name} was cut off by a restart and picked its work back up", { name: bot.name }));
- }
- if (reply.kind === "cut") {
- return (0, import_react17.createElement)("div", { key: `${reply.botId}-${index}`, className: "bt-event" }, t("{name} was cut off by a restart again and stopped", { name: bot.name }));
- }
- if (reply.kind === "approval" || reply.kind === "working") {
- return (0, import_react17.createElement)(
- "div",
- { key: `${reply.botId}-${index}`, className: "bt-event" },
- (0, import_react17.createElement)(
- "button",
- { type: "button", className: "bt-event-whole", onClick: () => actions.showDetails(sessionId) },
- (0, import_react17.createElement)(BotMark, { bot, size: 16 }),
- (0, import_react17.createElement)("span", { className: "bt-event-name" }, t(reply.kind === "working" ? "{name} started on it" : "{name} paused for your approval", { name: bot.name }))
- )
- );
- }
- if (reply.kind === "folder") {
- return (0, import_react17.createElement)("div", { key: `folder-${index}`, className: "bt-event" }, reply.text);
- }
- if (reply.kind === "stopped") {
- return (0, import_react17.createElement)("div", { key: `${reply.botId}-${index}`, className: "bt-event" }, t("You stopped {name}'s work", { name: bot.name }));
- }
- if (reply.kind === "done") {
- return (0, import_react17.createElement)("div", { key: `${reply.botId}-${index}`, className: "bt-event" }, t("{name} finished its work", { name: bot.name }));
+ if (reply.kind !== void 0) {
+ return (0, import_react17.createElement)(RelayEvent, { key: `${reply.botId ?? reply.kind}-${index}`, reply, bot, sessionId, actions });
}
return (0, import_react17.createElement)(GroupMessage, { key: `${reply.botId}-${index}`, bot, texts: texts2, room: room2, roster, actions, msgKey: callId ? `${sessionId}:${callId}:${index}` : void 0, useUi, time, duration });
}),
diff --cc ds-bot/src/client/cells.js
index 8f48c6ed,6575a1ba..c00d2ddc
--- a/ds-bot/src/client/cells.js
+++ b/ds-bot/src/client/cells.js
@@@ -971,49 -943,12 +973,12 @@@ function GroupReplies({ sessionId, call
stackReplies(replies).map(({ reply, index, texts, time, duration }) => {
const bot = roster.byId[reply.botId] ?? { id: reply.botId, name: reply.name, color: reply.color ?? 'gray' }
if (reply.kind === 'user') {
- return h('div', { key: `user-${index}`, className: 'bt-urow' }, h('div', { className: 'bt-ububble' },
- h(MarkdownText, { text: reply.text, labels: mdLabels(), variant: 'compact' }),
- Number.isFinite(time) ? h('div', { className: 'bt-utime', title: clockLabel(time) }, messageClock(time)) : null))
+ return h('div', { key: `user-${index}`, className: 'bt-urow' },
+ h('div', { className: 'bt-ububble' }, h(MarkdownText, { text: reply.text, labels: mdLabels(), variant: 'compact' })),
+ Number.isFinite(time) ? h('div', { className: 'bt-utime', title: clockLabel(time) }, messageClock(time)) : null)
}
- if (reply.kind === 'failed') {
- return h('div', { key: `${reply.botId}-${index}`, className: 'bt-event bt-event-error', role: 'status', title: [reply.code, reply.status, reply.text].filter(Boolean).join(' · ') },
- t('{name} could not answer: {reason}', { name: bot.name, reason: failureLabel(reply.code, reply.text) }))
- }
- if (reply.kind === 'lookup') {
- return h('div', { key: `${reply.botId}-${index}`, className: 'bt-event' },
- reply.text ? t('{name} looked up its own chat for “{text}”', { name: bot.name, text: reply.text }) : t('{name} looked up its own chat', { name: bot.name }))
- }
- if (reply.kind === 'missed') {
- return h('div', { key: `${reply.botId}-${index}`, className: 'bt-event' }, t("{name} didn't answer in time", { name: bot.name }))
- }
- if (reply.kind === 'admin-passed') {
- return h('div', { key: `${reply.botId}-${index}`, className: 'bt-event' },
- t('{name} did not answer or call anyone; call a member with @Name', { name: bot.name }))
- }
- // LEGACY: rounds from when groups paused at a relay limit.
- if (reply.kind === 'paused') {
- return h('div', { key: `paused-${index}`, className: 'bt-event' },
- t('Paused after {count} Bot relays. Waiting: {names}', { count: reply.count, names: (reply.names ?? []).join(t(' and ')) }))
- }
- if (reply.kind === 'resumed') {
- return h('div', { key: `${reply.botId}-${index}`, className: 'bt-event' }, t('{name} was cut off by a restart and picked its work back up', { name: bot.name }))
- }
- if (reply.kind === 'cut') {
- return h('div', { key: `${reply.botId}-${index}`, className: 'bt-event' }, t('{name} was cut off by a restart again and stopped', { name: bot.name }))
- }
- if (reply.kind === 'approval' || reply.kind === 'working') {
- return h('div', { key: `${reply.botId}-${index}`, className: 'bt-event' },
- h('button', { type: 'button', className: 'bt-event-whole', onClick: () => actions.showDetails(sessionId) },
- h(BotMark, { bot, size: 16 }), h('span', { className: 'bt-event-name' }, t(reply.kind === 'working' ? '{name} started on it' : '{name} paused for your approval', { name: bot.name }))))
- }
- if (reply.kind === 'folder') {
- return h('div', { key: `folder-${index}`, className: 'bt-event' }, reply.text)
- }
- if (reply.kind === 'stopped') {
- return h('div', { key: `${reply.botId}-${index}`, className: 'bt-event' }, t("You stopped {name}'s work", { name: bot.name }))
- }
- if (reply.kind === 'done') {
- return h('div', { key: `${reply.botId}-${index}`, className: 'bt-event' }, t('{name} finished its work', { name: bot.name }))
+ if (reply.kind !== undefined) {
+ return h(RelayEvent, { key: `${reply.botId ?? reply.kind}-${index}`, reply, bot, sessionId, actions })
}
return h(GroupMessage, { key: `${reply.botId}-${index}`, bot, texts, room, roster, actions, msgKey: callId ? `${sessionId}:${callId}:${index}` : undefined, useUi, time, duration })
}),