mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28:04 +08:00
feat: add code editor
This commit is contained in:
@ -17,14 +17,14 @@ const useConfig = (id: string, payload: CodeNodeType) => {
|
||||
draft.code = code
|
||||
})
|
||||
setInputs(newInputs)
|
||||
}, [setInputs])
|
||||
}, [inputs, setInputs])
|
||||
|
||||
const handleCodeLanguageChange = useCallback((codeLanguage: CodeLanguage) => {
|
||||
const newInputs = produce(inputs, (draft) => {
|
||||
draft.code_language = codeLanguage
|
||||
})
|
||||
setInputs(newInputs)
|
||||
}, [setInputs])
|
||||
}, [inputs, setInputs])
|
||||
|
||||
const { handleVarListChange: handleOutputVarListChange, handleAddVariable: handleAddOutputVariable } = useOutputVarList<CodeNodeType>({
|
||||
inputs,
|
||||
|
||||
Reference in New Issue
Block a user