@xmanrui/dsh-im 4.21.0 → 4.21.2
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 +10 -0
- package/README.md +10 -0
- package/lib/client.js +46 -9
- package/lib/index.js +281 -280
- package/package.json +1 -1
- package/plugin-src/client/channels/feishu/index.js +22 -7
- package/plugin-src/client/credential-binding.js +2 -0
- package/plugin-src/client/i18n.js +6 -0
- package/plugin-src/host/channels/feishu/rpc.mjs +2 -1
- package/plugin-src/host/index.mjs +7 -0
- package/plugin-src/host/injected-context.mjs +104 -0
- package/scripts/verify-lan-management.mjs +53 -8
- package/src/channels/dingtalk/dingtalk-bridge.mjs +104 -27
- package/src/channels/feishu/bridge.mjs +35 -2
- package/src/channels/qq/qq-bridge.mjs +27 -2
- package/src/channels/shared/context-enhancement.mjs +40 -3
- package/src/channels/shared/control-command.mjs +8 -1
- package/src/channels/shared/harness-client.mjs +7 -0
- package/src/channels/shared/i18n-en/dingtalk.mjs +1 -0
- package/src/channels/shared/i18n-en/weixin.mjs +2 -0
- package/src/channels/shared/im-source-guidance.mjs +65 -0
- package/src/channels/shared/injected-context.mjs +362 -0
- package/src/channels/shared/semantic/artifact.mjs +3 -3
- package/src/channels/shared/semantic/reply-reference.mjs +2 -1
- package/src/channels/shared/text-harness-bridge.mjs +23 -2
- package/src/channels/shared/workspace-session.mjs +9 -0
- package/src/channels/wecom/wecom-bridge.mjs +11 -1
- package/src/channels/wecom-app/wecom-app-bridge.mjs +11 -1
- package/src/channels/weixin/weixin-api.mjs +52 -13
- package/src/channels/weixin/weixin-bridge.mjs +13 -1
|
@@ -36,7 +36,11 @@ import {
|
|
|
36
36
|
} from '../shared/preset-command.mjs';
|
|
37
37
|
import { runWorkspaceCommand } from '../shared/workspace-command.mjs';
|
|
38
38
|
import { askInWorkspaceSession } from '../shared/workspace-session.mjs';
|
|
39
|
-
import {
|
|
39
|
+
import {
|
|
40
|
+
captureContextEnhancement,
|
|
41
|
+
captureContextEnhancementSource,
|
|
42
|
+
enhanceContextContent,
|
|
43
|
+
} from '../shared/context-enhancement.mjs';
|
|
40
44
|
import {
|
|
41
45
|
hasInboundImages,
|
|
42
46
|
imagePromptDiagnostic,
|
|
@@ -262,6 +266,8 @@ function artifactFailureText(fileName, error) {
|
|
|
262
266
|
return t('结果文件「{name}」已生成,但微信机器人当前没有文件消息发送权限,请检查机器人文件消息能力。', { name });
|
|
263
267
|
case 'artifact-too-large':
|
|
264
268
|
return t('结果文件「{name}」超过当前微信会话可发送的文件大小,未发送。', { name });
|
|
269
|
+
case 'artifact-upload-timeout':
|
|
270
|
+
return t('结果文件「{name}」上传微信时长时间没有进展,已超时,文件尚未发送。请检查网络后重试,或压缩、拆分文件后发送。', { name });
|
|
265
271
|
case 'artifact-rate-limited':
|
|
266
272
|
return t('结果文件「{name}」暂时被微信限流,未能发送,请稍后重试。', { name });
|
|
267
273
|
case 'artifact-provider-rejected':
|
|
@@ -707,6 +713,11 @@ export class WeixinHarnessBridge {
|
|
|
707
713
|
|| this.#approvals.hasPending(key),
|
|
708
714
|
control: { owner: this, key },
|
|
709
715
|
deferredDelivery: this.#deferred,
|
|
716
|
+
enhancement: captureContextEnhancementSource(
|
|
717
|
+
this.#contextEnhancement,
|
|
718
|
+
'direct',
|
|
719
|
+
() => ({ channel: 'weixin', senderId: sender, chatId: sender }),
|
|
720
|
+
),
|
|
710
721
|
});
|
|
711
722
|
if (result?.stopped) {
|
|
712
723
|
await Promise.allSettled([
|
|
@@ -826,6 +837,7 @@ export class WeixinHarnessBridge {
|
|
|
826
837
|
text,
|
|
827
838
|
content,
|
|
828
839
|
titleText: batchSubmission?.title,
|
|
840
|
+
sourceGuidance: snapshot?.config?.guidance,
|
|
829
841
|
contextEnhanced,
|
|
830
842
|
createOptions: { signal: this.#signal },
|
|
831
843
|
existsOptions: { signal: this.#signal },
|