дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
fix(http-client): find the generated request scratch on Windows (#356)
Generate Request in HTTP Client (and Generate Requests for Controller, and the gutter icon) left the scratch file empty on Windows with "Cannot open file …\ai.l0ng.openidea/scratches/generated-requests.http": the scratch path joined the native app data directory (backslashes) with a /-separated suffix, so the opened editor could not be found by its path. Scratch paths now normalise the app data directory to the UI's /-separated form through a shared ipcPath helper, used by scratches, the HTTP client and Spring request generation. Co-authored-by: kevinh458 <[email protected]> 未在 Windows 实机验证。
Цей коміт міститься в:
1 джерело
9575500dd6
коміт
9d1fe17894
7 files changed
+144
-4
No files matched your search
@@ -7,6 +7,7 @@
|
||||
* plain JSON (localStorage, keyed by project root) and rebuilt into a fresh
|
||||
* TabsState with new ids.
|
||||
*/
|
||||
import { ipcPath } from "@/platform/paths";
|
||||
import type { EditorInput } from "@/workbench/contributions";
|
||||
import { initialTabsState, paneIds, type LayoutNode, type Pane, type Tab, type TabsState } from "./tabs";
|
||||
|
||||
@@ -91,7 +92,7 @@ export function serializeSession(
|
||||
* and `\\?\C:\a\b` become `C:/a/b`. Other paths are returned as is.
|
||||
*/
|
||||
export function slashPath(p: string): string {
|
||||
return /^(\\\\\?\\)?[A-Za-z]:\\/.test(p) ? p.replace(/^\\\\\?\\/, "").replace(/\\/g, "/") : p;
|
||||
return ipcPath(p);
|
||||
}
|
||||
|
||||
function isSessionTab(v: unknown): v is SessionTab {
|
||||
|
||||
Reference in new issue
Заблокувати користувача