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
|
-
|
|
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');
|