MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / onEditJSONClicked

Function onEditJSONClicked

packages/ui/src/views/canvas/NodeInputHandler.jsx:495–516  ·  view source on GitHub ↗
(value, inputParam)

Source from the content-addressed store, hash-verified

493 }
494
495 const onEditJSONClicked = (value, inputParam) => {
496 // Preset values if the field is format prompt values
497 let inputValue = value
498 if (inputParam.name === 'promptValues' && !value) {
499 const templateValue =
500 (data.inputs['template'] ?? '') +
501 (data.inputs['systemMessagePrompt'] ?? '') +
502 (data.inputs['humanMessagePrompt'] ?? '') +
503 (data.inputs['workerPrompt'] ?? '')
504 inputValue = getJSONValue(templateValue)
505 }
506 const dialogProp = {
507 value: inputValue,
508 inputParam,
509 nodes: reactFlowInstance?.getNodes() || [],
510 edges: reactFlowInstance?.getEdges() || [],
511 nodeId: data.id,
512 data
513 }
514 setFormatPromptValuesDialogProps(dialogProp)
515 setShowFormatPromptValuesDialog(true)
516 }
517
518 const onExpandDialogSave = (newValue, inputParamName) => {
519 data.inputs[inputParamName] = newValue

Callers 1

NodeInputHandlerFunction · 0.85

Calls 1

getJSONValueFunction · 0.85

Tested by

no test coverage detected