MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / getDesktopInstallStatus

Function getDesktopInstallStatus

src/utils/desktopDeepLink.ts:137–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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