- Latest interaction is now positioned right above the chat-input / form

- It moves to the standard positing in MessageHistory.vue
This commit is contained in:
Josako
2025-07-23 09:43:33 +02:00
parent e990fe65d8
commit f16ed85e82
232 changed files with 80 additions and 48476 deletions

View File

@@ -259,7 +259,8 @@ export default {
type: 'text',
timestamp: new Date().toISOString(),
taskId: data.task_id,
status: 'processing'
status: 'processing',
isTemporarilyAtBottom: true
};
this.allMessages.push(placeholderMessage);
@@ -277,6 +278,20 @@ export default {
}
},
// Message repositioning logic - simplified to only toggle flag
repositionLatestAiMessage() {
// Find AI message with isTemporarilyAtBottom flag
const aiMessage = this.allMessages.find(msg =>
msg.sender === 'ai' && msg.taskId && msg.isTemporarilyAtBottom
);
if (aiMessage) {
// Simply turn off the flag - no array manipulation needed
aiMessage.isTemporarilyAtBottom = false;
console.log('AI message returned to normal flow position');
}
},
// Message handling
addMessage(messageData) {
const message = {
@@ -307,7 +322,10 @@ export default {
console.log('Sending message:', this.currentMessage);
// Add user message to chat
// FIRST: Reposition latest AI message to correct chronological place
this.repositionLatestAiMessage();
// THEN: Add user message to chat
const userMessage = this.addMessage({
content: this.currentMessage,
sender: 'user',
@@ -356,7 +374,8 @@ export default {
type: 'text',
timestamp: new Date().toISOString(),
taskId: data.task_id,
status: 'processing'
status: 'processing',
isTemporarilyAtBottom: true
};
this.allMessages.push(placeholderMessage);