diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/starter/input-format.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/starter/input-format.tsx index 3c9fe88554..ad1e3671c5 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/starter/input-format.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/starter/input-format.tsx @@ -310,6 +310,47 @@ export function FieldFormat({ ) } + if (field.type === 'files') { + const lineCount = fieldValue.split('\n').length + const gutterWidth = calculateGutterWidth(lineCount) + + const renderLineNumbers = () => { + return Array.from({ length: lineCount }, (_, i) => ( +
+ {i + 1} +
+ )) + } + + return ( + + {renderLineNumbers()} + + + { + '[\n {\n "data": "data:application/pdf;base64,...",\n "type": "file",\n "name": "document.pdf",\n "mime": "application/pdf"\n }\n]' + } + + { + if (!isReadOnly) { + updateField(field.id, 'value', newValue) + } + }} + highlight={(code) => highlight(code, languages.json, 'json')} + disabled={isReadOnly} + {...getCodeEditorProps({ disabled: isReadOnly })} + /> + + + ) + } + return ( <>