@nestim/koishi-plugin-qq-group-manager 1.4.11 → 1.4.13

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/src/index.ts CHANGED
@@ -133,6 +133,7 @@ export const Config = Schema.intersect([
133
133
  aiIdleTopicMinHour: Schema.natural().min(0).max(23).default(9).description('主动话题允许的最早小时(0-23)。'),
134
134
  aiIdleTopicMaxHour: Schema.natural().min(0).max(24).default(23).description('主动话题允许的最晚小时(不含)。'),
135
135
  aiIdleTopicCooldownMinutes: Schema.natural().min(1).max(1440).default(60).description('两次主动话题之间的最小间隔(分钟)。'),
136
+ aiIdleTopicWebSearch: Schema.boolean().default(true).description('主动话题前先搜一次(优先用最近聊天内容做 query,没有上下文就搜当天热点);搜不到或无关会自动忽略。'),
136
137
  aiSystemPrompt: Schema.string().role('textarea').default('你是群聊中的友好机器人,请简洁、自然、符合中文互联网语境地回复。').description('默认系统提示词。'),
137
138
  aiActivePersona: Schema.string().default('').description('启用的人格 ID(为空时使用默认自称与默认提示词)。'),
138
139
  aiPersonas: Schema.array(Schema.object({
package/src/service.js CHANGED
@@ -902,10 +902,12 @@ class QQGroupManagerService extends koishi_1.Service {
902
902
  .map((item) => String(item || '').trim())
903
903
  .filter(Boolean));
904
904
  const label = String(payload && payload.label || '自动归纳');
905
+ const category = String(payload && payload.category || '').trim();
906
+ const fullLabel = category ? `${label} · ${category}` : label;
905
907
  return this.runMemoryWriteLocked(async () => {
906
908
  const now = new Date();
907
909
  const stamp = now.toLocaleString('zh-CN', { hour12: false });
908
- const block = `## ${stamp} · ${label}\n${add}`;
910
+ const block = `## ${stamp} · ${fullLabel}\n${add}`;
909
911
  const existing = (await this.readMemoryFile(scope)).trim();
910
912
  const blocks = this.extractMemoryBlocks(existing);
911
913
  const kept = [];