fix(editor): Adjust Ask AI tracking events & pass NDV session id (no-changelog) (#7027)

Github issue / Community forum post (link here to close automatically):

---------

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
OlegIvaniv
2023-08-29 12:53:29 +02:00
committed by GitHub
parent a4578d68a5
commit 4600bb3317
7 changed files with 48 additions and 37 deletions

View File

@@ -9,6 +9,7 @@ import type {
} from '@/Interface';
import type { INodeIssues, IRunData } from 'n8n-workflow';
import { defineStore } from 'pinia';
import { v4 as uuid } from 'uuid';
import { useWorkflowsStore } from './workflows.store';
export const useNDVStore = defineStore(STORES.NDV, {
@@ -163,7 +164,7 @@ export const useNDVStore = defineStore(STORES.NDV, {
};
},
setNDVSessionId(): void {
this.sessionId = `ndv-${Math.random().toString(36).slice(-8)}`;
this.sessionId = `ndv-${uuid()}`;
},
resetNDVSessionId(): void {
this.sessionId = '';