Merge pull request #253 from SuanmoSuanyangTechnology/fix/codeNode_zy

feat(web): code node hidden
This commit is contained in:
yingzhao
2026-01-30 13:51:06 +08:00
committed by GitHub

View File

@@ -431,32 +431,32 @@ export const nodeLibrary: NodeLibrary[] = [
} }
} }
}, },
{ type: "code", icon: codeExecutionIcon, // { type: "code", icon: codeExecutionIcon,
config: { // config: {
input_variables: { // input_variables: {
type: 'inputList', // type: 'inputList',
defaultValue: [{ name: 'arg1' }, { name: 'arg2' }] // defaultValue: [{ name: 'arg1' }, { name: 'arg2' }]
}, // },
language: { // language: {
type: 'select', // type: 'select',
defaultValue: 'python3' // defaultValue: 'python3'
}, // },
code: { // code: {
type: 'messageEditor', // type: 'messageEditor',
isArray: false, // isArray: false,
language: ['python3', 'javascript'], // language: ['python3', 'javascript'],
titleVariant: 'borderless', // titleVariant: 'borderless',
defaultValue: `def main(arg1: str, arg2: str): // defaultValue: `def main(arg1: str, arg2: str):
return { // return {
"result": arg1 + arg2, // "result": arg1 + arg2,
}` // }`
}, // },
output_variables: { // output_variables: {
type: 'outputList', // type: 'outputList',
defaultValue: [{name: 'result', type: 'string'}] // defaultValue: [{name: 'result', type: 'string'}]
}, // },
} // }
}, // },
{ type: "jinja-render", icon: templateRenderingIcon, { type: "jinja-render", icon: templateRenderingIcon,
config: { config: {
mapping: { mapping: {