@michengai/dsh-im-connect 1.0.29 → 1.0.31
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/CHANGELOG.md +16 -0
- package/CHANGELOG.zh-CN.md +16 -0
- package/README.en.md +29 -15
- package/README.md +29 -15
- package/README.zh-CN.md +29 -15
- package/client.js +2448 -202
- package/lib/channels/telegram.d.ts.map +1 -1
- package/lib/channels/telegram.js +141 -5
- package/lib/channels/telegram.js.map +1 -1
- package/lib/channels/thinking-block.d.ts +35 -0
- package/lib/channels/thinking-block.d.ts.map +1 -0
- package/lib/channels/thinking-block.js +59 -0
- package/lib/channels/thinking-block.js.map +1 -0
- package/lib/client.js +2448 -558
- package/lib/engine/command-messages.d.ts +2 -0
- package/lib/engine/command-messages.d.ts.map +1 -1
- package/lib/engine/command-messages.js +2 -0
- package/lib/engine/command-messages.js.map +1 -1
- package/lib/engine/gateway.d.ts +1 -0
- package/lib/engine/gateway.d.ts.map +1 -1
- package/lib/engine/gateway.js +59 -9
- package/lib/engine/gateway.js.map +1 -1
- package/lib/engine/thinking-display.d.ts +41 -0
- package/lib/engine/thinking-display.d.ts.map +1 -0
- package/lib/engine/thinking-display.js +190 -0
- package/lib/engine/thinking-display.js.map +1 -0
- package/lib/engine/types.d.ts +39 -0
- package/lib/engine/types.d.ts.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -1
- package/lib/manager.d.ts +1 -0
- package/lib/manager.d.ts.map +1 -1
- package/lib/manager.js +21 -0
- package/lib/manager.js.map +1 -1
- package/locale/de.json +7 -0
- package/locale/en.json +2 -1
- package/locale/es.json +7 -0
- package/locale/fr.json +7 -0
- package/locale/ja.json +7 -0
- package/locale/pt.json +7 -0
- package/locale/ru.json +7 -0
- package/locale/zh.json +2 -1
- package/package.json +22 -3
- package/src/channels/telegram.ts +139 -5
- package/src/channels/thinking-block.ts +88 -0
- package/src/engine/command-messages.ts +2 -0
- package/src/engine/gateway.ts +52 -8
- package/src/engine/thinking-display.ts +202 -0
- package/src/engine/types.ts +40 -0
- package/src/index.ts +9 -0
- package/src/manager.ts +19 -0
- package/src/plugin-update-ui.js +0 -362
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.31] - 2026-11-09
|
|
4
|
+
|
|
5
|
+
### Full 8-language i18n & streamlined plugin management
|
|
6
|
+
|
|
7
|
+
- Native 8-language support: provide full interface and manifest localization across Simplified Chinese, English, Japanese, Spanish, French, German, Russian, and Portuguese (Brazil), offering a seamless native experience across all supported host locales.
|
|
8
|
+
- Document fallback for global users: align plugin detail pages with host language fallbacks, ensuring non-Chinese environments display the comprehensive English documentation.
|
|
9
|
+
- Streamlined settings experience: remove obsolete update controls and buttons from the settings header, fully delegating plugin lifecycles and updates to the official DSH plugin manager.
|
|
10
|
+
|
|
11
|
+
## [1.0.30] - 2026-11-08
|
|
12
|
+
|
|
13
|
+
### Telegram collapsible thinking message & visual settings
|
|
14
|
+
|
|
15
|
+
- Collapsible thinking messages in Telegram: support sending the model's reasoning chain as a native collapsible quote block (`<blockquote expandable>`), allowing chat participants to tap and expand the thought process (#63).
|
|
16
|
+
- Visual dropdown setting: add a native "Show thinking process" dropdown (Off / Collapsed) in **Settings → IM Assistant → Telegram Account**, allowing quick per-account toggling or falling back to plugin defaults.
|
|
17
|
+
- Harmonized form layout: place the thinking process setting next to "Idle session rotation" in a balanced two-column grid with an inline privacy and display guidance tooltip.
|
|
18
|
+
|
|
3
19
|
## [1.0.29] - 2026-11-08
|
|
4
20
|
|
|
5
21
|
### Telegram group mention policy & visual configuration
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.0.31] - 2026-11-09
|
|
4
|
+
|
|
5
|
+
### 全语言国际化支持与插件中心体验对齐
|
|
6
|
+
|
|
7
|
+
- 全面支持官方 8 门语言:完整支持简体中文、英语、日语、西班牙语、法语、德语、俄语与葡萄牙语(巴西),包括插件市场简介与即时通讯管理面板的全部界面文案,跨语言切换自然顺畅。
|
|
8
|
+
- 详情与使用说明文档对齐:优化插件市场与插件中心的详情文档路由,非中文环境默认展示完整的英文使用手册,方便全球用户查阅接入指引。
|
|
9
|
+
- 管理界面精简与对齐官方生态:移除设置面板内冗余的自制更新入口与开关,版本升级与生命周期完全由 DSH 官方插件管理统一接管,保持设置面板专注高效。
|
|
10
|
+
|
|
11
|
+
## [1.0.30] - 2026-11-08
|
|
12
|
+
|
|
13
|
+
### Telegram 思考过程可折叠展示与设置选项
|
|
14
|
+
|
|
15
|
+
- Telegram 思考过程折叠消息:支持将模型的深度思考内容通过 Telegram 原生可折叠引用块(`<blockquote expandable>`)单独发送,群聊或私聊中点击即可展开查看思维链(#63)。
|
|
16
|
+
- 可视化设置下拉选项:在「设置 → IM助理 → Telegram 账号」中提供「展示思考过程」原生下拉选项(关闭 / 折叠展示),支持账号级一键切换或跟随全局配置。
|
|
17
|
+
- 表单布局与体验优化:将思考过程选项排布在「空闲新开会话」右侧,两列网格整齐对称;右上角配备说明图标,解释折叠消息展示边界与群聊隐私指引。
|
|
18
|
+
|
|
3
19
|
## [1.0.29] - 2026-11-08
|
|
4
20
|
|
|
5
21
|
### Telegram 群聊免 @ 触发策略与可视化设置
|
package/README.en.md
CHANGED
|
@@ -240,7 +240,7 @@ The configuration output should contain `im-connect`. Restart DSH Web and hard-r
|
|
|
240
240
|
The plugin follows standard DSH bundle configuration conventions. Options are located at:
|
|
241
241
|
> **Sidebar → Plugins → Click `@michengai/dsh-im-connect`** (the host's `plugins.bundle.config` slot).
|
|
242
242
|
|
|
243
|
-
Native configuration options are provided here. Their values are persisted in `channels.json` under the plugin's `stateDir` and survive restarts; they are not equivalent Cordis YAML options. `location` and `taskTreeSessions` are managed through this UI
|
|
243
|
+
Native configuration options are provided here. Their values are persisted in `channels.json` under the plugin's `stateDir` and survive restarts; they are not equivalent Cordis YAML options. `location` and `taskTreeSessions` are managed through this UI:
|
|
244
244
|
|
|
245
245
|
### 1. Entry Location (`location`)
|
|
246
246
|
- **Default**: Settings only (`settings`)
|
|
@@ -250,20 +250,7 @@ Native configuration options are provided here. Their values are persisted in `c
|
|
|
250
250
|
- **Settings only (`settings`)**: Unregisters the sidebar icon (gracefully switching active views if currently open) and retains only the entry in **Settings → IM Assistant**.
|
|
251
251
|
- **Effect**: Clicking the sidebar icon opens the IM Assistant management page directly in the primary workspace with a **960px centered container** (matching host plugin manager conventions). This eliminates vertical scrolling constraints in narrow settings dialogs; state is synchronized live across both entry points.
|
|
252
252
|
|
|
253
|
-
### 2.
|
|
254
|
-
- **Default**: Enabled (`true`)
|
|
255
|
-
- **Description**: Controls whether the plugin checks for and installs updates from npm.
|
|
256
|
-
- **Effect**:
|
|
257
|
-
- **Dynamic UI Sync**: Disabling the toggle hides the **Check for updates** button and version badge in the header immediately without requiring a full page reload;
|
|
258
|
-
- **Endpoint Guard**: When disabled, the update API route returns `HTTP 403` for all check and install requests, preventing unreviewed updates;
|
|
259
|
-
- **Host / Platform Lock**: For curated plugin indexes (such as VibeDev) or restricted enterprise environments, this can be locked directly via Cordis configuration (bundle patch) without needing UI interaction:
|
|
260
|
-
```yaml
|
|
261
|
-
updater: false # or onlineUpdate: false
|
|
262
|
-
```
|
|
263
|
-
Once configured, the updater is disabled at startup, the update action stays hidden, and the online-update switch is disabled. The host lock takes precedence over the user's choice in `channels.json` and cannot be lifted through the UI. Removing the host lock restores the saved user preference.
|
|
264
|
-
- **Update Modes**: When a newer release is available, **Update automatically** runs only when the DSH CLI or Desktop update service is available; otherwise, the dialog provides a profile-specific manual command to copy and run.
|
|
265
|
-
|
|
266
|
-
### 3. Show IM Sessions in Task Tree (`taskTreeSessions`)
|
|
253
|
+
### 2. Show IM Sessions in Task Tree (`taskTreeSessions`)
|
|
267
254
|
- **Default**: Disabled (`false`, hides IM sessions in the workspace task tree by default to keep daily workspaces clean)
|
|
268
255
|
- **Description**: Controls whether messaging channel sessions appear in the official workspace task tree.
|
|
269
256
|
- **Effect**:
|
|
@@ -271,6 +258,16 @@ Native configuration options are provided here. Their values are persisted in `c
|
|
|
271
258
|
- **Channels Tab Preserved**: Filtering applies only to the official workspace tree. All channel sessions remain fully available and accessible at any time under the sidebar's **Channels** tab;
|
|
272
259
|
- **Lightweight Pipeline Collaboration**: Implemented via the `NativeTabRegistry.sessionFilters` inter-plugin protocol without invasive host hijacking. Toggling takes effect immediately and interoperates smoothly with Automation and Archive Manager. Non-supporting host shells degrade gracefully with a one-time warning.
|
|
273
260
|
|
|
261
|
+
### 3. Cordis Host-Level Online Update Lock (`updater` / `onlineUpdate`)
|
|
262
|
+
- **Default**: Unlocked (`undefined`)
|
|
263
|
+
- **Description**: For enterprise intranets, offline environments, or curated plugin distribution platforms, update endpoints can be explicitly locked and disabled directly in Cordis configuration (e.g. `cordis.patch.yml`):
|
|
264
|
+
```yaml
|
|
265
|
+
- id: im-connect
|
|
266
|
+
config:
|
|
267
|
+
updater: false # or onlineUpdate: false
|
|
268
|
+
```
|
|
269
|
+
Once locked, plugin update endpoints are disabled (returning HTTP 403), delegating lifecycle and updates entirely to official DSH plugin management and market mechanisms.
|
|
270
|
+
|
|
274
271
|
### 4. Telegram group trigger policy (`mentionPolicy` / `freeChatGroups`)
|
|
275
272
|
- **Default**: `addressed` — in groups the bot only reacts to an @mention, a reply to it, or a direct message.
|
|
276
273
|
- **What it does**: to let a group chat with the bot without @mentioning it, configure the trigger policy directly in **Settings → IM Assistant → Telegram Account Details**, or in `channels.json`:
|
|
@@ -306,6 +303,23 @@ Native configuration options are provided here. Their values are persisted in `c
|
|
|
306
303
|
- **Option 2**: Send any message in the group, forward it to a query bot (such as `@userinfobot`), and copy the chat `Id` (starts with a minus sign);
|
|
307
304
|
- **Option 3**: Call `https://api.telegram.org/bot<TOKEN>/getUpdates` directly in your browser and check `"chat":{"id": -100xxxxxxxxxx}`.
|
|
308
305
|
|
|
306
|
+
### 5. Collapsible thinking message (`thinkingDisplay`)
|
|
307
|
+
- **Default**: off (`mode: 'off'`).
|
|
308
|
+
- **What it does**: when enabled, the model's reasoning is sent as a separate Telegram collapsible quote (`<blockquote expandable>`) — about three lines collapsed, tap "show more" to expand. The same message is edited in place during the turn and retitled "🧠 Thought process" when the turn ends.
|
|
309
|
+
- **Example** (plugin config slot):
|
|
310
|
+
```yaml
|
|
311
|
+
thinkingDisplay:
|
|
312
|
+
mode: collapsed # off | collapsed
|
|
313
|
+
minChars: 120 # only send once this many characters accumulated
|
|
314
|
+
intervalMs: 2000 # minimum interval between refreshes
|
|
315
|
+
maxChars: 3500 # per-message cap; longer text is truncated and noted
|
|
316
|
+
```
|
|
317
|
+
- **Channel and UI support**: implemented for Telegram; can be enabled in **Settings → IM Assistant → Telegram Account** by selecting **Collapsed** in the **Show thinking process** dropdown. Other channels ignore the setting and keep the existing status line.
|
|
318
|
+
- **Boundaries and privacy**: collapsing is client-side display, not access control; everyone who can read the group message can expand the reasoning. Enable only where sharing reasoning is intentional. Thinking is not counted as final-answer delivery or included in automatic recovery.
|
|
319
|
+
- **Resources and lifecycle**: off/unsupported channels retain no raw reasoning. When enabled, each turn retains at most a 4096 UTF-16-unit prefix plus a scalar character count. Pending refreshes coalesce to the latest snapshot; cancellation, rebinding, muting, unloading and turn replacement prevent stale output.
|
|
320
|
+
- **Ranges**: `minChars` 0–4096 (also applied on final), `intervalMs` 1000–60000, `maxChars` 200–4096. Finite out-of-range values are clamped, nonfinite values use defaults. HTML escaping, labels, wrappers and truncation notes all fit the budget without splitting emoji surrogate pairs.
|
|
321
|
+
- **Fallback**: only a definite HTML entity rejection switches to plain text, which persists for later edits in that turn. Unknown network outcomes, authentication failures and rate limits do not trigger a format-switch resend.
|
|
322
|
+
|
|
309
323
|
## Usage
|
|
310
324
|
|
|
311
325
|
Open **Settings → IM Assistant**, select **Add account** under the target channel, then choose that account's workspace, model, permission, private-access mode, and send mode. To register a new workspace, click **Add workspace…** in the dropdown footer to invoke the system folder picker (manual path inputs are disallowed); hosts lacking native folder pickers show "This Host cannot create workspaces" (upgrade to one of the supported host releases listed in Requirements, or add via the host sidebar).
|
package/README.md
CHANGED
|
@@ -240,7 +240,7 @@ dsh --profile web --dump-config
|
|
|
240
240
|
插件遵循 DSH 官方扩展配置规范,配置项位于:
|
|
241
241
|
> **主界面侧边栏「插件」→ 点击 `@michengai/dsh-im-connect` 详情页**(对应宿主 `plugins.bundle.config` 槽位)。
|
|
242
242
|
|
|
243
|
-
此处提供原生配置项。界面配置值保存在插件 `stateDir` 下的 `channels.json` 中,重启后保留;它们不是等价的 Cordis YAML 配置项。`location` 和 `taskTreeSessions`
|
|
243
|
+
此处提供原生配置项。界面配置值保存在插件 `stateDir` 下的 `channels.json` 中,重启后保留;它们不是等价的 Cordis YAML 配置项。`location` 和 `taskTreeSessions` 通过此界面管理:
|
|
244
244
|
|
|
245
245
|
### 1. 入口位置 (`location`)
|
|
246
246
|
- **默认状态**:仅设置(`settings`)
|
|
@@ -250,20 +250,7 @@ dsh --profile web --dump-config
|
|
|
250
250
|
- **仅设置 (`settings`)**:注销侧边栏图标(若当前正停留在 IM 面板,会自动安全切回默认视图,防止悬空和白屏),仅在「设置 → IM助理」保留入口。
|
|
251
251
|
- **生效效果**:在侧边栏点击即可直达 IM 助理中心,并在主工作区以 **960px 居中版心**(对齐官方插件管理与市场规范)展开完整大面板,彻底告别在设置弹窗狭窄视口内滚动的局限;两处入口数据与状态 100% 实时同步。
|
|
252
252
|
|
|
253
|
-
### 2.
|
|
254
|
-
- **默认状态**:开启(`true`)
|
|
255
|
-
- **功能说明**:控制是否允许在线检查并安装 IM 连接器的新版本。
|
|
256
|
-
- **生效效果**:
|
|
257
|
-
- **界面联动**:关闭开关后,IM 管理面板标题旁的「检查更新」按钮与版本提示将即时隐藏,无需刷新页面;开启后自动恢复展示;
|
|
258
|
-
- **接口安全拦截**:关闭后,服务端的更新路由对任何版本检查和安装请求均返回 `HTTP 403` 禁用状态,彻底杜绝在插件内安装未审核版本;
|
|
259
|
-
- **宿主/平台级锁定**:面向精选插件索引(如 VibeDev)或企业安全合规环境,支持直接在 Cordis 配置文件(bundle patch)中声明,无需进入界面手动配置:
|
|
260
|
-
```yaml
|
|
261
|
-
updater: false # 或 onlineUpdate: false
|
|
262
|
-
```
|
|
263
|
-
配置生效后,更新器在启动时即被禁用,更新入口隐藏,详情页在线更新开关置灰。宿主锁定优先于 `channels.json` 中的用户选择,界面不能解除锁定;宿主移除锁定后,重新按已保存的用户选择生效。
|
|
264
|
-
- **更新模式**:发现新版后,只有检测到 DSH CLI 或 Desktop 更新服务时才可使用“自动更新”;其他环境会在弹窗中提供可复制、与当前 Profile 对应的手工更新命令。
|
|
265
|
-
|
|
266
|
-
### 3. 在任务树显示 IM 会话 (`taskTreeSessions`)
|
|
253
|
+
### 2. 在任务树显示 IM 会话 (`taskTreeSessions`)
|
|
267
254
|
- **默认状态**:关闭(`false`,默认在任务树隐藏即时通讯会话,保持日常工作区清爽)
|
|
268
255
|
- **功能说明**:控制是否在官方工作区任务树中显示各渠道产生的即时通讯会话。
|
|
269
256
|
- **生效效果**:
|
|
@@ -271,6 +258,16 @@ dsh --profile web --dump-config
|
|
|
271
258
|
- **频道面板不受影响**:关闭仅作用于主任务树,在侧栏「频道」页签中依然完整保留并可随时点开、回复和复盘全部渠道会话;
|
|
272
259
|
- **轻量管道协同**:基于 `NativeTabRegistry.sessionFilters` 标准协作协议实现,无需深度劫持宿主组件,切换即时生效,与定时插件及归档管理等第三方插件完全兼容。未支持该协议的外壳会自动安全降级并提示。
|
|
273
260
|
|
|
261
|
+
### 3. Cordis 宿主级在线更新锁定 (`updater` / `onlineUpdate`)
|
|
262
|
+
- **默认状态**:未锁定(`undefined`)
|
|
263
|
+
- **功能说明**:针对企业内网、离线环境或精选插件分发平台,支持直接在 Cordis 配置文件(如 `cordis.patch.yml`)中显式声明锁定禁用更新服务:
|
|
264
|
+
```yaml
|
|
265
|
+
- id: im-connect
|
|
266
|
+
config:
|
|
267
|
+
updater: false # 或 onlineUpdate: false
|
|
268
|
+
```
|
|
269
|
+
锁定后插件自身的更新端点自动关闭(返回 HTTP 403),版本升级统一交由 DSH 官方插件管理与市场机制负责。
|
|
270
|
+
|
|
274
271
|
### 4. Telegram 群聊触发策略 (`mentionPolicy` / `freeChatGroups`)
|
|
275
272
|
- **默认状态**:`addressed`(群里只有 @bot、回复 bot 或私聊才会处理)
|
|
276
273
|
- **功能说明**:群聊希望「不 @ 也能直接聊」时,可直接在「设置 → IM助理 → Telegram 账号详情」中配置群聊触发策略,亦可在 `channels.json` 中配置:
|
|
@@ -306,6 +303,23 @@ dsh --profile web --dump-config
|
|
|
306
303
|
- **方法 2**:在群里随便发一条消息,转发给官方查询机器人(如 `@userinfobot`),复制其回复中 `Forwarded from chat` 的 `Id` 数字(以负号开头);
|
|
307
304
|
- **方法 3**:通过 Bot 原生接口查询 `https://api.telegram.org/bot<TOKEN>/getUpdates`,找到 `"chat":{"id": -100xxxxxxxxxx}`。
|
|
308
305
|
|
|
306
|
+
### 5. 思考过程折叠消息 (`thinkingDisplay`)
|
|
307
|
+
- **默认状态**:关闭(`mode: 'off'`)
|
|
308
|
+
- **功能说明**:开启后,模型的思考过程会单独发成一条 Telegram「可折叠引用块」消息(`<blockquote expandable>`),默认只显示约三行,点「显示更多」展开;同一回合就地编辑,回合结束时标题变为「🧠 思考过程」。
|
|
309
|
+
- **配置示例**(插件配置槽位):
|
|
310
|
+
```yaml
|
|
311
|
+
thinkingDisplay:
|
|
312
|
+
mode: collapsed # off | collapsed
|
|
313
|
+
minChars: 120 # 累计到这个字数才发第一条
|
|
314
|
+
intervalMs: 2000 # 两次刷新的最小间隔
|
|
315
|
+
maxChars: 3500 # 单条上限,超出截断并注明
|
|
316
|
+
```
|
|
317
|
+
- **渠道与界面支持**:目前由 Telegram 实现,可在「设置 → IM助理 → Telegram 账号」中通过「展示思考过程」下拉选择「折叠展示」一键开启;其他渠道会忽略该配置,只保留原有状态行。
|
|
318
|
+
- **边界与隐私**:折叠是客户端展示,不是访问控制,群内所有能看到消息的人均能点击展开思考内容。请只在明确允许公开展示思维链的部署中开启;思考消息不会被算作最终答案的送达或自动补发内容。
|
|
319
|
+
- **资源与生命周期**:关闭或渠道不支持时不缓存思考原文;开启时每回合最多保留 4096 个 UTF-16 单元的前缀和总字数。刷新合并为最新快照,停止、换绑、静音、卸载及下一回合会阻止过期输出。
|
|
320
|
+
- **参数范围**:`minChars` 为 0–4096(结束时同样适用),`intervalMs` 为 1000–60000,`maxChars` 为 200–4096;超界值收敛到范围,非有限数字使用默认值。实际 HTML 转义、标题、标签与截断提示均计入预算,不切开 emoji 代理对。
|
|
321
|
+
- **格式降级**:仅在平台明确拒绝 HTML 实体时切到纯文本,并在该回合后续编辑中保持纯文本;网络结果不明、鉴权失败、限流不会通过换格式重发绕过。
|
|
322
|
+
|
|
309
323
|
## 使用
|
|
310
324
|
|
|
311
325
|
打开「设置 → IM助理」,在目标渠道点击「添加账号」,并为该账号选择工作区、模型、权限、私聊准入和发送方式。若需要新工作区,可展开工作区下拉列表点击底部的「添加工作区…」直接调起系统文件选择器(禁止手输路径);不支持原生目录选择器的宿主会提示「当前 Host 无法新增工作区」,请升级到「环境要求」中列出的受支持宿主版本,或直接在宿主侧栏添加工作区。
|
package/README.zh-CN.md
CHANGED
|
@@ -240,7 +240,7 @@ dsh --profile web --dump-config
|
|
|
240
240
|
插件遵循 DSH 官方扩展配置规范,配置项位于:
|
|
241
241
|
> **主界面侧边栏「插件」→ 点击 `@michengai/dsh-im-connect` 详情页**(对应宿主 `plugins.bundle.config` 槽位)。
|
|
242
242
|
|
|
243
|
-
此处提供原生配置项。界面配置值保存在插件 `stateDir` 下的 `channels.json` 中,重启后保留;它们不是等价的 Cordis YAML 配置项。`location` 和 `taskTreeSessions`
|
|
243
|
+
此处提供原生配置项。界面配置值保存在插件 `stateDir` 下的 `channels.json` 中,重启后保留;它们不是等价的 Cordis YAML 配置项。`location` 和 `taskTreeSessions` 通过此界面管理:
|
|
244
244
|
|
|
245
245
|
### 1. 入口位置 (`location`)
|
|
246
246
|
- **默认状态**:仅设置(`settings`)
|
|
@@ -250,20 +250,7 @@ dsh --profile web --dump-config
|
|
|
250
250
|
- **仅设置 (`settings`)**:注销侧边栏图标(若当前正停留在 IM 面板,会自动安全切回默认视图,防止悬空和白屏),仅在「设置 → IM助理」保留入口。
|
|
251
251
|
- **生效效果**:在侧边栏点击即可直达 IM 助理中心,并在主工作区以 **960px 居中版心**(对齐官方插件管理与市场规范)展开完整大面板,彻底告别在设置弹窗狭窄视口内滚动的局限;两处入口数据与状态 100% 实时同步。
|
|
252
252
|
|
|
253
|
-
### 2.
|
|
254
|
-
- **默认状态**:开启(`true`)
|
|
255
|
-
- **功能说明**:控制是否允许在线检查并安装 IM 连接器的新版本。
|
|
256
|
-
- **生效效果**:
|
|
257
|
-
- **界面联动**:关闭开关后,IM 管理面板标题旁的「检查更新」按钮与版本提示将即时隐藏,无需刷新页面;开启后自动恢复展示;
|
|
258
|
-
- **接口安全拦截**:关闭后,服务端的更新路由对任何版本检查和安装请求均返回 `HTTP 403` 禁用状态,彻底杜绝在插件内安装未审核版本;
|
|
259
|
-
- **宿主/平台级锁定**:面向精选插件索引(如 VibeDev)或企业安全合规环境,支持直接在 Cordis 配置文件(bundle patch)中声明,无需进入界面手动配置:
|
|
260
|
-
```yaml
|
|
261
|
-
updater: false # 或 onlineUpdate: false
|
|
262
|
-
```
|
|
263
|
-
配置生效后,更新器在启动时即被禁用,更新入口隐藏,详情页在线更新开关置灰。宿主锁定优先于 `channels.json` 中的用户选择,界面不能解除锁定;宿主移除锁定后,重新按已保存的用户选择生效。
|
|
264
|
-
- **更新模式**:发现新版后,只有检测到 DSH CLI 或 Desktop 更新服务时才可使用“自动更新”;其他环境会在弹窗中提供可复制、与当前 Profile 对应的手工更新命令。
|
|
265
|
-
|
|
266
|
-
### 3. 在任务树显示 IM 会话 (`taskTreeSessions`)
|
|
253
|
+
### 2. 在任务树显示 IM 会话 (`taskTreeSessions`)
|
|
267
254
|
- **默认状态**:关闭(`false`,默认在任务树隐藏即时通讯会话,保持日常工作区清爽)
|
|
268
255
|
- **功能说明**:控制是否在官方工作区任务树中显示各渠道产生的即时通讯会话。
|
|
269
256
|
- **生效效果**:
|
|
@@ -271,6 +258,16 @@ dsh --profile web --dump-config
|
|
|
271
258
|
- **频道面板不受影响**:关闭仅作用于主任务树,在侧栏「频道」页签中依然完整保留并可随时点开、回复和复盘全部渠道会话;
|
|
272
259
|
- **轻量管道协同**:基于 `NativeTabRegistry.sessionFilters` 标准协作协议实现,无需深度劫持宿主组件,切换即时生效,与定时插件及归档管理等第三方插件完全兼容。未支持该协议的外壳会自动安全降级并提示。
|
|
273
260
|
|
|
261
|
+
### 3. Cordis 宿主级在线更新锁定 (`updater` / `onlineUpdate`)
|
|
262
|
+
- **默认状态**:未锁定(`undefined`)
|
|
263
|
+
- **功能说明**:针对企业内网、离线环境或精选插件分发平台,支持直接在 Cordis 配置文件(如 `cordis.patch.yml`)中显式声明锁定禁用更新服务:
|
|
264
|
+
```yaml
|
|
265
|
+
- id: im-connect
|
|
266
|
+
config:
|
|
267
|
+
updater: false # 或 onlineUpdate: false
|
|
268
|
+
```
|
|
269
|
+
锁定后插件自身的更新端点自动关闭(返回 HTTP 403),版本升级统一交由 DSH 官方插件管理与市场机制负责。
|
|
270
|
+
|
|
274
271
|
### 4. Telegram 群聊触发策略 (`mentionPolicy` / `freeChatGroups`)
|
|
275
272
|
- **默认状态**:`addressed`(群里只有 @bot、回复 bot 或私聊才会处理)
|
|
276
273
|
- **功能说明**:群聊希望「不 @ 也能直接聊」时,可直接在「设置 → IM助理 → Telegram 账号详情」中配置群聊触发策略,亦可在 `channels.json` 中配置:
|
|
@@ -306,6 +303,23 @@ dsh --profile web --dump-config
|
|
|
306
303
|
- **方法 2**:在群里随便发一条消息,转发给官方查询机器人(如 `@userinfobot`),复制其回复中 `Forwarded from chat` 的 `Id` 数字(以负号开头);
|
|
307
304
|
- **方法 3**:通过 Bot 原生接口查询 `https://api.telegram.org/bot<TOKEN>/getUpdates`,找到 `"chat":{"id": -100xxxxxxxxxx}`。
|
|
308
305
|
|
|
306
|
+
### 5. 思考过程折叠消息 (`thinkingDisplay`)
|
|
307
|
+
- **默认状态**:关闭(`mode: 'off'`)
|
|
308
|
+
- **功能说明**:开启后,模型的思考过程会单独发成一条 Telegram「可折叠引用块」消息(`<blockquote expandable>`),默认只显示约三行,点「显示更多」展开;同一回合就地编辑,回合结束时标题变为「🧠 思考过程」。
|
|
309
|
+
- **配置示例**(插件配置槽位):
|
|
310
|
+
```yaml
|
|
311
|
+
thinkingDisplay:
|
|
312
|
+
mode: collapsed # off | collapsed
|
|
313
|
+
minChars: 120 # 累计到这个字数才发第一条
|
|
314
|
+
intervalMs: 2000 # 两次刷新的最小间隔
|
|
315
|
+
maxChars: 3500 # 单条上限,超出截断并注明
|
|
316
|
+
```
|
|
317
|
+
- **渠道与界面支持**:目前由 Telegram 实现,可在「设置 → IM助理 → Telegram 账号」中通过「展示思考过程」下拉选择「折叠展示」一键开启;其他渠道会忽略该配置,只保留原有状态行。
|
|
318
|
+
- **边界与隐私**:折叠是客户端展示,不是访问控制,群内所有能看到消息的人均能点击展开思考内容。请只在明确允许公开展示思维链的部署中开启;思考消息不会被算作最终答案的送达或自动补发内容。
|
|
319
|
+
- **资源与生命周期**:关闭或渠道不支持时不缓存思考原文;开启时每回合最多保留 4096 个 UTF-16 单元的前缀和总字数。刷新合并为最新快照,停止、换绑、静音、卸载及下一回合会阻止过期输出。
|
|
320
|
+
- **参数范围**:`minChars` 为 0–4096(结束时同样适用),`intervalMs` 为 1000–60000,`maxChars` 为 200–4096;超界值收敛到范围,非有限数字使用默认值。实际 HTML 转义、标题、标签与截断提示均计入预算,不切开 emoji 代理对。
|
|
321
|
+
- **格式降级**:仅在平台明确拒绝 HTML 实体时切到纯文本,并在该回合后续编辑中保持纯文本;网络结果不明、鉴权失败、限流不会通过换格式重发绕过。
|
|
322
|
+
|
|
309
323
|
## 使用
|
|
310
324
|
|
|
311
325
|
打开「设置 → IM助理」,在目标渠道点击「添加账号」,并为该账号选择工作区、模型、权限、私聊准入和发送方式。若需要新工作区,可展开工作区下拉列表点击底部的「添加工作区…」直接调起系统文件选择器(禁止手输路径);不支持原生目录选择器的宿主会提示「当前 Host 无法新增工作区」,请升级到「环境要求」中列出的受支持宿主版本,或直接在宿主侧栏添加工作区。
|