Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): V2 imports stashed prompts and drafts from the V1 profile #15072

Mergedjuliusmarmingemerged 5 commits intomain fromrefs/pull/15072/headmerged by juliusmarminge View on GitHub

Showing 11 changed files with 122 additions and 0 deletions (loading 9).

x
0 of 11 viewed, 11 left
5 additions and 0 deletionsapps/desktop/src/app/DesktopApp.tsModified
View file
@@ -19,6 +19,7 @@
import * as DesktopWindow from "../window/DesktopWindow.ts";
import * as DesktopBackendPool from "../backend/DesktopBackendPool.ts";
import * as DesktopEnvironment from "./DesktopEnvironment.ts";
+import * as DesktopLegacyLocalStorage from "./DesktopLegacyLocalStorage.ts";
import * as DesktopLifecycle from "./DesktopLifecycle.ts";
import * as DesktopLinuxUrlHandler from "./DesktopLinuxUrlHandler.ts";
import * as DesktopObservability from "./DesktopObservability.ts";
@@ -179,6 +180,10 @@
});
yield* installDesktopIpcHandlers();
yield* logBootstrapInfo("bootstrap ipc handlers registered");
+ // Before any window: the preload merges these items before the app reads storage.
+ yield* (yield* DesktopLegacyLocalStorage.DesktopLegacyLocalStorage).load(
+ yield* (yield* DesktopAppIdentity.DesktopAppIdentity).resolveUserDataPath,
+ );
​
yield* snapShot.initialize;
​
117 additions and 0 deletionsapps/desktop/src/app/DesktopLegacyLocalStorage.tsAdded
View file
@@ -0,0 +1,117 @@
+import * as Context from "effect/Context";
+import * as Effect from "effect/Effect";
+import * as FileSystem from "effect/FileSystem";
+import * as Layer from "effect/Layer";
+import * as Option from "effect/Option";
+import * as Path from "effect/Path";