()
| 246 | }; |
| 247 | |
| 248 | const confirmEnableBackgroundService = async (): Promise<boolean> => { |
| 249 | // EXECUTOR_TEST_AUTO_CONFIRM_BACKGROUND_SERVICE skips the modal, the same seam |
| 250 | // as confirmResetState. Native dialogs are unreachable from CDP/Playwright, so |
| 251 | // a first-run boot under automation otherwise blocks here forever with no way |
| 252 | // to answer. "1" keeps the background service; any other value declines and |
| 253 | // falls back to the managed sidecar. |
| 254 | const autoConfirm = process.env.EXECUTOR_TEST_AUTO_CONFIRM_BACKGROUND_SERVICE; |
| 255 | if (autoConfirm !== undefined) return autoConfirm === "1"; |
| 256 | const { response } = await dialog.showMessageBox({ |
| 257 | type: "question", |
| 258 | title: "Keep Executor running in the background?", |
| 259 | message: "Keep your connections available after you quit Executor?", |
| 260 | detail: |
| 261 | "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.", |
| 262 | buttons: ["Keep running in the background", "Not now"], |
| 263 | defaultId: 0, |
| 264 | cancelId: 1, |
| 265 | }); |
| 266 | return response === 0; |
| 267 | }; |
| 268 | |
| 269 | const acceptSupervisedConnection = async ( |
| 270 | attached: SidecarConnection, |
no outgoing calls
no test coverage detected