@@ -132,17 +132,34 @@ export const PulseBlock: BlockConfig<PulseParserOutput> = {
132132const pulseV2Inputs = PulseBlock . inputs
133133 ? Object . fromEntries ( Object . entries ( PulseBlock . inputs ) . filter ( ( [ key ] ) => key !== 'filePath' ) )
134134 : { }
135- const pulseV2SubBlocks = ( PulseBlock . subBlocks || [ ] ) . filter (
136- ( subBlock ) => subBlock . id !== 'filePath'
137- )
135+ const pulseV2SubBlocks = ( PulseBlock . subBlocks || [ ] ) . flatMap ( ( subBlock ) => {
136+ if ( subBlock . id === 'filePath' ) {
137+ return [ ] // Remove the old filePath subblock
138+ }
139+ if ( subBlock . id === 'fileUpload' ) {
140+ // Insert fileReference right after fileUpload
141+ return [
142+ subBlock ,
143+ {
144+ id : 'fileReference' ,
145+ title : 'Document' ,
146+ type : 'short-input' as SubBlockType ,
147+ canonicalParamId : 'document' ,
148+ placeholder : 'File reference' ,
149+ mode : 'advanced' as const ,
150+ } ,
151+ ]
152+ }
153+ return [ subBlock ]
154+ } )
138155
139156export const PulseV2Block : BlockConfig < PulseParserOutput > = {
140157 ...PulseBlock ,
141158 type : 'pulse_v2' ,
142- name : 'Pulse (File Only) ' ,
159+ name : 'Pulse' ,
143160 hideFromToolbar : false ,
144161 longDescription :
145- 'Integrate Pulse into the workflow. Extract text from PDF documents, images, and Office files via upload.' ,
162+ 'Integrate Pulse into the workflow. Extract text from PDF documents, images, and Office files via upload or file references .' ,
146163 subBlocks : pulseV2SubBlocks ,
147164 tools : {
148165 access : [ 'pulse_parser_v2' ] ,
0 commit comments