fix: ensure storageKey defaults to an empty string in Vibe panel and workflow hooks

This commit is contained in:
WTW0313 2025-12-27 13:40:58 +08:00
parent 9341b2c4c2
commit 4548760d41
3 changed files with 2 additions and 3 deletions

View File

@ -338,7 +338,7 @@ export const useWorkflowVibe = () => {
const lastInstructionRef = useRef<string>('')
const { addVersion, current: currentFlowGraph } = useVibeFlowData({
storageKey: `${configsMap?.flowId}`,
storageKey: configsMap?.flowId || '',
})
useEffect(() => {

View File

@ -34,7 +34,7 @@ const VibePanel: FC = () => {
const configsMap = useHooksStore(s => s.configsMap)
const { current: currentFlowGraph, versions, currentVersionIndex, setCurrentVersionIndex } = useVibeFlowData({
storageKey: `${configsMap?.flowId}`,
storageKey: configsMap?.flowId || '',
})
const vibePanelPreviewNodes = currentFlowGraph?.nodes || []

View File

@ -48,5 +48,4 @@ export const createPanelSlice: StateCreator<PanelSliceShape> = set => ({
setInitShowLastRunTab: initShowLastRunTab => set(() => ({ initShowLastRunTab })),
showVibePanel: false,
setShowVibePanel: showVibePanel => set(() => ({ showVibePanel })),
vibePanelMermaidCode: '',
})