mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
Added support for session_id in API calls (#2886)
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user