()
| 207 | }; |
| 208 | |
| 209 | const confirmEnableBackgroundService = async (): Promise<boolean> => { |
| 210 | // EXECUTOR_TEST_AUTO_CONFIRM_BACKGROUND_SERVICE skips the modal, the same seam |
| 211 | // as confirmResetState. Native dialogs are unreachable from CDP/Playwright, so |
| 212 | // a first-run boot under automation otherwise blocks here forever with no way |
| 213 | // to answer. "1" keeps the background service; any other value declines and |
| 214 | // falls back to the managed sidecar. |
| 215 | const autoConfirm = process.env.EXECUTOR_TEST_AUTO_CONFIRM_BACKGROUND_SERVICE; |
| 216 | if (autoConfirm !== undefined) return autoConfirm === "1"; |
| 217 | const { response } = await dialog.showMessageBox({ |
| 218 | type: "question", |
| 219 | title: "Keep Executor running in the background?", |
| 220 | message: "Keep your connections available after you quit Executor?", |
| 221 | detail: |
| 222 | "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.", |
| 223 | buttons: ["Keep running in the background", "Not now"], |
| 224 | defaultId: 0, |
| 225 | cancelId: 1, |
| 226 | }); |
| 227 | return response === 0; |
| 228 | }; |
| 229 | |
| 230 | const acceptSupervisedConnection = async ( |
| 231 | attached: SidecarConnection, |
no outgoing calls
no test coverage detected