- Eerste stap in het opnieuw laten werken van de chat client...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user