- eveai_chat_client update to have different ways of presenting ProgressTracker.vue. Based on progress_tracker_insights in Tenant Make Configuration.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
:message="message"
|
||||
:is-submitting-form="isSubmittingForm"
|
||||
:api-prefix="apiPrefix"
|
||||
:is-latest-ai-message="isLatestAiMessage(message)"
|
||||
@image-loaded="handleImageLoaded"
|
||||
@specialist-complete="$emit('specialist-complete', $event)"
|
||||
@specialist-error="$emit('specialist-error', $event)"
|
||||
@@ -228,6 +229,25 @@ export default {
|
||||
message.content &&
|
||||
message.content.toLowerCase().includes(searchTerm)
|
||||
);
|
||||
},
|
||||
|
||||
isLatestAiMessage(message) {
|
||||
// Only AI messages with taskId can be "latest"
|
||||
if (message.sender !== 'ai' || !message.taskId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Find the latest AI message with a taskId by iterating in reverse order
|
||||
// The latest AI message is the one where the specialist interaction is still active
|
||||
for (let i = this.messages.length - 1; i >= 0; i--) {
|
||||
const msg = this.messages[i];
|
||||
if (msg.sender === 'ai' && msg.taskId) {
|
||||
// This is the latest AI message with a taskId
|
||||
return msg.id === message.id;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user