mioku-plugin-chat 2.9.0 → 2.9.9

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/core/chat-turn.ts CHANGED
@@ -312,6 +312,7 @@ export async function processChat(
312
312
  humanize: pluginCtx.humanize,
313
313
  targetMessage,
314
314
  selfId: e.self_id,
315
+ audioService: pluginCtx.audioService,
315
316
  });
316
317
 
317
318
  const result = await pluginCtx.runWithRateLimitGuard(
@@ -497,6 +498,7 @@ async function executeChatRuntimeRequestNow(
497
498
  humanize: pluginCtx.humanize,
498
499
  targetMessage,
499
500
  selfId,
501
+ audioService: pluginCtx.audioService,
500
502
  });
501
503
 
502
504
  if (options.send === false) {
@@ -81,6 +81,7 @@ export async function handleIdleCheckDebug(
81
81
  humanize: pluginCtx.humanize,
82
82
  targetMessage,
83
83
  selfId: e.self_id,
84
+ audioService: pluginCtx.audioService,
84
85
  });
85
86
 
86
87
  const result = await pluginCtx.runWithRateLimitGuard(
package/handlers/poke.ts CHANGED
@@ -86,6 +86,7 @@ export function createPokeHandler(
86
86
  humanize: pluginCtx.humanize,
87
87
  targetMessage,
88
88
  selfId: e.self_id,
89
+ audioService: pluginCtx.audioService,
89
90
  });
90
91
 
91
92
  const result = await pluginCtx.runWithRateLimitGuard(
@@ -16,10 +16,10 @@ export async function handleTtsCommand(
16
16
  ): Promise<void> {
17
17
  const { ctx } = pluginCtx;
18
18
  const isOwner = ctx.isOwner?.(e) ?? false;
19
- if (!isOwner) {
20
- await e.reply("只有主人才能使用 /tts 指令~");
21
- return;
22
- }
19
+ // if (!isOwner) {
20
+ // await e.reply("只有主人才能使用 /tts 指令~");
21
+ // return;
22
+ // }
23
23
 
24
24
  const text = String(payload || "").trim();
25
25
  if (!text) {
@@ -42,7 +42,9 @@ export async function handleTtsCommand(
42
42
  return;
43
43
  }
44
44
 
45
- ctx.logger.info(`[tts-cmd] 推理: "${text.slice(0, 40)}" lang=${detectLang(text)}`);
45
+ ctx.logger.info(
46
+ `[tts-cmd] 推理: "${text.slice(0, 40)}" lang=${detectLang(text)}`,
47
+ );
46
48
 
47
49
  let result;
48
50
  try {
@@ -227,6 +227,7 @@ export class CooldownManager {
227
227
  humanize: this.humanize,
228
228
  targetMessage,
229
229
  selfId,
230
+ audioService: this.pluginCtx.audioService,
230
231
  });
231
232
 
232
233
  const contexts = await this.getHumanizeContexts(
@@ -353,6 +354,7 @@ export class CooldownManager {
353
354
  humanize: this.humanize,
354
355
  targetMessage,
355
356
  selfId,
357
+ audioService: this.pluginCtx.audioService,
356
358
  });
357
359
  const { groupName, memberCount } = await this.getGroupInfoData(
358
360
  this.ctx,
@@ -254,6 +254,7 @@ export class IdleCheckManager {
254
254
  humanize: this.humanize,
255
255
  targetMessage,
256
256
  selfId,
257
+ audioService: this.pluginCtx.audioService,
257
258
  });
258
259
 
259
260
  const result = await this.runWithRateLimitGuard(
@@ -184,6 +184,7 @@ export class QueueProcessor {
184
184
  const toolCtx = this.buildToolContext({
185
185
  ctx: this.ctx, event: firstMsg.event, groupSessionId, groupId, userId: firstMsg.userId,
186
186
  config: cfg, aiService: this.aiService, db: this.db, botRole, humanize: this.humanize, targetMessage, selfId,
187
+ audioService: this.pluginCtx.audioService,
187
188
  });
188
189
 
189
190
  this.sessionManager.getOrCreate(groupSessionId, "group", groupId);
@@ -264,6 +265,7 @@ export class QueueProcessor {
264
265
  const toolCtx = this.buildToolContext({
265
266
  ctx: this.ctx, event: null, groupSessionId, groupId, userId: targetMessage.userId,
266
267
  config: cfg, aiService: this.aiService, db: this.db, botRole, humanize: this.humanize, targetMessage, selfId,
268
+ audioService: this.pluginCtx.audioService,
267
269
  });
268
270
 
269
271
  const { history } = await this.getGroupHistoryMessages(groupId, groupSessionId, this.ctx, cfg.historyCount, this.db, selfId, this.buildHistoryMediaOptions(this.aiInstance, cfg));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mioku-plugin-chat",
3
- "version": "2.9.0",
3
+ "version": "2.9.9",
4
4
  "description": "AI 智能聊天插件",
5
5
  "main": "index.ts",
6
6
  "type": "module",