   // Set the current conversation ID
                localStorage.setItem('currentConversationId', conversationId);
                
                // Redirect to index.html with the conversation ID
                window.location.href = `/static/index.html?conversation=${conversationId}`;
                
            } catch (error) {
                console.error('Error joining conversation:', error);
                showError(error.message);
            }
        }
        
        function showError(m