@openclaw-china/dingtalk 2026.3.19 → 2026.3.20
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/dist/index.js +24 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6966,6 +6966,21 @@ async function configureWechatMp(prompter, cfg) {
|
|
|
6966
6966
|
],
|
|
6967
6967
|
toTrimmedString2(existing.replyMode) ?? "passive"
|
|
6968
6968
|
);
|
|
6969
|
+
let activeDeliveryMode;
|
|
6970
|
+
if (replyMode === "active") {
|
|
6971
|
+
activeDeliveryMode = await prompter.askSelect(
|
|
6972
|
+
"\u4E3B\u52A8\u53D1\u9001\u6A21\u5F0F\uFF08activeDeliveryMode\uFF09",
|
|
6973
|
+
[
|
|
6974
|
+
{ value: "split", label: "split\uFF08\u9010\u5757\u53D1\u9001\uFF0C\u63A8\u8350\uFF09" },
|
|
6975
|
+
{ value: "merged", label: "merged\uFF08\u5408\u5E76\u540E\u5355\u6B21\u53D1\u9001\uFF09" }
|
|
6976
|
+
],
|
|
6977
|
+
toTrimmedString2(existing.activeDeliveryMode) ?? "split"
|
|
6978
|
+
);
|
|
6979
|
+
}
|
|
6980
|
+
const renderMarkdown = await prompter.askConfirm(
|
|
6981
|
+
"\u542F\u7528 Markdown \u6E32\u67D3\uFF08\u63A8\u8350\u5F00\u542F\uFF09",
|
|
6982
|
+
toBoolean(existing.renderMarkdown, true)
|
|
6983
|
+
);
|
|
6969
6984
|
const welcomeText = await prompter.askText({
|
|
6970
6985
|
label: "\u6B22\u8FCE\u8BED\uFF08\u53EF\u9009\uFF09",
|
|
6971
6986
|
defaultValue: toTrimmedString2(existing.welcomeText),
|
|
@@ -6979,6 +6994,8 @@ async function configureWechatMp(prompter, cfg) {
|
|
|
6979
6994
|
encodingAESKey: messageMode === "plain" ? void 0 : encodingAESKey,
|
|
6980
6995
|
messageMode,
|
|
6981
6996
|
replyMode,
|
|
6997
|
+
activeDeliveryMode,
|
|
6998
|
+
renderMarkdown,
|
|
6982
6999
|
welcomeText: welcomeText || void 0
|
|
6983
7000
|
});
|
|
6984
7001
|
}
|
|
@@ -8485,7 +8502,8 @@ function resolveGatewayRequestParams(runtime2, dingtalkCfg, logger) {
|
|
|
8485
8502
|
const gatewayUrl = typeof gateway?.url === "string" ? gateway.url : `http://127.0.0.1:${gatewayPort}/v1/chat/completions`;
|
|
8486
8503
|
const authToken = dingtalkCfg.gatewayToken ?? dingtalkCfg.gatewayPassword ?? gateway?.auth?.token ?? gateway?.authToken ?? gateway?.token ?? process.env.OPENCLAW_GATEWAY_TOKEN ?? process.env.OPENCLAW_GATEWAY_PASSWORD ?? resolveGatewayAuthFromConfigFile(logger);
|
|
8487
8504
|
const headers = {
|
|
8488
|
-
"Content-Type": "application/json"
|
|
8505
|
+
"Content-Type": "application/json",
|
|
8506
|
+
"x-openclaw-message-channel": "dingtalk"
|
|
8489
8507
|
};
|
|
8490
8508
|
if (typeof authToken === "string" && authToken.trim()) {
|
|
8491
8509
|
headers["Authorization"] = `Bearer ${authToken}`;
|
|
@@ -8508,12 +8526,14 @@ async function* streamFromGateway(params) {
|
|
|
8508
8526
|
logger.debug(`[gateway] streaming via ${gatewayUrl}, session=${sessionKey}`);
|
|
8509
8527
|
const response = await fetch(gatewayUrl, {
|
|
8510
8528
|
method: "POST",
|
|
8511
|
-
headers
|
|
8529
|
+
headers: {
|
|
8530
|
+
...headers,
|
|
8531
|
+
"x-openclaw-session-key": sessionKey
|
|
8532
|
+
},
|
|
8512
8533
|
body: JSON.stringify({
|
|
8513
8534
|
model: "default",
|
|
8514
8535
|
messages: [{ role: "user", content: userContent }],
|
|
8515
|
-
stream: true
|
|
8516
|
-
user: sessionKey
|
|
8536
|
+
stream: true
|
|
8517
8537
|
}),
|
|
8518
8538
|
signal: abortSignal
|
|
8519
8539
|
});
|