@@ -642,7 +642,11 @@ export class MarketplaceManager {
642642 await assertsBinarySha256 ( binaryUint8 , item . binaryHash )
643643
644644 // Extract config and check if it has prompt parameters.
645- const config = await extractRocketConfigFromUint8 ( binaryUint8 )
645+ const config = await extractRocketConfigFromUint8 ( binaryUint8 ) . catch ( ( e ) => {
646+ if ( e ?. message === "No rocket config found in the archive" ) return null
647+
648+ throw e
649+ } )
646650 const configHavePromptParameters = config ?. parameters ?. some ( ( param ) => param . resolver . operation === "prompt" )
647651 if ( configHavePromptParameters ) {
648652 vscode . window . showInformationMessage ( `"${ item . name } " is configurable, opening UI form...` )
@@ -685,16 +689,17 @@ export class MarketplaceManager {
685689 mcps : [ ] ,
686690 files : [ ] ,
687691 }
688- customHookable . hook ( "onFileOutput" , ( { filePath, parsedData } ) => {
689- const pD = parsedData as Record < string , any >
692+ customHookable . hook ( "onFileOutput" , ( { filePath, data } ) => {
690693 if ( filePath . endsWith ( "/.roomodes" ) ) {
691- if ( pD ?. customModes ?. length ) {
692- pD . customModes . forEach ( ( mode : any ) => {
694+ const parsedData = yaml . parse ( data )
695+ if ( parsedData ?. customModes ?. length ) {
696+ parsedData . customModes . forEach ( ( mode : any ) => {
693697 itemInstalledMetadata . modes ?. push ( mode . slug )
694698 } )
695699 }
696700 } else if ( filePath . endsWith ( "/.roo/mcp.json" ) ) {
697- const mcpSlugs = Object . keys ( pD ?. mcpServers ?? { } )
701+ const parsedData = JSON . parse ( data )
702+ const mcpSlugs = Object . keys ( parsedData ?. mcpServers ?? { } )
698703 if ( mcpSlugs . length ) {
699704 mcpSlugs . forEach ( ( mcpSlug : any ) => {
700705 itemInstalledMetadata . mcps ?. push ( mcpSlug )
@@ -711,7 +716,7 @@ export class MarketplaceManager {
711716 nonAssemblyBehavior : true ,
712717 cwd,
713718 } ) . then ( ( ) => {
714- _IMM . addInstalledItem ( "project" , item . id , itemInstalledMetadata )
719+ _IMM . addInstalledItem ( target , item . id , itemInstalledMetadata )
715720 } )
716721 vscode . window . showInformationMessage ( `"${ item . name } " installed successfully` )
717722
0 commit comments