A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
Stop holding DSH's work-details mode at verbose
Fei24118d5b5da291b3
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex be0739b5..35ef554d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,10 @@ All notable changes to DS Bot are listed here. The format follows [Keep a Change## [Unreleased]+### Fixed++- DS Bot no longer sets DeepSeek Harness's work-details mode (Settings → General) to the most detailed one, and no longer hides that setting. Bot chats stay flat in every mode, and your choice applies again outside them. If you had chosen another mode before, choose it again once: DS Bot cannot tell which one it was.+## [0.1.4] - 2026-10-13### Addeddiff --git a/ds-bot/client.js b/ds-bot/client.jsindex ea2b7877..bbb33967 100644--- a/ds-bot/client.js+++ b/ds-bot/client.js@@ -2586,11 +2586,13 @@ var CONVERSATION_CSS = `[class*="_scroll"]>[class*="_column"]::before{content:var(--bt-first-sep,none);display:block;flex:none;height:28px;margin:17px 0 12px;font-size:12px;line-height:28px;text-align:center;color:var(--bt-ink-2);white-space:nowrap}.bt-activity{display:flex;align-items:center;gap:10px;margin:8px 0 4px 2px;font-size:14px;color:var(--bt-ink-2)}.bt-group-replies{display:contents}-/* The plugin holds the work-details mode at verbose, which renders no step groups.- These rules keep every group flat anyway: before that write lands, when the Host- refuses it, or on a page whose settings stay process-local. */+/* A Bot chat is flat in every work-details mode, without changing the user's mode+ (it is a DSH-wide setting): step groups lose their header and stay open, and what a+ mode folds away in a finished turn stays shown. TurnProcessCell also opens that+ fold; these rules cover the first frame before it does. */[data-step-process]>div:first-child{display:none!important}[data-step-process]>[data-step-process-body]{display:block!important;content-visibility:visible!important;max-height:none!important;overflow:visible!important;mask-image:none!important;scrollbar-gutter:auto!important}+:is([data-step-process],[data-turn-process-hidden])[hidden]{content-visibility:visible!important}[class*="_flowItem"]:has(> [data-slot="conversation.chat.node"]:empty){display:none!important}[class*="_header"]:has(.bt-head){border-bottom-color:transparent!important;box-shadow:none!important}/* The transcript runs under a floating header pill. */@@ -12776,23 +12778,6 @@ function serveBrowserReads({ browsers, post, clientId = globalThis.crypto.random};}-// src/client/flat-transcript.js-var FLAT_TRANSCRIPT_VIEW = "verbose";-function holdFlatTranscript(form) {- let tried;- const check = () => {- const snapshot = form.getSnapshot();- if (snapshot.status !== "ready" || snapshot.value === void 0 || !snapshot.writable) return;- if (snapshot.value.transcriptView === FLAT_TRANSCRIPT_VIEW) return;- if (tried === snapshot.revision) return;- tried = snapshot.revision;- void Promise.resolve(form.set("transcriptView", FLAT_TRANSCRIPT_VIEW)).catch(() => {- });- };- check();- return form.subscribe(check);-}-// src/client/surface.jsfunction groupsFor({ mode, plain = false }) {return { shell: mode === "bot", conversation: mode === "bot" && !plain };@@ -12955,7 +12940,7 @@ function noticeApprovals({ work, roster, shownSession, openSession, since: since}// src/client/index.js-var inject = ["sessions", "uiWorkspace", "uiConversation", "slots", "theme", "layout", "configForms"];+var inject = ["sessions", "uiWorkspace", "uiConversation", "slots", "theme", "layout"];function apply(ctx) {ctx.effect(() => installLocale(ctx.get("locale")), "ds-bot: interface copy");const roster = createSource(EMPTY_ROSTER);@@ -13755,8 +13740,6 @@ function apply(ctx) {shadow("sidebar.footer.action", { id: "bot-account", order: -200, inject: face }, FooterAccount),shadow("sidebar.footer.action", { id: "bot-connect", order: -100, inject: face }, ConnectPlugins),shadow("settings.trigger", { priority: -10 }, YouAvatar),- // ui-chat's "Transcript view" row: a lower priority on the same list id shadows it.- shadow("settings.general.item", { id: "transcript-view", priority: -10 }, Nothing),// At priority -10 the whale wins the seat over a shell account plugin's own// launcher (the Desktop's "··· More"), which comes back in Agent mode.shadow("settings.launcher", { priority: -10, inject: face }, AccountLauncher),@@ -13769,9 +13752,6 @@ function apply(ctx) {installBubbleTokens(),installMentions(),installAtMenu(),- // Bot conversations are always flat, so the work-details mode is not a choice:- // the mode is held at `verbose` while this group is mounted.- holdFlatTranscript(ctx.configForms.get("ui-chat")),shadow("conversation.session.header", { priority: -10, inject: face }, HeaderPill),shadow("conversation.chat.node", { key: "assistant-step", priority: -10, locale: "chat", inject: assistantFace }, AssistantCell),shadow("conversation.chat.node", { key: "turn-trigger", priority: -10, locale: "chat", inject: face }, TriggerCell),diff --git a/ds-bot/src/client/flat-transcript.js b/ds-bot/src/client/flat-transcript.jsdeleted file mode 100644index 951b398b..00000000--- a/ds-bot/src/client/flat-transcript.js+++ /dev/null@@ -1,22 +0,0 @@-// The transcript is flat: no collapsible step groups in any conversation.-// dsh's Chat work-details mode `verbose` is the only mode without them.-export const FLAT_TRANSCRIPT_VIEW = 'verbose'--// Holds the `ui-chat` settings section at the flat mode. Desktop's first-run setup-// writes `standard`, and with no saved value ui-chat falls back to `standard` on-// Desktop and `detailed` elsewhere, so any other value is overwritten whenever it-// shows up. At most one write is made per Host revision: a refused write leaves the-// revision unchanged, and retrying it would loop.-export function holdFlatTranscript(form) {- let tried- const check = () => {- const snapshot = form.getSnapshot()- if (snapshot.status !== 'ready' || snapshot.value === undefined || !snapshot.writable) return- if (snapshot.value.transcriptView === FLAT_TRANSCRIPT_VIEW) return- if (tried === snapshot.revision) return- tried = snapshot.revision- void Promise.resolve(form.set('transcriptView', FLAT_TRANSCRIPT_VIEW)).catch(() => {})- }- check()- return form.subscribe(check)-}diff --git a/ds-bot/src/client/index.js b/ds-bot/src/client/index.jsindex e14e7191..97d8bda5 100644--- a/ds-bot/src/client/index.js+++ b/ds-bot/src/client/index.js@@ -17,7 +17,6 @@ import { AssistantCell, TriggerCell, TurnProcessCell, Nothing, TurnTailCell, Tooimport { Overlays } from './overlays.js'import { createBotBrowsers, serveBrowserReads } from './bot-browsers.js'import { BROWSER_CSS } from './browser-pane.js'-import { holdFlatTranscript } from './flat-transcript.js'import { SECRET_CSS, SecretDock } from './secret-card.js'import { MODEL_CSS, ModelChoiceDock, DeepSeekSignIn } from './model-menu.js'import { BOT_SETTINGS_CSS } from './bot-settings.js'@@ -34,7 +33,7 @@ import { MEMBER_CSS, MemberDock } from './member-status.js'import { USER_MESSAGE_CSS, UserMessageCell, canDrawUserMessages } from './user-message.js'import { noticeApprovals } from './approval-notices.js'-export const inject = ['sessions', 'uiWorkspace', 'uiConversation', 'slots', 'theme', 'layout', 'configForms']+export const inject = ['sessions', 'uiWorkspace', 'uiConversation', 'slots', 'theme', 'layout']export function apply(ctx) {ctx.effect(() => installLocale(ctx.get('locale')), 'ds-bot: interface copy')@@ -778,8 +777,6 @@ export function apply(ctx) {shadow('sidebar.footer.action', { id: 'bot-account', order: -200, inject: face }, FooterAccount),shadow('sidebar.footer.action', { id: 'bot-connect', order: -100, inject: face }, ConnectPlugins),shadow('settings.trigger', { priority: -10 }, YouAvatar),- // ui-chat's "Transcript view" row: a lower priority on the same list id shadows it.- shadow('settings.general.item', { id: 'transcript-view', priority: -10 }, Nothing),// At priority -10 the whale wins the seat over a shell account plugin's own// launcher (the Desktop's "··· More"), which comes back in Agent mode.shadow('settings.launcher', { priority: -10, inject: face }, AccountLauncher),@@ -792,9 +789,6 @@ export function apply(ctx) {installBubbleTokens(),installMentions(),installAtMenu(),- // Bot conversations are always flat, so the work-details mode is not a choice:- // the mode is held at `verbose` while this group is mounted.- holdFlatTranscript(ctx.configForms.get('ui-chat')),shadow('conversation.session.header', { priority: -10, inject: face }, HeaderPill),shadow('conversation.chat.node', { key: 'assistant-step', priority: -10, locale: 'chat', inject: assistantFace }, AssistantCell),shadow('conversation.chat.node', { key: 'turn-trigger', priority: -10, locale: 'chat', inject: face }, TriggerCell),diff --git a/ds-bot/src/client/styles.js b/ds-bot/src/client/styles.jsindex 5b87ae7f..a65739db 100644--- a/ds-bot/src/client/styles.js+++ b/ds-bot/src/client/styles.js@@ -797,11 +797,13 @@ export const CONVERSATION_CSS = `[class*="_scroll"]>[class*="_column"]::before{content:var(--bt-first-sep,none);display:block;flex:none;height:28px;margin:17px 0 12px;font-size:12px;line-height:28px;text-align:center;color:var(--bt-ink-2);white-space:nowrap}.bt-activity{display:flex;align-items:center;gap:10px;margin:8px 0 4px 2px;font-size:14px;color:var(--bt-ink-2)}.bt-group-replies{display:contents}-/* The plugin holds the work-details mode at verbose, which renders no step groups.- These rules keep every group flat anyway: before that write lands, when the Host- refuses it, or on a page whose settings stay process-local. */+/* A Bot chat is flat in every work-details mode, without changing the user's mode+ (it is a DSH-wide setting): step groups lose their header and stay open, and what a+ mode folds away in a finished turn stays shown. TurnProcessCell also opens that+ fold; these rules cover the first frame before it does. */[data-step-process]>div:first-child{display:none!important}[data-step-process]>[data-step-process-body]{display:block!important;content-visibility:visible!important;max-height:none!important;overflow:visible!important;mask-image:none!important;scrollbar-gutter:auto!important}+:is([data-step-process],[data-turn-process-hidden])[hidden]{content-visibility:visible!important}[class*="_flowItem"]:has(> [data-slot="conversation.chat.node"]:empty){display:none!important}[class*="_header"]:has(.bt-head){border-bottom-color:transparent!important;box-shadow:none!important}/* The transcript runs under a floating header pill. */diff --git a/ds-bot/test/client-bundle.test.js b/ds-bot/test/client-bundle.test.jsindex 6ef95cbf..f4c9dfe2 100644--- a/ds-bot/test/client-bundle.test.js+++ b/ds-bot/test/client-bundle.test.js@@ -35,5 +35,7 @@ test('client.js registers a factory that exports apply and inject', () => {assert.equal(Object.prototype.toString.call(exports), '[object Module]')assert.deepEqual(Object.keys(exports), ['apply', 'inject'])assert.equal(typeof exports.apply, 'function')- assert.deepEqual(Array.from(exports.inject), ['sessions', 'uiWorkspace', 'uiConversation', 'slots', 'theme', 'layout', 'configForms'])+ // No `configForms`: the client never writes the user's DSH settings, such as the+ // work-details mode it once held at `verbose`.+ assert.deepEqual(Array.from(exports.inject), ['sessions', 'uiWorkspace', 'uiConversation', 'slots', 'theme', 'layout'])})diff --git a/ds-bot/test/flat-transcript.test.js b/ds-bot/test/flat-transcript.test.jsdeleted file mode 100644index 1af44e9f..00000000--- a/ds-bot/test/flat-transcript.test.js+++ /dev/null@@ -1,80 +0,0 @@-import { test } from 'node:test'-import assert from 'node:assert/strict'-import { FLAT_TRANSCRIPT_VIEW, holdFlatTranscript } from '../src/client/flat-transcript.js'--// A ui-chat config form: `set` records the write; `accept` and `refuse` settle it the-// way the Host would (a new revision with the value, or the same revision reloaded).-function fakeForm(snapshot) {- let current = { status: 'ready', writable: true, mode: 'host', revision: 1, ...snapshot }- const listeners = new Set()- const writes = []- const publish = (next) => { current = next; for (const listener of [...listeners]) listener() }- return {- writes,- listeners,- getSnapshot: () => current,- subscribe: (listener) => { listeners.add(listener); return () => listeners.delete(listener) },- set: (field, value) => { writes.push([field, value]); return Promise.resolve(true) },- publish,- accept: value => publish({ ...current, revision: current.revision + 1, value: { ...current.value, transcriptView: value } }),- refuse: () => publish({ ...current }),- }-}--test('Desktop first-run `standard` is replaced by the flat mode', () => {- const form = fakeForm({ value: { transcriptView: 'standard' } })- const stop = holdFlatTranscript(form)- assert.deepEqual(form.writes, [['transcriptView', FLAT_TRANSCRIPT_VIEW]])- form.accept(FLAT_TRANSCRIPT_VIEW)- assert.equal(form.writes.length, 1)- stop()- assert.equal(form.listeners.size, 0)-})--test('an unset mode is written, and nothing is written before the section arrives', () => {- const form = fakeForm({ status: 'loading', value: undefined, revision: undefined })- holdFlatTranscript(form)- assert.equal(form.writes.length, 0)- form.publish({ ...form.getSnapshot(), status: 'ready', revision: 3, value: {} })- assert.deepEqual(form.writes, [['transcriptView', 'verbose']])-})--test('a flat mode already saved is left alone', () => {- const form = fakeForm({ value: { transcriptView: 'verbose' } })- holdFlatTranscript(form)- form.publish({ ...form.getSnapshot() })- assert.equal(form.writes.length, 0)-})--test('a later change away from flat is undone', () => {- const form = fakeForm({ value: { transcriptView: 'verbose' } })- holdFlatTranscript(form)- form.accept('compact')- assert.deepEqual(form.writes, [['transcriptView', 'verbose']])-})--test('a refused write is not retried in a loop', () => {- const form = fakeForm({ value: { transcriptView: 'detailed' } })- holdFlatTranscript(form)- form.refuse()- form.refuse()- assert.equal(form.writes.length, 1)- // A new Host revision is a new chance.- form.accept('detailed')- assert.equal(form.writes.length, 2)-})--test('process-local or read-only settings are never written', () => {- const memory = fakeForm({ status: 'unavailable', mode: 'memory', writable: false, value: undefined })- holdFlatTranscript(memory)- const readOnly = fakeForm({ writable: false, value: { transcriptView: 'standard' } })- holdFlatTranscript(readOnly)- assert.equal(memory.writes.length + readOnly.writes.length, 0)-})--test('a rejected write does not escape', async () => {- const form = fakeForm({ value: { transcriptView: 'standard' } })- form.set = () => Promise.reject(new Error('offline'))- holdFlatTranscript(form)- await new Promise(resolve => setImmediate(resolve))-})