mioku-plugin-chat 2.7.0 → 2.7.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mioku-plugin-chat",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "AI 智能聊天插件",
5
5
  "main": "index.ts",
6
6
  "type": "module",
package/types.ts CHANGED
@@ -234,6 +234,7 @@ export interface ChatGroupOverrides {
234
234
  dynamicDelay?: { enabled?: boolean };
235
235
  enableMarkdownScreenshot?: boolean;
236
236
  enableMediaRecognition?: boolean;
237
+ allowedExternalSkills?: string[];
237
238
  }
238
239
 
239
240
  export type ChatGroupsFile = {
@@ -18,6 +18,8 @@ const OVERRIDABLE_BOOLEAN_FIELDS = [
18
18
  "enableMediaRecognition",
19
19
  ] as const;
20
20
 
21
+ const OVERRIDABLE_ARRAY_FIELDS = ["allowedExternalSkills"] as const;
22
+
21
23
  /**
22
24
  * 把每个群的覆盖配置浅合并到全局配置上
23
25
  * - 子对象(如 emoji)只覆盖其中存在的字段,未填字段继承全局
@@ -55,6 +57,13 @@ export function mergeGroupOverrides(
55
57
  }
56
58
  }
57
59
 
60
+ for (const key of OVERRIDABLE_ARRAY_FIELDS) {
61
+ const value = overridesMap[key];
62
+ if (Array.isArray(value)) {
63
+ resultMap[key] = value.filter((v) => typeof v === "string");
64
+ }
65
+ }
66
+
58
67
  return result;
59
68
  }
60
69