From 0cb932364380ec7481c68f050c0e2ef2f32b96c8 Mon Sep 17 00:00:00 2001 From: aqiu <819110812@qq.com> Date: Sun, 28 Dec 2025 09:55:23 +0800 Subject: [PATCH] [feat/vibe-w] fix conflict errors --- .../components/workflow/panel/vibe-panel/index.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web/app/components/workflow/panel/vibe-panel/index.tsx b/web/app/components/workflow/panel/vibe-panel/index.tsx index 87579b454a..2f644bd09a 100644 --- a/web/app/components/workflow/panel/vibe-panel/index.tsx +++ b/web/app/components/workflow/panel/vibe-panel/index.tsx @@ -3,7 +3,7 @@ import type { FC } from 'react' import type { FormValue } from '@/app/components/header/account-setting/model-provider-page/declarations' import type { CompletionParams, Model } from '@/types/app' -import { RiCheckLine, RiClipboardLine, RiInformation2Line, RiRefreshLine } from '@remixicon/react' +import { RiClipboardLine, RiInformation2Line } from '@remixicon/react' import copy from 'copy-to-clipboard' import { useCallback, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -29,8 +29,12 @@ const VibePanel: FC = () => { const { t } = useTranslation() const workflowStore = useWorkflowStore() const showVibePanel = useStore(s => s.showVibePanel) + const setShowVibePanel = useStore(s => s.setShowVibePanel) const isVibeGenerating = useStore(s => s.isVibeGenerating) + const setIsVibeGenerating = useStore(s => s.setIsVibeGenerating) const vibePanelInstruction = useStore(s => s.vibePanelInstruction) + const vibePanelMermaidCode = useStore(s => s.vibePanelMermaidCode) + const setVibePanelMermaidCode = useStore(s => s.setVibePanelMermaidCode) const configsMap = useHooksStore(s => s.configsMap) const { current: currentFlowGraph, versions, currentVersionIndex, setCurrentVersionIndex } = useVibeFlowData({ @@ -39,7 +43,7 @@ const VibePanel: FC = () => { const vibePanelPreviewNodes = currentFlowGraph?.nodes || [] const vibePanelPreviewEdges = currentFlowGraph?.edges || [] - + const setVibePanelInstruction = useStore(s => s.setVibePanelInstruction) const vibePanelIntent = useStore(s => s.vibePanelIntent) const setVibePanelIntent = useStore(s => s.setVibePanelIntent) @@ -127,10 +131,9 @@ const VibePanel: FC = () => { }, [handleClose]) const handleCopyMermaid = useCallback(() => { - const { vibePanelMermaidCode } = workflowStore.getState() copy(vibePanelMermaidCode) Toast.notify({ type: 'success', message: t('common.actionMsg.copySuccessfully') }) - }, [workflowStore, t]) + }, [vibePanelMermaidCode, t]) const handleSuggestionClick = useCallback((suggestion: string) => { setVibePanelInstruction(suggestion)