File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ export class FileStorageManager {
4949 private dbInitializationPromise : Promise < IDBDatabase > | null = null ;
5050
5151 private constructor ( ) {
52- this . sessionId = 'default' ; // Will be set to conversation ID when conversation is created/loaded
53- logger . info ( 'Initialized FileStorageManager with default session' ) ;
52+ this . sessionId = `temp- ${ this . generateUUID ( ) } ` ; // Unique per session, will be set to conversation ID when conversation is created/loaded
53+ logger . info ( 'Initialized FileStorageManager with session' , { sessionId : this . sessionId } ) ;
5454 }
5555
5656 static getInstance ( ) : FileStorageManager {
Original file line number Diff line number Diff line change @@ -1837,10 +1837,11 @@ export class AIChatPanel extends UI.Panel.Panel {
18371837 this . #isProcessing = false ;
18381838 this . #selectedAgentType = null ; // Reset selected agent type
18391839
1840- // Reset file storage session ID to default for new chat
1840+ // Reset file storage session ID to a new unique ID for new chat
18411841 const { FileStorageManager} = await import ( '../tools/FileStorageManager.js' ) ;
1842- FileStorageManager . getInstance ( ) . setSessionId ( 'default' ) ;
1843- logger . info ( 'Reset file storage sessionId to default for new chat' ) ;
1842+ const newSessionId = `temp-${ crypto . randomUUID ( ) } ` ;
1843+ FileStorageManager . getInstance ( ) . setSessionId ( newSessionId ) ;
1844+ logger . info ( 'Set file storage sessionId for new chat' , { sessionId : newSessionId } ) ;
18441845
18451846 // Create new EvaluationAgent for new chat session
18461847 this . #createEvaluationAgentIfNeeded( ) ;
You can’t perform that action at this time.
0 commit comments