@openclaw-china/qqbot 0.1.9 → 0.1.11

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 CHANGED
@@ -6191,7 +6191,7 @@ ${l}
6191
6191
  }
6192
6192
  }
6193
6193
  } }).prompt();
6194
- var PROJECT_REPO = "https://github.com/BytePioneer-AI/moltbot-china";
6194
+ var PROJECT_REPO = "https://github.com/BytePioneer-AI/openclaw-china";
6195
6195
  var GUIDES_BASE = "https://github.com/BytePioneer-AI/openclaw-china/tree/main/doc/guides";
6196
6196
  var OPENCLAW_HOME = join(homedir(), ".openclaw");
6197
6197
  var DEFAULT_PLUGIN_PATH = join(OPENCLAW_HOME, "extensions");
@@ -6586,6 +6586,7 @@ async function configureWecomApp(prompter, cfg) {
6586
6586
  section("\u914D\u7F6E WeCom App\uFF08\u81EA\u5EFA\u5E94\u7528-\u53EF\u63A5\u5165\u5FAE\u4FE1\uFF09");
6587
6587
  showGuideLink("wecom-app");
6588
6588
  const existing = getChannelConfig(cfg, "wecom-app");
6589
+ const existingAsr = isRecord(existing.asr) ? existing.asr : {};
6589
6590
  const webhookPath = await prompter.askText({
6590
6591
  label: "Webhook \u8DEF\u5F84\uFF08\u9700\u4E0E\u4F01\u4E1A\u5FAE\u4FE1\u540E\u53F0\u914D\u7F6E\u4E00\u81F4\uFF0C\u9ED8\u8BA4 /wecom-app\uFF09",
6591
6592
  defaultValue: toTrimmedString(existing.webhookPath) ?? "/wecom-app",
@@ -6624,12 +6625,45 @@ async function configureWecomApp(prompter, cfg) {
6624
6625
  patch.corpId = corpId;
6625
6626
  patch.corpSecret = corpSecret;
6626
6627
  patch.agentId = agentId;
6628
+ const asrEnabled = await prompter.askConfirm(
6629
+ "\u542F\u7528 ASR\uFF08\u652F\u6301\u5165\u7AD9\u8BED\u97F3\u81EA\u52A8\u8F6C\u6587\u5B57\uFF09",
6630
+ toBoolean(existingAsr.enabled, false)
6631
+ );
6632
+ const asr = {
6633
+ enabled: asrEnabled
6634
+ };
6635
+ if (asrEnabled) {
6636
+ Ve(
6637
+ [
6638
+ "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",
6639
+ "https://github.com/BytePioneer-AI/openclaw-china/blob/main/doc/guides/wecom-app/configuration.md"
6640
+ ].join("\n"),
6641
+ "\u63D0\u793A"
6642
+ );
6643
+ asr.appId = await prompter.askText({
6644
+ label: "ASR appId\uFF08\u817E\u8BAF\u4E91\uFF09",
6645
+ defaultValue: toTrimmedString(existingAsr.appId),
6646
+ required: true
6647
+ });
6648
+ asr.secretId = await prompter.askSecret({
6649
+ label: "ASR secretId\uFF08\u817E\u8BAF\u4E91\uFF09",
6650
+ existingValue: toTrimmedString(existingAsr.secretId),
6651
+ required: true
6652
+ });
6653
+ asr.secretKey = await prompter.askSecret({
6654
+ label: "ASR secretKey\uFF08\u817E\u8BAF\u4E91\uFF09",
6655
+ existingValue: toTrimmedString(existingAsr.secretKey),
6656
+ required: true
6657
+ });
6658
+ }
6659
+ patch.asr = asr;
6627
6660
  return mergeChannelConfig(cfg, "wecom-app", patch);
6628
6661
  }
6629
6662
  async function configureQQBot(prompter, cfg) {
6630
6663
  section("\u914D\u7F6E QQBot\uFF08QQ \u673A\u5668\u4EBA\uFF09");
6631
6664
  showGuideLink("qqbot");
6632
6665
  const existing = getChannelConfig(cfg, "qqbot");
6666
+ const existingAsr = isRecord(existing.asr) ? existing.asr : {};
6633
6667
  const appId = await prompter.askText({
6634
6668
  label: "QQBot appId",
6635
6669
  defaultValue: toTrimmedString(existing.appId),
@@ -6640,19 +6674,44 @@ async function configureQQBot(prompter, cfg) {
6640
6674
  existingValue: toTrimmedString(existing.clientSecret),
6641
6675
  required: true
6642
6676
  });
6677
+ Ve(
6678
+ "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",
6679
+ "\u63D0\u793A"
6680
+ );
6643
6681
  const markdownSupport = await prompter.askConfirm(
6644
6682
  "\u542F\u7528 Markdown \u652F\u6301",
6645
6683
  toBoolean(existing.markdownSupport, false)
6646
6684
  );
6647
- const replyFinalOnly = await prompter.askConfirm(
6648
- "\u4EC5\u53D1\u9001\u6700\u7EC8\u56DE\u590D\uFF08\u5173\u95ED\u6D41\u5F0F\u5206\u7247\uFF09",
6649
- toBoolean(existing.replyFinalOnly, false)
6685
+ const asrEnabled = await prompter.askConfirm(
6686
+ "\u542F\u7528 ASR\uFF08\u652F\u6301\u5165\u7AD9\u8BED\u97F3\u81EA\u52A8\u8F6C\u6587\u5B57\uFF09",
6687
+ toBoolean(existingAsr.enabled, false)
6650
6688
  );
6689
+ const asr = {
6690
+ enabled: asrEnabled
6691
+ };
6692
+ if (asrEnabled) {
6693
+ Ve("ASR \u5F00\u901A\u65B9\u5F0F\u8BE6\u60C5\u8BF7\u67E5\u770B\u914D\u7F6E\u6587\u6863\u3002", "\u63D0\u793A");
6694
+ asr.appId = await prompter.askText({
6695
+ label: "ASR appId\uFF08\u817E\u8BAF\u4E91\uFF09",
6696
+ defaultValue: toTrimmedString(existingAsr.appId),
6697
+ required: true
6698
+ });
6699
+ asr.secretId = await prompter.askSecret({
6700
+ label: "ASR secretId\uFF08\u817E\u8BAF\u4E91\uFF09",
6701
+ existingValue: toTrimmedString(existingAsr.secretId),
6702
+ required: true
6703
+ });
6704
+ asr.secretKey = await prompter.askSecret({
6705
+ label: "ASR secretKey\uFF08\u817E\u8BAF\u4E91\uFF09",
6706
+ existingValue: toTrimmedString(existingAsr.secretKey),
6707
+ required: true
6708
+ });
6709
+ }
6651
6710
  return mergeChannelConfig(cfg, "qqbot", {
6652
6711
  appId,
6653
6712
  clientSecret,
6654
6713
  markdownSupport,
6655
- replyFinalOnly
6714
+ asr
6656
6715
  });
6657
6716
  }
6658
6717
  async function configureSingleChannel(channel, prompter, cfg) {
@@ -6793,7 +6852,7 @@ function registerChinaSetupCli(api, opts) {
6793
6852
  }
6794
6853
 
6795
6854
  // ../../packages/shared/src/cli/install-hint.ts
6796
- var PROJECT_REPO2 = "https://github.com/BytePioneer-AI/moltbot-china";
6855
+ var PROJECT_REPO2 = "https://github.com/BytePioneer-AI/openclaw-china";
6797
6856
  var INSTALL_SETUP_COMMAND = "openclaw china setup";
6798
6857
  var START_GATEWAY_COMMAND = "openclaw gateway --port 18789 --verbose";
6799
6858
  var ANSI_RESET2 = "\x1B[0m";