koishi-plugin-group-analysis-mx 1.6.0 → 1.6.2

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.
@@ -43,7 +43,8 @@ class LLMService extends koishi_1.Service {
43
43
  throw new Error('未找到 YAML 响应。');
44
44
  }
45
45
  try {
46
- const data = (0, js_yaml_1.load)(yamlMatch[1]);
46
+ // json: true 容忍重复 key(LLM 偶尔会重复输出 sender 等字段),后者覆盖前者
47
+ const data = (0, js_yaml_1.load)(yamlMatch[1], { json: true });
47
48
  if (Array.isArray(data)) {
48
49
  this.ctx.logger.info(`成功解析 ${data.length} 条数据。`);
49
50
  }
@@ -243,6 +243,7 @@ class RendererService extends koishi_1.Service {
243
243
  const img = av ? '<img src="' + av + '" alt="" style="width:1.15em;height:1.15em;border-radius:50%;object-fit:cover;vertical-align:middle;display:inline-block;margin-right:3px">' : '';
244
244
  return '<span class="topic-user" style="display:inline-flex;align-items:center;background:rgba(0,0,0,.055);border-radius:999px;padding:1px 8px 1px 2px;font-size:.92em;line-height:1.7;vertical-align:middle;margin:0 1px">' + img + name + '</span>';
245
245
  };
246
+ try { this.ctx.logger.info(`[chip] 映射昵称=${nameAvatar.size} 候选=${chipNames.length} 话题=${(data.topics || []).length} rawName示例=${JSON.stringify((data.userStats||[]).slice(0,2).map(u=>({n:u.nickname,r:u.rawName,a:String(u.avatar||'').slice(0,15)})))}`); } catch (e) {}
246
247
  const templatePath = this.getSkinPath('template_group.html');
247
248
  const randomId = Math.random().toString(36).substring(2, 15);
248
249
  const skin = this.config.skin || 'md3';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-group-analysis-mx",
3
3
  "description": "群聊分析插件 - 生成精美群聊统计报告,支持 AI 话题总结(独立版,不依赖 ChatLuna)",
4
- "version": "1.6.0",
4
+ "version": "1.6.2",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.mjs",
7
7
  "typings": "lib/index.d.ts",
@@ -53,3 +53,5 @@
53
53
 
54
54
 
55
55
 
56
+
57
+