fix(editor): Include session_id in AI builder tracking (no-changelog) (#17830)

This commit is contained in:
oleg
2025-07-30 16:46:30 +02:00
committed by GitHub
parent 08a7b365b8
commit 53594a90e4
3 changed files with 11 additions and 0 deletions

View File

@@ -59,6 +59,8 @@ export const useBuilderStore = defineStore(STORES.BUILDER, () => {
// Computed properties
const isAssistantEnabled = computed(() => settings.isAiAssistantEnabled);
const trackingSessionId = computed(() => rootStore.pushRef);
const workflowPrompt = computed(() => {
const firstUserMessage = chatMessages.value.find(
(msg) => msg.role === 'user' && msg.type === 'text',
@@ -173,6 +175,7 @@ export const useBuilderStore = defineStore(STORES.BUILDER, () => {
telemetry.track('Workflow generation errored', {
error: e.message,
session_id: trackingSessionId.value,
workflow_id: workflowsStore.workflowId,
});
}
@@ -228,6 +231,7 @@ export const useBuilderStore = defineStore(STORES.BUILDER, () => {
telemetry.track('User submitted builder message', {
source,
message: text,
session_id: trackingSessionId.value,
start_workflow_json: currentWorkflowJson,
workflow_id: workflowsStore.workflowId,
});
@@ -388,6 +392,7 @@ export const useBuilderStore = defineStore(STORES.BUILDER, () => {
workflowPrompt,
toolMessages,
workflowMessages,
trackingSessionId,
// Methods
updateWindowWidth,