@michengai/dsh-im-connect 1.0.8 → 1.0.10

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 (48) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/CHANGELOG.zh-CN.md +16 -0
  3. package/README.md +8 -0
  4. package/README.zh-CN.md +8 -0
  5. package/client.js +1040 -1296
  6. package/lib/channels/telegram.d.ts.map +1 -1
  7. package/lib/channels/telegram.js +39 -0
  8. package/lib/channels/telegram.js.map +1 -1
  9. package/lib/client.js +1037 -1293
  10. package/lib/engine/chat-commands.d.ts +3 -1
  11. package/lib/engine/chat-commands.d.ts.map +1 -1
  12. package/lib/engine/chat-commands.js +17 -1
  13. package/lib/engine/chat-commands.js.map +1 -1
  14. package/lib/engine/command-messages.d.ts +7 -0
  15. package/lib/engine/command-messages.d.ts.map +1 -1
  16. package/lib/engine/command-messages.js +7 -0
  17. package/lib/engine/command-messages.js.map +1 -1
  18. package/lib/engine/gateway.d.ts +25 -4
  19. package/lib/engine/gateway.d.ts.map +1 -1
  20. package/lib/engine/gateway.js +109 -5
  21. package/lib/engine/gateway.js.map +1 -1
  22. package/lib/engine/session-export.d.ts.map +1 -1
  23. package/lib/engine/session-export.js +2 -1
  24. package/lib/engine/session-export.js.map +1 -1
  25. package/lib/engine/topic-title.d.ts +51 -0
  26. package/lib/engine/topic-title.d.ts.map +1 -0
  27. package/lib/engine/topic-title.js +146 -0
  28. package/lib/engine/topic-title.js.map +1 -0
  29. package/lib/engine/types.d.ts +9 -0
  30. package/lib/engine/types.d.ts.map +1 -1
  31. package/lib/index.d.ts +2 -0
  32. package/lib/index.d.ts.map +1 -1
  33. package/lib/index.js +2 -0
  34. package/lib/index.js.map +1 -1
  35. package/lib/manager.d.ts +0 -1
  36. package/lib/manager.d.ts.map +1 -1
  37. package/lib/manager.js +1 -16
  38. package/lib/manager.js.map +1 -1
  39. package/package.json +1 -1
  40. package/src/channels/telegram.ts +38 -0
  41. package/src/engine/chat-commands.ts +12 -1
  42. package/src/engine/command-messages.ts +7 -0
  43. package/src/engine/gateway.ts +105 -3
  44. package/src/engine/session-export.ts +6 -2
  45. package/src/engine/topic-title.ts +163 -0
  46. package/src/engine/types.ts +9 -0
  47. package/src/index.ts +4 -0
  48. package/src/manager.ts +1 -14
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.10 - 2026-10-20
4
+
5
+ - Telegram topics now receive the first generated session title automatically, while later title changes leave the topic name stable. `/rename` also updates the topic name; ordinary chats are unaffected.
6
+ - Add `/topicname` to check, lock, or unlock automatic naming for the current topic. The plugin configuration supports naming once (default), following title changes, or turning automatic naming off; topic locks survive restarts.
7
+ - Preserve detected manual topic names and avoid duplicate renames when titles arrive together or a naming request is still in progress. For private topics, use `/topicname off` to protect a manually chosen name.
8
+ - Fix `/export` failing to generate and send a session ZIP on supported DSH `0.2.1` RC hosts.
9
+
10
+ ## 1.0.9 - 2026-10-20
11
+
12
+ - The Channels tab now adopts the host's native tree browser: sessions default to By channel grouping with platform brand icons on group headers and rows, supporting official search, sorting, and archive filtering.
13
+ - Improved channel shortcuts: single-channel workspaces show their platform brand icon instead of the folder icon, channel group menus offer a direct shortcut to Channel settings, and the header add button now opens IM settings.
14
+ - Seamless sidebar tab coordination: Tasks, Channels, and Scheduled tabs match the host segmented tab styling with adaptive padding that prevents label wrapping. Tab selection is shared and preserved alongside the automation plugin across reloads and host changes.
15
+ - Integrated channel and task sessions: channel sessions now appear in the official task tree and open without unexpectedly switching the active tab; newly created channel sessions display immediately without requiring a page reload.
16
+ - Fix the Add channel button failing to open IM settings when the sidebar only provides the Settings trigger within the official account menu.
17
+ - UI glyphs now align with the host icon system to ensure visual consistency across themes.
18
+
3
19
  ## 1.0.8 - 2026-10-19
4
20
 
5
21
  - Let the account settings page fill the host content column by removing the 1080px cap.
@@ -4,6 +4,22 @@
4
4
 
5
5
  以下记录近期发布的版本。Git 标签与 GitHub Release 现已和这些条目同步;历史条目继续保留原始发布提交链接。
6
6
 
7
+ ## 1.0.10 - 2026-10-20
8
+
9
+ - Telegram 话题现在会自动采用首次生成的会话标题,后续对话不再频繁改变话题名;使用 `/rename` 也会同步修改话题名,普通聊天不受影响。
10
+ - 新增 `/topicname`,可查询、锁定或解除当前话题的自动命名;插件配置支持只命名一次(默认)、跟随标题变化和关闭自动命名,话题锁定状态在重启后保留。
11
+ - 检测到人工改名后保留用户选择的名字,避免多个标题同时到达或改名请求尚未结束时重复覆盖。私聊话题请使用 `/topicname off` 保护手动设置的名字。
12
+ - 修复在支持的 DSH `0.2.1` RC 宿主上,`/export` 无法生成并发送会话 ZIP 的问题。
13
+
14
+ ## 1.0.9 - 2026-10-20
15
+
16
+ - 侧边栏「频道」列表改用宿主原生工作区树渲染:默认按频道分组,分组头和会话行显示对应渠道品牌图标,支持官方搜索、排序和归档状态筛选。
17
+ - 完善频道操作入口:单一频道的工作区使用渠道 logo 替换文件夹图标,分组菜单提供直达「频道设置」入口,头部新增「添加频道」按钮直达 IM 设置页。
18
+ - 侧边栏页签深度协同:侧栏「任务 / 频道 / 定时」页签几何与滑块样式对齐宿主,自适应内边距防止窄栏换行;与定时自动化插件共享页签状态,页面刷新或换壳时不再丢失已选页签。
19
+ - 频道会话与任务列表互通:频道会话同步展示在官方主任务树中,点击打开时停留在当前页签,不会被强制切回「频道」;新建频道会话后任务树即时显示,无需手动刷新页面。
20
+ - 修复在侧栏仅通过账号菜单提供设置入口时,点击「添加频道」无法打开 IM 设置页的问题。
21
+ - 界面图标全面对齐宿主原生图标系统,保持主题外观一致。
22
+
7
23
  ## 1.0.8 - 2026-10-19
8
24
 
9
25
  - 账号设置页占满宿主内容区,移除 1080px 宽度上限。
package/README.md CHANGED
@@ -272,6 +272,14 @@ Explicitly binding a session with `/session` restores its output, including when
272
272
 
273
273
  DingTalk replies prefer official AI Card streaming. If card creation fails, plain text preserves line breaks; code fences and list markers remain literal. QQ replies use official markdown and keep headings, bold text, links, and tables; only a platform rejection falls back to plain text (where tables become lists). Telegram replies are sent as Rich Messages with Markdown so headings, bold text, and tables render, falling back to plain text when that method is unavailable; do not enable Webhook on the same bot. Feishu normal replies also use card Markdown, so headings and tables render; cards are split so none holds more than five tables, with a plain-text fallback. Long replies split with structure awareness: table chunks repeat the header, code fences are re-closed, and the `(n/m)` marker only prefixes prose chunks. `/help` is grouped as getting around / sessions and workspaces / models and reasoning / tasks and delivery, with one entry per feature and the usable aliases marked; group titles are bold while the rest of the command copy stays plain text, which keeps them scannable on a phone. Discord renders headings, bold text, code, and lists on the client but has no Markdown tables, and mobile clients cannot scroll horizontally, so pipe tables become a vertical block per row (first two columns as a bold title, remaining columns as `header: value`). Everything else is sent verbatim. Do not configure a Discord Interactions Endpoint URL, or button clicks will not arrive through the Gateway. Slack also has no Markdown tables and no `#` headings, so outgoing text is converted to mrkdwn: headings become a bold whole line, tables become the same vertical block, `**bold**` becomes `*bold*`, and links become `<url|label>`, while code fences stay untouched.
274
274
 
275
+ ### Telegram topic naming
276
+
277
+ Telegram topics are automatically named once from the first non-fallback session title; later conversation titles do not keep changing the topic name. `/rename <title>` explicitly synchronizes the topic name. Ordinary chats are unaffected. The bot needs permission to rename the topic.
278
+
279
+ - `/topicname` shows this topic's policy and lock state. `/topicname off` locks automatic naming; `/topicname on` unlocks it. With the default policy, unlocking allows the next valid title to name the topic again.
280
+ - The plugin configuration `topicNaming` accepts `once` (default), `follow` (follow valid titles), or `off` (disable automatic naming). `/topicname on` does not override global `off`. Explicit `/rename` remains available regardless of automatic naming settings.
281
+ - A manual rename event in a group forum locks automatic naming. Private topics cannot rely on that event for manual rename detection; use `/topicname off`. Naming and lock state persist across restarts in `topic-titles.json` under the state directory.
282
+
275
283
  ### Connecting Slack
276
284
 
277
285
  Slack uses a Socket Mode long connection, so no public URL or request URL is required:
package/README.zh-CN.md CHANGED
@@ -266,6 +266,14 @@ dsh --profile web --dump-config
266
266
 
267
267
  通过 `/workspace` 新建后,`/new` 和当前会话归档后的续聊会保留所选工作区,并使用账号配置的模型、Agent 与权限预设。`/session` 接续已有会话、`/fork` 分叉则保留原会话配置。
268
268
 
269
+ ### Telegram 话题命名
270
+
271
+ Telegram 话题默认使用第一条非兜底会话标题自动命名一次,之后不会随对话频繁变化。`/rename <名称>` 会显式同步话题名;普通聊天不受影响。机器人需要拥有该话题的改名权限。
272
+
273
+ - `/topicname` 查看当前话题的策略和锁定状态;`/topicname off` 锁定自动命名,`/topicname on` 解除锁定。默认策略下,解除锁定后允许下一个有效标题重新命名。
274
+ - 插件配置 `topicNaming` 支持 `once`(默认)、`follow`(跟随有效标题)和 `off`(关闭自动命名);`/topicname on` 不会覆盖全局 `off`。显式 `/rename` 不受自动命名开关限制。
275
+ - 收到群组论坛的人工改名事件后自动锁定;私聊话题无法依赖该事件检测人工改名,请使用 `/topicname off`。开关与命名状态保存在状态目录的 `topic-titles.json`,重启后保留。
276
+
269
277
  ### Slack 接入步骤
270
278
 
271
279
  Slack 走 Socket Mode 长连接,不需要公网地址,也不用配置请求网址: