@michengai/dsh-im-connect 1.0.43 → 1.0.44
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 +8 -0
- package/CHANGELOG.zh-CN.md +8 -0
- package/README.en.md +1 -1
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/client.js +90 -23
- package/lib/client.js +90 -23
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.44] - 2026-11-17
|
|
4
|
+
|
|
5
|
+
### Feishu & Lark Thread Session Settings Experience
|
|
6
|
+
|
|
7
|
+
- **Standard dropdown picker & tooltip**: The "Thread session isolation" setting in Feishu and Lark account details has been upgraded to a standard select picker (with "Off" and "Isolated sessions" options), accompanied by a helpful tooltip explaining that threads maintain isolated conversation context when enabled and share group context when disabled.
|
|
8
|
+
- **Full multilingual localization**: Added localized labels and explanation tooltips for thread session isolation across all 8 supported languages (German, English, Spanish, French, Japanese, Portuguese, Russian, and Simplified Chinese).
|
|
9
|
+
- **Reliable account settings synchronization**: Refined account detail saving and configuration synchronization to ensure platform-specific options (such as thread session isolation and thinking process display) take effect reliably with smooth account reloading.
|
|
10
|
+
|
|
3
11
|
## [1.0.43] - 2026-11-17
|
|
4
12
|
|
|
5
13
|
### Feishu & Lark Thinking Process
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.0.44] - 2026-11-17
|
|
4
|
+
|
|
5
|
+
### 飞书与 Lark 会话隔离设置体验
|
|
6
|
+
|
|
7
|
+
- **设置下拉选择器与说明提示**:飞书与 Lark 账号详情中的「群回复串会话隔离」选项优化为标准下拉选择器(提供「关闭」与「独立会话」两档),并在设置项旁提供气泡提示,清晰说明开启后回复串将按话题独立隔离上下文、关闭时与群聊大厅共享上下文。
|
|
8
|
+
- **多语言完整支持**:补齐群回复串会话隔离选项与提示说明在德语、英语、西班牙语、法语、日语、葡萄牙语、俄语、中文共 8 种语言的本地化文案。
|
|
9
|
+
- **账号设置即时生效保障**:完善账号详情保存与配置同步流程,确保飞书与 Lark 的会话隔离及思考过程展示等渠道专有配置在保存后稳定生效并平滑重载。
|
|
10
|
+
|
|
3
11
|
## [1.0.43] - 2026-11-17
|
|
4
12
|
|
|
5
13
|
### 飞书与 Lark 思考过程展示
|
package/README.en.md
CHANGED
|
@@ -317,7 +317,7 @@ Native configuration options are provided here. Their values are persisted in `c
|
|
|
317
317
|
### 5. Feishu thread session isolation (`threadSessions`)
|
|
318
318
|
- **Default**: disabled (`false`)
|
|
319
319
|
- **Description**: When enabled, message threads in Feishu group chats maintain independent sessions and conversation context bounded by their root message ID. When disabled, all threads share the main group session context.
|
|
320
|
-
- **UI Configuration**:
|
|
320
|
+
- **UI Configuration**: Configure **Thread session isolation** directly in **Settings → IM Assistant → Feishu / Lark Account Settings** (select **Isolated sessions**); takes effect dynamically via account restart upon saving.
|
|
321
321
|
- **Example** (account or plugin configuration):
|
|
322
322
|
```json
|
|
323
323
|
{
|
package/README.md
CHANGED
|
@@ -317,7 +317,7 @@ dsh --profile web --dump-config
|
|
|
317
317
|
### 5. 飞书群回复串会话隔离 (`threadSessions`)
|
|
318
318
|
- **默认状态**:关闭(`false`)
|
|
319
319
|
- **功能说明**:开启后,飞书群聊中的消息回复串(Thread / 话题)将以根消息 ID 为边界建立独立的会话与上下文;关闭时,群聊内所有回复串与大厅消息共享同一个群聊会话上下文。
|
|
320
|
-
- **界面配置**:在「设置 → IM助理 → 飞书 / Lark
|
|
320
|
+
- **界面配置**:在「设置 → IM助理 → 飞书 / Lark 账号设置」中,可直接在「群回复串会话隔离」下拉选择器中切换为「独立会话」,保存后动态重启账号生效。
|
|
321
321
|
- **配置示例**(账号配置或插件配置):
|
|
322
322
|
```json
|
|
323
323
|
{
|
|
@@ -351,7 +351,7 @@ dsh --profile web --dump-config
|
|
|
351
351
|
| 批准陌生人私聊 | 打开「设置 → IM助理」,在待批准列表点「批准」或「拒绝」 | 只影响私聊准入,不影响群聊 |
|
|
352
352
|
| 回答交互问题 | 直接回复选项序号或文字;多选用逗号分隔,也可以输入自定义答案 | 多个问题会按顺序发送;群聊只接受任务发起者回答 |
|
|
353
353
|
| 批准工具 | 在私聊回复「批准」或「拒绝」 | 也接受 `yes` / `no` / `allow` / `reject`;群聊无效 |
|
|
354
|
-
| 飞书回复串隔离 | 点击飞书 / Lark
|
|
354
|
+
| 飞书回复串隔离 | 点击飞书 / Lark 账号右侧「设置」,在弹窗的「群回复串会话隔离」下拉选择器中切换为「独立会话」 | 开启后群聊回复串按话题独立隔离会话与上下文;默认关闭(保持大厅共享上下文) |
|
|
355
355
|
| 静默回复协议 | 在模型输出中包含 `NO_REPLY` 或 `<<<NO_REPLY>>>` | 当 Agent 判断当前场景无需向用户回复时,插件静默完成回合,不发送「未返回可投递的结果」占位卡片 |
|
|
356
356
|
| 在网页里回看 | 打开工作区「频道」页签 | IM 会话不会出现在「任务」里 |
|
|
357
357
|
|
package/README.zh-CN.md
CHANGED
|
@@ -317,7 +317,7 @@ dsh --profile web --dump-config
|
|
|
317
317
|
### 5. 飞书群回复串会话隔离 (`threadSessions`)
|
|
318
318
|
- **默认状态**:关闭(`false`)
|
|
319
319
|
- **功能说明**:开启后,飞书群聊中的消息回复串(Thread / 话题)将以根消息 ID 为边界建立独立的会话与上下文;关闭时,群聊内所有回复串与大厅消息共享同一个群聊会话上下文。
|
|
320
|
-
- **界面配置**:在「设置 → IM助理 → 飞书 / Lark
|
|
320
|
+
- **界面配置**:在「设置 → IM助理 → 飞书 / Lark 账号设置」中,可直接在「群回复串会话隔离」下拉选择器中切换为「独立会话」,保存后动态重启账号生效。
|
|
321
321
|
- **配置示例**(账号配置或插件配置):
|
|
322
322
|
```json
|
|
323
323
|
{
|
|
@@ -351,7 +351,7 @@ dsh --profile web --dump-config
|
|
|
351
351
|
| 批准陌生人私聊 | 打开「设置 → IM助理」,在待批准列表点「批准」或「拒绝」 | 只影响私聊准入,不影响群聊 |
|
|
352
352
|
| 回答交互问题 | 直接回复选项序号或文字;多选用逗号分隔,也可以输入自定义答案 | 多个问题会按顺序发送;群聊只接受任务发起者回答 |
|
|
353
353
|
| 批准工具 | 在私聊回复「批准」或「拒绝」 | 也接受 `yes` / `no` / `allow` / `reject`;群聊无效 |
|
|
354
|
-
| 飞书回复串隔离 | 点击飞书 / Lark
|
|
354
|
+
| 飞书回复串隔离 | 点击飞书 / Lark 账号右侧「设置」,在弹窗的「群回复串会话隔离」下拉选择器中切换为「独立会话」 | 开启后群聊回复串按话题独立隔离会话与上下文;默认关闭(保持大厅共享上下文) |
|
|
355
355
|
| 静默回复协议 | 在模型输出中包含 `NO_REPLY` 或 `<<<NO_REPLY>>>` | 当 Agent 判断当前场景无需向用户回复时,插件静默完成回合,不发送「未返回可投递的结果」占位卡片 |
|
|
356
356
|
| 在网页里回看 | 打开工作区「频道」页签 | IM 会话不会出现在「任务」里 |
|
|
357
357
|
|
package/client.js
CHANGED
|
@@ -654,7 +654,9 @@ window.__ModuleLoader__.load({
|
|
|
654
654
|
"account.telegramThinkingDisplayNote": "开启后,模型的思考过程会以可折叠引用块单独发送,点击可展开查看。群聊中所有成员均可展开,请在允许分享思考的部署开启。",
|
|
655
655
|
"account.telegramThinkingDisplayOff": "关闭",
|
|
656
656
|
"account.threadSessions": "群回复串会话隔离",
|
|
657
|
+
"account.threadSessionsIsolated": "独立会话",
|
|
657
658
|
"account.threadSessionsNote": "开启后飞书群聊回复串将按话题独立会话与上下文;默认关闭。",
|
|
659
|
+
"account.threadSessionsOff": "关闭",
|
|
658
660
|
"account.workspace": "工作区",
|
|
659
661
|
"action.addAccount": "添加账号",
|
|
660
662
|
"action.approve": "批准",
|
|
@@ -958,7 +960,9 @@ window.__ModuleLoader__.load({
|
|
|
958
960
|
"account.telegramThinkingDisplayNote": "When enabled, reasoning is sent as an expandable quote block that users can tap to expand. All group members can view expanded reasoning.",
|
|
959
961
|
"account.telegramThinkingDisplayOff": "Off",
|
|
960
962
|
"account.threadSessions": "Thread session isolation",
|
|
963
|
+
"account.threadSessionsIsolated": "Isolated sessions",
|
|
961
964
|
"account.threadSessionsNote": "When enabled, group message threads are isolated into separate sessions; disabled by default.",
|
|
965
|
+
"account.threadSessionsOff": "Off",
|
|
962
966
|
"account.workspace": "Workspace",
|
|
963
967
|
"action.addAccount": "Add account",
|
|
964
968
|
"action.approve": "Approve",
|
|
@@ -1262,7 +1266,9 @@ window.__ModuleLoader__.load({
|
|
|
1262
1266
|
"account.telegramThinkingDisplayNote": "有効にすると、思考過程が折りたたみ可能な引用ブロックとして送信され、タップして展開できます。グループ内の全員が展開して閲覧可能です。",
|
|
1263
1267
|
"account.telegramThinkingDisplayOff": "オフ",
|
|
1264
1268
|
"account.threadSessions": "スレッドセッション分離",
|
|
1269
|
+
"account.threadSessionsIsolated": "スレッドごとに分離",
|
|
1265
1270
|
"account.threadSessionsNote": "有効にすると、グループ返信スレッドごとに独立したセッションとコンテキストが保持されます。デフォルトは無効です。",
|
|
1271
|
+
"account.threadSessionsOff": "オフ",
|
|
1266
1272
|
"account.workspace": "ワークスペース",
|
|
1267
1273
|
"action.addAccount": "アカウントを追加",
|
|
1268
1274
|
"action.approve": "承認",
|
|
@@ -1566,7 +1572,9 @@ window.__ModuleLoader__.load({
|
|
|
1566
1572
|
"account.telegramThinkingDisplayNote": "Cuando está habilitado, el razonamiento se envía como un bloque de cita desplegable que los usuarios pueden tocar para expandir. Todos los miembros pueden verlo.",
|
|
1567
1573
|
"account.telegramThinkingDisplayOff": "Desactivado",
|
|
1568
1574
|
"account.threadSessions": "Aislamiento de sesiones de hilos",
|
|
1575
|
+
"account.threadSessionsIsolated": "Sesiones aisladas",
|
|
1569
1576
|
"account.threadSessionsNote": "Al activarse, los hilos de mensajes en grupos se aíslan en sesiones independientes; desactivado por defecto.",
|
|
1577
|
+
"account.threadSessionsOff": "Desactivado",
|
|
1570
1578
|
"account.workspace": "Espacio de trabajo",
|
|
1571
1579
|
"action.addAccount": "Añadir cuenta",
|
|
1572
1580
|
"action.approve": "Aprobar",
|
|
@@ -1870,7 +1878,9 @@ window.__ModuleLoader__.load({
|
|
|
1870
1878
|
"account.telegramThinkingDisplayNote": "Si activé, le raisonnement est envoyé sous forme de bloc de citation pliable pouvant être déroulé au toucher. Visible par tous les membres du groupe.",
|
|
1871
1879
|
"account.telegramThinkingDisplayOff": "Désactivé",
|
|
1872
1880
|
"account.threadSessions": "Isolation des sessions de fil",
|
|
1881
|
+
"account.threadSessionsIsolated": "Sessions isolées",
|
|
1873
1882
|
"account.threadSessionsNote": "Une fois activé, les fils de messages de groupe sont isolés dans des sessions distinctes ; désactivé par défaut.",
|
|
1883
|
+
"account.threadSessionsOff": "Désactivé",
|
|
1874
1884
|
"account.workspace": "Espace de travail",
|
|
1875
1885
|
"action.addAccount": "Ajouter un compte",
|
|
1876
1886
|
"action.approve": "Approuver",
|
|
@@ -2174,7 +2184,9 @@ window.__ModuleLoader__.load({
|
|
|
2174
2184
|
"account.telegramThinkingDisplayNote": "Wenn aktiviert, wird das Reasoning als einklappbarer Zitatblock gesendet, der angetippt werden kann. Alle Gruppenmitglieder können ihn einsehen.",
|
|
2175
2185
|
"account.telegramThinkingDisplayOff": "Aus",
|
|
2176
2186
|
"account.threadSessions": "Thread-Sitzungsisolation",
|
|
2187
|
+
"account.threadSessionsIsolated": "Isolierte Sitzungen",
|
|
2177
2188
|
"account.threadSessionsNote": "Wenn aktiviert, werden Gruppen-Nachrichten-Threads in separate Sitzungen isoliert; standardmäßig deaktiviert.",
|
|
2189
|
+
"account.threadSessionsOff": "Aus",
|
|
2178
2190
|
"account.workspace": "Arbeitsbereich",
|
|
2179
2191
|
"action.addAccount": "Konto hinzufügen",
|
|
2180
2192
|
"action.approve": "Genehmigen",
|
|
@@ -2478,7 +2490,9 @@ window.__ModuleLoader__.load({
|
|
|
2478
2490
|
"account.telegramThinkingDisplayNote": "Если включено, ход мыслей отправляется в виде сворачиваемого цитатного блока. Все участники группы могут развернуть и просмотреть его.",
|
|
2479
2491
|
"account.telegramThinkingDisplayOff": "Выкл",
|
|
2480
2492
|
"account.threadSessions": "Изоляция сессий тредов",
|
|
2493
|
+
"account.threadSessionsIsolated": "Изолированные сессии",
|
|
2481
2494
|
"account.threadSessionsNote": "При включении цепочки ответов в группах изолируются в отдельные сессии; по умолчанию выключено.",
|
|
2495
|
+
"account.threadSessionsOff": "Выкл",
|
|
2482
2496
|
"account.workspace": "Рабочая область",
|
|
2483
2497
|
"action.addAccount": "Добавить аккаунт",
|
|
2484
2498
|
"action.approve": "Одобрить",
|
|
@@ -2782,7 +2796,9 @@ window.__ModuleLoader__.load({
|
|
|
2782
2796
|
"account.telegramThinkingDisplayNote": "Quando ativado, o raciocínio é enviado como um bloco de citação expansível que pode ser aberto com um toque. Visível para todos no grupo.",
|
|
2783
2797
|
"account.telegramThinkingDisplayOff": "Desactivado",
|
|
2784
2798
|
"account.threadSessions": "Isolamento de sessões de tópicos",
|
|
2799
|
+
"account.threadSessionsIsolated": "Sessões isoladas",
|
|
2785
2800
|
"account.threadSessionsNote": "Quando ativado, os tópicos de mensagens em grupos são isolados em sessões separadas; desativado por padrão.",
|
|
2801
|
+
"account.threadSessionsOff": "Desativado",
|
|
2786
2802
|
"account.workspace": "Espaço de trabalho",
|
|
2787
2803
|
"action.addAccount": "Adicionar conta",
|
|
2788
2804
|
"action.approve": "Aprovar",
|
|
@@ -4064,6 +4080,29 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4064
4080
|
);
|
|
4065
4081
|
}
|
|
4066
4082
|
|
|
4083
|
+
function resolveThreadSessionsSelect(value) {
|
|
4084
|
+
return Boolean(value && value.threadSessions) ? "isolated" : "off";
|
|
4085
|
+
}
|
|
4086
|
+
|
|
4087
|
+
function threadSessionsPatch(next) {
|
|
4088
|
+
return { threadSessions: next === "isolated" };
|
|
4089
|
+
}
|
|
4090
|
+
|
|
4091
|
+
function filterAccountPlatformPayload(platform, patch, payload) {
|
|
4092
|
+
const result = payload || {};
|
|
4093
|
+
if (platform === "telegram" || platform === "feishu" || platform === "lark") {
|
|
4094
|
+
if (Object.prototype.hasOwnProperty.call(patch, "thinkingDisplay")) {
|
|
4095
|
+
result.thinkingDisplay = patch.thinkingDisplay;
|
|
4096
|
+
}
|
|
4097
|
+
}
|
|
4098
|
+
if (platform === "feishu" || platform === "lark") {
|
|
4099
|
+
if (Object.prototype.hasOwnProperty.call(patch, "threadSessions")) {
|
|
4100
|
+
result.threadSessions = patch.threadSessions;
|
|
4101
|
+
}
|
|
4102
|
+
}
|
|
4103
|
+
return result;
|
|
4104
|
+
}
|
|
4105
|
+
|
|
4067
4106
|
function AccountSettingsPicker(props) {
|
|
4068
4107
|
const t = props.t || fallbackT;
|
|
4069
4108
|
const modelT = props.modelT || ((key) => key);
|
|
@@ -4268,6 +4307,29 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4268
4307
|
: thinkingTipAnchor,
|
|
4269
4308
|
);
|
|
4270
4309
|
|
|
4310
|
+
const threadSessionsTip = t("account.threadSessionsNote");
|
|
4311
|
+
const threadSessionsTipAnchor = h("span", {
|
|
4312
|
+
className: "ima-label-tip",
|
|
4313
|
+
title: HostTooltip ? undefined : threadSessionsTip,
|
|
4314
|
+
"aria-label": threadSessionsTip,
|
|
4315
|
+
role: "button",
|
|
4316
|
+
tabIndex: 0,
|
|
4317
|
+
style: {
|
|
4318
|
+
display: "inline-flex",
|
|
4319
|
+
alignItems: "center",
|
|
4320
|
+
cursor: "help",
|
|
4321
|
+
color: "var(--dsw-alias-label-tertiary, var(--ima-muted))",
|
|
4322
|
+
marginLeft: 2,
|
|
4323
|
+
},
|
|
4324
|
+
}, h(IconInfoOutline, { size: 12 }));
|
|
4325
|
+
|
|
4326
|
+
const threadSessionsLabel = h("span", { style: { display: "inline-flex", alignItems: "center", gap: 4 } },
|
|
4327
|
+
h("span", null, t("account.threadSessions")),
|
|
4328
|
+
HostTooltip
|
|
4329
|
+
? h(HostTooltip, { label: threadSessionsTip, portal: true, side: "top" }, threadSessionsTipAnchor)
|
|
4330
|
+
: threadSessionsTipAnchor,
|
|
4331
|
+
);
|
|
4332
|
+
|
|
4271
4333
|
const sessionIdleLabel = h("span", { style: { display: "inline-flex", alignItems: "center", gap: 4 } },
|
|
4272
4334
|
h("span", null, t("account.sessionIdle")),
|
|
4273
4335
|
HostTooltip
|
|
@@ -4399,6 +4461,16 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4399
4461
|
],
|
|
4400
4462
|
onChange: (next) => update({ thinkingDisplay: next === "collapsed" }),
|
|
4401
4463
|
})),
|
|
4464
|
+
props.threadSessionsSupported && field("threadSessions", threadSessionsLabel, h(Select, {
|
|
4465
|
+
className: "ima-account-picker",
|
|
4466
|
+
value: resolveThreadSessionsSelect(value),
|
|
4467
|
+
"aria-label": t("account.threadSessions"),
|
|
4468
|
+
options: [
|
|
4469
|
+
{ value: "off", label: t("account.threadSessionsOff") },
|
|
4470
|
+
{ value: "isolated", label: t("account.threadSessionsIsolated") },
|
|
4471
|
+
],
|
|
4472
|
+
onChange: (next) => update(threadSessionsPatch(next)),
|
|
4473
|
+
})),
|
|
4402
4474
|
segmentSupported && field("segmentReply", segmentReplyLabel, h(Select, {
|
|
4403
4475
|
className: "ima-account-picker",
|
|
4404
4476
|
value: segmentReply ? "segmented" : "full",
|
|
@@ -4622,15 +4694,22 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4622
4694
|
payload.mentionPolicy = Object.prototype.hasOwnProperty.call(patch, "mentionPolicy") ? patch.mentionPolicy : (mentionPolicyDraft === "always" ? "always" : "addressed");
|
|
4623
4695
|
payload.freeChatGroups = Object.prototype.hasOwnProperty.call(patch, "freeChatGroups") ? patch.freeChatGroups : freeChatGroupsDraft;
|
|
4624
4696
|
}
|
|
4625
|
-
if (Object.prototype.hasOwnProperty.call(patch, "thinkingDisplay")) {
|
|
4626
|
-
payload.thinkingDisplay = patch.thinkingDisplay;
|
|
4627
|
-
}
|
|
4628
4697
|
}
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4698
|
+
const filterPayload = typeof filterAccountPlatformPayload === "function" ? filterAccountPlatformPayload : (platform, patch, target) => {
|
|
4699
|
+
const res = target || {};
|
|
4700
|
+
if (platform === "telegram" || platform === "feishu" || platform === "lark") {
|
|
4701
|
+
if (Object.prototype.hasOwnProperty.call(patch, "thinkingDisplay")) {
|
|
4702
|
+
res.thinkingDisplay = patch.thinkingDisplay;
|
|
4703
|
+
}
|
|
4632
4704
|
}
|
|
4633
|
-
|
|
4705
|
+
if (platform === "feishu" || platform === "lark") {
|
|
4706
|
+
if (Object.prototype.hasOwnProperty.call(patch, "threadSessions")) {
|
|
4707
|
+
res.threadSessions = patch.threadSessions;
|
|
4708
|
+
}
|
|
4709
|
+
}
|
|
4710
|
+
return res;
|
|
4711
|
+
};
|
|
4712
|
+
filterPayload(account.platform, patch, payload);
|
|
4634
4713
|
return onSave(account.id, payload).then((ok) => {
|
|
4635
4714
|
if (seq === saveSeq.current) setNote(ok ? "status.saved" : "error.save");
|
|
4636
4715
|
return ok;
|
|
@@ -4672,6 +4751,7 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4672
4751
|
value: draft,
|
|
4673
4752
|
onChange: applySettings,
|
|
4674
4753
|
thinkingDisplaySupported: account.platform === "telegram" || account.platform === "feishu" || account.platform === "lark",
|
|
4754
|
+
threadSessionsSupported: account.platform === "feishu" || account.platform === "lark",
|
|
4675
4755
|
segmentReplySupported: account.segmentReplySupported !== false,
|
|
4676
4756
|
catalog,
|
|
4677
4757
|
permissions,
|
|
@@ -4770,22 +4850,6 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4770
4850
|
})(),
|
|
4771
4851
|
h("div", { className: "ima-picker-note" }, t("account.telegramGroupPolicyNote")),
|
|
4772
4852
|
),
|
|
4773
|
-
(account.platform === "feishu" || account.platform === "lark") && h("div", { className: "ima-thread-sessions-settings" },
|
|
4774
|
-
h("div", { className: "ima-picker-field wide" },
|
|
4775
|
-
h("span", { className: "ima-picker-label" }, t("account.threadSessions")),
|
|
4776
|
-
h(Switch, {
|
|
4777
|
-
role: "switch",
|
|
4778
|
-
checked: Boolean(draft.threadSessions ?? account.threadSessions),
|
|
4779
|
-
"aria-checked": Boolean(draft.threadSessions ?? account.threadSessions),
|
|
4780
|
-
"aria-label": t("account.threadSessions"),
|
|
4781
|
-
onChange: (checked) => {
|
|
4782
|
-
setDraft({ ...draft, threadSessions: checked });
|
|
4783
|
-
save({ threadSessions: checked });
|
|
4784
|
-
},
|
|
4785
|
-
}),
|
|
4786
|
-
),
|
|
4787
|
-
h("div", { className: "ima-picker-note" }, t("account.threadSessionsNote")),
|
|
4788
|
-
),
|
|
4789
4853
|
h(CommandPermissionSettings, { value: draft.commandPermissions, onSave: commandPermissions => save({ commandPermissions }), t }),
|
|
4790
4854
|
note && h("div", { className: note === "status.saved" ? "ima-save-note ok" : "ima-save-note" }, t(note)),
|
|
4791
4855
|
h("div", { className: "ima-inspector-actions" },
|
|
@@ -7174,6 +7238,9 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
7174
7238
|
exports.inject = inject;
|
|
7175
7239
|
exports.resolveApiUrl = resolveApiUrl;
|
|
7176
7240
|
exports.setupSidebarEntry = setupSidebarEntry;
|
|
7241
|
+
exports.resolveThreadSessionsSelect = resolveThreadSessionsSelect;
|
|
7242
|
+
exports.threadSessionsPatch = threadSessionsPatch;
|
|
7243
|
+
exports.filterAccountPlatformPayload = filterAccountPlatformPayload;
|
|
7177
7244
|
return module.exports;
|
|
7178
7245
|
},
|
|
7179
7246
|
});
|
package/lib/client.js
CHANGED
|
@@ -700,7 +700,9 @@ function resolveApiUrl(path) {
|
|
|
700
700
|
"account.telegramThinkingDisplayNote": "开启后,模型的思考过程会以可折叠引用块单独发送,点击可展开查看。群聊中所有成员均可展开,请在允许分享思考的部署开启。",
|
|
701
701
|
"account.telegramThinkingDisplayOff": "关闭",
|
|
702
702
|
"account.threadSessions": "群回复串会话隔离",
|
|
703
|
+
"account.threadSessionsIsolated": "独立会话",
|
|
703
704
|
"account.threadSessionsNote": "开启后飞书群聊回复串将按话题独立会话与上下文;默认关闭。",
|
|
705
|
+
"account.threadSessionsOff": "关闭",
|
|
704
706
|
"account.workspace": "工作区",
|
|
705
707
|
"action.addAccount": "添加账号",
|
|
706
708
|
"action.approve": "批准",
|
|
@@ -1004,7 +1006,9 @@ function resolveApiUrl(path) {
|
|
|
1004
1006
|
"account.telegramThinkingDisplayNote": "When enabled, reasoning is sent as an expandable quote block that users can tap to expand. All group members can view expanded reasoning.",
|
|
1005
1007
|
"account.telegramThinkingDisplayOff": "Off",
|
|
1006
1008
|
"account.threadSessions": "Thread session isolation",
|
|
1009
|
+
"account.threadSessionsIsolated": "Isolated sessions",
|
|
1007
1010
|
"account.threadSessionsNote": "When enabled, group message threads are isolated into separate sessions; disabled by default.",
|
|
1011
|
+
"account.threadSessionsOff": "Off",
|
|
1008
1012
|
"account.workspace": "Workspace",
|
|
1009
1013
|
"action.addAccount": "Add account",
|
|
1010
1014
|
"action.approve": "Approve",
|
|
@@ -1308,7 +1312,9 @@ function resolveApiUrl(path) {
|
|
|
1308
1312
|
"account.telegramThinkingDisplayNote": "有効にすると、思考過程が折りたたみ可能な引用ブロックとして送信され、タップして展開できます。グループ内の全員が展開して閲覧可能です。",
|
|
1309
1313
|
"account.telegramThinkingDisplayOff": "オフ",
|
|
1310
1314
|
"account.threadSessions": "スレッドセッション分離",
|
|
1315
|
+
"account.threadSessionsIsolated": "スレッドごとに分離",
|
|
1311
1316
|
"account.threadSessionsNote": "有効にすると、グループ返信スレッドごとに独立したセッションとコンテキストが保持されます。デフォルトは無効です。",
|
|
1317
|
+
"account.threadSessionsOff": "オフ",
|
|
1312
1318
|
"account.workspace": "ワークスペース",
|
|
1313
1319
|
"action.addAccount": "アカウントを追加",
|
|
1314
1320
|
"action.approve": "承認",
|
|
@@ -1612,7 +1618,9 @@ function resolveApiUrl(path) {
|
|
|
1612
1618
|
"account.telegramThinkingDisplayNote": "Cuando está habilitado, el razonamiento se envía como un bloque de cita desplegable que los usuarios pueden tocar para expandir. Todos los miembros pueden verlo.",
|
|
1613
1619
|
"account.telegramThinkingDisplayOff": "Desactivado",
|
|
1614
1620
|
"account.threadSessions": "Aislamiento de sesiones de hilos",
|
|
1621
|
+
"account.threadSessionsIsolated": "Sesiones aisladas",
|
|
1615
1622
|
"account.threadSessionsNote": "Al activarse, los hilos de mensajes en grupos se aíslan en sesiones independientes; desactivado por defecto.",
|
|
1623
|
+
"account.threadSessionsOff": "Desactivado",
|
|
1616
1624
|
"account.workspace": "Espacio de trabajo",
|
|
1617
1625
|
"action.addAccount": "Añadir cuenta",
|
|
1618
1626
|
"action.approve": "Aprobar",
|
|
@@ -1916,7 +1924,9 @@ function resolveApiUrl(path) {
|
|
|
1916
1924
|
"account.telegramThinkingDisplayNote": "Si activé, le raisonnement est envoyé sous forme de bloc de citation pliable pouvant être déroulé au toucher. Visible par tous les membres du groupe.",
|
|
1917
1925
|
"account.telegramThinkingDisplayOff": "Désactivé",
|
|
1918
1926
|
"account.threadSessions": "Isolation des sessions de fil",
|
|
1927
|
+
"account.threadSessionsIsolated": "Sessions isolées",
|
|
1919
1928
|
"account.threadSessionsNote": "Une fois activé, les fils de messages de groupe sont isolés dans des sessions distinctes ; désactivé par défaut.",
|
|
1929
|
+
"account.threadSessionsOff": "Désactivé",
|
|
1920
1930
|
"account.workspace": "Espace de travail",
|
|
1921
1931
|
"action.addAccount": "Ajouter un compte",
|
|
1922
1932
|
"action.approve": "Approuver",
|
|
@@ -2220,7 +2230,9 @@ function resolveApiUrl(path) {
|
|
|
2220
2230
|
"account.telegramThinkingDisplayNote": "Wenn aktiviert, wird das Reasoning als einklappbarer Zitatblock gesendet, der angetippt werden kann. Alle Gruppenmitglieder können ihn einsehen.",
|
|
2221
2231
|
"account.telegramThinkingDisplayOff": "Aus",
|
|
2222
2232
|
"account.threadSessions": "Thread-Sitzungsisolation",
|
|
2233
|
+
"account.threadSessionsIsolated": "Isolierte Sitzungen",
|
|
2223
2234
|
"account.threadSessionsNote": "Wenn aktiviert, werden Gruppen-Nachrichten-Threads in separate Sitzungen isoliert; standardmäßig deaktiviert.",
|
|
2235
|
+
"account.threadSessionsOff": "Aus",
|
|
2224
2236
|
"account.workspace": "Arbeitsbereich",
|
|
2225
2237
|
"action.addAccount": "Konto hinzufügen",
|
|
2226
2238
|
"action.approve": "Genehmigen",
|
|
@@ -2524,7 +2536,9 @@ function resolveApiUrl(path) {
|
|
|
2524
2536
|
"account.telegramThinkingDisplayNote": "Если включено, ход мыслей отправляется в виде сворачиваемого цитатного блока. Все участники группы могут развернуть и просмотреть его.",
|
|
2525
2537
|
"account.telegramThinkingDisplayOff": "Выкл",
|
|
2526
2538
|
"account.threadSessions": "Изоляция сессий тредов",
|
|
2539
|
+
"account.threadSessionsIsolated": "Изолированные сессии",
|
|
2527
2540
|
"account.threadSessionsNote": "При включении цепочки ответов в группах изолируются в отдельные сессии; по умолчанию выключено.",
|
|
2541
|
+
"account.threadSessionsOff": "Выкл",
|
|
2528
2542
|
"account.workspace": "Рабочая область",
|
|
2529
2543
|
"action.addAccount": "Добавить аккаунт",
|
|
2530
2544
|
"action.approve": "Одобрить",
|
|
@@ -2828,7 +2842,9 @@ function resolveApiUrl(path) {
|
|
|
2828
2842
|
"account.telegramThinkingDisplayNote": "Quando ativado, o raciocínio é enviado como um bloco de citação expansível que pode ser aberto com um toque. Visível para todos no grupo.",
|
|
2829
2843
|
"account.telegramThinkingDisplayOff": "Desactivado",
|
|
2830
2844
|
"account.threadSessions": "Isolamento de sessões de tópicos",
|
|
2845
|
+
"account.threadSessionsIsolated": "Sessões isoladas",
|
|
2831
2846
|
"account.threadSessionsNote": "Quando ativado, os tópicos de mensagens em grupos são isolados em sessões separadas; desativado por padrão.",
|
|
2847
|
+
"account.threadSessionsOff": "Desativado",
|
|
2832
2848
|
"account.workspace": "Espaço de trabalho",
|
|
2833
2849
|
"action.addAccount": "Adicionar conta",
|
|
2834
2850
|
"action.approve": "Aprovar",
|
|
@@ -4110,6 +4126,29 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4110
4126
|
);
|
|
4111
4127
|
}
|
|
4112
4128
|
|
|
4129
|
+
function resolveThreadSessionsSelect(value) {
|
|
4130
|
+
return Boolean(value && value.threadSessions) ? "isolated" : "off";
|
|
4131
|
+
}
|
|
4132
|
+
|
|
4133
|
+
function threadSessionsPatch(next) {
|
|
4134
|
+
return { threadSessions: next === "isolated" };
|
|
4135
|
+
}
|
|
4136
|
+
|
|
4137
|
+
function filterAccountPlatformPayload(platform, patch, payload) {
|
|
4138
|
+
const result = payload || {};
|
|
4139
|
+
if (platform === "telegram" || platform === "feishu" || platform === "lark") {
|
|
4140
|
+
if (Object.prototype.hasOwnProperty.call(patch, "thinkingDisplay")) {
|
|
4141
|
+
result.thinkingDisplay = patch.thinkingDisplay;
|
|
4142
|
+
}
|
|
4143
|
+
}
|
|
4144
|
+
if (platform === "feishu" || platform === "lark") {
|
|
4145
|
+
if (Object.prototype.hasOwnProperty.call(patch, "threadSessions")) {
|
|
4146
|
+
result.threadSessions = patch.threadSessions;
|
|
4147
|
+
}
|
|
4148
|
+
}
|
|
4149
|
+
return result;
|
|
4150
|
+
}
|
|
4151
|
+
|
|
4113
4152
|
function AccountSettingsPicker(props) {
|
|
4114
4153
|
const t = props.t || fallbackT;
|
|
4115
4154
|
const modelT = props.modelT || ((key) => key);
|
|
@@ -4314,6 +4353,29 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4314
4353
|
: thinkingTipAnchor,
|
|
4315
4354
|
);
|
|
4316
4355
|
|
|
4356
|
+
const threadSessionsTip = t("account.threadSessionsNote");
|
|
4357
|
+
const threadSessionsTipAnchor = h("span", {
|
|
4358
|
+
className: "ima-label-tip",
|
|
4359
|
+
title: HostTooltip ? undefined : threadSessionsTip,
|
|
4360
|
+
"aria-label": threadSessionsTip,
|
|
4361
|
+
role: "button",
|
|
4362
|
+
tabIndex: 0,
|
|
4363
|
+
style: {
|
|
4364
|
+
display: "inline-flex",
|
|
4365
|
+
alignItems: "center",
|
|
4366
|
+
cursor: "help",
|
|
4367
|
+
color: "var(--dsw-alias-label-tertiary, var(--ima-muted))",
|
|
4368
|
+
marginLeft: 2,
|
|
4369
|
+
},
|
|
4370
|
+
}, h(IconInfoOutline, { size: 12 }));
|
|
4371
|
+
|
|
4372
|
+
const threadSessionsLabel = h("span", { style: { display: "inline-flex", alignItems: "center", gap: 4 } },
|
|
4373
|
+
h("span", null, t("account.threadSessions")),
|
|
4374
|
+
HostTooltip
|
|
4375
|
+
? h(HostTooltip, { label: threadSessionsTip, portal: true, side: "top" }, threadSessionsTipAnchor)
|
|
4376
|
+
: threadSessionsTipAnchor,
|
|
4377
|
+
);
|
|
4378
|
+
|
|
4317
4379
|
const sessionIdleLabel = h("span", { style: { display: "inline-flex", alignItems: "center", gap: 4 } },
|
|
4318
4380
|
h("span", null, t("account.sessionIdle")),
|
|
4319
4381
|
HostTooltip
|
|
@@ -4445,6 +4507,16 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4445
4507
|
],
|
|
4446
4508
|
onChange: (next) => update({ thinkingDisplay: next === "collapsed" }),
|
|
4447
4509
|
})),
|
|
4510
|
+
props.threadSessionsSupported && field("threadSessions", threadSessionsLabel, h(Select, {
|
|
4511
|
+
className: "ima-account-picker",
|
|
4512
|
+
value: resolveThreadSessionsSelect(value),
|
|
4513
|
+
"aria-label": t("account.threadSessions"),
|
|
4514
|
+
options: [
|
|
4515
|
+
{ value: "off", label: t("account.threadSessionsOff") },
|
|
4516
|
+
{ value: "isolated", label: t("account.threadSessionsIsolated") },
|
|
4517
|
+
],
|
|
4518
|
+
onChange: (next) => update(threadSessionsPatch(next)),
|
|
4519
|
+
})),
|
|
4448
4520
|
segmentSupported && field("segmentReply", segmentReplyLabel, h(Select, {
|
|
4449
4521
|
className: "ima-account-picker",
|
|
4450
4522
|
value: segmentReply ? "segmented" : "full",
|
|
@@ -4668,15 +4740,22 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4668
4740
|
payload.mentionPolicy = Object.prototype.hasOwnProperty.call(patch, "mentionPolicy") ? patch.mentionPolicy : (mentionPolicyDraft === "always" ? "always" : "addressed");
|
|
4669
4741
|
payload.freeChatGroups = Object.prototype.hasOwnProperty.call(patch, "freeChatGroups") ? patch.freeChatGroups : freeChatGroupsDraft;
|
|
4670
4742
|
}
|
|
4671
|
-
if (Object.prototype.hasOwnProperty.call(patch, "thinkingDisplay")) {
|
|
4672
|
-
payload.thinkingDisplay = patch.thinkingDisplay;
|
|
4673
|
-
}
|
|
4674
4743
|
}
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4744
|
+
const filterPayload = typeof filterAccountPlatformPayload === "function" ? filterAccountPlatformPayload : (platform, patch, target) => {
|
|
4745
|
+
const res = target || {};
|
|
4746
|
+
if (platform === "telegram" || platform === "feishu" || platform === "lark") {
|
|
4747
|
+
if (Object.prototype.hasOwnProperty.call(patch, "thinkingDisplay")) {
|
|
4748
|
+
res.thinkingDisplay = patch.thinkingDisplay;
|
|
4749
|
+
}
|
|
4678
4750
|
}
|
|
4679
|
-
|
|
4751
|
+
if (platform === "feishu" || platform === "lark") {
|
|
4752
|
+
if (Object.prototype.hasOwnProperty.call(patch, "threadSessions")) {
|
|
4753
|
+
res.threadSessions = patch.threadSessions;
|
|
4754
|
+
}
|
|
4755
|
+
}
|
|
4756
|
+
return res;
|
|
4757
|
+
};
|
|
4758
|
+
filterPayload(account.platform, patch, payload);
|
|
4680
4759
|
return onSave(account.id, payload).then((ok) => {
|
|
4681
4760
|
if (seq === saveSeq.current) setNote(ok ? "status.saved" : "error.save");
|
|
4682
4761
|
return ok;
|
|
@@ -4718,6 +4797,7 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4718
4797
|
value: draft,
|
|
4719
4798
|
onChange: applySettings,
|
|
4720
4799
|
thinkingDisplaySupported: account.platform === "telegram" || account.platform === "feishu" || account.platform === "lark",
|
|
4800
|
+
threadSessionsSupported: account.platform === "feishu" || account.platform === "lark",
|
|
4721
4801
|
segmentReplySupported: account.segmentReplySupported !== false,
|
|
4722
4802
|
catalog,
|
|
4723
4803
|
permissions,
|
|
@@ -4816,22 +4896,6 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
4816
4896
|
})(),
|
|
4817
4897
|
h("div", { className: "ima-picker-note" }, t("account.telegramGroupPolicyNote")),
|
|
4818
4898
|
),
|
|
4819
|
-
(account.platform === "feishu" || account.platform === "lark") && h("div", { className: "ima-thread-sessions-settings" },
|
|
4820
|
-
h("div", { className: "ima-picker-field wide" },
|
|
4821
|
-
h("span", { className: "ima-picker-label" }, t("account.threadSessions")),
|
|
4822
|
-
h(Switch, {
|
|
4823
|
-
role: "switch",
|
|
4824
|
-
checked: Boolean(draft.threadSessions ?? account.threadSessions),
|
|
4825
|
-
"aria-checked": Boolean(draft.threadSessions ?? account.threadSessions),
|
|
4826
|
-
"aria-label": t("account.threadSessions"),
|
|
4827
|
-
onChange: (checked) => {
|
|
4828
|
-
setDraft({ ...draft, threadSessions: checked });
|
|
4829
|
-
save({ threadSessions: checked });
|
|
4830
|
-
},
|
|
4831
|
-
}),
|
|
4832
|
-
),
|
|
4833
|
-
h("div", { className: "ima-picker-note" }, t("account.threadSessionsNote")),
|
|
4834
|
-
),
|
|
4835
4899
|
h(CommandPermissionSettings, { value: draft.commandPermissions, onSave: commandPermissions => save({ commandPermissions }), t }),
|
|
4836
4900
|
note && h("div", { className: note === "status.saved" ? "ima-save-note ok" : "ima-save-note" }, t(note)),
|
|
4837
4901
|
h("div", { className: "ima-inspector-actions" },
|
|
@@ -7220,5 +7284,8 @@ body:not([data-ds-dark-theme]) .ima-section-card{background:var(--dsw-alias-bg-l
|
|
|
7220
7284
|
exports.inject = inject;
|
|
7221
7285
|
exports.resolveApiUrl = resolveApiUrl;
|
|
7222
7286
|
exports.setupSidebarEntry = setupSidebarEntry;
|
|
7287
|
+
exports.resolveThreadSessionsSelect = resolveThreadSessionsSelect;
|
|
7288
|
+
exports.threadSessionsPatch = threadSessionsPatch;
|
|
7289
|
+
exports.filterAccountPlatformPayload = filterAccountPlatformPayload;
|
|
7223
7290
|
return module.exports;
|
|
7224
7291
|
} });
|
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.44",
|
|
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",
|