feat(editor): Add user_message_id to AI assistant feedback telemetry (#24279)

This commit is contained in:
Albert Alises
2026-01-14 07:48:51 +00:00
committed by GitHub
parent b7bebf9f1d
commit 8e040f2649
3 changed files with 6 additions and 0 deletions
@@ -813,6 +813,7 @@ export const useBuilderStore = defineStore(STORES.BUILDER, () => {
hasNoCreditsRemaining,
hasMessages: computed(() => hasMessages.value),
workflowTodos,
lastUserMessageId,
// Methods
abortStreaming,
@@ -468,9 +468,12 @@ describe('AskAssistantBuild', () => {
const workflowJson = '{"nodes": [], "connections": {}}';
describe('when workflow-updated message exists', () => {
const testUserMessageId = 'test-user-message-id';
beforeEach(() => {
// Use $patch to ensure reactivity
builderStore.$patch({
lastUserMessageId: testUserMessageId,
chatMessages: [
{
id: faker.string.uuid(),
@@ -554,6 +557,7 @@ describe('AskAssistantBuild', () => {
expect.objectContaining({
feedback: feedbackText,
workflow_id: 'abc123',
user_message_id: testUserMessageId,
}),
);
});
@@ -168,6 +168,7 @@ function onFeedback(feedback: RatingFeedback) {
feedback: feedback.feedback,
workflow_id: workflowsStore.workflowId,
session_id: builderStore.trackingSessionId,
user_message_id: builderStore.lastUserMessageId,
});
}
}