From dbe88f6e0e8efb989b21fc8b46e0da124f5204ff Mon Sep 17 00:00:00 2001 From: Bryan Morgan Date: Tue, 1 Jul 2025 19:16:09 -0400 Subject: Added support for session_id in API calls (#2886) --- packages/core/src/code_assist/server.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/core/src/code_assist/server.ts') diff --git a/packages/core/src/code_assist/server.ts b/packages/core/src/code_assist/server.ts index 3cf0c721..f285dba8 100644 --- a/packages/core/src/code_assist/server.ts +++ b/packages/core/src/code_assist/server.ts @@ -48,6 +48,7 @@ export class CodeAssistServer implements ContentGenerator { readonly client: OAuth2Client, readonly projectId?: string, readonly httpOptions: HttpOptions = {}, + readonly sessionId?: string, ) {} async generateContentStream( @@ -55,7 +56,7 @@ export class CodeAssistServer implements ContentGenerator { ): Promise> { const resps = await this.requestStreamingPost( 'streamGenerateContent', - toGenerateContentRequest(req, this.projectId), + toGenerateContentRequest(req, this.projectId, this.sessionId), req.config?.abortSignal, ); return (async function* (): AsyncGenerator { @@ -70,7 +71,7 @@ export class CodeAssistServer implements ContentGenerator { ): Promise { const resp = await this.requestPost( 'generateContent', - toGenerateContentRequest(req, this.projectId), + toGenerateContentRequest(req, this.projectId, this.sessionId), req.config?.abortSignal, ); return fromGenerateContentResponse(resp); -- cgit v1.2.3