| 67 | |
| 68 | // Method to get the singleton instance of the ChatManager |
| 69 | public static getInstance(setChatMessages: (messages: any[]) => void, setStatusMessage: (message: string) => void, setProgress: (progress: number) => void, setIsLoadingFirstMessage: (isLoading: boolean) => void): ChatManager { // Add setIsLoadingFirstMessage here |
| 70 | if (this.instance === null) { |
| 71 | this.instance = new ChatManager(setChatMessages, setStatusMessage, setProgress, setIsLoadingFirstMessage); // And here |
| 72 | } |
| 73 | return this.instance; |
| 74 | } |
| 75 | |
| 76 | // Method to start the assistant |
| 77 | async startAssistant(assistantDetails: any, fileIds: string[], initialMessage: string): Promise<void> { |