@wu529778790/open-im 1.11.4-beta.3 → 1.11.4-beta.5

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.
@@ -95,6 +95,11 @@ export interface Config {
95
95
  allowedUserIds: string[];
96
96
  apiUrl?: string;
97
97
  apiToken?: string;
98
+ /** TTS 配置 */
99
+ tts?: {
100
+ enabled?: boolean;
101
+ voice?: string;
102
+ };
98
103
  };
99
104
  };
100
105
  }
@@ -162,6 +167,10 @@ export interface FilePlatformClawbot {
162
167
  allowedUserIds?: string[];
163
168
  apiUrl?: string;
164
169
  apiToken?: string;
170
+ tts?: {
171
+ enabled?: boolean;
172
+ voice?: string;
173
+ };
165
174
  }
166
175
  export interface FileToolClaude {
167
176
  cliPath?: string;
@@ -338,6 +338,8 @@ function buildInitialPayload(file) {
338
338
  apiUrl: file.platforms?.clawbot?.apiUrl ?? "http://127.0.0.1:26322",
339
339
  apiToken: maskSecret(file.platforms?.clawbot?.apiToken),
340
340
  allowedUserIds: (file.platforms?.clawbot?.allowedUserIds ?? []).join(", "),
341
+ ttsEnabled: file.platforms?.clawbot?.tts?.enabled ?? false,
342
+ ttsVoice: file.platforms?.clawbot?.tts?.voice ?? "zh-CN-XiaoxiaoNeural",
341
343
  },
342
344
  },
343
345
  ai: {
@@ -771,6 +773,10 @@ function toFileConfig(payload, existing) {
771
773
  apiUrl: clean(payload.platforms.clawbot.apiUrl) ?? "http://127.0.0.1:26322",
772
774
  apiToken: resolveSecret(payload.platforms.clawbot.apiToken, existing.platforms?.clawbot?.apiToken),
773
775
  allowedUserIds: splitCsv(payload.platforms.clawbot.allowedUserIds),
776
+ tts: {
777
+ enabled: payload.platforms.clawbot.ttsEnabled,
778
+ voice: payload.platforms.clawbot.ttsVoice || "zh-CN-XiaoxiaoNeural",
779
+ },
774
780
  },
775
781
  },
776
782
  };
package/dist/index.js CHANGED
@@ -104,9 +104,12 @@ const PLATFORM_MODULES = {
104
104
  const pc = config.platforms.clawbot;
105
105
  if (pc?.apiUrl && pc?.apiToken) {
106
106
  initClawBotSender(pc.apiUrl, pc.apiToken);
107
- // 初始化 TTS
107
+ // 初始化 TTS — 从配置读取
108
108
  const { initTTS } = await import('./shared/tts.js');
109
- initTTS({ enabled: true, voice: 'zh-CN-XiaoxiaoNeural' });
109
+ initTTS({
110
+ enabled: pc.tts?.enabled ?? false,
111
+ voice: pc.tts?.voice ?? 'zh-CN-XiaoxiaoNeural',
112
+ });
110
113
  }
111
114
  const handle = setupClawbotHandlers(config, sessionManager);
112
115
  await initClawbot(config, handle.handleEvent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wu529778790/open-im",
3
- "version": "1.11.4-beta.3",
3
+ "version": "1.11.4-beta.5",
4
4
  "description": "Your AI coding assistant, in every chat app. Multi-platform IM bridge for Claude Code, Codex, and CodeBuddy.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",