mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 00:57:45 +00:00
fix(orcad): move host account env restore out of orcad-entry to clear max-lines (#28529)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -291,12 +291,8 @@ async function startOrcadRuntime(
|
||||
})
|
||||
|
||||
// Why before any launch: a desktop that owns this host's accounts pushed them on an earlier run.
|
||||
const { readOrcadHostAccountLaunchEnv, writeOrcadHostAccountLaunchEnv } =
|
||||
await import('./orcad-host-account-launch-env-store')
|
||||
runtime.restoreHostAccountLaunchEnv(
|
||||
readOrcadHostAccountLaunchEnv(runtimeUserDataPath),
|
||||
(launchEnv) => writeOrcadHostAccountLaunchEnv(runtimeUserDataPath, launchEnv)
|
||||
)
|
||||
const { restoreOrcadHostAccountLaunchEnv } = await import('./orcad-host-account-launch-env-store')
|
||||
restoreOrcadHostAccountLaunchEnv(runtime, runtimeUserDataPath)
|
||||
|
||||
const { installOrcadSessionSearchService } = await import('./orcad-session-search')
|
||||
sessionSearch = await installOrcadSessionSearchService({
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
HostAccountLaunchEnvParams,
|
||||
type HostAccountLaunchEnv
|
||||
} from '../../shared/host-account-launch-env'
|
||||
import type { OrcaRuntimeService } from '../runtime/orca-runtime'
|
||||
|
||||
const FILE_NAME = 'host-account-launch-env.json'
|
||||
|
||||
@@ -41,3 +42,12 @@ export function writeOrcadHostAccountLaunchEnv(
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
export function restoreOrcadHostAccountLaunchEnv(
|
||||
runtime: Pick<OrcaRuntimeService, 'restoreHostAccountLaunchEnv'>,
|
||||
userDataPath: string
|
||||
): void {
|
||||
runtime.restoreHostAccountLaunchEnv(readOrcadHostAccountLaunchEnv(userDataPath), (launchEnv) =>
|
||||
writeOrcadHostAccountLaunchEnv(userDataPath, launchEnv)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user