@kadaliao/dsh-bots 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -115,6 +115,8 @@ model's thinking levels when it has them. Besides the models Harness already has
115
115
  tokens, and neither signs the other out. Claude Code's login is shown but not offered: Anthropic allows a
116
116
  Claude subscription only in Claude Code and claude.ai, so add Claude with an API key instead.
117
117
 
118
+ ![Model sources](docs/en-model-sources.png)
119
+
118
120
  ## Topics: conversations that don't grow forever
119
121
 
120
122
  A bot's conversation is a **topic**. A new topic is a fresh conversation (the old one is archived, the
@@ -151,6 +153,10 @@ Every bot keeps **notes** that outlast its topics, and the team shares one more
151
153
  or token is never stored.
152
154
  - Memory work runs on each bot's own model unless Settings names a cheaper one.
153
155
 
156
+ ![A bot's memory](docs/en-memory.png)
157
+
158
+ ![Team memory](docs/en-team-memory.png)
159
+
154
160
  ## Usage
155
161
 
156
162
  **Usage** in the sidebar counts every model call the bots make — their conversations, the memory work and
@@ -159,6 +165,8 @@ for today), with the change from the period before. A **task** is everything a b
159
165
  (you, a chat app, a schedule or another bot) until it is idle again. Costs are estimates from your own
160
166
  prices or LiteLLM's public price list (**Prices**); a model with no price shows its tokens only.
161
167
 
168
+ ![Usage](docs/en-usage.png)
169
+
162
170
  ## Message your team from Feishu, Telegram, Slack or Discord
163
171
 
164
172
  Add **Feishu / Lark**, **Telegram**, **Slack** or **Discord** to a bot (normally the dispatcher) in its **Apps** tab, and you can hand out
package/README.zh-CN.md CHANGED
@@ -97,6 +97,8 @@ Bot 就是一个普通的 Harness 会话,所以 Harness 能做的它都能做
97
97
  另一边都会拿到新令牌,谁也不会把谁踢下线。Claude Code 的登录会显示出来但不提供:Anthropic 只允许
98
98
  在 Claude Code 和 claude.ai 里使用 Claude 订阅,请改用 API Key 添加 Claude。
99
99
 
100
+ ![模型来源](docs/model-sources.png)
101
+
100
102
  ## 话题:对话不会无限变长
101
103
 
102
104
  bot 的会话就是一个**话题**。新话题是一段全新的会话(旧会话归档,bot 的定时任务一起搬过去),
@@ -127,6 +129,10 @@ bot 知道的事靠记忆延续。下面几种情况会开新话题:
127
129
  置顶的笔记不会被自动整理改动;看起来像 Key 或 Token 的内容一律不存。
128
130
  - 记忆工作默认使用各 bot 自己的模型,也可以在设置里指定一个更便宜的。
129
131
 
132
+ ![bot 的记忆](docs/memory.png)
133
+
134
+ ![团队记忆](docs/team-memory.png)
135
+
130
136
  ## 用量
131
137
 
132
138
  侧栏的 **用量** 统计 bot 的每一次模型调用(它们的对话、记忆工作,以及 Harness 压缩它们的上下文),
@@ -134,6 +140,8 @@ bot 知道的事靠记忆延续。下面几种情况会开新话题:
134
140
  从收到一个请求(来自你、聊天应用、定时任务或其他 bot)到重新空闲为止做的所有事。费用是估算:
135
141
  用你填的价格,或 LiteLLM 公开价格表(**价格**);没有价格的模型只显示 tokens。
136
142
 
143
+ ![用量](docs/usage.png)
144
+
137
145
  ## 在飞书、Telegram、Slack 或 Discord 里给团队发消息
138
146
 
139
147
  在某个 bot(一般是调度员)的**应用**页加上**飞书**、**Telegram**、**Slack** 或 **Discord**,就能用手机派活:你发给聊天 Bot 的话,
package/client.js CHANGED
@@ -1259,10 +1259,20 @@ a.dshb-lc:hover{border-color:${C.border};background:${C.layer2}}
1259
1259
  }
1260
1260
 
1261
1261
  /** Markdown through the product's own renderer (the same as the main chat), else a small built-in one. */
1262
+ /**
1263
+ * Amounts stay amounts: the Harness renderer reads `$…$` as inline math, so "$9 monthly / $90 annual"
1264
+ * would turn into a formula. A `$` right before a digit is escaped, outside code.
1265
+ */
1266
+ function moneySafe(text) {
1267
+ return str(text)
1268
+ .split(/(```[\s\S]*?(?:```|$)|`[^`\n]*`)/g)
1269
+ .map((part, i) => (i % 2 ? part : part.replace(/(^|[^\\])\$(?=\d)/g, '$1\\$')))
1270
+ .join('');
1271
+ }
1262
1272
  function RichText({ t, text }) {
1263
1273
  const Md = primitives && primitives.MarkdownText;
1264
1274
  if (Md && (typeof Md === 'function' || typeof Md === 'object')) {
1265
- return h('div', { className: 'dshb-rich', 'data-dsh-bots-md': 'harness' }, h(Md, { text, labels: mdLabels(t), variant: 'compact' }));
1275
+ return h('div', { className: 'dshb-rich', 'data-dsh-bots-md': 'harness' }, h(Md, { text: moneySafe(text), labels: mdLabels(t), variant: 'compact' }));
1266
1276
  }
1267
1277
  return h('div', { className: 'dshb-rich dshb-mdf', 'data-dsh-bots-md': 'builtin' }, miniMarkdown(text));
1268
1278
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kadaliao/dsh-bots",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "description": "Grok-style bots for DeepSeek Harness: create bots with their own avatar, persona, model, skills, apps, scheduled tasks and memory; they message each other, a dispatcher bot hands out the work, and a usage view counts tokens by bot, task and day.",
6
6
  "exports": {