mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	see if this doesn't upset the machine?
This commit is contained in:
		| @@ -576,15 +576,17 @@ export default class LlmChatPanel extends BasicWidget { | |||||||
|             } |             } | ||||||
|         } else { |         } else { | ||||||
|             // Verify the session exists on the server |             // Verify the session exists on the server | ||||||
|             try { |  | ||||||
|             const sessionExists = await checkSessionExists(this.sessionId); |             const sessionExists = await checkSessionExists(this.sessionId); | ||||||
|             if (!sessionExists) { |             if (!sessionExists) { | ||||||
|                 console.log(`Session ${this.sessionId} not found, creating a new one`); |                 console.log(`Session ${this.sessionId} not found, creating a new one`); | ||||||
|                 await this.createChatSession(); |                 await this.createChatSession(); | ||||||
|  |  | ||||||
|  |                 if (!this.sessionId) { | ||||||
|  |                     // If still no session ID after attempted creation, show error and return | ||||||
|  |                     console.error("Failed to create chat session after session not found"); | ||||||
|  |                     toastService.showError("Failed to create chat session"); | ||||||
|  |                     return; | ||||||
|                 } |                 } | ||||||
|             } catch (error) { |  | ||||||
|                 console.log(`Error checking session ${this.sessionId}, creating a new one`); |  | ||||||
|                 await this.createChatSession(); |  | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user