refactor(core): consolidate execute() arguments into ExecuteOptions (#25101)

This commit is contained in:
Michael Bleigh
2026-04-10 10:11:17 -07:00
committed by GitHub
parent 1d36309f5f
commit 3b7c17a22c
69 changed files with 849 additions and 527 deletions
+10 -4
View File
@@ -60,7 +60,9 @@ describe('SdkTool Execution', () => {
mockMessageBus,
undefined,
);
const result = await invocation.execute(new AbortController().signal);
const result = await invocation.execute({
abortSignal: new AbortController().signal,
});
expect(result.llmContent).toBe('Success: test');
expect(result.error).toBeUndefined();
@@ -86,7 +88,7 @@ describe('SdkTool Execution', () => {
);
await expect(
invocation.execute(new AbortController().signal),
invocation.execute({ abortSignal: new AbortController().signal }),
).rejects.toThrow('Standard error');
});
@@ -108,7 +110,9 @@ describe('SdkTool Execution', () => {
mockMessageBus,
undefined,
);
const result = await invocation.execute(new AbortController().signal);
const result = await invocation.execute({
abortSignal: new AbortController().signal,
});
expect(result.error).toBeDefined();
expect(result.error?.message).toBe('Visible error');
@@ -134,7 +138,9 @@ describe('SdkTool Execution', () => {
mockMessageBus,
undefined,
);
const result = await invocation.execute(new AbortController().signal);
const result = await invocation.execute({
abortSignal: new AbortController().signal,
});
expect(result.error).toBeDefined();
expect(result.error?.message).toBe('Standard error');