A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
Show the time on user messages inside a group relay
Fei2411908f5a08093f
diff --git a/ds-bot/client.js b/ds-bot/client.jsindex 168aef38..d1671d89 100644--- a/ds-bot/client.js+++ b/ds-bot/client.js@@ -5034,7 +5034,8 @@ function GroupReplies({ sessionId, callId, done, content, roster, actions, useUireturn (0, import_react8.createElement)("div", { key: `user-${index}`, className: "bt-urow" }, (0, import_react8.createElement)("div",{ className: "bt-ububble" },- (0, import_react8.createElement)(import_dsh_client_ui_primitives.MarkdownText, { text: reply.text, labels: mdLabels(), variant: "compact" })+ (0, import_react8.createElement)(import_dsh_client_ui_primitives.MarkdownText, { text: reply.text, labels: mdLabels(), variant: "compact" }),+ Number.isFinite(time) ? (0, import_react8.createElement)("div", { className: "bt-utime", title: clockLabel(time) }, messageClock(time)) : null));}if (reply.kind === "failed") {diff --git a/ds-bot/src/client/cells.js b/ds-bot/src/client/cells.jsindex 38fb23cc..d13baed5 100644--- a/ds-bot/src/client/cells.js+++ b/ds-bot/src/client/cells.js@@ -7,7 +7,7 @@ import { SmileIcon, ReplyIcon, DotsIcon, CheckIcon, DownloadIcon, CopyIcon, Memoimport { colorOf, toolState, BotMark, RoomAvatar } from './mark.js'import { AnsweredCell, SettledQuestion, PendingQuestion } from './questions.js'import { SecretToolCell } from './secret-card.js'-import { dateLocale, t } from './i18n.js'+import { t } from './i18n.js'import { call } from './api.js'import { failureLabel } from './diagnostics.js'import { turnReasoning, thinkingStep } from './turn-reasoning.js'@@ -730,7 +730,8 @@ function GroupReplies({ sessionId, callId, done, content, roster, actions, useUiconst 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' })))+ 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(' · ') },diff --git a/ds-bot/test/tool-cells.test.js b/ds-bot/test/tool-cells.test.jsindex 595ac39c..df2f2653 100644--- a/ds-bot/test/tool-cells.test.js+++ b/ds-bot/test/tool-cells.test.js@@ -136,6 +136,19 @@ test('a group reply shows its time, and how long its turn ran', () => {assert.deepEqual(tooks.map(node => node.props.title), ['Ran for 1m 8s', 'Ran for 2s'])})+// A user text sent while a relay runs joins the round's replies with its time.+test('a user message inside a group relay shows its time', () => {+ const today = at(0, 14, 5)+ const replies = [+ { kind: 'user', text: 'hold on', time: today },+ { botId: 'writer', text: 'Draft is up.', time: at(0, 14, 6), duration: 1000 },+ ]+ const out = show(call('group_relay', 'direct', { content: { replies } }), { sessionId: 'room' })+ const times = findAll(out, node => node.props?.className === 'bt-utime')+ assert.deepEqual(times.map(text), [clockOf(today)])+ assert.deepEqual(times.map(node => node.props.title), [`Today ${clockOf(today)}`])+})+// The trigger of a post in a group chat carries the event's time, not the post's.test('a group post drawn from its trigger shows the time it came in', () => {const time = at(0, 16, 42)