feat(editor): Open Focus Panel on canvas action button click (no-changelog) (#16698)

This commit is contained in:
Daria
2025-06-25 14:05:37 +03:00
committed by GitHub
parent 3835cb31ea
commit 781b680f2a
5 changed files with 43 additions and 11 deletions

View File

@@ -136,6 +136,7 @@ import { needsAgentInput } from '@/utils/nodes/nodeTransforms';
import { useLogsStore } from '@/stores/logs.store';
import { canvasEventBus } from '@/event-bus/canvas';
import CanvasChatButton from '@/components/canvas/elements/buttons/CanvasChatButton.vue';
import { useFocusPanelStore } from '@/stores/focusPanel.store';
defineOptions({
name: 'NodeView',
@@ -186,6 +187,7 @@ const usersStore = useUsersStore();
const tagsStore = useTagsStore();
const pushConnectionStore = usePushConnectionStore();
const ndvStore = useNDVStore();
const focusPanelStore = useFocusPanelStore();
const templatesStore = useTemplatesStore();
const builderStore = useBuilderStore();
const foldersStore = useFoldersStore();
@@ -1207,6 +1209,14 @@ function onToggleNodeCreator(options: ToggleNodeCreatorOptions) {
}
}
function onToggleFocusPanel() {
if (!isFocusPanelFeatureEnabled.value) {
return;
}
focusPanelStore.toggleFocusPanel();
}
function closeNodeCreator() {
if (nodeCreatorStore.isCreateNodeActive) {
nodeCreatorStore.isCreateNodeActive = false;
@@ -2039,6 +2049,7 @@ onBeforeUnmount(() => {
@selection:end="onSelectionEnd"
@drag-and-drop="onDragAndDrop"
@tidy-up="onTidyUp"
@toggle:focus-panel="onToggleFocusPanel"
@extract-workflow="onExtractWorkflow"
@start-chat="startChat()"
>