mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
refactor: Improve type safety in context generate modal hooks
This commit is contained in:
@ -2,7 +2,7 @@ import type { FormValue } from '@/app/components/header/account-setting/model-pr
|
|||||||
import type { ToolParameter } from '@/app/components/tools/types'
|
import type { ToolParameter } from '@/app/components/tools/types'
|
||||||
import type { CodeNodeType } from '@/app/components/workflow/nodes/code/types'
|
import type { CodeNodeType } from '@/app/components/workflow/nodes/code/types'
|
||||||
import type { ToolNodeType } from '@/app/components/workflow/nodes/tool/types'
|
import type { ToolNodeType } from '@/app/components/workflow/nodes/tool/types'
|
||||||
import type { Node, NodeOutPutVar, Var } from '@/app/components/workflow/types'
|
import type { Node, NodeOutPutVar, ValueSelector, Var } from '@/app/components/workflow/types'
|
||||||
import type {
|
import type {
|
||||||
ContextGenerateAvailableVar,
|
ContextGenerateAvailableVar,
|
||||||
ContextGenerateCodeContext,
|
ContextGenerateCodeContext,
|
||||||
@ -39,8 +39,7 @@ export const normalizeCodeLanguage = (value?: string) => {
|
|||||||
return CodeLanguage.python3
|
return CodeLanguage.python3
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Implement buildValueSelector function
|
const buildValueSelector = (nodeId: string, variable: Var): ValueSelector => {
|
||||||
const buildValueSelector = (nodeId: string, variable: Var): string[] => {
|
|
||||||
if (!nodeId)
|
if (!nodeId)
|
||||||
return variable.variable.split('.')
|
return variable.variable.split('.')
|
||||||
const isSys = variable.variable.startsWith('sys.')
|
const isSys = variable.variable.startsWith('sys.')
|
||||||
|
|||||||
Reference in New Issue
Block a user