Added support for session_id in API calls (#2886)

This commit is contained in:
Bryan Morgan
2025-07-01 19:16:09 -04:00
committed by GitHub
parent 3492c429b9
commit dbe88f6e0e
6 changed files with 46 additions and 5 deletions

View File

@@ -12,11 +12,12 @@ import { CodeAssistServer, HttpOptions } from './server.js';
export async function createCodeAssistContentGenerator(
httpOptions: HttpOptions,
authType: AuthType,
sessionId?: string,
): Promise<ContentGenerator> {
if (authType === AuthType.LOGIN_WITH_GOOGLE) {
const authClient = await getOauthClient();
const projectId = await setupUser(authClient);
return new CodeAssistServer(authClient, projectId, httpOptions);
return new CodeAssistServer(authClient, projectId, httpOptions, sessionId);
}
throw new Error(`Unsupported authType: ${authType}`);