mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
feat: code support vars
This commit is contained in:
26
web/app/components/workflow/nodes/code/mock.ts
Normal file
26
web/app/components/workflow/nodes/code/mock.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { CodeLanguage } from './types'
|
||||
import type { CodeNodeType } from './types'
|
||||
|
||||
export const mockData: CodeNodeType = {
|
||||
title: 'Test',
|
||||
desc: 'Test',
|
||||
type: 'Test',
|
||||
variables: [
|
||||
{
|
||||
variable: 'name',
|
||||
value_selector: ['aaa', 'name'],
|
||||
},
|
||||
{
|
||||
variable: 'age',
|
||||
value_selector: ['bbb', 'b', 'c'],
|
||||
},
|
||||
],
|
||||
code_language: CodeLanguage.python3,
|
||||
code: 'print("hello world")',
|
||||
outputs: [
|
||||
{
|
||||
variable: 'output',
|
||||
variable_type: 'string',
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user