MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getDesktopInstallStatus

Function getDesktopInstallStatus

source code/utils/desktopDeepLink.ts:139–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137 * Check Desktop install status including version compatibility.
138 */
139export async function getDesktopInstallStatus(): Promise<DesktopInstallStatus> {
140 const installed = await isDesktopInstalled()
141 if (!installed) {
142 return { status: 'not-installed' }
143 }
144
145 let version: string | null
146 try {
147 version = await getDesktopVersion()
148 } catch {
149 // Best effort — proceed with handoff if version detection fails
150 return { status: 'ready', version: 'unknown' }
151 }
152
153 if (!version) {
154 // Can't determine version — assume it's ready (dev mode or unknown install)
155 return { status: 'ready', version: 'unknown' }
156 }
157
158 const coerced = semverCoerce(version)
159 if (!coerced || !semverGte(coerced.version, MIN_DESKTOP_VERSION)) {
160 return { status: 'version-too-old', version }
161 }
162
163 return { status: 'ready', version }
164}
165
166/**
167 * Opens a deep link URL using the platform-specific mechanism.

Callers 1

performHandoffFunction · 0.85

Calls 2

isDesktopInstalledFunction · 0.85
getDesktopVersionFunction · 0.85

Tested by

no test coverage detected