/ commands / desktop / index.ts
index.ts
 1  import type { Command } from '../../commands.js'
 2  
 3  function isSupportedPlatform(): boolean {
 4    if (process.platform === 'darwin') {
 5      return true
 6    }
 7    if (process.platform === 'win32' && process.arch === 'x64') {
 8      return true
 9    }
10    return false
11  }
12  
13  const desktop = {
14    type: 'local-jsx',
15    name: 'desktop',
16    aliases: ['app'],
17    description: 'Continue the current session in Claude Desktop',
18    availability: ['claude-ai'],
19    isEnabled: isSupportedPlatform,
20    get isHidden() {
21      return !isSupportedPlatform()
22    },
23    load: () => import('./desktop.js'),
24  } satisfies Command
25  
26  export default desktop