()
| 196 | }; |
| 197 | |
| 198 | const confirmEnableBackgroundService = async (): Promise<boolean> => { |
| 199 | // EXECUTOR_TEST_AUTO_CONFIRM_BACKGROUND_SERVICE skips the modal, the same seam |
| 200 | // as confirmResetState. Native dialogs are unreachable from CDP/Playwright, so |
| 201 | // a first-run boot under automation otherwise blocks here forever with no way |
| 202 | // to answer. "1" keeps the background service; any other value declines and |
| 203 | // falls back to the managed sidecar. |
| 204 | const autoConfirm = process.env.EXECUTOR_TEST_AUTO_CONFIRM_BACKGROUND_SERVICE; |
| 205 | if (autoConfirm !== undefined) return autoConfirm === "1"; |
| 206 | const { response } = await dialog.showMessageBox({ |
| 207 | type: "question", |
| 208 | title: "Keep Executor running in the background?", |
| 209 | message: "Keep your connections available after you quit Executor?", |
| 210 | detail: |
| 211 | "Executor can run as a lightweight background service so your MCP tools keep working after you close this window or restart your computer. You can turn this off anytime in Settings.", |
| 212 | buttons: ["Keep running in the background", "Not now"], |
| 213 | defaultId: 0, |
| 214 | cancelId: 1, |
| 215 | }); |
| 216 | return response === 0; |
| 217 | }; |
| 218 | |
| 219 | /** |
| 220 | * Resolve a connection to the OS-supervised daemon, installing it on first run |
no outgoing calls
no test coverage detected