Skip to content

The agent that grows with you

fix(desktop): drop duplicate knownSessionOwner re-landed by rebase (main's richer variant wins)

Tekniumb722177fcdd3
diff --git a/apps/desktop/src/store/session.ts b/apps/desktop/src/store/session.ts
index 3bfc4b00df4..0b7b99fefa7 100644
--- a/apps/desktop/src/store/session.ts
+++ b/apps/desktop/src/store/session.ts
@@ -168,35 +168,6 @@ export function knownSessionOwner(
return hint
}
-/**
- * The exact owner a session-scoped RPC should use, preserving registry
- * connection identity when the session was discovered through a named remote
- * connection. Falling back to only the profile is safe solely when no exact
- * route hint exists.
- */
-export function knownSessionOwner(
- sessions: readonly SessionInfo[],
- sessionId: null | string
-): SessionProfileRoute | string | undefined {
- if (!sessionId) {
- return undefined
- }
-
- const session = sessions.find(candidate => sessionMatchesStoredId(candidate, sessionId))
- const connectionId = session?.connection_id?.trim()
-
- if (connectionId) {
- return {
- connectionId,
- profile: session?.profile?.trim() || 'default'
- }
- }
-
- const hint = getSessionOwnerHint(sessionId)
-
- return hint ?? (session?.profile?.trim() || undefined)
-}
-
/**
* The profile a routed session belongs to, for keying the remembered id and
* other PRESENTATION uses (which profile's sidebar/navigation this session sits