Skip to content

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

Loosen long text in chat bubbles

Fei2411eadf214d2bb2
diff --git a/app/ui/src/app.css b/app/ui/src/app.css
index 91e42d80..85d37844 100644
--- a/app/ui/src/app.css
+++ b/app/ui/src/app.css
@@ -1,7 +1,7 @@
/* The frame around the Bot views. The views bring their own stylesheets (main.js); these
rules give the frame the sizes the views have in DSH. Colors come from the --bt-* variables. */
html,body,#root{height:100%;margin:0}
-body{color-scheme:light;background:var(--bt-main);color:var(--bt-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}
+body{color-scheme:light;background:var(--bt-main);color:var(--bt-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}
body[data-ds-dark-theme]{color-scheme:dark}
::-webkit-scrollbar{width:12px;height:12px}
::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:12px;background:var(--bt-line-2) content-box}
diff --git a/docs/design/ui-standard.md b/docs/design/ui-standard.md
index 00b32ebc..909712a5 100644
--- a/docs/design/ui-standard.md
+++ b/docs/design/ui-standard.md
@@ -114,6 +114,7 @@ Bot 名字、提及用同一个颜色写字;纯黑读起来像标题,所以
- 界面:`-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif`。
- 代码、密钥、路径:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`。
- 对话内容的字号跟随 DSH 的 `--dsh-content-font-size`(默认 14px)。
+- 对话内容的中文字体不点名:桌面应用的字体列表里不写中文字体,交给系统回退(macOS 经 `-apple-system` 是苹方,Linux 由 fontconfig 选,Windows 用系统或用户装的中文字体);在 DSH Desktop / Web 里跟随 DSH 的正文字体设置。
### 3.2 字号档
@@ -125,7 +126,8 @@ Bot 名字、提及用同一个颜色写字;纯黑读起来像标题,所以
| 注释 | 11 / 16 | 400–500 | 计数、时间、小芯片 | `.bt-chip` |
| 小 | 12 / 16 | 400–500 | 标签、说明、小按钮、错误 | `.bt-tag`、`.bt-note`、`.bt-soft-sm` |
| 正文 | 13 / 18 | 400 | 设置行、菜单项、面板正文、列表 | `.bt-set-row`、`.bt-menu button` |
-| 内容 | 14 / 22 | 400 | 对话气泡、输入框、主按钮 | `.bt-bubble`、`.bt-soft` |
+| 内容 | 14 / 22 | 400 | 输入框、主按钮 | `.bt-soft` |
+| 气泡 | 14 / 24 | 400 | 对话气泡的正文;行高是字号 + 10,跟随 --dsh-content-font-size | `.bt-bubble`、`.bt-ububble` |
| 胶囊 | 14 / 20 | 400 | 顶部胶囊 | `.bt-pill` |
| 小标题 | 15 / 20 | 600 | 对话框标题、卡片标题 | `.bt-settings-head h2`、`.bt-q-title` |
| 标题 | 17 / 24 | 500 | 详情面板里的 Bot 名 | `.bt-drawer-name` |
diff --git a/ds-bot/client.js b/ds-bot/client.js
index 433f1439..f2ce5741 100644
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@ -2494,7 +2494,7 @@ body[data-bt-motion=quiet] .bt-mark[data-poke]{cursor:default}
/* The width settings: the share of the column a bubble may take, and the flat text. */
body{--bt-msg-w:.8;--bt-flat-w:1}
.bt-astack{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin:0}
-.bt-bubble{max-width:min(calc(var(--bt-msg-w) * 100%),calc(100% - 82px));background:var(--bt-bubble);color:var(--bt-ink);border-radius:18px;padding:7px 12px;font-size:var(--dsh-content-font-size,14px);line-height:calc(var(--dsh-content-font-size,14px) + 8px);box-sizing:border-box;overflow-wrap:anywhere}
+.bt-bubble{max-width:min(calc(var(--bt-msg-w) * 100%),calc(100% - 82px));background:var(--bt-bubble);color:var(--bt-ink);border-radius:18px;padding:7px 12px;font-size:var(--dsh-content-font-size,14px);line-height:calc(var(--dsh-content-font-size,14px) + 10px);box-sizing:border-box;overflow-wrap:anywhere;text-wrap:pretty;text-autospace:normal}
.bt-msg:not(:first-child)>.bt-msg-line>.bt-bubble{border-start-start-radius:6px}
.bt-msg:not(:last-child)>.bt-msg-line>.bt-bubble{border-end-start-radius:6px}
.bt-bubble [class*="_markdown"]>*+*{margin-top:10px}
@@ -2502,6 +2502,10 @@ body{--bt-msg-w:.8;--bt-flat-w:1}
.bt-bubble p{margin:0}
.bt-bubble p + p{margin-top:6px}
.bt-bubble ul,.bt-bubble ol{margin:4px 0;padding-left:20px}
+.bt-bubble [class*="_markdown"] li+li{margin-top:6px}
+.bt-bubble [class*="_markdown"] li::marker{color:var(--bt-ink-2)}
+/* line-height:1 keeps the monospace line box from making an inline code line taller. */
+.bt-bubble [class*="_markdown"] :not(pre)>code{line-height:1;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.bt-bubble a[href^="${MENTION_ORIGIN}"]{text-decoration:none;font-weight:400;cursor:pointer;white-space:nowrap}
.bt-bubble a[href^="${MENTION_ORIGIN}"]::before{content:"";display:inline-block;width:16px;height:16px;margin-right:3px;vertical-align:-3px;background:currentColor;-webkit-mask:${DEFAULT_MASK} center/contain no-repeat;mask:${DEFAULT_MASK} center/contain no-repeat}
.bt-group-msg{display:flex;flex-direction:column;gap:4px;margin:16px 0 0}
@@ -3417,9 +3421,9 @@ div:has(> nav [class*="_marks"]){display:none!important}
.bt-earlier-top{display:flex;justify-content:center;align-items:center;height:34px;flex:none}
.bt-earlier-top .bt-soft{height:28px;font-size:12px;padding:0 12px}
.bt-urow{display:flex;justify-content:flex-end}
-.bt-ububble{max-width:calc(var(--bt-msg-w) * 100%);background:var(--bt-user);color:var(--bt-user-ink);border-radius:18px;padding:7px 12px;font-size:14px;line-height:20px;box-sizing:border-box;overflow-wrap:anywhere}
+.bt-ububble{max-width:calc(var(--bt-msg-w) * 100%);background:var(--bt-user);color:var(--bt-user-ink);border-radius:18px;padding:7px 12px;font-size:14px;line-height:20px;box-sizing:border-box;overflow-wrap:anywhere;text-wrap:pretty;text-autospace:normal}
.bt-ububble [class*="_markdown"],.bt-ububble a{color:inherit!important}
-.bt-ububble p{margin:0;line-height:22px}
+.bt-ububble p{margin:0;line-height:24px}
.bt-uimages{display:block;font-size:12px;opacity:.7}
.bt-utime{margin-top:-4px;font-size:11px;line-height:14px;color:var(--bt-ink-3);font-variant-numeric:tabular-nums;white-space:nowrap}
.bt-earlier .bt-event{margin:4px 0}
diff --git a/ds-bot/src/client/styles.js b/ds-bot/src/client/styles.js
index 3d1b9ffa..ae23249c 100644
--- a/ds-bot/src/client/styles.js
+++ b/ds-bot/src/client/styles.js
@@ -179,7 +179,7 @@ body[data-bt-motion=quiet] .bt-mark[data-poke]{cursor:default}
/* The width settings: the share of the column a bubble may take, and the flat text. */
body{--bt-msg-w:.8;--bt-flat-w:1}
.bt-astack{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin:0}
-.bt-bubble{max-width:min(calc(var(--bt-msg-w) * 100%),calc(100% - 82px));background:var(--bt-bubble);color:var(--bt-ink);border-radius:18px;padding:7px 12px;font-size:var(--dsh-content-font-size,14px);line-height:calc(var(--dsh-content-font-size,14px) + 8px);box-sizing:border-box;overflow-wrap:anywhere}
+.bt-bubble{max-width:min(calc(var(--bt-msg-w) * 100%),calc(100% - 82px));background:var(--bt-bubble);color:var(--bt-ink);border-radius:18px;padding:7px 12px;font-size:var(--dsh-content-font-size,14px);line-height:calc(var(--dsh-content-font-size,14px) + 10px);box-sizing:border-box;overflow-wrap:anywhere;text-wrap:pretty;text-autospace:normal}
.bt-msg:not(:first-child)>.bt-msg-line>.bt-bubble{border-start-start-radius:6px}
.bt-msg:not(:last-child)>.bt-msg-line>.bt-bubble{border-end-start-radius:6px}
.bt-bubble [class*="_markdown"]>*+*{margin-top:10px}
@@ -187,6 +187,10 @@ body{--bt-msg-w:.8;--bt-flat-w:1}
.bt-bubble p{margin:0}
.bt-bubble p + p{margin-top:6px}
.bt-bubble ul,.bt-bubble ol{margin:4px 0;padding-left:20px}
+.bt-bubble [class*="_markdown"] li+li{margin-top:6px}
+.bt-bubble [class*="_markdown"] li::marker{color:var(--bt-ink-2)}
+/* line-height:1 keeps the monospace line box from making an inline code line taller. */
+.bt-bubble [class*="_markdown"] :not(pre)>code{line-height:1;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.bt-bubble a[href^="${MENTION_ORIGIN}"]{text-decoration:none;font-weight:400;cursor:pointer;white-space:nowrap}
.bt-bubble a[href^="${MENTION_ORIGIN}"]::before{content:"";display:inline-block;width:16px;height:16px;margin-right:3px;vertical-align:-3px;background:currentColor;-webkit-mask:${DEFAULT_MASK} center/contain no-repeat;mask:${DEFAULT_MASK} center/contain no-repeat}
.bt-group-msg{display:flex;flex-direction:column;gap:4px;margin:16px 0 0}
@@ -1103,9 +1107,9 @@ div:has(> nav [class*="_marks"]){display:none!important}
.bt-earlier-top{display:flex;justify-content:center;align-items:center;height:34px;flex:none}
.bt-earlier-top .bt-soft{height:28px;font-size:12px;padding:0 12px}
.bt-urow{display:flex;justify-content:flex-end}
-.bt-ububble{max-width:calc(var(--bt-msg-w) * 100%);background:var(--bt-user);color:var(--bt-user-ink);border-radius:18px;padding:7px 12px;font-size:14px;line-height:20px;box-sizing:border-box;overflow-wrap:anywhere}
+.bt-ububble{max-width:calc(var(--bt-msg-w) * 100%);background:var(--bt-user);color:var(--bt-user-ink);border-radius:18px;padding:7px 12px;font-size:14px;line-height:20px;box-sizing:border-box;overflow-wrap:anywhere;text-wrap:pretty;text-autospace:normal}
.bt-ububble [class*="_markdown"],.bt-ububble a{color:inherit!important}
-.bt-ububble p{margin:0;line-height:22px}
+.bt-ububble p{margin:0;line-height:24px}
.bt-uimages{display:block;font-size:12px;opacity:.7}
.bt-utime{margin-top:-4px;font-size:11px;line-height:14px;color:var(--bt-ink-3);font-variant-numeric:tabular-nums;white-space:nowrap}
.bt-earlier .bt-event{margin:4px 0}