feat(coding-agent): add after_provider_response hook closes #3128

This commit is contained in:
Mario Zechner
2026-04-16 20:27:04 +02:00
parent aa78fa91fe
commit d131fcd4ba
19 changed files with 120 additions and 25 deletions

View File

@@ -142,6 +142,17 @@ export async function createHarness(options: HarnessOptions = {}): Promise<Harne
}
return runner.emitBeforeProviderRequest(payload);
},
onResponse: async (response) => {
const runner = extensionRunnerRef.current;
if (!runner?.hasHandlers("after_provider_response")) {
return;
}
await runner.emit({
type: "after_provider_response",
status: response.status,
headers: response.headers,
});
},
transformContext: async (messages: AgentMessage[]) => {
const runner = extensionRunnerRef.current;
if (!runner) return messages;