@ynhcj/xiaoyi-channel 0.0.71-beta → 0.0.73-beta

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.
@@ -15,6 +15,9 @@ const DEVICE_TOOL_POLICY = {
15
15
  "search_message",
16
16
  "send_command_to_car",
17
17
  "search_contact",
18
+ "QueryCollection",
19
+ "AddCollection",
20
+ "DeleteCollection",
18
21
  ],
19
22
  },
20
23
  };
@@ -61,6 +61,14 @@ export const saveMediaToGalleryTool = {
61
61
  if (mediaType && !["pic", "video"].includes(mediaType)) {
62
62
  throw new ToolInputError(`mediaType只支持 pic 或 video,当前值: ${mediaType}`);
63
63
  }
64
+ // Strip file extension from fileName if present
65
+ let sanitizedFileName = fileName;
66
+ if (sanitizedFileName && typeof sanitizedFileName === "string") {
67
+ const lastDot = sanitizedFileName.lastIndexOf(".");
68
+ if (lastDot > 0) {
69
+ sanitizedFileName = sanitizedFileName.substring(0, lastDot);
70
+ }
71
+ }
64
72
  // Get session context
65
73
  const sessionContext = getCurrentSessionContext();
66
74
  if (!sessionContext) {
@@ -86,8 +94,8 @@ export const saveMediaToGalleryTool = {
86
94
  if (mediaType) {
87
95
  intentParam.mediaType = mediaType;
88
96
  }
89
- if (fileName) {
90
- intentParam.fileName = fileName;
97
+ if (sanitizedFileName) {
98
+ intentParam.fileName = sanitizedFileName;
91
99
  }
92
100
  // Build SaveMediaToGallery command
93
101
  const command = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.71-beta",
3
+ "version": "0.0.73-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",