.
This commit is contained in:
@@ -176,7 +176,6 @@ function setInitStep(step: InitStep) {
|
||||
|
||||
async function initialize() {
|
||||
const needsMigration = !sqliteFileExists()
|
||||
const sqliteDone = needsMigration ? defer<void>() : undefined
|
||||
let overlay: BrowserWindow | null = null
|
||||
|
||||
const port = await allocatePort()
|
||||
@@ -203,7 +202,6 @@ async function initialize() {
|
||||
setInitStep({ phase: "sqlite_waiting" })
|
||||
if (overlay) sendSqliteMigrationProgress(overlay, progress)
|
||||
if (mainWindow) sendSqliteMigrationProgress(mainWindow, progress)
|
||||
if (progress.type === "Done") sqliteDone?.resolve()
|
||||
})
|
||||
|
||||
if (needsMigration) {
|
||||
@@ -215,12 +213,6 @@ async function initialize() {
|
||||
},
|
||||
})
|
||||
initEmitter.emit("sqlite", { type: "Done" })
|
||||
|
||||
sqliteDone?.resolve()
|
||||
}
|
||||
|
||||
if (needsMigration) {
|
||||
await sqliteDone?.promise
|
||||
}
|
||||
|
||||
logger.log("spawning windows sidecar", { url })
|
||||
|
||||
@@ -14,7 +14,6 @@ import type {
|
||||
WslTranscriptLine,
|
||||
} from "../preload/types"
|
||||
import { LEGACY_LOCAL_SERVER_KEY, WSL_SERVERS_KEY } from "./constants"
|
||||
import { spawnWslSidecar } from "./server"
|
||||
import { getStore } from "./store"
|
||||
import type { WslCommandLine } from "./wsl"
|
||||
import {
|
||||
@@ -412,10 +411,9 @@ export function createWslServersController(appVersion: string, spawnSidecar: Spa
|
||||
|
||||
stopAll() {
|
||||
for (const item of state.servers) invalidateStartAttempt(item.config.id)
|
||||
for (const [id] of sidecars) {
|
||||
const existing = sidecars.get(id)
|
||||
for (const existing of sidecars.values()) {
|
||||
try {
|
||||
existing?.listener.stop()
|
||||
existing.listener.stop()
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
|
||||
@@ -436,11 +436,7 @@ render(() => {
|
||||
}
|
||||
})
|
||||
|
||||
const [defaultServer] = createResource(() =>
|
||||
platform.getDefaultServer?.().then((url) => {
|
||||
if (url) return ServerConnection.Key.make(url)
|
||||
}),
|
||||
)
|
||||
const [defaultServer] = createResource(() => platform.getDefaultServer?.())
|
||||
const [locale] = createResource(loadLocale)
|
||||
const [storedServers] = createResource(async () => {
|
||||
const raw = await platform.storage?.("opencode.global.dat").getItem("server")
|
||||
|
||||
Reference in New Issue
Block a user