agentgui 1.0.399 → 1.0.400
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
|
@@ -193,12 +193,16 @@ class ConversationManager {
|
|
|
193
193
|
getParentPath(dirPath) {
|
|
194
194
|
const expanded = dirPath === '~' ? this.folderBrowser.homePath : dirPath;
|
|
195
195
|
const parts = pathSplit(expanded);
|
|
196
|
+
const isWindows = expanded.includes('\\') || /^[A-Za-z]:/.test(expanded);
|
|
197
|
+
const separator = isWindows ? '\\' : '/';
|
|
196
198
|
if (parts.length <= 1) {
|
|
197
|
-
|
|
198
|
-
return separator;
|
|
199
|
+
return isWindows && parts[0] && parts[0].endsWith(':') ? parts[0] + separator : separator;
|
|
199
200
|
}
|
|
200
201
|
parts.pop();
|
|
201
|
-
|
|
202
|
+
if (isWindows) {
|
|
203
|
+
const joined = parts.join(separator);
|
|
204
|
+
return parts.length === 1 && parts[0].endsWith(':') ? joined + separator : joined;
|
|
205
|
+
}
|
|
202
206
|
return separator + parts.join(separator);
|
|
203
207
|
}
|
|
204
208
|
|