(ide: IDE)
| 29 | } |
| 30 | |
| 31 | export async function startLocalLemonade(ide: IDE): Promise<any> { |
| 32 | let startCommand: string | undefined; |
| 33 | |
| 34 | switch (process.platform) { |
| 35 | case "linux": // Linux |
| 36 | // On Linux, direct users to start Lemonade manually |
| 37 | return ide.showToast( |
| 38 | "info", |
| 39 | "Please start Lemonade manually. Visit https://lemonade-server.ai for instructions.", |
| 40 | ); |
| 41 | |
| 42 | case "win32": // Windows |
| 43 | startCommand = "lemonade-server serve\n"; |
| 44 | break; |
| 45 | |
| 46 | default: |
| 47 | return ide.showToast( |
| 48 | "error", |
| 49 | "Cannot start Lemonade: platform not supported!", |
| 50 | ); |
| 51 | } |
| 52 | |
| 53 | if (startCommand) { |
| 54 | return ide.runCommand(startCommand, { |
| 55 | reuseTerminal: true, |
| 56 | terminalName: "Start Lemonade", |
| 57 | }); |
| 58 | } |
| 59 | } |
no test coverage detected