fix: abort embedded prompts on cancel

This commit is contained in:
Peter Steinberger
2026-01-18 05:17:28 +00:00
parent 89c5185f1c
commit 016693a1f5
16 changed files with 128 additions and 44 deletions

View File

@@ -252,7 +252,7 @@ async function connectClient(params: { url: string; token: string }) {
}
describe("gateway (mock openai): tool calling", () => {
it("runs a Read tool call end-to-end via gateway agent loop", async () => {
it("runs a Read tool call end-to-end via gateway agent loop", { timeout: 90_000 }, async () => {
const prev = {
home: process.env.HOME,
configPath: process.env.CLAWDBOT_CONFIG_PATH,

View File

@@ -268,5 +268,5 @@ describe("gateway wizard (e2e)", () => {
process.env.CLAWDBOT_SKIP_CRON = prev.skipCron;
process.env.CLAWDBOT_SKIP_CANVAS_HOST = prev.skipCanvas;
}
}, 60_000);
}, 90_000);
});

View File

@@ -14,10 +14,10 @@ import {
installGatewayTestHooks();
describe("gateway server auth/connect", () => {
test("closes silent handshakes after timeout", { timeout: 15_000 }, async () => {
test("closes silent handshakes after timeout", { timeout: 30_000 }, async () => {
const { server, ws } = await startServerWithClient();
const closed = await new Promise<boolean>((resolve) => {
const timer = setTimeout(() => resolve(false), 12_000);
const timer = setTimeout(() => resolve(false), 25_000);
ws.once("close", () => {
clearTimeout(timer);
resolve(true);

View File

@@ -16,7 +16,7 @@ import {
installGatewayTestHooks();
describe("gateway server health/presence", () => {
test("connect + health + presence + status succeed", { timeout: 8000 }, async () => {
test("connect + health + presence + status succeed", { timeout: 20_000 }, async () => {
const { server, ws } = await startServerWithClient();
await connectOk(ws);

View File

@@ -46,7 +46,7 @@ describe("gateway server misc", () => {
}
});
test("send dedupes by idempotencyKey", { timeout: 8000 }, async () => {
test("send dedupes by idempotencyKey", { timeout: 20_000 }, async () => {
const { server, ws } = await startServerWithClient();
await connectOk(ws);

View File

@@ -64,7 +64,7 @@ describe("gateway server models + voicewake", () => {
test(
"voicewake.get returns defaults and voicewake.set broadcasts",
{ timeout: 15_000 },
{ timeout: 30_000 },
async () => {
const homeDir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-home-"));
const restoreHome = setTempHome(homeDir);