@dabuliu_wsy/dsh-im 0.0.0-stage → 0.2.0

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.
Files changed (137) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +197 -3
  3. package/cordis.patch.yml +4 -0
  4. package/dist/core/agent-state.d.ts +38 -0
  5. package/dist/core/agent-state.js +59 -0
  6. package/dist/core/arbiter-bridge.d.ts +25 -0
  7. package/dist/core/arbiter-bridge.js +20 -0
  8. package/dist/core/arbiter.d.ts +29 -0
  9. package/dist/core/arbiter.js +59 -0
  10. package/dist/core/avatar-brands.d.ts +23 -0
  11. package/dist/core/avatar-brands.js +75 -0
  12. package/dist/core/avatar-presets.d.ts +21 -0
  13. package/dist/core/avatar-presets.js +38 -0
  14. package/dist/core/avatar.d.ts +1 -0
  15. package/dist/core/avatar.js +18 -0
  16. package/dist/core/blocked.d.ts +12 -0
  17. package/dist/core/blocked.js +23 -0
  18. package/dist/core/budget-plan.d.ts +41 -0
  19. package/dist/core/budget-plan.js +69 -0
  20. package/dist/core/calibration-samples.d.ts +77 -0
  21. package/dist/core/calibration-samples.js +168 -0
  22. package/dist/core/calibrator.d.ts +57 -0
  23. package/dist/core/calibrator.js +125 -0
  24. package/dist/core/chapter-tree.d.ts +128 -0
  25. package/dist/core/chapter-tree.js +400 -0
  26. package/dist/core/consensus.d.ts +135 -0
  27. package/dist/core/consensus.js +394 -0
  28. package/dist/core/context-budget.d.ts +153 -0
  29. package/dist/core/context-budget.js +183 -0
  30. package/dist/core/curator.d.ts +28 -0
  31. package/dist/core/curator.js +190 -0
  32. package/dist/core/dual-window.d.ts +86 -0
  33. package/dist/core/dual-window.js +175 -0
  34. package/dist/core/events.d.ts +110 -0
  35. package/dist/core/events.js +117 -0
  36. package/dist/core/facts.d.ts +114 -0
  37. package/dist/core/facts.js +400 -0
  38. package/dist/core/fence.d.ts +34 -0
  39. package/dist/core/fence.js +129 -0
  40. package/dist/core/floor.d.ts +18 -0
  41. package/dist/core/floor.js +80 -0
  42. package/dist/core/ids.d.ts +11 -0
  43. package/dist/core/ids.js +29 -0
  44. package/dist/core/im.d.ts +167 -0
  45. package/dist/core/im.js +1307 -0
  46. package/dist/core/index.d.ts +33 -0
  47. package/dist/core/index.js +33 -0
  48. package/dist/core/log.d.ts +21 -0
  49. package/dist/core/log.js +63 -0
  50. package/dist/core/memory-claims.d.ts +67 -0
  51. package/dist/core/memory-claims.js +164 -0
  52. package/dist/core/memory-context.d.ts +121 -0
  53. package/dist/core/memory-context.js +303 -0
  54. package/dist/core/memory-visibility.d.ts +58 -0
  55. package/dist/core/memory-visibility.js +36 -0
  56. package/dist/core/memory.d.ts +12 -0
  57. package/dist/core/memory.js +73 -0
  58. package/dist/core/metrics.d.ts +49 -0
  59. package/dist/core/metrics.js +89 -0
  60. package/dist/core/multi-hop.d.ts +116 -0
  61. package/dist/core/multi-hop.js +278 -0
  62. package/dist/core/persist.d.ts +21 -0
  63. package/dist/core/persist.js +94 -0
  64. package/dist/core/proactive.d.ts +54 -0
  65. package/dist/core/proactive.js +108 -0
  66. package/dist/core/prompt.d.ts +82 -0
  67. package/dist/core/prompt.js +164 -0
  68. package/dist/core/receipt.d.ts +107 -0
  69. package/dist/core/receipt.js +86 -0
  70. package/dist/core/retrieval.d.ts +69 -0
  71. package/dist/core/retrieval.js +260 -0
  72. package/dist/core/role-state.d.ts +16 -0
  73. package/dist/core/role-state.js +65 -0
  74. package/dist/core/runtime.d.ts +137 -0
  75. package/dist/core/runtime.js +574 -0
  76. package/dist/core/summary.d.ts +19 -0
  77. package/dist/core/summary.js +96 -0
  78. package/dist/core/text.d.ts +10 -0
  79. package/dist/core/text.js +45 -0
  80. package/dist/core/time.d.ts +22 -0
  81. package/dist/core/time.js +84 -0
  82. package/dist/core/tool-schema.d.ts +12 -0
  83. package/dist/core/tool-schema.js +92 -0
  84. package/dist/core/tools.d.ts +137 -0
  85. package/dist/core/tools.js +348 -0
  86. package/dist/core/types.d.ts +400 -0
  87. package/dist/core/types.js +1 -0
  88. package/dist/core/window.d.ts +6 -0
  89. package/dist/core/window.js +7 -0
  90. package/dist/core/workspace-node.d.ts +28 -0
  91. package/dist/core/workspace-node.js +232 -0
  92. package/dist/core/workspace.d.ts +9 -0
  93. package/dist/core/workspace.js +45 -0
  94. package/dist/host/agent-session.d.ts +279 -0
  95. package/dist/host/agent-session.js +935 -0
  96. package/dist/host/attachment-gc.d.ts +37 -0
  97. package/dist/host/attachment-gc.js +97 -0
  98. package/dist/host/calibration-samples-store.d.ts +5 -0
  99. package/dist/host/calibration-samples-store.js +67 -0
  100. package/dist/host/capabilities.d.ts +45 -0
  101. package/dist/host/capabilities.js +67 -0
  102. package/dist/host/derived-store.d.ts +36 -0
  103. package/dist/host/derived-store.js +199 -0
  104. package/dist/host/dsh-llm.d.ts +143 -0
  105. package/dist/host/dsh-llm.js +395 -0
  106. package/dist/host/event-store.d.ts +47 -0
  107. package/dist/host/event-store.js +154 -0
  108. package/dist/host/fs-atomic.d.ts +1 -0
  109. package/dist/host/fs-atomic.js +26 -0
  110. package/dist/host/im-api.d.ts +352 -0
  111. package/dist/host/im-api.js +1137 -0
  112. package/dist/host/index.d.ts +103 -0
  113. package/dist/host/index.js +453 -0
  114. package/dist/host/memory-index.d.ts +65 -0
  115. package/dist/host/memory-index.js +181 -0
  116. package/dist/host/metrics-store.d.ts +7 -0
  117. package/dist/host/metrics-store.js +104 -0
  118. package/dist/host/models.d.ts +39 -0
  119. package/dist/host/models.js +67 -0
  120. package/dist/host/persona-tools.d.ts +57 -0
  121. package/dist/host/persona-tools.js +226 -0
  122. package/dist/host/preflight.d.ts +31 -0
  123. package/dist/host/preflight.js +29 -0
  124. package/dist/host/receipt-store.d.ts +26 -0
  125. package/dist/host/receipt-store.js +68 -0
  126. package/dist/host/run-check.d.ts +51 -0
  127. package/dist/host/run-check.js +190 -0
  128. package/dist/host/state-roots.d.ts +50 -0
  129. package/dist/host/state-roots.js +163 -0
  130. package/dist/host/tool-cache.d.ts +25 -0
  131. package/dist/host/tool-cache.js +90 -0
  132. package/dist/host/tool-call-budget.d.ts +29 -0
  133. package/dist/host/tool-call-budget.js +38 -0
  134. package/dsh-plugin.json +25 -0
  135. package/lib/client.inner.cjs +3346 -0
  136. package/lib/client.js +3354 -0
  137. package/package.json +86 -6
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-im contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,197 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # dsh-roundtable · 专家团队
2
+
3
+ > DSH(DeepSeek Harness)插件:把多个角色拉进同一个群或私聊,让它们各自带着人设、岗位和工具协作。
4
+ > 模型与调用全部走宿主 `ctx.llm`(或原生 session),插件不直连任何网关、不保存任何密钥。
5
+
6
+ `版本 0.2.0` · `Node ≥ 20` · `MIT` · **可用版本(0.x:接口与数据格式可能小幅调整)**
7
+
8
+ > 名称说明:仓库与品牌名为 **dsh-roundtable**;npm 包名是带 scope 的 `@dabuliu_wsy/dsh-im`,**插件 id 与数据目录仍是 `dsh-im`**(`.dsh-im/`、`DSH_IM_*` 环境变量),以兼容现有数据和已装配置。
9
+
10
+ ## 这是什么
11
+
12
+ 在 DSH 侧栏出现的「专家团队」面板:新建角色(人设 / 岗位 / 模型 / 工具白名单)、拉群、私聊、`@` 点名、看任务板。
13
+
14
+ 它不是"多开几个对话框":角色发言要过发言权仲裁,上下文按摘要 / 事实 / 共识分层投喂,每次发言留下可核验的回执与指标,角色调工具的过程能看到执行轨迹。
15
+
16
+ ## 界面
17
+
18
+ > 截图来自开发预览与测试群(内存假模型 / 测试角色),仅作界面示意。
19
+
20
+ **群聊**:三栏布局——左会话列表,中聊天流(按日期分组的消息,用户消息靠右,底部是等待发言与输入框),右栏按 Tab 切换成员 / 任务板 / 候选 / 执行。
21
+
22
+ ![群聊界面](docs/screenshots/group-chat.png)
23
+
24
+ **私聊**:单角色小窗,右侧显示角色资料(人设 / 职责 / 模型 / 可用工具 / 活跃度 / 禁言 / 主动私聊开关)。
25
+
26
+ ![私聊界面](docs/screenshots/dm.png)
27
+
28
+ **角色编辑**:人设、岗位、模型(只能选 DSH 已配置的模型)、可用工具(内置能力 + 宿主来源组 / 单工具授权)、头像(预设或本地上传)。
29
+
30
+ ![角色编辑](docs/screenshots/persona-editor.png)
31
+
32
+ **深色模式**:主题跟随 DSH 的**有效主题**(读宿主投影,不猜系统设置);面板与 portal 浮层一起切换。
33
+
34
+ ![深色模式](docs/screenshots/dark-mode.png)
35
+
36
+ ## 功能
37
+
38
+ - **群聊与私聊**:建群 / 邀请 / 关联工作区;DM;`@` 点名;模型回复里自带的"某某:"前缀会兜底剥离;附件(图片 ≤8MB、文件 ≤20MB,可粘贴/拖拽)。
39
+ - **发言权仲裁**:点名独占 > 回复对象 > 职责命中 > 活跃度补位;`wait` 只停本轮、不插话;默认串行地板(并发发言关闭)。
40
+ - **上下文与记忆**:分层摘要(L1 旧消息压缩 + L2 不可压缩事实)、窗口预算按模型 `contextWindow` 分配(群级按最小成员窗口统一压)、角色状态快照(承诺 / 待办 / 决定 / 立场)、按需检索(默认 shadow:算但不进 prompt)。
41
+ - **可寻址记忆层**:消息索引投影(派生字段,不复制正文)+ claim 弱状态(active / superseded / raw)+ 可见性谓词表;模型侧有 `memory_search` / `memory_expand` 两个记忆工具(只返回句柄,正文按需展开,两者同权);默认 shadow,需显式开启才注入 prompt。
42
+ - **事实与共识**:规则 + LLM 双路抽取事实、哈希幂等、supersede / retract、任务板归档不复活;共识层自动生成并带生命周期状态,prompt 只注入仍然有效的条目。
43
+ - **工具与能力**:内置五能力 `read` / `search` / `write` / `check` / `memory`(**没有 shell**);宿主第三方工具(浏览器、MCP 等)按「来源组 + 单工具」显式授权,默认不授予、未授权一律硬拒绝;`run_check` 只跑本仓 vitest / tsc,参数白名单、不经 shell、60s 超时、并发与排队有上限。
44
+ - **原生 session(默认开)**:每个「角色 × 群」一个 DSH 原生会话,角色因此能真实调工具、保留自己的会话记忆;授权或工具可见性变化时重建会话;空闲 30 分钟释放。宿主缺 `ctx.agents` / `tools.register` / `tools.guard` 任一能力时**整体回退** `ctx.llm`,不会半残运行。
45
+ - **可观测**:执行轨迹(工具步骤与结果摘要)、两阶段回执(intent / outcome + 规范化双 hash + `basedOnSeq`)、`metrics.jsonl` 指标、失败 turn 可导出的复现包、黄金回放测试。
46
+ - **稳定性**:模型调用 120s 超时并透出失败码、`Origin` 同源校验、请求体 2MB 上限、坏 `state.json` 清洗、数据根发现与失败可见(加载 / 保存失败明确报错,而不是把错误吞成"空团队");角色模型调用失败时,中断状态条**固定在顶部**(不顶掉聊天滚动位置),可选「已修好重试 / 移除它继续 / 暂停本轮」。
47
+ - **界面**:三栏 IM(左会话 / 中聊天 / 右栏成员·任务板·候选·执行)、深色模式自动跟随 DSH 有效主题(读宿主投影,不猜系统设置)、`@` 高亮、按日期分组的消息时间、角色头像(预设 / 上传)、窄窗降级;插件 CSS 全部作用域到 `.dsh-im-root`,不污染宿主样式。
48
+
49
+ ## 安装
50
+
51
+ ### 方式一:从源码接入(最稳,推荐)
52
+
53
+ ```sh
54
+ git clone https://github.com/wangshouyong/dsh-roundtable.git
55
+ cd dsh-roundtable
56
+ npm install
57
+ npm run build
58
+ dsh plugin --profile desktop add ./
59
+ dsh --profile desktop
60
+ ```
61
+
62
+ 重启后侧栏出现「专家团队」。新建角色时选 **DSH 设置里已经配好的模型**(和输入框旁的选择器同一份目录)。
63
+
64
+ 开发调试:
65
+
66
+ ```sh
67
+ npm run dev # 开发预览:内置内存假模型,不联网(默认 5173 端口)
68
+ npm test # 单测
69
+ npm run gate # 提交前门禁:typecheck + 测试 + build + 打包内容校验
70
+ ```
71
+
72
+ ### 方式二:从 Release 包安装
73
+
74
+ 在 [Releases](https://github.com/wangshouyong/dsh-roundtable/releases) 下载对应版本的构建包(含 `dist/`、`lib/client.js`、`cordis.patch.yml`、`dsh-plugin.json`),解压后:
75
+
76
+ ```sh
77
+ dsh plugin --profile desktop add <解压后的目录>
78
+ ```
79
+
80
+ ### 方式三:直接用 git 地址安装(需要一步 allowBuilds)
81
+
82
+ ```sh
83
+ dsh plugin --profile desktop add git+https://github.com/wangshouyong/dsh-roundtable.git
84
+ ```
85
+
86
+ 首次会失败并打印 `ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED`:pnpm 默认不允许 git 包执行构建脚本,
87
+ 而本插件要靠 `prepare` / `prepack` 构建 `dist/` 与 `lib/client.js`。
88
+
89
+ 把报错里那一行 key 原样加到 **profile** 的 `pnpm-workspace.yaml`(例如 `~/.dsh/profiles/desktop/pnpm-workspace.yaml`)再重跑:
90
+
91
+ ```yaml
92
+ allowBuilds:
93
+ 'dsh-im@https://codeload.github.com/wangshouyong/dsh-roundtable/tar.gz/<commit-hash>': true
94
+ ```
95
+
96
+ 这条 key 里的 commit 哈希要跟报错里的一致(换版本会变)。如果你不想碰 pnpm 配置,用方式一或方式二。
97
+
98
+ ### 方式四:从 npm 安装
99
+
100
+ ```sh
101
+ dsh plugin --profile desktop add @dabuliu_wsy/dsh-im
102
+ ```
103
+
104
+ npm 包名是 `@dabuliu_wsy/dsh-im`(scope 必填),插件 id 与数据目录仍是 `dsh-im`。
105
+ 发布前会跑 `npm run gate` + `npm run verify:pack`(产物齐全、无开发材料、manifest 与版本一致)。
106
+
107
+ > 状态:**尚未发布到 npm**。包体已就绪(`npm pack` 校验通过),发布流程(2FA / token)还在走,
108
+ > 发布后本节即刻可用。在此之前请用方式一 / 方式二 / 方式三。
109
+
110
+ ## 配置
111
+
112
+ - **模型**:全部来自 DSH 设置里已配置的 provider / model;插件不写死地址、密钥或网关,也不换组——解析不到就报错让你重选。
113
+ - **工具授权**:角色编辑器里按「内置能力 → 宿主来源组 → 单工具」勾选;默认全不授予。契约见 [`docs/TOOL-GRANTS.md`](docs/TOOL-GRANTS.md)。
114
+ - **数据根**:面板标题旁「工作区」下拉可切换 / 注册工作区;数据按 DSH 工作区分别存放(见下节)。
115
+ - **环境变量**(全部可选):
116
+
117
+ | 变量 | 默认 | 作用 |
118
+ | --- | --- | --- |
119
+ | `DSH_IM_NATIVE_SESSION` | 开 | 设 `0` 整段关闭原生 session,退回 `ctx.llm` |
120
+ | `DSH_IM_NATIVE_TTL_MS` | 30 分钟 | 原生会话空闲多久释放 |
121
+ | `DSH_IM_NATIVE_PROVIDER` | 空 | 覆盖原生 session 的 provider(排查用) |
122
+ | `DSH_IM_NATIVE_TOOL_ALLOW` | 空 | 整表覆盖工具授权(仅排查;guard 仍拒绝名单外工具) |
123
+ | `DSH_IM_NATIVE_ARCHIVE` | 空 | 设 `live` 时用 `stopActivity:false` 试归档 |
124
+ | `DSH_IM_TURN_BUDGET_MS` | 240000 | 单轮工具循环总时长预算(防挂死) |
125
+ | `DSH_IM_MAX_TOOL_ROUNDS` | 50 | 单轮工具循环硬顶(仅防死循环) |
126
+ | `DSH_IM_ROOTS_FILE` | `~/.dsh-im/known-roots.json` | "用过的数据根"清单文件 |
127
+ | `DSH_IM_DEV_ROOT` | 进程 cwd | dev 预览的 state 根 |
128
+ | `DSH_IM_CALIBRATION_MODE` | 影子(只观测) | 设 `calibrated` 才把 usage 校准系数用于预算换算 |
129
+
130
+ - **实验开关(浏览器控制台,刷新生效)**:`localStorage['dsh-im:retrieval']`(`off` / `shadow` / `on`)控制按需检索是否进 prompt;`localStorage['dsh-im:memory']` 控制记忆层句柄是否注入。两者默认 `shadow`,只写回执、不改行为。
131
+
132
+ ## 数据与隐私
133
+
134
+ 数据按 DSH 工作区存放,位于 `<工作区>/.dsh-im/`:
135
+
136
+ ```
137
+ .dsh-im/
138
+ ├ state.json 角色、会话、消息、事实投影(当前读路径)
139
+ ├ calibration-samples.jsonl token 校准样本(每轮实测 usage,用于把 token 预算换算成字符预算)
140
+ └ groups/<threadId>/ 每个群 / 私聊一个目录
141
+ ├ events.jsonl 只追加的事件日志("唯一事实源"的演进方向)
142
+ ├ facts.json 事实物化投影
143
+ ├ receipts.jsonl 每次发言的 intent / outcome 回执
144
+ ├ metrics.jsonl 指标(llm_call / stale / floor_round / extraction / summary 等)
145
+ ├ sync.json 摘要 / 事实推进边界
146
+ ├ index.json 记忆索引投影(默认诊断模式不落盘,开启后才有)
147
+ ├ attachments/ 本群附件
148
+ └ 纪要/ 角色写进群工作区的文档(纪要 / 草案 / 验收标准)
149
+ ```
150
+
151
+ - 角色只能读写自己群的 `groups/<threadId>/`;`.dsh-im` 其余内容(`state.json`、别的群)对角色**禁读**。
152
+ - 插件自身不收集遥测、不直连模型网关(源码中没有外部 API 地址或密钥)。
153
+ - **注意**:群消息会进入该角色模型的上下文;如果给角色授权了第三方 MCP / 浏览器工具,相关内容会交给对应工具处理,是否合规需自行评估。
154
+
155
+ ## 开发与测试
156
+
157
+ - **提交前门禁**:`npm run gate`(= `typecheck` → `test` → `build` → `verify:tarball`),一条命令跑完;CI 在 GitHub Actions `windows-latest` 上跑同一串(`.github/workflows/ci.yml`)。
158
+ - **发布包校验**:`npm run verify:pack`(`prepublishOnly` 会自动跑)——断言运行时产物齐全、发布包里没有开发材料、`dsh-plugin.json` 与 `package.json` 版本一致。
159
+ - **测试分层**:`src/core` 纯函数单测 · `src/host` 集成测试 · `src/client` 组件测试 · 黄金回放(行为变化要显式更新 GOLDEN)· 记忆层 fixture ground truth(`test/fixtures/memory/`)· 活体测试(默认 `skip`,需要 DSH 正在运行)。
160
+ - **架构约束**:`src/core` 不 import 任何 `@deepseek-ai/*`,可脱离宿主单测;宿主能力只从 `src/host` 进入。
161
+ - **代码地图**:
162
+
163
+ ```
164
+ src/core/ 领域层(群 / 仲裁 / 事实 / 共识 / 摘要 / 检索 / 记忆 / 回执 / 指标,纯函数为主)
165
+ src/host/ DSH Host 入口(/api/im 路由、ctx.llm、原生 session、工具执行、记忆索引)
166
+ src/client/ 客户端 UI(三栏 IM、模型选择器、角色编辑器、头像、样式作用域)
167
+ src/dsh/ 面板挂载入口
168
+ src/dev/ 开发预览(vite + 内存假模型)
169
+ scripts/ 构建与校验脚本
170
+ ```
171
+
172
+ ## 项目状态与已知限制(如实)
173
+
174
+ - **当前版本 `v0.2.0`**(tag + [Release 附件](https://github.com/wangshouyong/dsh-roundtable/releases)):核心功能完成,`npm run gate`(typecheck → 单测 → build → 打包内容校验)与 GitHub Actions 全绿。
175
+ - **0.x 语义**:接口、数据格式与 UI 仍可能小幅调整;破坏性变更会写进 Release 说明,不静默改契约。
176
+ - **原生 session 是默认路径,但仍是需要门禁守着的链路**:依赖宿主提供 `ctx.agents` + `tools.register` / `tools.guard`;缺能力时整体回退 `ctx.llm`。它不是"稳定 API",宿主升级后可能要跟着改。
177
+ - **实验特性默认 shadow**:按需检索、记忆层句柄注入、token 校准都先只观测(写进回执/样本),要显式开开关才改变行为。
178
+ - **记忆层仍在推进**:索引、claim、可见性、句柄协议、search/expand 工具已落地,但注入默认关闭。
179
+ - **并发发言默认关闭**(串行地板)。
180
+ - 目前只在 **Windows 上的 DSH Desktop** 实测通过,其它平台未验证。
181
+ - **没有遥测 / 崩溃上报**:排查依赖本机 `metrics.jsonl`、`receipts.jsonl` 和宿主日志。
182
+ - 单测全绿 ≠ 所有模型、所有平台都验证过;活体测试默认跳过,需要单独跑。
183
+ - 设计约束见 [`docs/DESIGN.md`](docs/DESIGN.md)。
184
+
185
+ ## 关于开发方式(如实说明)
186
+
187
+ 本项目是 **AI 辅助开发**:代码、测试与文档由作者与 AI 编程助手(DeepSeek Harness 会话)协作产出,架构取舍、验收标准与最终发布决定由作者负责。仓库不把 AI 协作包装成"完全手写"。
188
+
189
+ ## 文档
190
+
191
+ - [`docs/DESIGN.md`](docs/DESIGN.md):架构、模块边界、数据模型与关键设计约束
192
+ - [`docs/TOOL-GRANTS.md`](docs/TOOL-GRANTS.md):工具授权契约(来源组 / 单工具 / 记忆可见性)
193
+ - [`LICENSE`](LICENSE):MIT
194
+
195
+ ## 许可证
196
+
197
+ [MIT](LICENSE)
@@ -0,0 +1,4 @@
1
+ # 专家团队 IM:侧栏「专家团队」+ Host /api/im
2
+ - insert:
3
+ - id: dsh-im
4
+ name: 'dsh-im'
@@ -0,0 +1,38 @@
1
+ /**
2
+ * 角色运行时状态机(仲裁的输入)。
3
+ *
4
+ * 只放内存、带 TTL:崩溃留下的 thinking 靠过期自动回 idle,
5
+ * 不把“正在想”写进事件日志(那正是崩溃时写不出来的东西)。
6
+ */
7
+ export type AgentStatus = 'idle' | 'thinking' | 'waiting_on' | 'pass';
8
+ export interface AgentRuntimeState {
9
+ personaId: string;
10
+ status: AgentStatus;
11
+ since: number;
12
+ /** waiting_on 时在等谁。 */
13
+ waitingOn?: string;
14
+ lastSpokeAt?: number;
15
+ }
16
+ /** thinking / waiting_on 超过这个时间视为失效(崩了/卡了)。 */
17
+ export declare const THINKING_TTL_MS = 120000;
18
+ /** 同一角色两次主动发言之间的冷却。 */
19
+ export declare const SPEAK_COOLDOWN_MS = 3000;
20
+ export declare function createRuntimeState(personaId: string, now: number): AgentRuntimeState;
21
+ export declare function beginThinking(state: AgentRuntimeState, now: number): AgentRuntimeState;
22
+ export declare function finishSpeaking(state: AgentRuntimeState, now: number): AgentRuntimeState;
23
+ export declare function waitOn(state: AgentRuntimeState, targetPersonaId: string, now: number): AgentRuntimeState;
24
+ export declare function pass(state: AgentRuntimeState, now: number): AgentRuntimeState;
25
+ /** 过期回收:thinking / waiting_on 卡太久就回 idle。 */
26
+ export declare function expireIfStale(state: AgentRuntimeState, now: number, ttlMs?: number): AgentRuntimeState;
27
+ /** 等待目标已经发过言 → 解除等待。 */
28
+ export declare function resolveWait(state: AgentRuntimeState, spokePersonaId: string, now: number): AgentRuntimeState;
29
+ /** 现在能不能主动发言:必须 idle,且过了冷却。 */
30
+ export declare function canSpeak(state: AgentRuntimeState, now: number, options?: {
31
+ cooldownMs?: number;
32
+ }): {
33
+ ok: boolean;
34
+ reason?: string;
35
+ };
36
+ export type TurnDecision = 'speak' | 'wait' | 'pass';
37
+ /** 把仲裁结果落成状态迁移(仲裁器只管决策,这里管状态)。 */
38
+ export declare function applyDecision(state: AgentRuntimeState, decision: TurnDecision, now: number, targetPersonaId?: string): AgentRuntimeState;
@@ -0,0 +1,59 @@
1
+ /** thinking / waiting_on 超过这个时间视为失效(崩了/卡了)。 */
2
+ export const THINKING_TTL_MS = 120_000;
3
+ /** 同一角色两次主动发言之间的冷却。 */
4
+ export const SPEAK_COOLDOWN_MS = 3_000;
5
+ export function createRuntimeState(personaId, now) {
6
+ return { personaId, status: 'idle', since: now };
7
+ }
8
+ function move(state, status, now, extra = {}) {
9
+ return { ...state, status, since: now, ...extra };
10
+ }
11
+ export function beginThinking(state, now) {
12
+ return move(state, 'thinking', now);
13
+ }
14
+ export function finishSpeaking(state, now) {
15
+ return move(state, 'idle', now, { lastSpokeAt: now, waitingOn: undefined });
16
+ }
17
+ export function waitOn(state, targetPersonaId, now) {
18
+ return move(state, 'waiting_on', now, { waitingOn: targetPersonaId });
19
+ }
20
+ export function pass(state, now) {
21
+ return move(state, 'pass', now);
22
+ }
23
+ /** 过期回收:thinking / waiting_on 卡太久就回 idle。 */
24
+ export function expireIfStale(state, now, ttlMs = THINKING_TTL_MS) {
25
+ const busy = state.status === 'thinking' || state.status === 'waiting_on';
26
+ if (!busy)
27
+ return state;
28
+ if (now - state.since < ttlMs)
29
+ return state;
30
+ return move(state, 'idle', now, { waitingOn: undefined });
31
+ }
32
+ /** 等待目标已经发过言 → 解除等待。 */
33
+ export function resolveWait(state, spokePersonaId, now) {
34
+ if (state.status !== 'waiting_on' || state.waitingOn !== spokePersonaId)
35
+ return state;
36
+ return move(state, 'idle', now, { waitingOn: undefined });
37
+ }
38
+ /** 现在能不能主动发言:必须 idle,且过了冷却。 */
39
+ export function canSpeak(state, now, options = {}) {
40
+ const cooldown = options.cooldownMs ?? SPEAK_COOLDOWN_MS;
41
+ if (state.status === 'thinking')
42
+ return { ok: false, reason: '正在生成' };
43
+ if (state.status === 'waiting_on')
44
+ return { ok: false, reason: '在等 ' + (state.waitingOn ?? '他人') };
45
+ if (state.status === 'pass')
46
+ return { ok: false, reason: '本轮已弃权' };
47
+ if (state.lastSpokeAt !== undefined && now - state.lastSpokeAt < cooldown) {
48
+ return { ok: false, reason: '冷却中' };
49
+ }
50
+ return { ok: true };
51
+ }
52
+ /** 把仲裁结果落成状态迁移(仲裁器只管决策,这里管状态)。 */
53
+ export function applyDecision(state, decision, now, targetPersonaId) {
54
+ if (decision === 'speak')
55
+ return beginThinking(state, now);
56
+ if (decision === 'wait')
57
+ return targetPersonaId ? waitOn(state, targetPersonaId, now) : waitOn(state, '他人', now);
58
+ return pass(state, now);
59
+ }
@@ -0,0 +1,25 @@
1
+ import { type ArbiterCandidate, type ArbiterDecision } from './arbiter.ts';
2
+ import { type AgentRuntimeState } from './agent-state.ts';
3
+ /** 从群成员派生仲裁候选:缺状态的补 idle,避免“没人能说”的假死。 */
4
+ export declare function buildCandidates(input: {
5
+ members: {
6
+ personaId: string;
7
+ name: string;
8
+ duties: string[];
9
+ activity: 'muted' | 'mention-only' | 'review' | 'high';
10
+ answered: boolean;
11
+ }[];
12
+ states: Record<string, AgentRuntimeState>;
13
+ now: number;
14
+ }): ArbiterCandidate[];
15
+ export interface FloorDecisionInput {
16
+ latestText: string;
17
+ mentionedIds: string[];
18
+ replyToPersonaId?: string;
19
+ members: Parameters<typeof buildCandidates>[0]['members'];
20
+ states: Record<string, AgentRuntimeState>;
21
+ spokenIds?: string[];
22
+ now: number;
23
+ }
24
+ /** 地板下一步决策:仲裁器 + 候选装配,一次调用拿到结论和原因。 */
25
+ export declare function decideNext(input: FloorDecisionInput): ArbiterDecision;
@@ -0,0 +1,20 @@
1
+ import { arbitrate } from './arbiter.js';
2
+ import { createRuntimeState } from './agent-state.js';
3
+ /** 从群成员派生仲裁候选:缺状态的补 idle,避免“没人能说”的假死。 */
4
+ export function buildCandidates(input) {
5
+ return input.members.map((member) => ({
6
+ ...member,
7
+ state: input.states[member.personaId] ?? createRuntimeState(member.personaId, input.now),
8
+ }));
9
+ }
10
+ /** 地板下一步决策:仲裁器 + 候选装配,一次调用拿到结论和原因。 */
11
+ export function decideNext(input) {
12
+ return arbitrate({
13
+ latestText: input.latestText,
14
+ mentionedIds: input.mentionedIds,
15
+ ...(input.replyToPersonaId === undefined ? {} : { replyToPersonaId: input.replyToPersonaId }),
16
+ candidates: buildCandidates({ members: input.members, states: input.states, now: input.now }),
17
+ ...(input.spokenIds === undefined ? {} : { spokenIds: input.spokenIds }),
18
+ now: input.now,
19
+ });
20
+ }
@@ -0,0 +1,29 @@
1
+ import { type AgentRuntimeState } from './agent-state.ts';
2
+ /** 群聊发言权仲裁:规则层,纯函数,决策可回放。 */
3
+ export type ArbiterAction = 'speak' | 'wait' | 'pass';
4
+ export interface ArbiterCandidate {
5
+ personaId: string;
6
+ name: string;
7
+ duties: string[];
8
+ activity: 'muted' | 'mention-only' | 'review' | 'high';
9
+ state: AgentRuntimeState;
10
+ /** 本轮是否已经就这条消息发过言。 */
11
+ answered: boolean;
12
+ }
13
+ export interface ArbiterInput {
14
+ latestText: string;
15
+ mentionedIds: string[];
16
+ replyToPersonaId?: string;
17
+ candidates: ArbiterCandidate[];
18
+ /** 本轮已经发过言的人(防止同一轮重复轮转)。 */
19
+ spokenIds?: string[];
20
+ now: number;
21
+ }
22
+ export interface ArbiterDecision {
23
+ action: ArbiterAction;
24
+ personaId?: string;
25
+ /** wait 时在等谁。 */
26
+ waitingOn?: string;
27
+ reason: string;
28
+ }
29
+ export declare function arbitrate(input: ArbiterInput): ArbiterDecision;
@@ -0,0 +1,59 @@
1
+ import { canSpeak } from './agent-state.js';
2
+ function find(candidates, personaId) {
3
+ if (!personaId)
4
+ return undefined;
5
+ return candidates.find((candidate) => candidate.personaId === personaId);
6
+ }
7
+ function canTake(candidate, input, spoken) {
8
+ if (spoken.has(candidate.personaId))
9
+ return false;
10
+ if (candidate.answered)
11
+ return false;
12
+ return canSpeak(candidate.state, input.now).ok;
13
+ }
14
+ export function arbitrate(input) {
15
+ const spoken = new Set(input.spokenIds ?? []);
16
+ const text = input.latestText.toLowerCase();
17
+ // 1) 显式点名:只有被点名的人能说;若他正在生成,其他人等。
18
+ if (input.mentionedIds.length > 0) {
19
+ for (const id of input.mentionedIds) {
20
+ const candidate = find(input.candidates, id);
21
+ if (!candidate)
22
+ continue;
23
+ if (spoken.has(candidate.personaId))
24
+ continue;
25
+ const gate = canSpeak(candidate.state, input.now);
26
+ if (gate.ok)
27
+ return { action: 'speak', personaId: candidate.personaId, reason: '被点名:' + candidate.name };
28
+ return { action: 'wait', personaId: candidate.personaId, waitingOn: candidate.personaId, reason: candidate.name + ' 正在处理(' + (gate.reason ?? '忙') + ')' };
29
+ }
30
+ return { action: 'pass', reason: '被点名者本轮都已发过言' };
31
+ }
32
+ // 2) 回复对象:只能他回。
33
+ const replyTo = find(input.candidates, input.replyToPersonaId);
34
+ if (replyTo && !spoken.has(replyTo.personaId)) {
35
+ const gate = canSpeak(replyTo.state, input.now);
36
+ if (gate.ok)
37
+ return { action: 'speak', personaId: replyTo.personaId, reason: '回复对象:' + replyTo.name };
38
+ return { action: 'wait', personaId: replyTo.personaId, waitingOn: replyTo.personaId, reason: replyTo.name + ' 正在处理' };
39
+ }
40
+ // 3) 自由发言:高活跃/评审参与里,按职责关键词与冷却挑一个。
41
+ const eligible = input.candidates.filter((candidate) => ((candidate.activity === 'high' || candidate.activity === 'review') && canTake(candidate, input, spoken)));
42
+ if (eligible.length === 0) {
43
+ const busy = input.candidates.find((candidate) => candidate.state.status === 'thinking');
44
+ if (busy)
45
+ return { action: 'wait', waitingOn: busy.personaId, reason: busy.name + ' 正在生成' };
46
+ return { action: 'pass', reason: '没有新的可发言角色(没被点名、都在冷却/已答/资格外)' };
47
+ }
48
+ const scored = eligible.map((candidate) => ({
49
+ candidate,
50
+ score: candidate.duties.reduce((total, duty) => (text.includes(duty.toLowerCase()) ? total + 3 : total), 0),
51
+ }));
52
+ scored.sort((left, right) => right.score - left.score);
53
+ const pick = scored[0];
54
+ return {
55
+ action: 'speak',
56
+ personaId: pick.candidate.personaId,
57
+ reason: pick.score > 0 ? '职责命中:' + pick.candidate.name : '按活跃度补位:' + pick.candidate.name,
58
+ };
59
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 预制头像的品牌图形数据 —— **自动生成,不要手改**。
3
+ * 重新生成:`node scripts/gen-avatar-brands.mjs <图标目录>`(唯一来源、需要联网下载图标)。
4
+ *
5
+ * 来源:@lobehub/icons-static-svg v1.102.0(https://github.com/lobehub/lobe-icons,MIT)。
6
+ * 商标归各自权利人所有(OpenAI / Anthropic / Google / DeepSeek / 阿里云 / 月之暗面 /
7
+ * 字节跳动 / 智谱 / Mistral AI / Meta / Hugging Face / Perplexity / xAI / Ollama),
8
+ * 仅作为本地角色头像的可选图案使用,不代表任何关联或背书。
9
+ *
10
+ * `body` 是 24×24 viewBox 里的原始图形(彩色品牌版自带 fill;单色版没有 fill,
11
+ * 由 `avatar-presets.ts` 统一染墨色)。每个文件单独塞进一个 data: 图里,id 不会互相污染。
12
+ */
13
+ export interface AvatarBrand {
14
+ /** 稳定 id,用于识别当前选中的预制头像 */
15
+ id: string;
16
+ /** 界面里显示的名字 */
17
+ label: string;
18
+ /** 原始 svg 根节点上的 fill-rule(OpenAI 这类挖空图形要靠它) */
19
+ fillRule?: string;
20
+ /** 24×24 viewBox 内的原始图形 */
21
+ body: string;
22
+ }
23
+ export declare const AVATAR_BRANDS: readonly AvatarBrand[];
@@ -0,0 +1,75 @@
1
+ export const AVATAR_BRANDS = [
2
+ {
3
+ id: 'openai',
4
+ label: 'ChatGPT',
5
+ fillRule: 'evenodd',
6
+ body: `<path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path>`,
7
+ },
8
+ {
9
+ id: 'claude',
10
+ label: 'Claude',
11
+ body: `<path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z" fill="#D97757" fill-rule="nonzero"></path>`,
12
+ },
13
+ {
14
+ id: 'gemini',
15
+ label: 'Gemini',
16
+ body: `<path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="#3186FF"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-0-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-1-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-2-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-0-_R_0_" x1="7" x2="11" y1="15.5" y2="12"><stop stop-color="#08B962"></stop><stop offset="1" stop-color="#08B962" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-1-_R_0_" x1="8" x2="11.5" y1="5.5" y2="11"><stop stop-color="#F94543"></stop><stop offset="1" stop-color="#F94543" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-2-_R_0_" x1="3.5" x2="17.5" y1="13.5" y2="12"><stop stop-color="#FABC12"></stop><stop offset=".46" stop-color="#FABC12" stop-opacity="0"></stop></linearGradient></defs>`,
17
+ },
18
+ {
19
+ id: 'deepseek',
20
+ label: 'DeepSeek',
21
+ body: `<path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z" fill="#4D6BFE"></path>`,
22
+ },
23
+ {
24
+ id: 'qwen',
25
+ label: '通义千问',
26
+ body: `<path d="M19.713 2.825h-5.907c0-.251-.066-.503-.196-.728L12.819.728A1.46 1.46 0 0 0 11.559 0h-1.58c-.52 0-1 .275-1.26.728l-2.42 4.19a1.45 1.45 0 0 0 0 1.453l.791 1.37c.26.448.74.727 1.26.727h11.36c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451l-.79-1.37a1.46 1.46 0 0 0-1.26-.728zM.195 9.905l2.951 5.115a1.46 1.46 0 0 0-.531.531l-.791 1.37a1.45 1.45 0 0 0 0 1.452l.79 1.37c.26.448.74.727 1.26.727h4.84c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451L5.086 7.083a1.46 1.46 0 0 0-1.26-.728h-1.58c-.52 0-1 .276-1.26.728l-.79 1.37a1.45 1.45 0 0 0 0 1.452m15.888 13.367 2.951-5.115c.217.125.469.196.728.196h1.582c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451l-2.42-4.191a1.46 1.46 0 0 0-1.259-.728h-1.582c-.52 0-1 .276-1.259.728l-5.678 9.838a1.45 1.45 0 0 0 0 1.452l.79 1.37c.26.448.74.727 1.26.727h1.582c.52 0 1-.275 1.26-.728z" fill="#082dff"></path>`,
27
+ },
28
+ {
29
+ id: 'kimi',
30
+ label: 'Kimi',
31
+ body: `<path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z" fill="#1783FF"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"></path>`,
32
+ },
33
+ {
34
+ id: 'doubao',
35
+ label: '豆包',
36
+ body: `<path d="M5.31 15.756c.172-3.75 1.883-5.999 2.549-6.739-3.26 2.058-5.425 5.658-6.358 8.308v1.12C1.501 21.513 4.226 24 7.59 24a6.59 6.59 0 002.2-.375c.353-.12.7-.248 1.039-.378.913-.899 1.65-1.91 2.243-2.992-4.877 2.431-7.974.072-7.763-4.5l.002.001z" fill="#1E37FC"></path><path d="M22.57 10.283c-1.212-.901-4.109-2.404-7.397-2.8.295 3.792.093 8.766-2.1 12.773a12.782 12.782 0 01-2.244 2.992c3.764-1.448 6.746-3.457 8.596-5.219 2.82-2.683 3.353-5.178 3.361-6.66a2.737 2.737 0 00-.216-1.084v-.002z" fill="#37E1BE"></path><path d="M14.303 1.867C12.955.7 11.248 0 9.39 0 7.532 0 5.883.677 4.545 1.807 2.791 3.29 1.627 5.557 1.5 8.125v9.201c.932-2.65 3.097-6.25 6.357-8.307.5-.318 1.025-.595 1.569-.829 1.883-.801 3.878-.932 5.746-.706-.222-2.83-.718-5.002-.87-5.617h.001z" fill="#A569FF"></path><path d="M17.305 4.961a199.47 199.47 0 01-1.08-1.094c-.202-.213-.398-.419-.586-.622l-1.333-1.378c.151.615.648 2.786.869 5.617 3.288.395 6.185 1.898 7.396 2.8-1.306-1.275-3.475-3.487-5.266-5.323z" fill="#1E37FC"></path>`,
37
+ },
38
+ {
39
+ id: 'zhipu',
40
+ label: '智谱 GLM',
41
+ body: `<path d="M11.991 23.503a.24.24 0 00-.244.248.24.24 0 00.244.249.24.24 0 00.245-.249.24.24 0 00-.22-.247l-.025-.001zM9.671 5.365a1.697 1.697 0 011.099 2.132l-.071.172-.016.04-.018.054c-.07.16-.104.32-.104.498-.035.71.47 1.279 1.186 1.314h.366c1.309.053 2.338 1.173 2.286 2.523-.052 1.332-1.152 2.38-2.478 2.327h-.174c-.715.018-1.274.64-1.239 1.368 0 .124.018.23.053.337.209.373.54.658.96.8.75.23 1.517-.125 1.9-.782l.018-.035c.402-.64 1.17-.96 1.92-.711.854.284 1.378 1.226 1.099 2.167a1.661 1.661 0 01-2.077 1.102 1.711 1.711 0 01-.907-.711l-.017-.035c-.2-.323-.463-.58-.851-.711l-.056-.018a1.646 1.646 0 00-1.954.746 1.66 1.66 0 01-1.065.764 1.677 1.677 0 01-1.989-1.279c-.209-.906.332-1.83 1.257-2.043a1.51 1.51 0 01.296-.035h.018c.68-.071 1.151-.622 1.116-1.333a1.307 1.307 0 00-.227-.693 2.515 2.515 0 01-.366-1.403 2.39 2.39 0 01.366-1.208c.14-.195.21-.444.227-.693.018-.71-.506-1.261-1.186-1.332l-.07-.018a1.43 1.43 0 01-.299-.07l-.05-.019a1.7 1.7 0 01-1.047-2.114 1.68 1.68 0 012.094-1.101zm-5.575 10.11c.26-.264.639-.367.994-.27.355.096.633.379.728.74.095.362-.007.748-.267 1.013-.402.41-1.053.41-1.455 0a1.062 1.062 0 010-1.482zm14.845-.294c.359-.09.738.024.992.297.254.274.344.665.237 1.025-.107.36-.396.634-.756.718-.551.128-1.1-.22-1.23-.781a1.05 1.05 0 01.757-1.26zm-.064-4.39c.314.32.49.753.49 1.206 0 .452-.176.886-.49 1.206-.315.32-.74.5-1.185.5-.444 0-.87-.18-1.184-.5a1.727 1.727 0 010-2.412 1.654 1.654 0 012.369 0zm-11.243.163c.364.484.447 1.128.218 1.691a1.665 1.665 0 01-2.188.923c-.855-.36-1.26-1.358-.907-2.228a1.68 1.68 0 011.33-1.038c.593-.08 1.183.169 1.547.652zm11.545-4.221c.368 0 .708.2.892.524.184.324.184.724 0 1.048a1.026 1.026 0 01-.892.524c-.568 0-1.03-.47-1.03-1.048 0-.579.462-1.048 1.03-1.048zm-14.358 0c.368 0 .707.2.891.524.184.324.184.724 0 1.048a1.026 1.026 0 01-.891.524c-.569 0-1.03-.47-1.03-1.048 0-.579.461-1.048 1.03-1.048zm10.031-1.475c.925 0 1.675.764 1.675 1.706s-.75 1.705-1.675 1.705-1.674-.763-1.674-1.705c0-.942.75-1.706 1.674-1.706zm-2.626-.684c.362-.082.653-.356.761-.718a1.062 1.062 0 00-.238-1.028 1.017 1.017 0 00-.996-.294c-.547.14-.881.7-.752 1.257.13.558.675.907 1.225.783zm0 16.876c.359-.087.644-.36.75-.72a1.062 1.062 0 00-.237-1.019 1.018 1.018 0 00-.985-.301 1.037 1.037 0 00-.762.717c-.108.361-.017.754.239 1.028.245.263.606.377.953.305l.043-.01zM17.19 3.5a.631.631 0 00.628-.64c0-.355-.279-.64-.628-.64a.631.631 0 00-.628.64c0 .355.28.64.628.64zm-10.38 0a.631.631 0 00.628-.64c0-.355-.28-.64-.628-.64a.631.631 0 00-.628.64c0 .355.279.64.628.64zm-5.182 7.852a.631.631 0 00-.628.64c0 .354.28.639.628.639a.63.63 0 00.627-.606l.001-.034a.62.62 0 00-.628-.64zm5.182 9.13a.631.631 0 00-.628.64c0 .355.279.64.628.64a.631.631 0 00.628-.64c0-.355-.28-.64-.628-.64zm10.38.018a.631.631 0 00-.628.64c0 .355.28.64.628.64a.631.631 0 00.628-.64c0-.355-.279-.64-.628-.64zm5.182-9.148a.631.631 0 00-.628.64c0 .354.279.639.628.639a.631.631 0 00.628-.64c0-.355-.28-.64-.628-.64zm-.384-4.992a.24.24 0 00.244-.249.24.24 0 00-.244-.249.24.24 0 00-.244.249c0 .142.122.249.244.249zM11.991.497a.24.24 0 00.245-.248A.24.24 0 0011.99 0a.24.24 0 00-.244.249c0 .133.108.236.223.247l.021.001zM2.011 6.36a.24.24 0 00.245-.249.24.24 0 00-.244-.249.24.24 0 00-.244.249.24.24 0 00.244.249zm0 11.263a.24.24 0 00-.243.248.24.24 0 00.244.249.24.24 0 00.244-.249.252.252 0 00-.244-.248zm19.995-.018a.24.24 0 00-.245.248.24.24 0 00.245.25.24.24 0 00.244-.25.252.252 0 00-.244-.248z" fill="#3859FF" fill-rule="nonzero"></path>`,
42
+ },
43
+ {
44
+ id: 'mistral',
45
+ label: 'Mistral',
46
+ body: `<path d="M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z" fill="gold"></path><path d="M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z" fill="#FFAF00"></path><path d="M3.428 10.258h17.144v3.428H3.428v-3.428z" fill="#FF8205"></path><path d="M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z" fill="#FA500F"></path><path d="M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z" fill="#E10500"></path>`,
47
+ },
48
+ {
49
+ id: 'meta',
50
+ label: 'Llama',
51
+ body: `<path d="M6.897 4h-.024l-.031 2.615h.022c1.715 0 3.046 1.357 5.94 6.246l.175.297.012.02 1.62-2.438-.012-.019a48.763 48.763 0 00-1.098-1.716 28.01 28.01 0 00-1.175-1.629C10.413 4.932 8.812 4 6.896 4z" fill="url(#lobe-icons-meta-0-_R_0_)"></path><path d="M6.873 4C4.95 4.01 3.247 5.258 2.02 7.17a4.352 4.352 0 00-.01.017l2.254 1.231.011-.017c.718-1.083 1.61-1.774 2.568-1.785h.021L6.896 4h-.023z" fill="url(#lobe-icons-meta-1-_R_0_)"></path><path d="M2.019 7.17l-.011.017C1.2 8.447.598 9.995.274 11.664l-.005.022 2.534.6.004-.022c.27-1.467.786-2.828 1.456-3.845l.011-.017L2.02 7.17z" fill="url(#lobe-icons-meta-2-_R_0_)"></path><path d="M2.807 12.264l-2.533-.6-.005.022c-.177.918-.267 1.851-.269 2.786v.023l2.598.233v-.023a12.591 12.591 0 01.21-2.44z" fill="url(#lobe-icons-meta-3-_R_0_)"></path><path d="M2.677 15.537a5.462 5.462 0 01-.079-.813v-.022L0 14.468v.024a8.89 8.89 0 00.146 1.652l2.535-.585a4.106 4.106 0 01-.004-.022z" fill="url(#lobe-icons-meta-4-_R_0_)"></path><path d="M3.27 16.89c-.284-.31-.484-.756-.589-1.328l-.004-.021-2.535.585.004.021c.192 1.01.568 1.85 1.106 2.487l.014.017 2.018-1.745a2.106 2.106 0 01-.015-.016z" fill="url(#lobe-icons-meta-5-_R_0_)"></path><path d="M10.78 9.654c-1.528 2.35-2.454 3.825-2.454 3.825-2.035 3.2-2.739 3.917-3.871 3.917a1.545 1.545 0 01-1.186-.508l-2.017 1.744.014.017C2.01 19.518 3.058 20 4.356 20c1.963 0 3.374-.928 5.884-5.33l1.766-3.13a41.283 41.283 0 00-1.227-1.886z" fill="#0082FB"></path><path d="M13.502 5.946l-.016.016c-.4.43-.786.908-1.16 1.416.378.483.768 1.024 1.175 1.63.48-.743.928-1.345 1.367-1.807l.016-.016-1.382-1.24z" fill="url(#lobe-icons-meta-6-_R_0_)"></path><path d="M20.918 5.713C19.853 4.633 18.583 4 17.225 4c-1.432 0-2.637.787-3.723 1.944l-.016.016 1.382 1.24.016-.017c.715-.747 1.408-1.12 2.176-1.12.826 0 1.6.39 2.27 1.075l.015.016 1.589-1.425-.016-.016z" fill="#0082FB"></path><path d="M23.998 14.125c-.06-3.467-1.27-6.566-3.064-8.396l-.016-.016-1.588 1.424.015.016c1.35 1.392 2.277 3.98 2.361 6.971v.023h2.292v-.022z" fill="url(#lobe-icons-meta-7-_R_0_)"></path><path d="M23.998 14.15v-.023h-2.292v.022c.004.14.006.282.006.424 0 .815-.121 1.474-.368 1.95l-.011.022 1.708 1.782.013-.02c.62-.96.946-2.293.946-3.91 0-.083 0-.165-.002-.247z" fill="url(#lobe-icons-meta-8-_R_0_)"></path><path d="M21.344 16.52l-.011.02c-.214.402-.519.67-.917.787l.778 2.462a3.493 3.493 0 00.438-.182 3.558 3.558 0 001.366-1.218l.044-.065.012-.02-1.71-1.784z" fill="url(#lobe-icons-meta-9-_R_0_)"></path><path d="M19.92 17.393c-.262 0-.492-.039-.718-.14l-.798 2.522c.449.153.927.222 1.46.222.492 0 .943-.073 1.352-.215l-.78-2.462c-.167.05-.341.075-.517.073z" fill="url(#lobe-icons-meta-10-_R_0_)"></path><path d="M18.323 16.534l-.014-.017-1.836 1.914.016.017c.637.682 1.246 1.105 1.937 1.337l.797-2.52c-.291-.125-.573-.353-.9-.731z" fill="url(#lobe-icons-meta-11-_R_0_)"></path><path d="M18.309 16.515c-.55-.642-1.232-1.712-2.303-3.44l-1.396-2.336-.011-.02-1.62 2.438.012.02.989 1.668c.959 1.61 1.74 2.774 2.493 3.585l.016.016 1.834-1.914a2.353 2.353 0 01-.014-.017z" fill="url(#lobe-icons-meta-12-_R_0_)"></path><defs><linearGradient id="lobe-icons-meta-0-_R_0_" x1="75.897%" x2="26.312%" y1="89.199%" y2="12.194%"><stop offset=".06%" stop-color="#0867DF"></stop><stop offset="45.39%" stop-color="#0668E1"></stop><stop offset="85.91%" stop-color="#0064E0"></stop></linearGradient><linearGradient id="lobe-icons-meta-1-_R_0_" x1="21.67%" x2="97.068%" y1="75.874%" y2="23.985%"><stop offset="13.23%" stop-color="#0064DF"></stop><stop offset="99.88%" stop-color="#0064E0"></stop></linearGradient><linearGradient id="lobe-icons-meta-2-_R_0_" x1="38.263%" x2="60.895%" y1="89.127%" y2="16.131%"><stop offset="1.47%" stop-color="#0072EC"></stop><stop offset="68.81%" stop-color="#0064DF"></stop></linearGradient><linearGradient id="lobe-icons-meta-3-_R_0_" x1="47.032%" x2="52.15%" y1="90.19%" y2="15.745%"><stop offset="7.31%" stop-color="#007CF6"></stop><stop offset="99.43%" stop-color="#0072EC"></stop></linearGradient><linearGradient id="lobe-icons-meta-4-_R_0_" x1="52.155%" x2="47.591%" y1="58.301%" y2="37.004%"><stop offset="7.31%" stop-color="#007FF9"></stop><stop offset="100%" stop-color="#007CF6"></stop></linearGradient><linearGradient id="lobe-icons-meta-5-_R_0_" x1="37.689%" x2="61.961%" y1="12.502%" y2="63.624%"><stop offset="7.31%" stop-color="#007FF9"></stop><stop offset="100%" stop-color="#0082FB"></stop></linearGradient><linearGradient id="lobe-icons-meta-6-_R_0_" x1="34.808%" x2="62.313%" y1="68.859%" y2="23.174%"><stop offset="27.99%" stop-color="#007FF8"></stop><stop offset="91.41%" stop-color="#0082FB"></stop></linearGradient><linearGradient id="lobe-icons-meta-7-_R_0_" x1="43.762%" x2="57.602%" y1="6.235%" y2="98.514%"><stop offset="0%" stop-color="#0082FB"></stop><stop offset="99.95%" stop-color="#0081FA"></stop></linearGradient><linearGradient id="lobe-icons-meta-8-_R_0_" x1="60.055%" x2="39.88%" y1="4.661%" y2="69.077%"><stop offset="6.19%" stop-color="#0081FA"></stop><stop offset="100%" stop-color="#0080F9"></stop></linearGradient><linearGradient id="lobe-icons-meta-9-_R_0_" x1="30.282%" x2="61.081%" y1="59.32%" y2="33.244%"><stop offset="0%" stop-color="#027AF3"></stop><stop offset="100%" stop-color="#0080F9"></stop></linearGradient><linearGradient id="lobe-icons-meta-10-_R_0_" x1="20.433%" x2="82.112%" y1="50.001%" y2="50.001%"><stop offset="0%" stop-color="#0377EF"></stop><stop offset="99.94%" stop-color="#0279F1"></stop></linearGradient><linearGradient id="lobe-icons-meta-11-_R_0_" x1="40.303%" x2="72.394%" y1="35.298%" y2="57.811%"><stop offset=".19%" stop-color="#0471E9"></stop><stop offset="100%" stop-color="#0377EF"></stop></linearGradient><linearGradient id="lobe-icons-meta-12-_R_0_" x1="32.254%" x2="68.003%" y1="19.719%" y2="84.908%"><stop offset="27.65%" stop-color="#0867DF"></stop><stop offset="100%" stop-color="#0471E9"></stop></linearGradient></defs>`,
52
+ },
53
+ {
54
+ id: 'huggingface',
55
+ label: 'Hugging Face',
56
+ body: `<path d="M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z" fill="#FF9D0B"></path><path d="M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z" fill="#FFD21E"></path><path d="M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-.576-.393-.394-1.023-.089-.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-.586 0 1.107.79 3.263 3.25 3.263h-.003z" fill="#FF323D"></path><path d="M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003zm1.12 5.34a2.166 2.166 0 011.325-1.106c.07-.02.144.06.219.171l.192.306c.069.1.139.175.209.175.074 0 .15-.074.223-.172l.205-.302c.08-.11.157-.188.234-.165.537.168.986.536 1.25 1.026.932-.724 1.275-1.905 1.275-2.633 0-.508-.306-.426-.81-.19l-.616.296c-.52.24-1.148.48-1.824.48-.676 0-1.302-.24-1.823-.48l-.589-.283c-.52-.248-.838-.342-.838.177 0 .703.32 1.831 1.187 2.56l.18.14z" fill="#3A3B45"></path><path d="M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8zM4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694.244-.162.523-.265.814-.3l.176-.012z" fill="#FF9D0B"></path><path d="M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-.573.534-.375-.677-1.405-2.416-1.94-2.751-.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-.522z" fill="#FFD21E"></path>`,
57
+ },
58
+ {
59
+ id: 'perplexity',
60
+ label: 'Perplexity',
61
+ body: `<path d="M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z" fill="#22B8CD" fill-rule="nonzero"></path>`,
62
+ },
63
+ {
64
+ id: 'grok',
65
+ label: 'Grok',
66
+ fillRule: 'evenodd',
67
+ body: `<path d="M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"></path>`,
68
+ },
69
+ {
70
+ id: 'ollama',
71
+ label: 'Ollama',
72
+ fillRule: 'evenodd',
73
+ body: `<path d="M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z"></path>`,
74
+ },
75
+ ];