Improved code coverage for cli/src/zed-integration (#13570)

This commit is contained in:
Megha Bansal
2025-11-21 21:08:33 +05:30
committed by GitHub
parent 0f0b463a2f
commit 3370644ffe
4 changed files with 1121 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ export async function runZedIntegration(
);
}
class GeminiAgent {
export class GeminiAgent {
private sessions: Map<string, Session> = new Map();
private clientCapabilities: acp.ClientCapabilities | undefined;
@@ -209,7 +209,7 @@ class GeminiAgent {
}
}
class Session {
export class Session {
private pendingPrompt: AbortController | null = null;
constructor(
@@ -296,6 +296,10 @@ class Session {
functionCalls.push(...resp.value.functionCalls);
}
}
if (pendingSend.signal.aborted) {
return { stopReason: 'cancelled' };
}
} catch (error) {
if (getErrorStatus(error) === 429) {
throw new acp.RequestError(