wip: send last search query in telemetry

This commit is contained in:
Eugene Molodkin 2024-09-27 11:25:19 +02:00
parent 79622b5f26
commit 882065bbab
No known key found for this signature in database

View file

@ -1,5 +1,5 @@
<script lang="ts">
import { defineAsyncComponent, defineComponent, nextTick, ref, h } from 'vue';
import { defineAsyncComponent, defineComponent, nextTick, ref, h, computed } from 'vue';
import { mapStores, storeToRefs } from 'pinia';
import type {
@ -188,6 +188,7 @@ interface AddNodeOptions {
position?: XYPosition;
dragAndDrop?: boolean;
name?: string;
search?: string;
}
const LazyNodeCreation = defineAsyncComponent(
@ -2390,6 +2391,7 @@ export default defineComponent({
is_auto_add: isAutoAdd,
workflow_id: this.workflowsStore.workflowId,
drag_and_drop: options.dragAndDrop,
search: options.search,
};
if (lastSelectedNode) {
@ -2500,6 +2502,11 @@ export default defineComponent({
this.historyStore.startRecordingUndo();
const lastActiveViewStack = useViewStacks().activeViewStack;
if (lastActiveViewStack) {
options.search = viewStack.search;
}
const newNodeData = await this.injectNode(
nodeTypeName,
options,