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 +2 -0
- package/handlers/idle-debug.ts +1 -0
- package/handlers/poke.ts +1 -0
- package/handlers/tts-command.ts +7 -5
- package/manage/cooldown.ts +2 -0
- package/manage/idle-check.ts +1 -0
- package/manage/queue-processor.ts +2 -0
- package/package.json +1 -1
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) {
|
package/handlers/idle-debug.ts
CHANGED
package/handlers/poke.ts
CHANGED
package/handlers/tts-command.ts
CHANGED
|
@@ -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
|
-
|
|
21
|
-
|
|
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(
|
|
45
|
+
ctx.logger.info(
|
|
46
|
+
`[tts-cmd] 推理: "${text.slice(0, 40)}" lang=${detectLang(text)}`,
|
|
47
|
+
);
|
|
46
48
|
|
|
47
49
|
let result;
|
|
48
50
|
try {
|
package/manage/cooldown.ts
CHANGED
|
@@ -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,
|
package/manage/idle-check.ts
CHANGED
|
@@ -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));
|