MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / confirmEnableBackgroundService

Function confirmEnableBackgroundService

apps/desktop/src/main/index.ts:249–268  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected