File tree Expand file tree Collapse file tree 2 files changed +21
-5
lines changed
Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -615,6 +615,22 @@ describe('parameters', async () => {
615615 "Cannot assign to builtin variable: '$now'" ,
616616 )
617617 } )
618+
619+ it ( 'includes parameters from content tags' , async ( ) => {
620+ const prompt = `
621+ <user>
622+ <content-file mime={{mimeParam}}>
623+ {{fileContent}}
624+ </content-file>
625+ </user>
626+ `
627+
628+ const metadata = await scan ( {
629+ prompt : removeCommonIndent ( prompt ) ,
630+ } )
631+
632+ expect ( metadata . parameters ) . toEqual ( new Set ( [ 'mimeParam' , 'fileContent' ] ) )
633+ } )
618634} )
619635
620636describe ( 'referenced prompts' , async ( ) => {
Original file line number Diff line number Diff line change @@ -452,14 +452,14 @@ export class Scan {
452452 this . baseNodeError ( errors . contentTagInsideContent , node )
453453 }
454454
455+ const attributes = await this . listTagAttributes ( {
456+ tagNode : node ,
457+ scopeContext,
458+ } )
459+
455460 if ( node . name === ContentTypeTagName . toolCall ) {
456461 this . accumulatedToolCalls . push ( node )
457462
458- const attributes = await this . listTagAttributes ( {
459- tagNode : node ,
460- scopeContext,
461- } )
462-
463463 if ( ! attributes . has ( 'id' ) ) {
464464 this . baseNodeError ( errors . toolCallTagWithoutId , node )
465465 }
You can’t perform that action at this time.
0 commit comments