Q57: quitting stops running sessions and waits for them to record their end

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 10:09:16 -04:00
1 parent d72333a04c
commit 3bc0d811cb
4 files changed
+71 -9

No files matched your search

@@ -1,5 +1,5 @@
import { net } from "electron";
import { currentRunSignal, RUN_STOPPED_MESSAGE, runStopReason } from "../run-control";
import { currentRunSignal, stopReasonOf } from "../run-control";
const BASE_URL = "https://backend.composio.dev/api/v3";
@@ -156,12 +156,12 @@ export class ComposioClient {
const request = net.request({ method, url });
const runSignal = currentRunSignal();
if (runSignal?.aborted) {
reject(new Error(runStopReason() ?? RUN_STOPPED_MESSAGE));
reject(new Error(stopReasonOf(runSignal)));
return;
}
runSignal?.addEventListener("abort", () => {
request.abort();
reject(new Error(runStopReason() ?? RUN_STOPPED_MESSAGE));
reject(new Error(stopReasonOf(runSignal)));
}, { once: true });
request.setHeader("x-api-key", this.apiKey);
request.setHeader("Accept", "application/json");