@michengai/dsh-im-connect 1.0.32 → 1.0.34
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 +14 -0
- package/CHANGELOG.zh-CN.md +14 -0
- package/README.de.md +3 -1
- package/README.en.md +3 -1
- package/README.es.md +3 -1
- package/README.fr.md +3 -1
- package/README.ja.md +3 -1
- package/README.md +3 -1
- package/README.pt.md +3 -1
- package/README.ru.md +3 -1
- package/README.zh-CN.md +3 -1
- package/client.js +67 -29
- package/lib/client.js +67 -29
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.34] - 2026-11-09
|
|
4
|
+
|
|
5
|
+
### Mobile sidebar interaction & channel session routing improvements
|
|
6
|
+
|
|
7
|
+
- Fix session opening from inserted channel tabs on mobile: clicking an IM channel session row in mobile drawers or external sidebar shells now properly restores and switches into the IM conversation, instead of falling back to a regular task session (#65).
|
|
8
|
+
- Fix duplicate icon display in mobile drawer navigation: when viewing sidebar shortcuts within mobile drawer sheets, the IM assistant entry cleanly displays its single icon with natural spacing, avoiding duplicate icon rendering.
|
|
9
|
+
|
|
10
|
+
## [1.0.33] - 2026-11-09
|
|
11
|
+
|
|
12
|
+
### Clean header navigation & documentation streamlining
|
|
13
|
+
|
|
14
|
+
- Two-tier navigation layout: split the README header links into two clean rows — the top row focuses on 8-language switching, while the second row clearly presents the Changelog and License.
|
|
15
|
+
- Prune internal handover links: remove internal development handover links from public documentation for a cleaner and more professional presentation.
|
|
16
|
+
|
|
3
17
|
## [1.0.32] - 2026-11-09
|
|
4
18
|
|
|
5
19
|
### Full multi-language README documentation & language navigation
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.0.34] - 2026-11-09
|
|
4
|
+
|
|
5
|
+
### 移动端侧栏交互与频道会话打开体验优化
|
|
6
|
+
|
|
7
|
+
- 修复移动端下频道会话点击无法进入的问题:在手机端或抽屉外壳中展开「频道」页签时,点击任意即时通讯会话行,能够准确唤起并进入对应的通讯对话,不再被误当成普通任务会话(#65)。
|
|
8
|
+
- 修复移动端抽屉下侧栏快捷入口显示双图标的问题:在移动端或浮层抽屉中展开左侧导航时,即时通讯管理入口恢复单枚专属图标与自然文字间距,不再重复渲染两个图标。
|
|
9
|
+
|
|
10
|
+
## [1.0.33] - 2026-11-09
|
|
11
|
+
|
|
12
|
+
### 文档导航布局优化与内部入口精简
|
|
13
|
+
|
|
14
|
+
- 导航栏分排排布:将 README 顶部的多语言切换链接与文档入口拆分为两排,第一排专注 8 门语言快速切换,第二排独立展示更新日志与开源协议。
|
|
15
|
+
- 精简内部迭代链接:移除仅供开发阶段使用的历史迭代交接入口,保持对外文档的纯净与专业。
|
|
16
|
+
|
|
3
17
|
## [1.0.32] - 2026-11-09
|
|
4
18
|
|
|
5
19
|
### 全语言 README 使用手册与导航互链
|
package/README.de.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
**Verbinden Sie Feishu, Lark, DingTalk, WeCom, WeChat, QQ, Telegram, Discord und Slack mit Ihrem lokalen DeepSeek Harness-Agenten**
|
|
10
10
|
|
|
11
|
-
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
11
|
+
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
12
|
+
|
|
13
|
+
[Änderungsprotokoll](CHANGELOG.md) · [Lizenz](LICENSE)
|
|
12
14
|
|
|
13
15
|
[](LICENSE)
|
|
14
16
|
[](https://www.npmjs.com/package/@michengai/dsh-im-connect)
|
package/README.en.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
**Connect Feishu, Lark, DingTalk, WeCom, WeChat, QQ, Telegram, Discord, and Slack to local DeepSeek Harness**
|
|
10
10
|
|
|
11
|
-
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
11
|
+
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
12
|
+
|
|
13
|
+
[Changelog](CHANGELOG.md) · [License](LICENSE)
|
|
12
14
|
|
|
13
15
|
[](LICENSE)
|
|
14
16
|
[](https://www.npmjs.com/package/@michengai/dsh-im-connect)
|
package/README.es.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
**Conecte Feishu, Lark, DingTalk, WeCom, WeChat, QQ, Telegram, Discord y Slack a su instancia local de DeepSeek Harness**
|
|
10
10
|
|
|
11
|
-
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
11
|
+
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
12
|
+
|
|
13
|
+
[Registro de cambios](CHANGELOG.md) · [Licencia](LICENSE)
|
|
12
14
|
|
|
13
15
|
[](LICENSE)
|
|
14
16
|
[](https://www.npmjs.com/package/@michengai/dsh-im-connect)
|
package/README.fr.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
**Connectez Feishu, Lark, DingTalk, WeCom, WeChat, QQ, Telegram, Discord et Slack à votre agent local DeepSeek Harness**
|
|
10
10
|
|
|
11
|
-
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
11
|
+
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
12
|
+
|
|
13
|
+
[Journal des modifications](CHANGELOG.md) · [Licence](LICENSE)
|
|
12
14
|
|
|
13
15
|
[](LICENSE)
|
|
14
16
|
[](https://www.npmjs.com/package/@michengai/dsh-im-connect)
|
package/README.ja.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
**Feishu、Lark、DingTalk、WeCom、WeChat、QQ、Telegram、Discord、Slack をローカルの DeepSeek Harness に接続**
|
|
10
10
|
|
|
11
|
-
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
11
|
+
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
12
|
+
|
|
13
|
+
[更新履歴](CHANGELOG.md) · [ライセンス](LICENSE)
|
|
12
14
|
|
|
13
15
|
[](LICENSE)
|
|
14
16
|
[](https://www.npmjs.com/package/@michengai/dsh-im-connect)
|
package/README.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
**把飞书、Lark、钉钉、企业微信、微信、QQ、Telegram、Discord、Slack 接到本机 DeepSeek Harness**
|
|
10
10
|
|
|
11
|
-
[English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
11
|
+
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
12
|
+
|
|
13
|
+
[更新日志](CHANGELOG.zh-CN.md) · [开源协议](LICENSE)
|
|
12
14
|
|
|
13
15
|
[](LICENSE)
|
|
14
16
|
[](https://www.npmjs.com/package/@michengai/dsh-im-connect)
|
package/README.pt.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
**Conecte Feishu, Lark, DingTalk, WeCom, WeChat, QQ, Telegram, Discord e Slack à sua instância local do DeepSeek Harness**
|
|
10
10
|
|
|
11
|
-
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
11
|
+
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
12
|
+
|
|
13
|
+
[Notas de versão](CHANGELOG.md) · [Licença](LICENSE)
|
|
12
14
|
|
|
13
15
|
[](LICENSE)
|
|
14
16
|
[](https://www.npmjs.com/package/@michengai/dsh-im-connect)
|
package/README.ru.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
**Подключение Feishu, Lark, DingTalk, WeCom, WeChat, QQ, Telegram, Discord и Slack к локальному агенту DeepSeek Harness**
|
|
10
10
|
|
|
11
|
-
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
11
|
+
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
12
|
+
|
|
13
|
+
[История изменений](CHANGELOG.md) · [Лицензия](LICENSE)
|
|
12
14
|
|
|
13
15
|
[](LICENSE)
|
|
14
16
|
[](https://www.npmjs.com/package/@michengai/dsh-im-connect)
|
package/README.zh-CN.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
**把飞书、Lark、钉钉、企业微信、微信、QQ、Telegram、Discord、Slack 接到本机 DeepSeek Harness**
|
|
10
10
|
|
|
11
|
-
[English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
11
|
+
[简体中文](README.zh-CN.md) · [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
12
|
+
|
|
13
|
+
[更新日志](CHANGELOG.zh-CN.md) · [开源协议](LICENSE)
|
|
12
14
|
|
|
13
15
|
[](LICENSE)
|
|
14
16
|
[](https://www.npmjs.com/package/@michengai/dsh-im-connect)
|
package/client.js
CHANGED
|
@@ -5787,6 +5787,18 @@ window.__ModuleLoader__.load({
|
|
|
5787
5787
|
}
|
|
5788
5788
|
}
|
|
5789
5789
|
|
|
5790
|
+
function createImSessionOpener(registry, hostOpen, getSessionById) {
|
|
5791
|
+
return (id) => {
|
|
5792
|
+
if (registry && Array.isArray(registry.sessionOpeners)
|
|
5793
|
+
&& registry.sessionOpeners.some((item) => item && item.id === "im-connect")) {
|
|
5794
|
+
openRegisteredSession(id, registry, hostOpen);
|
|
5795
|
+
return;
|
|
5796
|
+
}
|
|
5797
|
+
const byId = typeof getSessionById === "function" ? getSessionById() : getSessionById;
|
|
5798
|
+
openListedSession(resolveHostSessionId(id, byId), hostOpen);
|
|
5799
|
+
};
|
|
5800
|
+
}
|
|
5801
|
+
|
|
5790
5802
|
function createNativeTabRegistry(officialTree) {
|
|
5791
5803
|
const tabs = new Map();
|
|
5792
5804
|
const sessionFilters = [];
|
|
@@ -5926,18 +5938,10 @@ window.__ModuleLoader__.load({
|
|
|
5926
5938
|
previousCurrentId.current = followed.previousId;
|
|
5927
5939
|
if (followed.tab) setTab(followed.tab);
|
|
5928
5940
|
}, [currentId, extraTabs, membershipRevision]);
|
|
5929
|
-
const hostOpen = props.openSession
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
const openSession = (id) => {
|
|
5934
|
-
if (nativeTabs && Array.isArray(nativeTabs.sessionOpeners)
|
|
5935
|
-
&& nativeTabs.sessionOpeners.some((item) => item && item.id === "im-connect")) {
|
|
5936
|
-
openRegisteredSession(id, nativeTabs, hostOpen);
|
|
5937
|
-
return;
|
|
5938
|
-
}
|
|
5939
|
-
openListed(id);
|
|
5940
|
-
};
|
|
5941
|
+
const hostOpen = typeof props.openSession === "function"
|
|
5942
|
+
? props.openSession
|
|
5943
|
+
: (typeof props.open === "function" ? props.open : undefined);
|
|
5944
|
+
const openSession = createImSessionOpener(nativeTabs, hostOpen, sessionById);
|
|
5941
5945
|
const safeExpandSidebar = useCallback(() => {}, []);
|
|
5942
5946
|
const rawUseWorkspaceShortcuts = typeof props.useWorkspaceShortcuts === "function" ? props.useWorkspaceShortcuts : undefined;
|
|
5943
5947
|
const useIsolatedWorkspaceShortcuts = useCallback((select, equals) => {
|
|
@@ -6612,7 +6616,7 @@ window.__ModuleLoader__.load({
|
|
|
6612
6616
|
const QUEUE_ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="black" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round">${QUEUE_ICON_PATHS}</svg>`;
|
|
6613
6617
|
const QUEUE_ICON_MASK = `url("data:image/svg+xml,${encodeURIComponent(QUEUE_ICON_SVG)}")`;
|
|
6614
6618
|
|
|
6615
|
-
const NAV_ICON_CSS = `[${NAV_ICON_MARKER}]>svg{display:none!important}[${NAV_ICON_MARKER}]::before{content:'';flex:none;width:16px;height:16px;background-color:currentColor;-webkit-mask:${QUEUE_ICON_MASK} center/contain no-repeat;mask:${QUEUE_ICON_MASK} center/contain no-repeat;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:16px 16px;mask-size:16px 16px}`;
|
|
6619
|
+
const NAV_ICON_CSS = `[${NAV_ICON_MARKER}]>svg{display:none!important}[${NAV_ICON_MARKER}]::before{content:'';flex:none;width:16px;height:16px;background-color:currentColor;-webkit-mask:${QUEUE_ICON_MASK} center/contain no-repeat;mask:${QUEUE_ICON_MASK} center/contain no-repeat;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:16px 16px;mask-size:16px 16px}.dcu-sb-row[${NAV_ICON_MARKER}]::before{content:none!important}`;
|
|
6616
6620
|
|
|
6617
6621
|
function ensureNavIconStyle(doc) {
|
|
6618
6622
|
const targetDoc = doc || (typeof document !== "undefined" ? document : null);
|
|
@@ -6635,6 +6639,20 @@ window.__ModuleLoader__.load({
|
|
|
6635
6639
|
return String(label ?? "").trim();
|
|
6636
6640
|
}
|
|
6637
6641
|
|
|
6642
|
+
function isSidebarNavButton(button) {
|
|
6643
|
+
if (!button) return false;
|
|
6644
|
+
if (typeof button.matches === "function") {
|
|
6645
|
+
if (button.matches('.dcu-sb-row, [data-dcu-panel-id], button[class*="panelRow"]')) return true;
|
|
6646
|
+
}
|
|
6647
|
+
if (typeof button.closest === "function") {
|
|
6648
|
+
if (button.closest('.dcu-sidebar-nav-root, .dcu-sb-root, [data-dcu-managed], [data-dcu-sidebar-active], [data-slot="sidebar"], div[class*="SidebarRoot_root"]')) return true;
|
|
6649
|
+
}
|
|
6650
|
+
const cls = String(button.className || "");
|
|
6651
|
+
if (cls.includes("dcu-sb-row") || cls.includes("panelRow")) return true;
|
|
6652
|
+
if (typeof button.hasAttribute === "function" && button.hasAttribute("data-dcu-panel-id")) return true;
|
|
6653
|
+
return false;
|
|
6654
|
+
}
|
|
6655
|
+
|
|
6638
6656
|
function isOwnNavRow(rowText, wantedLabel) {
|
|
6639
6657
|
const normRow = String(rowText ?? "").replace(/\s+/g, "").toLowerCase();
|
|
6640
6658
|
if (normRow.length === 0) return false;
|
|
@@ -6647,11 +6665,21 @@ window.__ModuleLoader__.load({
|
|
|
6647
6665
|
}
|
|
6648
6666
|
|
|
6649
6667
|
function applySettingsNavIcon(button, wantedLabel) {
|
|
6668
|
+
if (isSidebarNavButton(button)) {
|
|
6669
|
+
if (button.hasAttribute(NAV_ICON_MARKER)) {
|
|
6670
|
+
button.removeAttribute(NAV_ICON_MARKER);
|
|
6671
|
+
return true;
|
|
6672
|
+
}
|
|
6673
|
+
return false;
|
|
6674
|
+
}
|
|
6650
6675
|
const isOwn = isOwnNavRow(getNavButtonText(button), typeof wantedLabel === "function" ? wantedLabel() : wantedLabel);
|
|
6651
6676
|
if (isOwn) {
|
|
6652
|
-
const hasSlotIcon = Array.from((button && button.children) || []).some((child) =>
|
|
6653
|
-
child.tagName
|
|
6654
|
-
|
|
6677
|
+
const hasSlotIcon = Array.from((button && button.children) || []).some((child) => {
|
|
6678
|
+
if (!child || child.tagName !== "SPAN") return false;
|
|
6679
|
+
const cls = String(child.className || "");
|
|
6680
|
+
const ariaHidden = typeof child.getAttribute === "function" ? child.getAttribute("aria-hidden") : null;
|
|
6681
|
+
return cls.includes("navIcon") || cls.includes("glyph") || cls.includes("dcu-sb-") || ariaHidden === "true";
|
|
6682
|
+
}) || Boolean(button && typeof button.querySelector === "function" && button.querySelector('span[class*="navIcon"], span[class*="glyph"], [class*="dcu-sb-glyph"]'));
|
|
6655
6683
|
if (hasSlotIcon) {
|
|
6656
6684
|
if (button.hasAttribute(NAV_ICON_MARKER)) {
|
|
6657
6685
|
button.removeAttribute(NAV_ICON_MARKER);
|
|
@@ -6992,19 +7020,29 @@ window.__ModuleLoader__.load({
|
|
|
6992
7020
|
label: t("rail.channels"),
|
|
6993
7021
|
order: 20,
|
|
6994
7022
|
matchSession: isChannelSession,
|
|
6995
|
-
render: (props) =>
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7023
|
+
render: (props) => {
|
|
7024
|
+
const hostOpen = typeof props.openSession === "function"
|
|
7025
|
+
? props.openSession
|
|
7026
|
+
: (typeof props.open === "function" ? props.open : undefined);
|
|
7027
|
+
const openSession = createImSessionOpener(registry, hostOpen, () => {
|
|
7028
|
+
try { return ctx.sessions && ctx.sessions.list && ctx.sessions.list.getSnapshot ? ctx.sessions.list.getSnapshot().byId : undefined; } catch { return undefined; }
|
|
7029
|
+
});
|
|
7030
|
+
return h(ImSidebarFallbackBoundary, {
|
|
7031
|
+
officialTree: () => h(ChannelUnavailable, { t }),
|
|
7032
|
+
hostProps: props,
|
|
7033
|
+
}, h(ChannelOfficialView, Object.assign({}, props, {
|
|
7034
|
+
officialTree: registry.officialTree,
|
|
7035
|
+
hostProps: props,
|
|
7036
|
+
hostT: props.officialT || props.t,
|
|
7037
|
+
t,
|
|
7038
|
+
openSession,
|
|
7039
|
+
open: openSession,
|
|
7040
|
+
openChannelSettings,
|
|
7041
|
+
openImSettings,
|
|
7042
|
+
archiveSession: props.archiveSession || ((id, options) => archiveHostSession(ctx, id, options)),
|
|
7043
|
+
unarchiveSession: props.unarchiveSession || ((id) => unarchiveHostSession(ctx, id)),
|
|
7044
|
+
})));
|
|
7045
|
+
},
|
|
7008
7046
|
});
|
|
7009
7047
|
};
|
|
7010
7048
|
refreshInsertedTab();
|
package/lib/client.js
CHANGED
|
@@ -5833,6 +5833,18 @@ function resolveApiUrl(path) {
|
|
|
5833
5833
|
}
|
|
5834
5834
|
}
|
|
5835
5835
|
|
|
5836
|
+
function createImSessionOpener(registry, hostOpen, getSessionById) {
|
|
5837
|
+
return (id) => {
|
|
5838
|
+
if (registry && Array.isArray(registry.sessionOpeners)
|
|
5839
|
+
&& registry.sessionOpeners.some((item) => item && item.id === "im-connect")) {
|
|
5840
|
+
openRegisteredSession(id, registry, hostOpen);
|
|
5841
|
+
return;
|
|
5842
|
+
}
|
|
5843
|
+
const byId = typeof getSessionById === "function" ? getSessionById() : getSessionById;
|
|
5844
|
+
openListedSession(resolveHostSessionId(id, byId), hostOpen);
|
|
5845
|
+
};
|
|
5846
|
+
}
|
|
5847
|
+
|
|
5836
5848
|
function createNativeTabRegistry(officialTree) {
|
|
5837
5849
|
const tabs = new Map();
|
|
5838
5850
|
const sessionFilters = [];
|
|
@@ -5972,18 +5984,10 @@ function resolveApiUrl(path) {
|
|
|
5972
5984
|
previousCurrentId.current = followed.previousId;
|
|
5973
5985
|
if (followed.tab) setTab(followed.tab);
|
|
5974
5986
|
}, [currentId, extraTabs, membershipRevision]);
|
|
5975
|
-
const hostOpen = props.openSession
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
const openSession = (id) => {
|
|
5980
|
-
if (nativeTabs && Array.isArray(nativeTabs.sessionOpeners)
|
|
5981
|
-
&& nativeTabs.sessionOpeners.some((item) => item && item.id === "im-connect")) {
|
|
5982
|
-
openRegisteredSession(id, nativeTabs, hostOpen);
|
|
5983
|
-
return;
|
|
5984
|
-
}
|
|
5985
|
-
openListed(id);
|
|
5986
|
-
};
|
|
5987
|
+
const hostOpen = typeof props.openSession === "function"
|
|
5988
|
+
? props.openSession
|
|
5989
|
+
: (typeof props.open === "function" ? props.open : undefined);
|
|
5990
|
+
const openSession = createImSessionOpener(nativeTabs, hostOpen, sessionById);
|
|
5987
5991
|
const safeExpandSidebar = useCallback(() => {}, []);
|
|
5988
5992
|
const rawUseWorkspaceShortcuts = typeof props.useWorkspaceShortcuts === "function" ? props.useWorkspaceShortcuts : undefined;
|
|
5989
5993
|
const useIsolatedWorkspaceShortcuts = useCallback((select, equals) => {
|
|
@@ -6658,7 +6662,7 @@ function resolveApiUrl(path) {
|
|
|
6658
6662
|
const QUEUE_ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="black" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round">${QUEUE_ICON_PATHS}</svg>`;
|
|
6659
6663
|
const QUEUE_ICON_MASK = `url("data:image/svg+xml,${encodeURIComponent(QUEUE_ICON_SVG)}")`;
|
|
6660
6664
|
|
|
6661
|
-
const NAV_ICON_CSS = `[${NAV_ICON_MARKER}]>svg{display:none!important}[${NAV_ICON_MARKER}]::before{content:'';flex:none;width:16px;height:16px;background-color:currentColor;-webkit-mask:${QUEUE_ICON_MASK} center/contain no-repeat;mask:${QUEUE_ICON_MASK} center/contain no-repeat;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:16px 16px;mask-size:16px 16px}`;
|
|
6665
|
+
const NAV_ICON_CSS = `[${NAV_ICON_MARKER}]>svg{display:none!important}[${NAV_ICON_MARKER}]::before{content:'';flex:none;width:16px;height:16px;background-color:currentColor;-webkit-mask:${QUEUE_ICON_MASK} center/contain no-repeat;mask:${QUEUE_ICON_MASK} center/contain no-repeat;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:16px 16px;mask-size:16px 16px}.dcu-sb-row[${NAV_ICON_MARKER}]::before{content:none!important}`;
|
|
6662
6666
|
|
|
6663
6667
|
function ensureNavIconStyle(doc) {
|
|
6664
6668
|
const targetDoc = doc || (typeof document !== "undefined" ? document : null);
|
|
@@ -6681,6 +6685,20 @@ function resolveApiUrl(path) {
|
|
|
6681
6685
|
return String(label ?? "").trim();
|
|
6682
6686
|
}
|
|
6683
6687
|
|
|
6688
|
+
function isSidebarNavButton(button) {
|
|
6689
|
+
if (!button) return false;
|
|
6690
|
+
if (typeof button.matches === "function") {
|
|
6691
|
+
if (button.matches('.dcu-sb-row, [data-dcu-panel-id], button[class*="panelRow"]')) return true;
|
|
6692
|
+
}
|
|
6693
|
+
if (typeof button.closest === "function") {
|
|
6694
|
+
if (button.closest('.dcu-sidebar-nav-root, .dcu-sb-root, [data-dcu-managed], [data-dcu-sidebar-active], [data-slot="sidebar"], div[class*="SidebarRoot_root"]')) return true;
|
|
6695
|
+
}
|
|
6696
|
+
const cls = String(button.className || "");
|
|
6697
|
+
if (cls.includes("dcu-sb-row") || cls.includes("panelRow")) return true;
|
|
6698
|
+
if (typeof button.hasAttribute === "function" && button.hasAttribute("data-dcu-panel-id")) return true;
|
|
6699
|
+
return false;
|
|
6700
|
+
}
|
|
6701
|
+
|
|
6684
6702
|
function isOwnNavRow(rowText, wantedLabel) {
|
|
6685
6703
|
const normRow = String(rowText ?? "").replace(/\s+/g, "").toLowerCase();
|
|
6686
6704
|
if (normRow.length === 0) return false;
|
|
@@ -6693,11 +6711,21 @@ function resolveApiUrl(path) {
|
|
|
6693
6711
|
}
|
|
6694
6712
|
|
|
6695
6713
|
function applySettingsNavIcon(button, wantedLabel) {
|
|
6714
|
+
if (isSidebarNavButton(button)) {
|
|
6715
|
+
if (button.hasAttribute(NAV_ICON_MARKER)) {
|
|
6716
|
+
button.removeAttribute(NAV_ICON_MARKER);
|
|
6717
|
+
return true;
|
|
6718
|
+
}
|
|
6719
|
+
return false;
|
|
6720
|
+
}
|
|
6696
6721
|
const isOwn = isOwnNavRow(getNavButtonText(button), typeof wantedLabel === "function" ? wantedLabel() : wantedLabel);
|
|
6697
6722
|
if (isOwn) {
|
|
6698
|
-
const hasSlotIcon = Array.from((button && button.children) || []).some((child) =>
|
|
6699
|
-
child.tagName
|
|
6700
|
-
|
|
6723
|
+
const hasSlotIcon = Array.from((button && button.children) || []).some((child) => {
|
|
6724
|
+
if (!child || child.tagName !== "SPAN") return false;
|
|
6725
|
+
const cls = String(child.className || "");
|
|
6726
|
+
const ariaHidden = typeof child.getAttribute === "function" ? child.getAttribute("aria-hidden") : null;
|
|
6727
|
+
return cls.includes("navIcon") || cls.includes("glyph") || cls.includes("dcu-sb-") || ariaHidden === "true";
|
|
6728
|
+
}) || Boolean(button && typeof button.querySelector === "function" && button.querySelector('span[class*="navIcon"], span[class*="glyph"], [class*="dcu-sb-glyph"]'));
|
|
6701
6729
|
if (hasSlotIcon) {
|
|
6702
6730
|
if (button.hasAttribute(NAV_ICON_MARKER)) {
|
|
6703
6731
|
button.removeAttribute(NAV_ICON_MARKER);
|
|
@@ -7038,19 +7066,29 @@ function resolveApiUrl(path) {
|
|
|
7038
7066
|
label: t("rail.channels"),
|
|
7039
7067
|
order: 20,
|
|
7040
7068
|
matchSession: isChannelSession,
|
|
7041
|
-
render: (props) =>
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7069
|
+
render: (props) => {
|
|
7070
|
+
const hostOpen = typeof props.openSession === "function"
|
|
7071
|
+
? props.openSession
|
|
7072
|
+
: (typeof props.open === "function" ? props.open : undefined);
|
|
7073
|
+
const openSession = createImSessionOpener(registry, hostOpen, () => {
|
|
7074
|
+
try { return ctx.sessions && ctx.sessions.list && ctx.sessions.list.getSnapshot ? ctx.sessions.list.getSnapshot().byId : undefined; } catch { return undefined; }
|
|
7075
|
+
});
|
|
7076
|
+
return h(ImSidebarFallbackBoundary, {
|
|
7077
|
+
officialTree: () => h(ChannelUnavailable, { t }),
|
|
7078
|
+
hostProps: props,
|
|
7079
|
+
}, h(ChannelOfficialView, Object.assign({}, props, {
|
|
7080
|
+
officialTree: registry.officialTree,
|
|
7081
|
+
hostProps: props,
|
|
7082
|
+
hostT: props.officialT || props.t,
|
|
7083
|
+
t,
|
|
7084
|
+
openSession,
|
|
7085
|
+
open: openSession,
|
|
7086
|
+
openChannelSettings,
|
|
7087
|
+
openImSettings,
|
|
7088
|
+
archiveSession: props.archiveSession || ((id, options) => archiveHostSession(ctx, id, options)),
|
|
7089
|
+
unarchiveSession: props.unarchiveSession || ((id) => unarchiveHostSession(ctx, id)),
|
|
7090
|
+
})));
|
|
7091
|
+
},
|
|
7054
7092
|
});
|
|
7055
7093
|
};
|
|
7056
7094
|
refreshInsertedTab();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-im-connect",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.34",
|
|
4
4
|
"description": "DSH IM Connect — 将主流即时通讯平台接入本机 DeepSeek Harness · Connect major messaging platforms to local DeepSeek Harness agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.22.0",
|