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 e4f95de7ee
commit cffa9cac87
6 changed files with 46 additions and 5 deletions
+2 -1
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}`);