A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
Slide the Bot sidebar out and in instead of cutting it
Fei2411d09249cbba11
diff --git a/ds-bot/client.js b/ds-bot/client.jsindex ec520f75..c23bc2e4 100644--- a/ds-bot/client.js+++ b/ds-bot/client.js@@ -2545,6 +2545,10 @@ body[data-bt-motion=quiet] .bt-mark[data-poke]{cursor:default}and the floating drawer keeps the opaque fill over the conversation. */.bt-leftcol{position:fixed;left:0;top:0;bottom:0;z-index:25;display:flex;--bt-lc-clear:var(--dsh-frame-top-clearance,var(--dsh-windows-titlebar-height,0px));background:var(--bt-leftcol-fill,var(--bt-sidebar));border-right:.5px solid var(--bt-line);box-sizing:border-box;padding:calc(var(--bt-lc-clear) + 6px) 12px 6px;color:var(--bt-ink);font-family:var(--bt-font)}html[data-windows-titlebar] .bt-leftcol,html[data-platform=darwin] .bt-leftcol{border-right:none}+.bt-leftcol{animation:bt-leftcol-in ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing}}+.bt-leftcol[data-leaving]{transform:translateX(-100%);transition:transform ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing};pointer-events:none}+@keyframes bt-leftcol-in{from{transform:translateX(-100%)}}+@media (prefers-reduced-motion:reduce){.bt-leftcol{animation:none}.bt-leftcol[data-leaving]{transition:none}}.bt-leftcol-grip{position:absolute;right:-4px;top:0;bottom:0;width:8px;cursor:col-resize;z-index:3;touch-action:none}.bt-leftcol-grip:hover,.bt-leftcol-grip:active{background:linear-gradient(to right,transparent 3px,var(--bt-line-2) 3px,var(--bt-line-2) 5px,transparent 5px)}/* The shell's collapsed sidebar keeps no track in the Bot view, so a hidden@@ -2792,9 +2796,9 @@ html[data-windows-titlebar]:not([data-fullscreen]) :is(.bt-pane,.bt-panel)::befo.bt-panel[data-leaving]{transform:translateX(100%);transition:transform .3s cubic-bezier(.2,0,0,1);pointer-events:none}.bt-panel[data-instant]{transition:none}@keyframes bt-pane-in{from{transform:translateX(100%)}}-/* The right margin glides with the Bot panel's slide; the left one lands at once,- as our left column appears, folds and hides without a slide of its own. */-[class*="_centerCol"]{transition:margin-right ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing}}+/* The conversation's margins glide with the Bot panel's slide and with our left+ column's slide in and out. */+[class*="_centerCol"]{transition:margin-right ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing},margin-left ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing}}.bt-panel-grip{position:absolute;left:-5px;top:0;bottom:0;width:8px;cursor:col-resize;z-index:3;touch-action:none}.bt-panel-grip:hover,.bt-panel[data-dragging] .bt-panel-grip{background:linear-gradient(to right,transparent 4px,var(--bt-line-2) 4px,var(--bt-line-2) 6px,transparent 6px)}.bt-drag-shield{position:fixed;inset:0;z-index:45;cursor:col-resize}@@ -4396,7 +4400,7 @@ var HANDOFF_CSS = `.bt-handoff .bt-q-foot{flex-wrap:wrap}`;-// node_modules/deep-view/src/react/ui.js+// ../../../DS Bot/DeepSeek-Bot/ds-bot/node_modules/deep-view/src/react/ui.jsvar import_react8 = require("react");var FallbackMarkdown = ({ text }) => (0, import_react8.createElement)("span", null, String(text ?? ""));var ViewUi = (0, import_react8.createContext)({ t: (key) => key, Markdown: FallbackMarkdown });@@ -4463,7 +4467,7 @@ function useOptionKeys2(count, onPick, ownRef) {return count > 0 && listening <= 1;}-// node_modules/deep-view/src/core/formula.js+// ../../../DS Bot/DeepSeek-Bot/ds-bot/node_modules/deep-view/src/core/formula.jsvar FUNCTIONS = {min: { args: [1, Infinity], run: (...values) => Math.min(...values.map(num)) },max: { args: [1, Infinity], run: (...values) => Math.max(...values.map(num)) },@@ -4744,7 +4748,7 @@ function evaluate(tree, lookup) {}}-// node_modules/deep-view/src/core/views.js+// ../../../DS Bot/DeepSeek-Bot/ds-bot/node_modules/deep-view/src/core/views.jsvar LAYOUT = ["stack", "row"];var DISPLAY = ["text", "metric", "table", "chart", "progress", "callout", "sources", "html"];var INPUT_TYPES = ["slider", "choice", "toggle", "number"];@@ -5364,7 +5368,7 @@ function validateForm(node, values) {return { fields };}-// node_modules/deep-view/src/react/chart.js+// ../../../DS Bot/DeepSeek-Bot/ds-bot/node_modules/deep-view/src/react/chart.jsvar import_react9 = require("react");var PALETTE = ["var(--dv-accent)", "var(--dv-ink-tangerine)", "var(--dv-ink-green)", "var(--dv-ink-violet)", "var(--dv-ink-sky)", "var(--dv-ink-rose)", "var(--dv-ink-yellow)", "var(--dv-ink-cyan)", "var(--dv-ink-magenta)"];var colorAt = (index) => PALETTE[index % PALETTE.length];@@ -5803,7 +5807,7 @@ var CHART_CSS = `@media (prefers-reduced-motion:reduce){.dv-chart-mark,.dv-chart-dot{transition:none}.dv-chart-tip{animation:none}}`;-// node_modules/deep-view/src/react/frame.js+// ../../../DS Bot/DeepSeek-Bot/ds-bot/node_modules/deep-view/src/react/frame.jsvar import_react10 = require("react");var THEME_VARS = [["--view-ink", "--bt-ink", "--dv-ink"],@@ -5885,7 +5889,7 @@ var HTML_CSS = `.dv-view-frame-stopped{margin:0;font-size:13px;line-height:18px;color:var(--dv-ink-2)}`;-// node_modules/deep-view/src/react/card.js+// ../../../DS Bot/DeepSeek-Bot/ds-bot/node_modules/deep-view/src/react/card.jsvar import_react11 = require("react");var mdLabels = (ui2) => ({ code: { copyLabel: ui2.t("Copy"), copiedLabel: ui2.t("Copied") }, footnotes: ui2.t("Footnotes") });var TONES2 = ["good", "warn", "bad"];@@ -6554,7 +6558,7 @@ ${CHART_CSS}${HTML_CSS}`;-// node_modules/deep-view/src/react/styles.js+// ../../../DS Bot/DeepSeek-Bot/ds-bot/node_modules/deep-view/src/react/styles.jsvar THEME_CSS = `body{--dv-ink:var(--dsw-alias-label-primary);@@ -6651,10 +6655,10 @@ button.dv-q-opt:active{background:var(--dv-active)}@media (prefers-reduced-motion:reduce){.dv-q,.dv-view-bare,.dv-q-submit,.dv-menu,.dv-q-check{animation:none}}`;-// node_modules/deep-view/src/react/index.js+// ../../../DS Bot/DeepSeek-Bot/ds-bot/node_modules/deep-view/src/react/index.jsvar DEEP_VIEW_CSS = THEME_CSS + QUESTION_CSS + WIDGET_CSS;-// node_modules/deep-view/src/core/reply.js+// ../../../DS Bot/DeepSeek-Bot/ds-bot/node_modules/deep-view/src/core/reply.jsvar REPLY_KIND = "user-question-reply";function viewCardText(args) {let card = args;@@ -9632,10 +9636,10 @@ function useListGlide(listRef, layout, key) {tops.current = { layout, map: next };}, [layout, key]);}-function LeftColumn({ mode, width, onGrip, children }) {+function LeftColumn({ mode, width, onGrip, leaving, children }) {return (0, import_react_dom3.createPortal)((0, import_react19.createElement)("div",- { className: "bt-leftcol", "data-left": mode, style: { width: `${width}px` } },+ { className: "bt-leftcol", "data-left": mode, "data-leaving": leaving || void 0, "aria-hidden": leaving || void 0, style: { width: `${width}px` } },children,(0, import_react19.createElement)("div", { className: "bt-leftcol-grip", role: "separator", "aria-orientation": "vertical", "aria-label": t("Resize sidebar"), title: t("Resize sidebar"), onPointerDown: onGrip })), document.body);@@ -9675,7 +9679,9 @@ function TeamSidebar(props) {});const [drag, setDrag] = (0, import_react19.useState)(null);const mode = drag?.left ?? layout.left;- const wideContent = mode !== "rail";+ const [held, leaving] = useLinger(mode === "hidden" ? null : mode, SPRING_SHAPE.duration);+ const shown = held ?? mode;+ const wideContent = shown !== "rail";const updated = useSessions((list) => {const stamps = {};for (const id of list.ids) stamps[id] = list.byId[id]?.updatedAt ?? 0;@@ -9695,7 +9701,7 @@ function TeamSidebar(props) {useListGlide(listRef, wideContent, order.map((entry) => entry.item.id).join(","));useLandOnMainBot(roster, useSessions, actions);const openWidth = drag?.width ?? frameSnap.sidebarWidth;- const ourWidth = mode === "rail" ? RAIL_WIDTH : openWidth;+ const ourWidth = shown === "rail" ? RAIL_WIDTH : openWidth;const pushed = mode === "open" ? openWidth : mode === "hidden" ? 0 : RAIL_WIDTH;(0, import_react19.useLayoutEffect)(() => {if (typeof document === "undefined") return;@@ -9928,7 +9934,7 @@ function TeamSidebar(props) {import_react19.Fragment,null,(0, import_react19.createElement)(TitleToggle, { hidden: mode === "hidden", onToggle }),- mode === "hidden" ? null : (0, import_react19.createElement)(LeftColumn, { mode, width: ourWidth, onGrip: startDrag }, content)+ shown === "hidden" ? null : (0, import_react19.createElement)(LeftColumn, { mode: shown, width: ourWidth, onGrip: startDrag, leaving }, content));}function UpdateButton({ useUpdate, actions }) {diff --git a/ds-bot/src/client/sidebar.js b/ds-bot/src/client/sidebar.jsindex 79e922a0..1bfc6495 100644--- a/ds-bot/src/client/sidebar.js+++ b/ds-bot/src/client/sidebar.js@@ -8,7 +8,7 @@ import { MAIN_LOOK } from './characters.js'import { botState, BotMark, BotAvatar, RoomAvatar } from './mark.js'import { reducedMotion } from './activity-row.js'import { Shimmer, workPhrase } from './cells.js'-import { springEasing, SPRING_SHAPE, useViewport, viewBottom } from './motion.js'+import { springEasing, SPRING_SHAPE, useLinger, useViewport, viewBottom } from './motion.js'import { hostText, t } from './i18n.js'import { clientErrors } from './diagnostics.js'import { showsDshRow } from './dsh-offer.js'@@ -269,8 +269,8 @@ function useListGlide(listRef, layout, key) {// collapsed sidebar: the open column or the avatar rail push the conversation// over, the drawer floats above it. Its right edge drags the open width, and// down to the rail.-function LeftColumn({ mode, width, onGrip, children }) {- return createPortal(h('div', { className: 'bt-leftcol', 'data-left': mode, style: { width: `${width}px` } },+function LeftColumn({ mode, width, onGrip, leaving, children }) {+ return createPortal(h('div', { className: 'bt-leftcol', 'data-left': mode, 'data-leaving': leaving || undefined, 'aria-hidden': leaving || undefined, style: { width: `${width}px` } },children,h('div', { className: 'bt-leftcol-grip', role: 'separator', 'aria-orientation': 'vertical', 'aria-label': t('Resize sidebar'), title: t('Resize sidebar'), onPointerDown: onGrip })), document.body)}@@ -317,7 +317,10 @@ export function TeamSidebar(props) {// A drag of the column's edge shows where it would land, live.const [drag, setDrag] = useState(null)const mode = drag?.left ?? layout.left- const wideContent = mode !== 'rail'+ // A hidden column stays mounted for its slide out; `shown` is the mode it last had.+ const [held, leaving] = useLinger(mode === 'hidden' ? null : mode, SPRING_SHAPE.duration)+ const shown = held ?? mode+ const wideContent = shown !== 'rail'const updated = useSessions(list => {const stamps = {}for (const id of list.ids) stamps[id] = list.byId[id]?.updatedAt ?? 0@@ -341,7 +344,7 @@ export function TeamSidebar(props) {// collapsed track; a drawer floats over the rail's place, so it pushes as much// as the rail and the chat stays put when it opens or closes.const openWidth = drag?.width ?? frameSnap.sidebarWidth- const ourWidth = mode === 'rail' ? RAIL_WIDTH : openWidth+ const ourWidth = shown === 'rail' ? RAIL_WIDTH : openWidthconst pushed = mode === 'open' ? openWidth : mode === 'hidden' ? 0 : RAIL_WIDTHuseLayoutEffect(() => {if (typeof document === 'undefined') return@@ -584,7 +587,7 @@ export function TeamSidebar(props) {foot)return h(Fragment, null,h(TitleToggle, { hidden: mode === 'hidden', onToggle }),- mode === 'hidden' ? null : h(LeftColumn, { mode, width: ourWidth, onGrip: startDrag }, content))+ shown === 'hidden' ? null : h(LeftColumn, { mode: shown, width: ourWidth, onGrip: startDrag, leaving }, content))}// The update button at the sidebar's top right: a cloud while a newer DS Bot —diff --git a/ds-bot/src/client/styles.js b/ds-bot/src/client/styles.jsindex 324919f8..73bf4e05 100644--- a/ds-bot/src/client/styles.js+++ b/ds-bot/src/client/styles.js@@ -152,6 +152,10 @@ body[data-bt-motion=quiet] .bt-mark[data-poke]{cursor:default}and the floating drawer keeps the opaque fill over the conversation. */.bt-leftcol{position:fixed;left:0;top:0;bottom:0;z-index:25;display:flex;--bt-lc-clear:var(--dsh-frame-top-clearance,var(--dsh-windows-titlebar-height,0px));background:var(--bt-leftcol-fill,var(--bt-sidebar));border-right:.5px solid var(--bt-line);box-sizing:border-box;padding:calc(var(--bt-lc-clear) + 6px) 12px 6px;color:var(--bt-ink);font-family:var(--bt-font)}html[data-windows-titlebar] .bt-leftcol,html[data-platform=darwin] .bt-leftcol{border-right:none}+.bt-leftcol{animation:bt-leftcol-in ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing}}+.bt-leftcol[data-leaving]{transform:translateX(-100%);transition:transform ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing};pointer-events:none}+@keyframes bt-leftcol-in{from{transform:translateX(-100%)}}+@media (prefers-reduced-motion:reduce){.bt-leftcol{animation:none}.bt-leftcol[data-leaving]{transition:none}}.bt-leftcol-grip{position:absolute;right:-4px;top:0;bottom:0;width:8px;cursor:col-resize;z-index:3;touch-action:none}.bt-leftcol-grip:hover,.bt-leftcol-grip:active{background:linear-gradient(to right,transparent 3px,var(--bt-line-2) 3px,var(--bt-line-2) 5px,transparent 5px)}/* The shell's collapsed sidebar keeps no track in the Bot view, so a hidden@@ -399,9 +403,9 @@ html[data-windows-titlebar]:not([data-fullscreen]) :is(.bt-pane,.bt-panel)::befo.bt-panel[data-leaving]{transform:translateX(100%);transition:transform .3s cubic-bezier(.2,0,0,1);pointer-events:none}.bt-panel[data-instant]{transition:none}@keyframes bt-pane-in{from{transform:translateX(100%)}}-/* The right margin glides with the Bot panel's slide; the left one lands at once,- as our left column appears, folds and hides without a slide of its own. */-[class*="_centerCol"]{transition:margin-right ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing}}+/* The conversation's margins glide with the Bot panel's slide and with our left+ column's slide in and out. */+[class*="_centerCol"]{transition:margin-right ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing},margin-left ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing}}.bt-panel-grip{position:absolute;left:-5px;top:0;bottom:0;width:8px;cursor:col-resize;z-index:3;touch-action:none}.bt-panel-grip:hover,.bt-panel[data-dragging] .bt-panel-grip{background:linear-gradient(to right,transparent 4px,var(--bt-line-2) 4px,var(--bt-line-2) 6px,transparent 6px)}.bt-drag-shield{position:fixed;inset:0;z-index:45;cursor:col-resize}