xiaozuoassistant 0.2.21 → 0.2.22

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.
@@ -119,7 +119,9 @@ export class ShortTermMemory {
119
119
  return this.saveQueue;
120
120
  }
121
121
  getSessionDir(sessionId) {
122
- return path.join(SESSIONS_DIR, sessionId);
122
+ // 替换不安全的字符 ( Windows 下不支持的 ':' 和 '/')
123
+ const safeSessionId = sessionId.replace(/[:/\\]/g, '_');
124
+ return path.join(SESSIONS_DIR, safeSessionId);
123
125
  }
124
126
  getMessagesFile(sessionId) {
125
127
  return path.join(this.getSessionDir(sessionId), 'messages.json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xiaozuoassistant",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "A local-first personal AI assistant with multi-channel support and enhanced memory.",
5
5
  "author": "mantle.lau",
6
6
  "license": "MIT",