@openclaw-china/dingtalk 0.1.36 → 0.1.38
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 +65 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6199,7 +6199,7 @@ ${l}
|
|
|
6199
6199
|
}
|
|
6200
6200
|
}
|
|
6201
6201
|
} }).prompt();
|
|
6202
|
-
var PROJECT_REPO = "https://github.com/BytePioneer-AI/
|
|
6202
|
+
var PROJECT_REPO = "https://github.com/BytePioneer-AI/openclaw-china";
|
|
6203
6203
|
var GUIDES_BASE = "https://github.com/BytePioneer-AI/openclaw-china/tree/main/doc/guides";
|
|
6204
6204
|
var OPENCLAW_HOME = join(homedir(), ".openclaw");
|
|
6205
6205
|
var DEFAULT_PLUGIN_PATH = join(OPENCLAW_HOME, "extensions");
|
|
@@ -6594,6 +6594,7 @@ async function configureWecomApp(prompter, cfg) {
|
|
|
6594
6594
|
section("\u914D\u7F6E WeCom App\uFF08\u81EA\u5EFA\u5E94\u7528-\u53EF\u63A5\u5165\u5FAE\u4FE1\uFF09");
|
|
6595
6595
|
showGuideLink("wecom-app");
|
|
6596
6596
|
const existing = getChannelConfig(cfg, "wecom-app");
|
|
6597
|
+
const existingAsr = isRecord(existing.asr) ? existing.asr : {};
|
|
6597
6598
|
const webhookPath = await prompter.askText({
|
|
6598
6599
|
label: "Webhook \u8DEF\u5F84\uFF08\u9700\u4E0E\u4F01\u4E1A\u5FAE\u4FE1\u540E\u53F0\u914D\u7F6E\u4E00\u81F4\uFF0C\u9ED8\u8BA4 /wecom-app\uFF09",
|
|
6599
6600
|
defaultValue: toTrimmedString(existing.webhookPath) ?? "/wecom-app",
|
|
@@ -6632,12 +6633,45 @@ async function configureWecomApp(prompter, cfg) {
|
|
|
6632
6633
|
patch.corpId = corpId;
|
|
6633
6634
|
patch.corpSecret = corpSecret;
|
|
6634
6635
|
patch.agentId = agentId;
|
|
6636
|
+
const asrEnabled = await prompter.askConfirm(
|
|
6637
|
+
"\u542F\u7528 ASR\uFF08\u652F\u6301\u5165\u7AD9\u8BED\u97F3\u81EA\u52A8\u8F6C\u6587\u5B57\uFF09",
|
|
6638
|
+
toBoolean(existingAsr.enabled, false)
|
|
6639
|
+
);
|
|
6640
|
+
const asr = {
|
|
6641
|
+
enabled: asrEnabled
|
|
6642
|
+
};
|
|
6643
|
+
if (asrEnabled) {
|
|
6644
|
+
Ve(
|
|
6645
|
+
[
|
|
6646
|
+
"ASR \u5F00\u901A\u65B9\u5F0F\u8BF7\u67E5\u770B\u914D\u7F6E\u6587\u6863\uFF1A\u6B65\u9AA4\u4E03\uFF08\u53EF\u9009\uFF09\uFF1A\u5F00\u542F\u8BED\u97F3\u8F6C\u6587\u672C\uFF08ASR\uFF09",
|
|
6647
|
+
"https://github.com/BytePioneer-AI/openclaw-china/blob/main/doc/guides/wecom-app/configuration.md"
|
|
6648
|
+
].join("\n"),
|
|
6649
|
+
"\u63D0\u793A"
|
|
6650
|
+
);
|
|
6651
|
+
asr.appId = await prompter.askText({
|
|
6652
|
+
label: "ASR appId\uFF08\u817E\u8BAF\u4E91\uFF09",
|
|
6653
|
+
defaultValue: toTrimmedString(existingAsr.appId),
|
|
6654
|
+
required: true
|
|
6655
|
+
});
|
|
6656
|
+
asr.secretId = await prompter.askSecret({
|
|
6657
|
+
label: "ASR secretId\uFF08\u817E\u8BAF\u4E91\uFF09",
|
|
6658
|
+
existingValue: toTrimmedString(existingAsr.secretId),
|
|
6659
|
+
required: true
|
|
6660
|
+
});
|
|
6661
|
+
asr.secretKey = await prompter.askSecret({
|
|
6662
|
+
label: "ASR secretKey\uFF08\u817E\u8BAF\u4E91\uFF09",
|
|
6663
|
+
existingValue: toTrimmedString(existingAsr.secretKey),
|
|
6664
|
+
required: true
|
|
6665
|
+
});
|
|
6666
|
+
}
|
|
6667
|
+
patch.asr = asr;
|
|
6635
6668
|
return mergeChannelConfig(cfg, "wecom-app", patch);
|
|
6636
6669
|
}
|
|
6637
6670
|
async function configureQQBot(prompter, cfg) {
|
|
6638
6671
|
section("\u914D\u7F6E QQBot\uFF08QQ \u673A\u5668\u4EBA\uFF09");
|
|
6639
6672
|
showGuideLink("qqbot");
|
|
6640
6673
|
const existing = getChannelConfig(cfg, "qqbot");
|
|
6674
|
+
const existingAsr = isRecord(existing.asr) ? existing.asr : {};
|
|
6641
6675
|
const appId = await prompter.askText({
|
|
6642
6676
|
label: "QQBot appId",
|
|
6643
6677
|
defaultValue: toTrimmedString(existing.appId),
|
|
@@ -6648,19 +6682,44 @@ async function configureQQBot(prompter, cfg) {
|
|
|
6648
6682
|
existingValue: toTrimmedString(existing.clientSecret),
|
|
6649
6683
|
required: true
|
|
6650
6684
|
});
|
|
6685
|
+
Ve(
|
|
6686
|
+
"QQ \u7684 Markdown \u4F53\u9A8C\u5F88\u597D\uFF0C\u4F46\u9700\u8981\u5148\u7533\u8BF7\u5F00\u901A\uFF0C\u8BE6\u60C5\u8BF7\u67E5\u770B\u914D\u7F6E\u6587\u6863\u3002",
|
|
6687
|
+
"\u63D0\u793A"
|
|
6688
|
+
);
|
|
6651
6689
|
const markdownSupport = await prompter.askConfirm(
|
|
6652
6690
|
"\u542F\u7528 Markdown \u652F\u6301",
|
|
6653
6691
|
toBoolean(existing.markdownSupport, false)
|
|
6654
6692
|
);
|
|
6655
|
-
const
|
|
6656
|
-
"\
|
|
6657
|
-
toBoolean(
|
|
6693
|
+
const asrEnabled = await prompter.askConfirm(
|
|
6694
|
+
"\u542F\u7528 ASR\uFF08\u652F\u6301\u5165\u7AD9\u8BED\u97F3\u81EA\u52A8\u8F6C\u6587\u5B57\uFF09",
|
|
6695
|
+
toBoolean(existingAsr.enabled, false)
|
|
6658
6696
|
);
|
|
6697
|
+
const asr = {
|
|
6698
|
+
enabled: asrEnabled
|
|
6699
|
+
};
|
|
6700
|
+
if (asrEnabled) {
|
|
6701
|
+
Ve("ASR \u5F00\u901A\u65B9\u5F0F\u8BE6\u60C5\u8BF7\u67E5\u770B\u914D\u7F6E\u6587\u6863\u3002", "\u63D0\u793A");
|
|
6702
|
+
asr.appId = await prompter.askText({
|
|
6703
|
+
label: "ASR appId\uFF08\u817E\u8BAF\u4E91\uFF09",
|
|
6704
|
+
defaultValue: toTrimmedString(existingAsr.appId),
|
|
6705
|
+
required: true
|
|
6706
|
+
});
|
|
6707
|
+
asr.secretId = await prompter.askSecret({
|
|
6708
|
+
label: "ASR secretId\uFF08\u817E\u8BAF\u4E91\uFF09",
|
|
6709
|
+
existingValue: toTrimmedString(existingAsr.secretId),
|
|
6710
|
+
required: true
|
|
6711
|
+
});
|
|
6712
|
+
asr.secretKey = await prompter.askSecret({
|
|
6713
|
+
label: "ASR secretKey\uFF08\u817E\u8BAF\u4E91\uFF09",
|
|
6714
|
+
existingValue: toTrimmedString(existingAsr.secretKey),
|
|
6715
|
+
required: true
|
|
6716
|
+
});
|
|
6717
|
+
}
|
|
6659
6718
|
return mergeChannelConfig(cfg, "qqbot", {
|
|
6660
6719
|
appId,
|
|
6661
6720
|
clientSecret,
|
|
6662
6721
|
markdownSupport,
|
|
6663
|
-
|
|
6722
|
+
asr
|
|
6664
6723
|
});
|
|
6665
6724
|
}
|
|
6666
6725
|
async function configureSingleChannel(channel, prompter, cfg) {
|
|
@@ -6801,7 +6860,7 @@ function registerChinaSetupCli(api, opts) {
|
|
|
6801
6860
|
}
|
|
6802
6861
|
|
|
6803
6862
|
// ../../packages/shared/src/cli/install-hint.ts
|
|
6804
|
-
var PROJECT_REPO2 = "https://github.com/BytePioneer-AI/
|
|
6863
|
+
var PROJECT_REPO2 = "https://github.com/BytePioneer-AI/openclaw-china";
|
|
6805
6864
|
var INSTALL_SETUP_COMMAND = "openclaw china setup";
|
|
6806
6865
|
var START_GATEWAY_COMMAND = "openclaw gateway --port 18789 --verbose";
|
|
6807
6866
|
var ANSI_RESET2 = "\x1B[0m";
|