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