- Accompanying css - Views to serve the Chat Client - first test version of the TRACIE_SELECTION_SPECIALIST - ESS Implemented.
43 lines
1.6 KiB
HTML
43 lines
1.6 KiB
HTML
<!-- chat.html - Clean componentized template -->
|
|
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ tenant_make.name|default('EveAI') }} - AI Chat{% endblock %}
|
|
|
|
{% block head %}
|
|
<!-- Chat specific CSS -->
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='assets/css/chat-components.css') }}">
|
|
|
|
<!-- Pass server data to JavaScript -->
|
|
<script>
|
|
// Definieer chatConfig voordat componenten worden geladen
|
|
window.chatConfig = {
|
|
explanation: `{{ customisation.sidebar_markdown|default('') }}`,
|
|
conversationId: '{{ conversation_id|default("default") }}',
|
|
messages: {{ messages|tojson|safe }},
|
|
settings: {
|
|
maxMessageLength: {{ settings.max_message_length|default(2000) }},
|
|
allowFileUpload: {{ settings.allow_file_upload|default('true')|lower }},
|
|
allowVoiceMessage: {{ settings.allow_voice_message|default('false')|lower }},
|
|
autoScroll: {{ settings.auto_scroll|default('true')|lower }},
|
|
allowReactions: {{ settings.allow_reactions|default('true')|lower }}
|
|
},
|
|
apiPrefix: '{{ request.headers.get("X-Forwarded-Prefix", "") }}'
|
|
};
|
|
|
|
// Debug info om te controleren of chatConfig correct is ingesteld
|
|
console.log('Chat configuration initialized:', window.chatConfig);
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<!-- Gebruik het ChatApp component -->
|
|
<chat-app>
|
|
</chat-app>
|
|
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<!-- Import components and main app -->
|
|
<!-- Alle componenten worden geladen met absolute paden vanaf /static/ -->
|
|
<script type="module" src="{{ url_for('static', filename='assets/js/chat-app.js') }}"></script>
|
|
{% endblock %} |