@xmanrui/dsh-im 4.30.0 → 4.32.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.
- package/README.en.md +4 -3
- package/README.md +4 -3
- package/docs/client-integration.md +4 -0
- package/lib/client.js +111 -21
- package/lib/index.js +276 -276
- package/locale/en.json +5 -0
- package/locale/zh.json +5 -0
- package/package.json +10 -4
- package/plugin-src/client/context-enhancement.js +7 -0
- package/plugin-src/client/i18n.js +7 -1
- package/plugin-src/client/index.js +3 -0
- package/plugin-src/client/plugin-page.js +51 -0
- package/plugin-src/client/styles.js +9 -0
- package/scripts/verify-package.mjs +1 -1
- package/src/channels/feishu/bridge.mjs +50 -3
- package/src/channels/feishu/feishu-cards.mjs +7 -1
- package/src/channels/shared/context-enhancement.mjs +148 -7
- package/src/channels/shared/i18n-en/feishu.mjs +5 -0
- package/src/channels/weixin/weixin-bridge.mjs +28 -10
package/README.en.md
CHANGED
|
@@ -218,7 +218,7 @@ Shells can embed the complete IM management panel through the optional `dshImCli
|
|
|
218
218
|
| `/sessionlist --limit N`, `/sessions --limit N` | List the first N sessions in the current workspace's existing order; N must be a positive integer. |
|
|
219
219
|
| `/session <Session ID>` | Bind the current chat to an existing Harness session. |
|
|
220
220
|
| `/history [count]` | Preview recent messages from the bound Session in a direct chat; defaults to 3, capped at 5. |
|
|
221
|
-
| Interactive question | Reply with an option number, option label, or custom text; separate multiple choices with commas. |
|
|
221
|
+
| Interactive question | Reply with an option number, option label, or custom text; separate multiple choices with commas. In Feishu, an image or image post from the person answering ends the pending question turn and is processed in the same Session, without finishing the remaining questions or resending the image. |
|
|
222
222
|
| Remote approval | Reply with `批准` / `拒绝` / `同意` / `不同意` / `yes` / `no`. |
|
|
223
223
|
|
|
224
224
|
### Command details
|
|
@@ -407,20 +407,21 @@ The initial list is based on user accounts in [GitHub Contributors](https://gith
|
|
|
407
407
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lyzhu86" title="lyzhu86"><img src="https://avatars.githubusercontent.com/u/276197423?s=80" width="80" alt="lyzhu86"/><br /><sub><b>lyzhu86</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/195" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/xmanrui/dsh-im/pull/195" title="Documentation">📖</a></td>
|
|
408
408
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/masucc" title="masucc"><img src="https://avatars.githubusercontent.com/u/143188027?s=80" width="80" alt="masucc"/><br /><sub><b>masucc</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/34bae7c4ee5ea04b28ef7f3108479651b56c78b8" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/34bae7c4ee5ea04b28ef7f3108479651b56c78b8" title="Tests">⚠️</a></td>
|
|
409
409
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/NIU-001-LIU" title="NIU-001-LIU"><img src="https://avatars.githubusercontent.com/u/133982393?s=80" width="80" alt="WENBO LIU"/><br /><sub><b>WENBO LIU</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/6366404c42f7163712bbc44c5011dbdafa63e9bd" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/6366404c42f7163712bbc44c5011dbdafa63e9bd" title="Tests">⚠️</a></td>
|
|
410
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Pegasus02" title="Pegasus02"><img src="https://avatars.githubusercontent.com/u/102945996?s=80" width="80" alt="Tianjun Cai"/><br /><sub><b>Tianjun Cai</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/279" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/pull/279" title="Tests">⚠️</a></td>
|
|
410
411
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/penggaolai" title="penggaolai"><img src="https://avatars.githubusercontent.com/u/44097312?s=80" width="80" alt="penggaolai"/><br /><sub><b>penggaolai</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/03565e5a69bfd03dc246990c3376fbd794caea6e" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/03565e5a69bfd03dc246990c3376fbd794caea6e" title="Tests">⚠️</a></td>
|
|
411
412
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/qwencoder" title="qwencoder"><img src="https://avatars.githubusercontent.com/u/224605497?s=80" width="80" alt="Qwen-Coder"/><br /><sub><b>Qwen-Coder</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/64b9ac8b6e4ba760bc0e182f700cc5be7fffb94f" title="Documentation">📖</a></td>
|
|
412
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rosalynthompson32-a11y" title="rosalynthompson32-a11y"><img src="https://avatars.githubusercontent.com/u/313334391?s=80" width="80" alt="Biertolovisk"/><br /><sub><b>Biertolovisk</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/271" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/pull/271" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/pull/271" title="Tests">⚠️</a></td>
|
|
413
413
|
</tr>
|
|
414
414
|
<tr>
|
|
415
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rosalynthompson32-a11y" title="rosalynthompson32-a11y"><img src="https://avatars.githubusercontent.com/u/313334391?s=80" width="80" alt="Biertolovisk"/><br /><sub><b>Biertolovisk</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/271" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/pull/271" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/pull/271" title="Tests">⚠️</a></td>
|
|
415
416
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ShawnKung" title="ShawnKung"><img src="https://avatars.githubusercontent.com/u/42027195?s=80" width="80" alt="ShawnKung"/><br /><sub><b>ShawnKung</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/224" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/pull/224" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/pull/224" title="Tests">⚠️</a></td>
|
|
416
417
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/trae-agent" title="trae-agent"><img src="https://avatars.githubusercontent.com/u/220387035?s=80" width="80" alt="Trae"/><br /><sub><b>Trae</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/ed47ae7db87d08a12fc6412083ece05669372929" title="Documentation">📖</a></td>
|
|
417
418
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/WE-Technology" title="WE-Technology"><img src="https://avatars.githubusercontent.com/u/109900108?s=80" width="80" alt="WE-Technology"/><br /><sub><b>WE-Technology</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/b0606159e01bbb0a171323e52578324b5faea97a" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/b0606159e01bbb0a171323e52578324b5faea97a" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/b0606159e01bbb0a171323e52578324b5faea97a" title="Tests">⚠️</a></td>
|
|
418
419
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wings1848" title="wings1848"><img src="https://avatars.githubusercontent.com/u/120104016?s=80" width="80" alt="Wings Butterfly"/><br /><sub><b>Wings Butterfly</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/206" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/pull/206" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/pull/206" title="Tests">⚠️</a></td>
|
|
419
420
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xmanrui" title="xmanrui"><img src="https://avatars.githubusercontent.com/u/4094054?s=80" width="80" alt="xiemanR"/><br /><sub><b>xiemanR</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/b8bd681a793a87ff2a7b8d282cb4944a0ce769c3" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/b8bd681a793a87ff2a7b8d282cb4944a0ce769c3" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/b8bd681a793a87ff2a7b8d282cb4944a0ce769c3" title="Tests">⚠️</a></td>
|
|
420
421
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yangzhe1991" title="yangzhe1991"><img src="https://avatars.githubusercontent.com/u/860739?s=80" width="80" alt="Zhe (Phil) Yang"/><br /><sub><b>Zhe (Phil) Yang</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commits/main/?author=yangzhe1991" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commits/main/?author=yangzhe1991" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commits/main/?author=yangzhe1991" title="Tests">⚠️</a></td>
|
|
421
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yhay81" title="yhay81"><img src="https://avatars.githubusercontent.com/u/11132792?s=80" width="80" alt="Yusuke Hayashi"/><br /><sub><b>Yusuke Hayashi</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Tests">⚠️</a></td>
|
|
422
422
|
</tr>
|
|
423
423
|
<tr>
|
|
424
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yhay81" title="yhay81"><img src="https://avatars.githubusercontent.com/u/11132792?s=80" width="80" alt="Yusuke Hayashi"/><br /><sub><b>Yusuke Hayashi</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Tests">⚠️</a></td>
|
|
424
425
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yzxxy010" title="yzxxy010"><img src="https://avatars.githubusercontent.com/u/98270201?s=80" width="80" alt="星曜"/><br /><sub><b>星曜</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/7a68e94f547a2412e602772dfef82af779750b5f" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/f27c0c3018a4c26c6d29885ba0cf2b44be947a4f" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/7a68e94f547a2412e602772dfef82af779750b5f" title="Tests">⚠️</a></td>
|
|
425
426
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zaakirio" title="zaakirio"><img src="https://avatars.githubusercontent.com/u/90780598?s=80" width="80" alt="zaakir"/><br /><sub><b>zaakir</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/dcd7cd64d80bd246e5e85912a7ee62a2d4572c05" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/dcd7cd64d80bd246e5e85912a7ee62a2d4572c05" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/dcd7cd64d80bd246e5e85912a7ee62a2d4572c05" title="Tests">⚠️</a> <a href="https://github.com/xmanrui/dsh-im/commit/dcd7cd64d80bd246e5e85912a7ee62a2d4572c05" title="Translation">🌍</a></td>
|
|
426
427
|
</tr>
|
package/README.md
CHANGED
|
@@ -220,7 +220,7 @@ Logo 由 dsh-im 的浏览器适配显示,无需修改 DSH。适配保留原始
|
|
|
220
220
|
| `/sessionlist --limit N`、`/sessions --limit N` | 列出当前工作区现有顺序中的前 N 个会话;N 必须是正整数。 |
|
|
221
221
|
| `/session <Session ID>` | 将当前聊天绑定到指定的已有 Harness 会话。 |
|
|
222
222
|
| `/history [数量]` | 在私聊中查看当前绑定会话的最近历史消息,默认 3 条,最多 5 条。 |
|
|
223
|
-
| 交互式提问 |
|
|
223
|
+
| 交互式提问 | 回复选项序号、选项文字或自定义文字;多选时用逗号分隔。飞书中,提问发起人发送图片或图文消息会结束本轮追问,并在同一会话继续处理图片,无需答完剩余问题或重新发图。 |
|
|
224
224
|
| 远程审批 | 回复 `批准` / `拒绝` / `同意` / `不同意` / `yes` / `no`。 |
|
|
225
225
|
|
|
226
226
|
### 命令说明
|
|
@@ -410,20 +410,21 @@ dsh web --trusted-host dsh.example.com
|
|
|
410
410
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lyzhu86" title="lyzhu86"><img src="https://avatars.githubusercontent.com/u/276197423?s=80" width="80" alt="lyzhu86"/><br /><sub><b>lyzhu86</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/195" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/xmanrui/dsh-im/pull/195" title="Documentation">📖</a></td>
|
|
411
411
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/masucc" title="masucc"><img src="https://avatars.githubusercontent.com/u/143188027?s=80" width="80" alt="masucc"/><br /><sub><b>masucc</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/34bae7c4ee5ea04b28ef7f3108479651b56c78b8" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/34bae7c4ee5ea04b28ef7f3108479651b56c78b8" title="Tests">⚠️</a></td>
|
|
412
412
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/NIU-001-LIU" title="NIU-001-LIU"><img src="https://avatars.githubusercontent.com/u/133982393?s=80" width="80" alt="WENBO LIU"/><br /><sub><b>WENBO LIU</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/6366404c42f7163712bbc44c5011dbdafa63e9bd" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/6366404c42f7163712bbc44c5011dbdafa63e9bd" title="Tests">⚠️</a></td>
|
|
413
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Pegasus02" title="Pegasus02"><img src="https://avatars.githubusercontent.com/u/102945996?s=80" width="80" alt="Tianjun Cai"/><br /><sub><b>Tianjun Cai</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/279" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/pull/279" title="Tests">⚠️</a></td>
|
|
413
414
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/penggaolai" title="penggaolai"><img src="https://avatars.githubusercontent.com/u/44097312?s=80" width="80" alt="penggaolai"/><br /><sub><b>penggaolai</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/03565e5a69bfd03dc246990c3376fbd794caea6e" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/03565e5a69bfd03dc246990c3376fbd794caea6e" title="Tests">⚠️</a></td>
|
|
414
415
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/qwencoder" title="qwencoder"><img src="https://avatars.githubusercontent.com/u/224605497?s=80" width="80" alt="Qwen-Coder"/><br /><sub><b>Qwen-Coder</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/64b9ac8b6e4ba760bc0e182f700cc5be7fffb94f" title="Documentation">📖</a></td>
|
|
415
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rosalynthompson32-a11y" title="rosalynthompson32-a11y"><img src="https://avatars.githubusercontent.com/u/313334391?s=80" width="80" alt="Biertolovisk"/><br /><sub><b>Biertolovisk</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/271" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/pull/271" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/pull/271" title="Tests">⚠️</a></td>
|
|
416
416
|
</tr>
|
|
417
417
|
<tr>
|
|
418
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rosalynthompson32-a11y" title="rosalynthompson32-a11y"><img src="https://avatars.githubusercontent.com/u/313334391?s=80" width="80" alt="Biertolovisk"/><br /><sub><b>Biertolovisk</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/271" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/pull/271" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/pull/271" title="Tests">⚠️</a></td>
|
|
418
419
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ShawnKung" title="ShawnKung"><img src="https://avatars.githubusercontent.com/u/42027195?s=80" width="80" alt="ShawnKung"/><br /><sub><b>ShawnKung</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/224" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/pull/224" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/pull/224" title="Tests">⚠️</a></td>
|
|
419
420
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/trae-agent" title="trae-agent"><img src="https://avatars.githubusercontent.com/u/220387035?s=80" width="80" alt="Trae"/><br /><sub><b>Trae</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/ed47ae7db87d08a12fc6412083ece05669372929" title="Documentation">📖</a></td>
|
|
420
421
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/WE-Technology" title="WE-Technology"><img src="https://avatars.githubusercontent.com/u/109900108?s=80" width="80" alt="WE-Technology"/><br /><sub><b>WE-Technology</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/b0606159e01bbb0a171323e52578324b5faea97a" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/b0606159e01bbb0a171323e52578324b5faea97a" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/b0606159e01bbb0a171323e52578324b5faea97a" title="Tests">⚠️</a></td>
|
|
421
422
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wings1848" title="wings1848"><img src="https://avatars.githubusercontent.com/u/120104016?s=80" width="80" alt="Wings Butterfly"/><br /><sub><b>Wings Butterfly</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/pull/206" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/pull/206" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/pull/206" title="Tests">⚠️</a></td>
|
|
422
423
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xmanrui" title="xmanrui"><img src="https://avatars.githubusercontent.com/u/4094054?s=80" width="80" alt="xiemanR"/><br /><sub><b>xiemanR</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/b8bd681a793a87ff2a7b8d282cb4944a0ce769c3" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/b8bd681a793a87ff2a7b8d282cb4944a0ce769c3" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/b8bd681a793a87ff2a7b8d282cb4944a0ce769c3" title="Tests">⚠️</a></td>
|
|
423
424
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yangzhe1991" title="yangzhe1991"><img src="https://avatars.githubusercontent.com/u/860739?s=80" width="80" alt="Zhe (Phil) Yang"/><br /><sub><b>Zhe (Phil) Yang</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commits/main/?author=yangzhe1991" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commits/main/?author=yangzhe1991" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commits/main/?author=yangzhe1991" title="Tests">⚠️</a></td>
|
|
424
|
-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yhay81" title="yhay81"><img src="https://avatars.githubusercontent.com/u/11132792?s=80" width="80" alt="Yusuke Hayashi"/><br /><sub><b>Yusuke Hayashi</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Tests">⚠️</a></td>
|
|
425
425
|
</tr>
|
|
426
426
|
<tr>
|
|
427
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yhay81" title="yhay81"><img src="https://avatars.githubusercontent.com/u/11132792?s=80" width="80" alt="Yusuke Hayashi"/><br /><sub><b>Yusuke Hayashi</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/91f49a603b504762fc0c5daf50d4385bf604ce93" title="Tests">⚠️</a></td>
|
|
427
428
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yzxxy010" title="yzxxy010"><img src="https://avatars.githubusercontent.com/u/98270201?s=80" width="80" alt="星曜"/><br /><sub><b>星曜</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/7a68e94f547a2412e602772dfef82af779750b5f" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/f27c0c3018a4c26c6d29885ba0cf2b44be947a4f" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/7a68e94f547a2412e602772dfef82af779750b5f" title="Tests">⚠️</a></td>
|
|
428
429
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zaakirio" title="zaakirio"><img src="https://avatars.githubusercontent.com/u/90780598?s=80" width="80" alt="zaakir"/><br /><sub><b>zaakir</b></sub></a><br /><a href="https://github.com/xmanrui/dsh-im/commit/dcd7cd64d80bd246e5e85912a7ee62a2d4572c05" title="Code">💻</a> <a href="https://github.com/xmanrui/dsh-im/commit/dcd7cd64d80bd246e5e85912a7ee62a2d4572c05" title="Documentation">📖</a> <a href="https://github.com/xmanrui/dsh-im/commit/dcd7cd64d80bd246e5e85912a7ee62a2d4572c05" title="Tests">⚠️</a> <a href="https://github.com/xmanrui/dsh-im/commit/dcd7cd64d80bd246e5e85912a7ee62a2d4572c05" title="Translation">🌍</a></td>
|
|
429
430
|
</tr>
|
|
@@ -4,6 +4,10 @@ dsh-im 发布可选客户端服务 `dshImClient`,供同一 DSH 客户端中的
|
|
|
4
4
|
|
|
5
5
|
The optional `dshImClient` service exposes the existing IM management panel to a shell in the same DSH client. Settings → IM bots remains available by default. No migration or new configuration is required. The host-side `dshIm` delivery service is separate.
|
|
6
6
|
|
|
7
|
+
支持插件详情操作按钮的 DSH 中,dsh-im 详情页提供「打开 IM机器人」按钮,在主区域打开同一管理面板;「返回插件详情」返回该插件。此入口依赖可选的 `layout`、`pluginNavigation` 服务及 `plugins.detail.actions` 槽位,旧版 DSH 仍可通过设置入口访问。
|
|
8
|
+
|
|
9
|
+
On DSH versions with plugin detail actions, **Open IM bots** opens the same management panel in the main area, with **Back to plugin details** returning to this plugin. This entry uses the optional `layout` and `pluginNavigation` services and the `plugins.detail.actions` slot. Older DSH versions retain the Settings entry.
|
|
10
|
+
|
|
7
11
|
```ts
|
|
8
12
|
interface DshImClient {
|
|
9
13
|
readonly version: 1;
|
package/lib/client.js
CHANGED
|
@@ -590,14 +590,14 @@ async function callManagementRpc(connection, channel7, method, payload, signal)
|
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
// plugin-src/client/index.js
|
|
593
|
-
var
|
|
593
|
+
var React38 = __toESM(require("react"), 1);
|
|
594
594
|
|
|
595
595
|
// package.json
|
|
596
596
|
var package_default = {
|
|
597
597
|
name: "@xmanrui/dsh-im",
|
|
598
|
-
version: "4.
|
|
598
|
+
version: "4.32.0",
|
|
599
599
|
icon: "./assets/logo-plugin-message-link-gradient.webp",
|
|
600
|
-
description: "\u628A\
|
|
600
|
+
description: "\u628A\u5FAE\u4FE1\u3001\u98DE\u4E66\u3001\u4F01\u5FAE\u3001\u9489\u9489\u3001QQ\u3001Telegram\u3001WhatsApp\u3001Slack\u3001Discord\u3001Matrix\u63A5\u5165DSH\u3002 Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH.",
|
|
601
601
|
keywords: [
|
|
602
602
|
"deepseek-harness",
|
|
603
603
|
"dsh",
|
|
@@ -685,6 +685,10 @@ var package_default = {
|
|
|
685
685
|
{
|
|
686
686
|
name: "Biertolovisk",
|
|
687
687
|
url: "https://github.com/rosalynthompson32-a11y"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
name: "Tianjun Cai",
|
|
691
|
+
url: "https://github.com/Pegasus02"
|
|
688
692
|
}
|
|
689
693
|
],
|
|
690
694
|
license: "MIT",
|
|
@@ -707,13 +711,15 @@ var package_default = {
|
|
|
707
711
|
exports: {
|
|
708
712
|
".": "./lib/index.js",
|
|
709
713
|
"./client": "./lib/client.js",
|
|
710
|
-
"./package.json": "./package.json"
|
|
714
|
+
"./package.json": "./package.json",
|
|
715
|
+
"./locale/*.json": "./locale/*.json"
|
|
711
716
|
},
|
|
712
717
|
files: [
|
|
713
718
|
"assets",
|
|
714
719
|
"bin",
|
|
715
720
|
"cordis.patch.yml",
|
|
716
721
|
"lib",
|
|
722
|
+
"locale/*.json",
|
|
717
723
|
"plugin-src",
|
|
718
724
|
"scripts/verify-interface-language.mjs",
|
|
719
725
|
"scripts/verify-injected-context.mjs",
|
|
@@ -773,7 +779,7 @@ var package_default = {
|
|
|
773
779
|
mailparser: "^3.9.28",
|
|
774
780
|
nodemailer: "^10.0.10",
|
|
775
781
|
qrcode: "1.5.4",
|
|
776
|
-
undici: "7.29.
|
|
782
|
+
undici: "7.29.1"
|
|
777
783
|
},
|
|
778
784
|
devDependencies: {
|
|
779
785
|
"@deepseek-ai/cordis": "4.0.1",
|
|
@@ -1251,6 +1257,8 @@ var EN = Object.freeze({
|
|
|
1251
1257
|
"\u65E0\u9700\u5B89\u88C5\u7B2C\u4E09\u65B9\u670D\u52A1\uFF1B\u8BF7\u6309\u6307\u5F15\u6388\u4E88 macOS Messages \u8BBF\u95EE\u6743\u9650\u3002": "No third-party service is required; follow the guide to grant macOS Messages access.",
|
|
1252
1258
|
"macOS Messages \u6743\u9650": "macOS Messages permissions",
|
|
1253
1259
|
"IM\u673A\u5668\u4EBA": "IM bots",
|
|
1260
|
+
"\u6253\u5F00 IM\u673A\u5668\u4EBA": "Open IM bots",
|
|
1261
|
+
"\u8FD4\u56DE\u63D2\u4EF6\u8BE6\u60C5": "Back to plugin details",
|
|
1254
1262
|
"IM\u673A\u5668\u4EBA\u8BBE\u7F6E": "IM bot settings",
|
|
1255
1263
|
"IM \u9762\u677F\u52A0\u8F7D\u5931\u8D25": "Could not load the IM panel",
|
|
1256
1264
|
"\u66F4\u591A\u673A\u5668\u4EBA\u8BBE\u7F6E": "More bot settings",
|
|
@@ -1627,6 +1635,10 @@ var EN = Object.freeze({
|
|
|
1627
1635
|
"\u67E5\u770B\u79C1\u804A\u8BDD\u9898\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E": "View direct topic ID field details",
|
|
1628
1636
|
"\u8BE5\u5B57\u6BB5\u4E0D\u662F\u6BCF\u4E2A\u6E20\u9053\u90FD\u80FD\u63D0\u4F9B\u3002\u98DE\u4E66\u8BDD\u9898\u7FA4\u7684\u6D88\u606F\u4F1A\u5E26\u4E0A\u8BDD\u9898 ID\uFF0C\u7528\u4E8E\u533A\u5206\u540C\u4E00\u7FA4\u7EC4\u5185\u7684\u4E0D\u540C\u8BDD\u9898\uFF1B\u5F53\u524D\u6D88\u606F\u4E0D\u5728\u8BDD\u9898\u4E2D\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 threadId\u3002": "This field is not available on every channel. Messages in a Feishu topic chat carry the topic ID, which distinguishes different topics inside the same group. If the current message is not inside a topic, <dsh_im_source> omits threadId even when the field is selected.",
|
|
1629
1637
|
"\u673A\u5668\u4EBA\u6807\u8BC6": "Bot ID",
|
|
1638
|
+
"\u53D1\u9001\u65F6\u95F4": "Sent at",
|
|
1639
|
+
"\u67E5\u770B\u7FA4\u804A\u53D1\u9001\u65F6\u95F4\u5B57\u6BB5\u8BF4\u660E": "View group sent-at field details",
|
|
1640
|
+
"\u67E5\u770B\u79C1\u804A\u53D1\u9001\u65F6\u95F4\u5B57\u6BB5\u8BF4\u660E": "View direct sent-at field details",
|
|
1641
|
+
"\u5F53\u524D\u6D88\u606F\u7684\u53D1\u9001\u65F6\u95F4\uFF0C\u683C\u5F0F\u4E3A YYYY-MM-DD HH:mm:ss\uFF08\u672C\u673A\u65F6\u533A\uFF09\u3002\u4F18\u5148\u4F7F\u7528\u5E73\u53F0\u7ED9\u51FA\u7684\u53D1\u9001\u65F6\u95F4\uFF1B\u5E73\u53F0\u672A\u63D0\u4F9B\u65F6\uFF0C\u4ECE\u5FAE\u4FE1\u6D88\u606F ID \u4E2D\u89E3\u6790\u51FA\u53D1\u9001\u65F6\u95F4\uFF1B\u4E24\u8005\u90FD\u4E0D\u53EF\u7528\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 sentAt\u3002\u76EE\u524D\u4EC5\u5FAE\u4FE1\u6E20\u9053\u63D0\u4F9B\uFF1B\u628A\u672C\u673A\u65F6\u533A\u5199\u8FDB\u589E\u5F3A\u63D0\u793A\u8BCD\uFF0C\u6A21\u578B\u5224\u65AD\u5148\u540E\u987A\u5E8F\u65F6\u66F4\u51C6\u786E\u3002": "When the current message was sent, as YYYY-MM-DD HH:mm:ss in the local time zone. The platform send time is used when available; otherwise the send time is decoded from the WeChat message ID. If neither is available, <dsh_im_source> omits sentAt even when the field is selected. WeChat is the only channel that provides it today. Naming your time zone in the guidance makes ordering judgements more accurate.",
|
|
1630
1642
|
"\u589E\u5F3A\u63D0\u793A\u8BCD": "Guidance",
|
|
1631
1643
|
"\u67E5\u770B\u589E\u5F3A\u63D0\u793A\u8BCD\u4F7F\u7528\u8BF4\u660E": "View guidance instructions",
|
|
1632
1644
|
"\u67E5\u770B\u7FA4\u804A\u589E\u5F3A\u63D0\u793A\u8BCD\u4F7F\u7528\u8BF4\u660E": "View group guidance instructions",
|
|
@@ -1653,7 +1665,7 @@ var EN = Object.freeze({
|
|
|
1653
1665
|
"\u4E0A\u4E0B\u6587\u589E\u5F3A\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002": "Could not save context enhancement. Try again.",
|
|
1654
1666
|
"\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002": "Submit the complete context enhancement settings.",
|
|
1655
1667
|
"\u7FA4\u804A\u548C\u79C1\u804A\u5F00\u5173\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002": "Group and direct switches must be booleans.",
|
|
1656
|
-
"\u6765\u6E90\u5B57\u6BB5\u53EA\u80FD\u9009\u62E9\u5DF2\u5B9A\u4E49\u7684\
|
|
1668
|
+
"\u6765\u6E90\u5B57\u6BB5\u53EA\u80FD\u9009\u62E9\u5DF2\u5B9A\u4E49\u7684\u5B57\u6BB5\u3002": "Source fields must be chosen from the defined fields.",
|
|
1657
1669
|
"\u4FDD\u5B58\u4E2D\u2026": "Saving\u2026",
|
|
1658
1670
|
"\u672A\u8BBE\u7F6E": "Not set",
|
|
1659
1671
|
"\u5DE5\u4F5C\u533A\u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002": "Could not update the workspace. Try again.",
|
|
@@ -3476,7 +3488,8 @@ var CONTEXT_ENHANCEMENT_FIELDS = Object.freeze([
|
|
|
3476
3488
|
"conversationTitle",
|
|
3477
3489
|
"chatId",
|
|
3478
3490
|
"threadId",
|
|
3479
|
-
"botId"
|
|
3491
|
+
"botId",
|
|
3492
|
+
"sentAt"
|
|
3480
3493
|
]);
|
|
3481
3494
|
var INJECTED_CONTEXT_TAGS = Object.freeze({
|
|
3482
3495
|
sourceOpen: "<dsh_im_source>",
|
|
@@ -3523,7 +3536,7 @@ function validateContextEnhancementScope(input) {
|
|
|
3523
3536
|
throw invalidConfig("\u7FA4\u804A\u548C\u79C1\u804A\u5F00\u5173\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");
|
|
3524
3537
|
}
|
|
3525
3538
|
if (!Array.isArray(fields) || ![...fields].every((field2) => CONTEXT_ENHANCEMENT_FIELDS.includes(field2))) {
|
|
3526
|
-
throw invalidConfig("\u6765\u6E90\u5B57\u6BB5\u53EA\u80FD\u9009\u62E9\u5DF2\u5B9A\u4E49\u7684\
|
|
3539
|
+
throw invalidConfig("\u6765\u6E90\u5B57\u6BB5\u53EA\u80FD\u9009\u62E9\u5DF2\u5B9A\u4E49\u7684\u5B57\u6BB5\u3002");
|
|
3527
3540
|
}
|
|
3528
3541
|
if (typeof guidance !== "string" || guidance.length > CONTEXT_ENHANCEMENT_GUIDANCE_MAX_LENGTH) {
|
|
3529
3542
|
throw invalidConfig(`\u589E\u5F3A\u63D0\u793A\u8BCD\u4E0D\u5F97\u8D85\u8FC7 ${CONTEXT_ENHANCEMENT_GUIDANCE_MAX_LENGTH} \u4E2A\u5B57\u7B26\u3002`);
|
|
@@ -4857,7 +4870,8 @@ var FIELD_LABELS = Object.freeze({
|
|
|
4857
4870
|
conversationTitle: "\u4F1A\u8BDD\u6807\u9898",
|
|
4858
4871
|
chatId: "\u4F1A\u8BDD\u6807\u8BC6",
|
|
4859
4872
|
threadId: "\u8BDD\u9898\u6807\u8BC6",
|
|
4860
|
-
botId: "\u673A\u5668\u4EBA\u6807\u8BC6"
|
|
4873
|
+
botId: "\u673A\u5668\u4EBA\u6807\u8BC6",
|
|
4874
|
+
sentAt: "\u53D1\u9001\u65F6\u95F4"
|
|
4861
4875
|
});
|
|
4862
4876
|
var FIELD_HELP = Object.freeze({
|
|
4863
4877
|
senderName: Object.freeze({
|
|
@@ -4875,6 +4889,10 @@ var FIELD_HELP = Object.freeze({
|
|
|
4875
4889
|
threadId: Object.freeze({
|
|
4876
4890
|
labelKey: "threadIdHelpLabel",
|
|
4877
4891
|
text: "\u8BE5\u5B57\u6BB5\u4E0D\u662F\u6BCF\u4E2A\u6E20\u9053\u90FD\u80FD\u63D0\u4F9B\u3002\u98DE\u4E66\u8BDD\u9898\u7FA4\u7684\u6D88\u606F\u4F1A\u5E26\u4E0A\u8BDD\u9898 ID\uFF0C\u7528\u4E8E\u533A\u5206\u540C\u4E00\u7FA4\u7EC4\u5185\u7684\u4E0D\u540C\u8BDD\u9898\uFF1B\u5F53\u524D\u6D88\u606F\u4E0D\u5728\u8BDD\u9898\u4E2D\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 threadId\u3002"
|
|
4892
|
+
}),
|
|
4893
|
+
sentAt: Object.freeze({
|
|
4894
|
+
labelKey: "sentAtHelpLabel",
|
|
4895
|
+
text: "\u5F53\u524D\u6D88\u606F\u7684\u53D1\u9001\u65F6\u95F4\uFF0C\u683C\u5F0F\u4E3A YYYY-MM-DD HH:mm:ss\uFF08\u672C\u673A\u65F6\u533A\uFF09\u3002\u4F18\u5148\u4F7F\u7528\u5E73\u53F0\u7ED9\u51FA\u7684\u53D1\u9001\u65F6\u95F4\uFF1B\u5E73\u53F0\u672A\u63D0\u4F9B\u65F6\uFF0C\u4ECE\u5FAE\u4FE1\u6D88\u606F ID \u4E2D\u89E3\u6790\u51FA\u53D1\u9001\u65F6\u95F4\uFF1B\u4E24\u8005\u90FD\u4E0D\u53EF\u7528\u65F6\uFF0C\u5373\u4F7F\u5DF2\u9009\u62E9\u8BE5\u5B57\u6BB5\uFF0C<dsh_im_source> \u4E2D\u4E5F\u4F1A\u7701\u7565 sentAt\u3002\u76EE\u524D\u4EC5\u5FAE\u4FE1\u6E20\u9053\u63D0\u4F9B\uFF1B\u628A\u672C\u673A\u65F6\u533A\u5199\u8FDB\u589E\u5F3A\u63D0\u793A\u8BCD\uFF0C\u6A21\u578B\u5224\u65AD\u5148\u540E\u987A\u5E8F\u65F6\u66F4\u51C6\u786E\u3002"
|
|
4878
4896
|
})
|
|
4879
4897
|
});
|
|
4880
4898
|
var SCOPE_COPY = Object.freeze({
|
|
@@ -4886,6 +4904,7 @@ var SCOPE_COPY = Object.freeze({
|
|
|
4886
4904
|
conversationTitleHelpLabel: "\u67E5\u770B\u7FA4\u804A\u4F1A\u8BDD\u6807\u9898\u5B57\u6BB5\u8BF4\u660E",
|
|
4887
4905
|
chatIdHelpLabel: "\u67E5\u770B\u7FA4\u804A\u4F1A\u8BDD\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E",
|
|
4888
4906
|
threadIdHelpLabel: "\u67E5\u770B\u7FA4\u804A\u8BDD\u9898\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E",
|
|
4907
|
+
sentAtHelpLabel: "\u67E5\u770B\u7FA4\u804A\u53D1\u9001\u65F6\u95F4\u5B57\u6BB5\u8BF4\u660E",
|
|
4889
4908
|
guidanceLabel: "\u589E\u5F3A\u63D0\u793A\u8BCD",
|
|
4890
4909
|
guidanceHelpLabel: "\u67E5\u770B\u7FA4\u804A\u589E\u5F3A\u63D0\u793A\u8BCD\u4F7F\u7528\u8BF4\u660E",
|
|
4891
4910
|
guidanceUsage: "\u7528\u4E8E\u544A\u8BC9\u6A21\u578B\u5982\u4F55\u4F7F\u7528\u5F53\u524D\u7FA4\u804A\u6D88\u606F\u7684 <dsh_im_source> \u6765\u6E90\u5B57\u6BB5\u3002\u53EA\u586B\u5199\u6B63\u6587\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u6DFB\u52A0 <dsh_im_source_guidance> \u6210\u5BF9\u6807\u7B7E\u3002",
|
|
@@ -4899,6 +4918,7 @@ var SCOPE_COPY = Object.freeze({
|
|
|
4899
4918
|
conversationTitleHelpLabel: "\u67E5\u770B\u79C1\u804A\u4F1A\u8BDD\u6807\u9898\u5B57\u6BB5\u8BF4\u660E",
|
|
4900
4919
|
chatIdHelpLabel: "\u67E5\u770B\u79C1\u804A\u4F1A\u8BDD\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E",
|
|
4901
4920
|
threadIdHelpLabel: "\u67E5\u770B\u79C1\u804A\u8BDD\u9898\u6807\u8BC6\u5B57\u6BB5\u8BF4\u660E",
|
|
4921
|
+
sentAtHelpLabel: "\u67E5\u770B\u79C1\u804A\u53D1\u9001\u65F6\u95F4\u5B57\u6BB5\u8BF4\u660E",
|
|
4902
4922
|
guidanceLabel: "\u589E\u5F3A\u63D0\u793A\u8BCD",
|
|
4903
4923
|
guidanceHelpLabel: "\u67E5\u770B\u79C1\u804A\u589E\u5F3A\u63D0\u793A\u8BCD\u4F7F\u7528\u8BF4\u660E",
|
|
4904
4924
|
guidanceUsage: "\u7528\u4E8E\u544A\u8BC9\u6A21\u578B\u5982\u4F55\u4F7F\u7528\u5F53\u524D\u79C1\u804A\u6D88\u606F\u7684 <dsh_im_source> \u6765\u6E90\u5B57\u6BB5\u3002\u53EA\u586B\u5199\u6B63\u6587\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u6DFB\u52A0 <dsh_im_source_guidance> \u6210\u5BF9\u6807\u7B7E\u3002",
|
|
@@ -19220,6 +19240,15 @@ function replacePageLocation(url, location = globalThis.location) {
|
|
|
19220
19240
|
// plugin-src/client/styles.js
|
|
19221
19241
|
var IM_STYLE_ID = "xmanrui-dsh-im-settings";
|
|
19222
19242
|
var CSS15 = String.raw`
|
|
19243
|
+
.dim-pluginOpen { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 14px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 8px; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-bg-layer-1, #fff); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
|
|
19244
|
+
.dim-pluginOpen:hover { background: var(--dsw-alias-interactive-bg-hover, #f7f8fa); }
|
|
19245
|
+
.dim-pluginOpen:focus-visible, .dim-pluginBack:focus-visible { outline: 2px solid var(--dsw-alias-state-business-primary, #3370ff); outline-offset: 3px; }
|
|
19246
|
+
.dim-pluginPage { height: 100%; min-height: 0; overflow: auto; box-sizing: border-box; padding: 24px clamp(16px, 4vw, 48px) 32px; color: var(--dsw-alias-label-primary, #1f2329); }
|
|
19247
|
+
.dim-pluginPageContent { max-width: 1080px; margin: 0 auto; }
|
|
19248
|
+
.dim-pluginBack { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin: 0 0 24px; padding: 6px 8px; border: 0; border-radius: 8px; color: var(--dsw-alias-label-secondary, #646a73); background: transparent; font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
|
|
19249
|
+
.dim-pluginBack:hover { color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-interactive-bg-hover, #f7f8fa); }
|
|
19250
|
+
.dim-pluginBack > span { font-size: 22px; line-height: 20px; }
|
|
19251
|
+
@media (pointer: coarse) { .dim-pluginOpen, .dim-pluginBack { min-height: 44px; } }
|
|
19223
19252
|
.dim-connectionDiagnostic { min-width: 0; width: 100%; color: var(--dsw-alias-label-secondary, #646a73); overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
|
|
19224
19253
|
.dim-connectionDiagnostic[data-warning="true"] { color: var(--dsw-alias-state-warn-primary, #d97706); }
|
|
19225
19254
|
.dim-connectionDiagnostic p { margin: 4px 0; }
|
|
@@ -20807,6 +20836,66 @@ var IMPanelErrorBoundary = class extends React36.Component {
|
|
|
20807
20836
|
}
|
|
20808
20837
|
};
|
|
20809
20838
|
|
|
20839
|
+
// plugin-src/client/plugin-page.js
|
|
20840
|
+
var React37 = __toESM(require("react"), 1);
|
|
20841
|
+
var IM_MAIN_PANEL_ID = "xmanrui-dsh-im";
|
|
20842
|
+
var h3 = React37.createElement;
|
|
20843
|
+
function OpenImAction({ subject, packageName, onOpen, t }) {
|
|
20844
|
+
if (subject?.kind !== "bundle" && subject?.kind !== "row") return null;
|
|
20845
|
+
if (subject.pkg?.name !== packageName) return null;
|
|
20846
|
+
if (subject.kind === "row" && subject.row?.moduleName !== packageName) return null;
|
|
20847
|
+
return h3("button", {
|
|
20848
|
+
type: "button",
|
|
20849
|
+
className: "dim-pluginOpen",
|
|
20850
|
+
onClick: onOpen
|
|
20851
|
+
}, t("\u6253\u5F00 IM\u673A\u5668\u4EBA"));
|
|
20852
|
+
}
|
|
20853
|
+
function ImPluginPage({ renderPanel, onBack, t }) {
|
|
20854
|
+
return h3(
|
|
20855
|
+
"div",
|
|
20856
|
+
{ className: "dim-pluginPage" },
|
|
20857
|
+
h3(
|
|
20858
|
+
"div",
|
|
20859
|
+
{ className: "dim-pluginPageContent" },
|
|
20860
|
+
h3(
|
|
20861
|
+
"button",
|
|
20862
|
+
{ type: "button", className: "dim-pluginBack", onClick: onBack },
|
|
20863
|
+
h3("span", { "aria-hidden": true }, "\u2039"),
|
|
20864
|
+
t("\u8FD4\u56DE\u63D2\u4EF6\u8BE6\u60C5")
|
|
20865
|
+
),
|
|
20866
|
+
renderPanel()
|
|
20867
|
+
)
|
|
20868
|
+
);
|
|
20869
|
+
}
|
|
20870
|
+
function installImPluginPage(ctx, { packageName, renderPanel }) {
|
|
20871
|
+
if (typeof ctx.inject !== "function") return;
|
|
20872
|
+
ctx.inject(["layout", "pluginNavigation"], (pageCtx) => pageCtx.slots.inject("main", () => {
|
|
20873
|
+
const unregisterPage = pageCtx.slots.register({
|
|
20874
|
+
name: "main",
|
|
20875
|
+
key: IM_MAIN_PANEL_ID,
|
|
20876
|
+
locale: IM_LOCALE_NAMESPACE,
|
|
20877
|
+
inject: () => ({
|
|
20878
|
+
renderPanel,
|
|
20879
|
+
onBack: () => pageCtx.pluginNavigation.openBundle(packageName)
|
|
20880
|
+
})
|
|
20881
|
+
}, ImPluginPage);
|
|
20882
|
+
const stopActions = pageCtx.slots.inject("plugins.detail.actions", () => pageCtx.slots.register({
|
|
20883
|
+
name: "plugins.detail.actions",
|
|
20884
|
+
id: "xmanrui-dsh-im-open",
|
|
20885
|
+
order: 20,
|
|
20886
|
+
locale: IM_LOCALE_NAMESPACE,
|
|
20887
|
+
inject: () => ({
|
|
20888
|
+
packageName,
|
|
20889
|
+
onOpen: () => pageCtx.layout.selectPanel(IM_MAIN_PANEL_ID)
|
|
20890
|
+
})
|
|
20891
|
+
}, OpenImAction));
|
|
20892
|
+
return () => {
|
|
20893
|
+
stopActions();
|
|
20894
|
+
unregisterPage();
|
|
20895
|
+
};
|
|
20896
|
+
}));
|
|
20897
|
+
}
|
|
20898
|
+
|
|
20810
20899
|
// plugin-src/client/index.js
|
|
20811
20900
|
var name = "im-settings";
|
|
20812
20901
|
var inject = ["slots", "connection", "locale", "workspaces"];
|
|
@@ -20981,28 +21070,28 @@ function IMSettingsTab({
|
|
|
20981
21070
|
browserLocation = globalThis.location,
|
|
20982
21071
|
navigateToRecoveryUrl = replacePageLocation
|
|
20983
21072
|
}) {
|
|
20984
|
-
const [selected, setSelected] =
|
|
20985
|
-
const [loopbackRecovery, setLoopbackRecovery] =
|
|
20986
|
-
const [runningVersion, setRunningVersion] =
|
|
20987
|
-
const [deliverySettings, setDeliverySettings] =
|
|
21073
|
+
const [selected, setSelected] = React38.useState(() => preferredSectionId === GLOBAL_SETTINGS_TAB_ID || CHANNELS.some((channel7) => channel7.id === preferredSectionId) ? preferredSectionId : "weixin");
|
|
21074
|
+
const [loopbackRecovery, setLoopbackRecovery] = React38.useState(null);
|
|
21075
|
+
const [runningVersion, setRunningVersion] = React38.useState(IM_PLUGIN_VERSION);
|
|
21076
|
+
const [deliverySettings, setDeliverySettings] = React38.useState(null);
|
|
20988
21077
|
const emailEnabled = useEmailChannelEnabled(emailRpcCall);
|
|
20989
|
-
const visibleChannels =
|
|
21078
|
+
const visibleChannels = React38.useMemo(
|
|
20990
21079
|
() => CHANNELS.filter((channel7) => channel7.id !== "email" || emailEnabled),
|
|
20991
21080
|
[emailEnabled]
|
|
20992
21081
|
);
|
|
20993
|
-
const githubTooltipId =
|
|
20994
|
-
const generalSettingsTooltipId =
|
|
21082
|
+
const githubTooltipId = React38.useId();
|
|
21083
|
+
const generalSettingsTooltipId = React38.useId();
|
|
20995
21084
|
const globalSettingsSelected = selected === GLOBAL_SETTINGS_TAB_ID;
|
|
20996
21085
|
const active = visibleChannels.find((channel7) => channel7.id === selected) ?? visibleChannels[0];
|
|
20997
21086
|
const activeTabId = globalSettingsSelected ? "dim-general-settings-trigger" : `dim-tab-${active.id}`;
|
|
20998
21087
|
const activePanelId = globalSettingsSelected ? `dim-panel-${GLOBAL_SETTINGS_TAB_ID}` : `dim-panel-${active.id}`;
|
|
20999
|
-
const reportLoopbackRecovery =
|
|
21088
|
+
const reportLoopbackRecovery = React38.useCallback((recovery) => {
|
|
21000
21089
|
setLoopbackRecovery((current) => current?.url === recovery.url ? current : recovery);
|
|
21001
21090
|
}, []);
|
|
21002
|
-
const reportUpdateStatus =
|
|
21091
|
+
const reportUpdateStatus = React38.useCallback((snapshot) => {
|
|
21003
21092
|
setRunningVersion(snapshot.runningVersion);
|
|
21004
21093
|
}, []);
|
|
21005
|
-
const rpcCalls =
|
|
21094
|
+
const rpcCalls = React38.useMemo(() => createLoopbackAwareRpcCalls({
|
|
21006
21095
|
dingtalkRpcCall,
|
|
21007
21096
|
discordRpcCall,
|
|
21008
21097
|
feishuRpcCall,
|
|
@@ -21044,7 +21133,7 @@ function IMSettingsTab({
|
|
|
21044
21133
|
weixinRpcCall,
|
|
21045
21134
|
whatsappRpcCall
|
|
21046
21135
|
]);
|
|
21047
|
-
const botSettingsContext =
|
|
21136
|
+
const botSettingsContext = React38.useMemo(() => Object.freeze({
|
|
21048
21137
|
openBotSettings: setDeliverySettings
|
|
21049
21138
|
}), []);
|
|
21050
21139
|
return h2(
|
|
@@ -21268,7 +21357,7 @@ function apply(ctx) {
|
|
|
21268
21357
|
};
|
|
21269
21358
|
const localeSnapshot = () => ctx.locale.getLocale?.()?.active ?? "";
|
|
21270
21359
|
function IMPanel({ preferredSectionId }) {
|
|
21271
|
-
|
|
21360
|
+
React38.useSyncExternalStore(subscribeLocale, localeSnapshot, localeSnapshot);
|
|
21272
21361
|
return h2(
|
|
21273
21362
|
IMPanelErrorBoundary,
|
|
21274
21363
|
null,
|
|
@@ -21278,6 +21367,7 @@ function apply(ctx) {
|
|
|
21278
21367
|
const buildPanelElement = (props = {}) => h2(IMPanel, {
|
|
21279
21368
|
preferredSectionId: props.preferredSectionId
|
|
21280
21369
|
});
|
|
21370
|
+
installImPluginPage(ctx, { packageName: package_default.name, renderPanel: buildPanelElement });
|
|
21281
21371
|
ctx.effect(() => {
|
|
21282
21372
|
let disposed = false;
|
|
21283
21373
|
let stopSettings = null;
|