mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
refactor: Centralize session ID generation and propagation
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
9
packages/core/src/utils/session.ts
Normal file
9
packages/core/src/utils/session.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { randomUUID } from 'crypto';
|
||||
|
||||
export const sessionId = randomUUID();
|
||||
Reference in New Issue
Block a user