- Eerste stap in het opnieuw laten werken van de chat client...

This commit is contained in:
Josako
2025-07-18 16:07:13 +02:00
parent f3a243698c
commit 11b1d548bd
20 changed files with 1201 additions and 352 deletions

View File

@@ -1,5 +1,15 @@
export const MessageHistory = {
// Import afhankelijke componenten
import { ChatMessage } from './ChatMessage.js';
import { TypingIndicator } from './TypingIndicator.js';
import { ProgressTracker } from './ProgressTracker.js';
export const MessageHistory = {
name: 'MessageHistory',
components: {
'chat-message': ChatMessage,
'typing-indicator': TypingIndicator,
'progress-tracker': ProgressTracker
},
props: {
messages: {
type: Array,
@@ -13,10 +23,10 @@ export const MessageHistory = {
isSubmittingForm: {
type: Boolean,
default: false
},
apiPrefix: {
type: String,
default: ''
},
apiPrefix: {
type: String,
default: ''
},
autoScroll: {
type: Boolean,
@@ -216,5 +226,27 @@ export const MessageHistory = {
<typing-indicator v-if="isTyping"></typing-indicator>
</div>
</div>
`,
`
};
// Statische renderComponent methode voor het MessageHistory object
MessageHistory.renderComponent = function(container, props, app) {
console.log('🔍 [DEBUG] MessageHistory.renderComponent() aangeroepen als statische methode');
if (!container) {
console.error('Container element niet gevonden voor MessageHistory');
return null;
}
console.log('🔍 [DEBUG] MessageHistory container gevonden, Vue app aanmaken');
try {
// Maak een nieuwe Vue app instantie met dit component
const instance = app.mount(container);
console.log('🔍 [DEBUG] MessageHistory component succesvol gemount');
return instance;
} catch (error) {
console.error('🚨 [ERROR] Fout bij mounten MessageHistory component:', error);
return null;
}
};