@openclaw-china/feishu-china 2026.3.9 → 2026.3.10
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 +20 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5799,6 +5799,13 @@ function getChannelConfig(cfg, channelId) {
|
|
|
5799
5799
|
const existing = channels[channelId];
|
|
5800
5800
|
return isRecord(existing) ? existing : {};
|
|
5801
5801
|
}
|
|
5802
|
+
function getGatewayAuthToken(cfg) {
|
|
5803
|
+
if (!isRecord(cfg.gateway)) {
|
|
5804
|
+
return void 0;
|
|
5805
|
+
}
|
|
5806
|
+
const auth = isRecord(cfg.gateway.auth) ? cfg.gateway.auth : void 0;
|
|
5807
|
+
return toTrimmedString(auth?.token);
|
|
5808
|
+
}
|
|
5802
5809
|
function getPreferredAccountConfig(channelCfg) {
|
|
5803
5810
|
const accounts = channelCfg.accounts;
|
|
5804
5811
|
if (!isRecord(accounts)) {
|
|
@@ -5960,11 +5967,22 @@ async function configureDingtalk(prompter, cfg) {
|
|
|
5960
5967
|
"\u542F\u7528 AI Card \u6D41\u5F0F\u56DE\u590D\uFF08\u63A8\u8350\u5173\u95ED\uFF0C\u4F7F\u7528\u975E\u6D41\u5F0F\uFF09",
|
|
5961
5968
|
toBoolean(existing.enableAICard, false)
|
|
5962
5969
|
);
|
|
5963
|
-
|
|
5970
|
+
const patch = {
|
|
5964
5971
|
clientId,
|
|
5965
5972
|
clientSecret,
|
|
5966
5973
|
enableAICard
|
|
5967
|
-
}
|
|
5974
|
+
};
|
|
5975
|
+
if (enableAICard) {
|
|
5976
|
+
const gatewayToken = await prompter.askSecret({
|
|
5977
|
+
label: "OpenClaw Gateway Token\uFF08\u6D41\u5F0F\u8F93\u51FA\u5FC5\u9700\uFF1B\u7559\u7A7A\u5219\u4F7F\u7528\u5168\u5C40 gateway.auth.token\uFF09",
|
|
5978
|
+
existingValue: toTrimmedString(existing.gatewayToken) ?? getGatewayAuthToken(cfg),
|
|
5979
|
+
required: false
|
|
5980
|
+
});
|
|
5981
|
+
if (gatewayToken.trim()) {
|
|
5982
|
+
patch.gatewayToken = gatewayToken;
|
|
5983
|
+
}
|
|
5984
|
+
}
|
|
5985
|
+
return mergeChannelConfig(cfg, "dingtalk", patch);
|
|
5968
5986
|
}
|
|
5969
5987
|
async function configureFeishu(prompter, cfg) {
|
|
5970
5988
|
section("\u914D\u7F6E Feishu\uFF08\u98DE\u4E66\uFF09");
|