koishi-plugin-group-analysis-mx 1.4.0 → 1.4.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.
- package/lib/config.js +1 -1
- package/lib/service/analysis.js +11 -0
- package/lib/utils.js +2 -2
- package/package.json +1 -1
package/lib/config.js
CHANGED
package/lib/service/analysis.js
CHANGED
|
@@ -962,6 +962,17 @@ class AnalysisService extends koishi_1.Service {
|
|
|
962
962
|
: 'N/A';
|
|
963
963
|
// Generate chart using the renderer service
|
|
964
964
|
const activeHoursChartHtml = (0, utils_1.generateActiveHoursChart)(overallActiveHours);
|
|
965
|
+
// 清理话题描述里 LLM 输出的"缺口说明/若信息不足"等元信息,避免出现在报告正文
|
|
966
|
+
if (Array.isArray(topics)) {
|
|
967
|
+
topics.forEach((t) => {
|
|
968
|
+
if (t && typeof t.detail === 'string') {
|
|
969
|
+
t.detail = t.detail
|
|
970
|
+
.replace(/缺口说明[::][\s\S]*$/g, '')
|
|
971
|
+
.replace(/若信息不足[\s\S]*$/g, '')
|
|
972
|
+
.trim();
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
}
|
|
965
976
|
const groupName = await this.resolveGroupName(selfId, target);
|
|
966
977
|
const result = {
|
|
967
978
|
totalMessages: messages.length,
|
package/lib/utils.js
CHANGED
|
@@ -382,8 +382,8 @@ function isJunkMessage(content) {
|
|
|
382
382
|
const s = String(content).trim();
|
|
383
383
|
if (!s)
|
|
384
384
|
return false;
|
|
385
|
-
// 腾讯 QQ
|
|
386
|
-
if (
|
|
385
|
+
// 腾讯 QQ 官方机器人消息签名(任意位置出现都过滤)
|
|
386
|
+
if (/ROBOT1\.0_/.test(s))
|
|
387
387
|
return true;
|
|
388
388
|
// 超长且无空白的 sign/token 串(正常聊天不会这样)
|
|
389
389
|
if (s.length > 150 && !/\s/.test(s) && /^[A-Za-z0-9+/=_.!-]+$/.test(s))
|
package/package.json
CHANGED