refactor: Centralize session ID generation and propagation

This commit is contained in:
jerop
2025-06-11 04:46:39 +00:00
committed by Jerop Kipruto
parent 95fdc66e7d
commit d1e23b7c71
20 changed files with 96 additions and 71 deletions

View File

@@ -71,6 +71,7 @@ describe('checkNextSpeaker', () => {
chatInstance = new GeminiChat(
mockModelsInstance, // This is the instance returned by mockGoogleGenAIInstance.getGenerativeModel
'gemini-pro', // model name
'test-session-id',
{},
[], // initial history
);

View File

@@ -0,0 +1,9 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { randomUUID } from 'crypto';
export const sessionId = randomUUID();