mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-06 05:47:55 +08:00
value of vars in node fetching
This commit is contained in:
parent
8a910a40a4
commit
2287a6e090
@ -1,5 +1,5 @@
|
||||
import { fetchNodeInspectVars } from '@/service/workflow'
|
||||
import { useWorkflowStore } from '../store'
|
||||
import { useStore, useWorkflowStore } from '../store'
|
||||
import type { ValueSelector } from '../types'
|
||||
import { VarInInspectType } from '@/types/workflow'
|
||||
import {
|
||||
@ -17,9 +17,9 @@ import { useCallback, useEffect, useState } from 'react'
|
||||
|
||||
const useInspectVarsCrud = () => {
|
||||
const workflowStore = useWorkflowStore()
|
||||
const nodesWithInspectVars = useStore(s => s.nodesWithInspectVars)
|
||||
const {
|
||||
appId,
|
||||
nodesWithInspectVars,
|
||||
getNodeInspectVars,
|
||||
setNodeInspectVars,
|
||||
setInspectVarValue,
|
||||
|
@ -6,7 +6,7 @@ export const vars: VarInInspect[] = [
|
||||
{
|
||||
id: 'xxx',
|
||||
type: VarInInspectType.node,
|
||||
name: 'text',
|
||||
name: 'text00',
|
||||
description: '',
|
||||
selector: ['1745476079387', 'text'],
|
||||
value_type: VarType.string,
|
||||
|
@ -90,5 +90,7 @@ export const fetchAllInspectVars = async (appId: string): Promise<VarInInspect[]
|
||||
export const fetchNodeInspectVars = async (appId: string, nodeId: string): Promise<VarInInspect[]> => {
|
||||
// TODO
|
||||
console.log('fetchNodeInspectVars', appId, nodeId)
|
||||
return []
|
||||
await sleep(1000)
|
||||
const data = await Promise.resolve(vars)
|
||||
return data
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user