Normalize session cwd matching for bootstrap reuse
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
b688456810
commit
9bd8e7b1db
1 file changed
+9
-1
@@ -363,9 +363,17 @@ export async function startRuntimeApiServer(
|
||||
};
|
||||
|
||||
const ensureLaunchSession = async (): Promise<BootstrapSessionResult> => {
|
||||
const isLaunchProjectSession = (session: ProviderSession) => {
|
||||
if (!session.cwd) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return path.resolve(session.cwd) === launchCwd;
|
||||
};
|
||||
|
||||
const existingSession = providerManager
|
||||
.listSessions()
|
||||
.find((session) => session.cwd === launchCwd && session.status !== "closed");
|
||||
.find((session) => isLaunchProjectSession(session) && session.status !== "closed");
|
||||
if (existingSession) {
|
||||
bootstrapFallbackSession = null;
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user