mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-07 02:58:15 +00:00
fix(marketplace): IMM broken, can't install non-rocket binary
This commit is contained in:
parent
f05457d2c9
commit
299e9a72e5
1 changed files with 12 additions and 7 deletions
|
|
@ -642,7 +642,11 @@ export class MarketplaceManager {
|
||||||
await assertsBinarySha256(binaryUint8, item.binaryHash)
|
await assertsBinarySha256(binaryUint8, item.binaryHash)
|
||||||
|
|
||||||
// Extract config and check if it has prompt parameters.
|
// Extract config and check if it has prompt parameters.
|
||||||
const config = await extractRocketConfigFromUint8(binaryUint8)
|
const config = await extractRocketConfigFromUint8(binaryUint8).catch((e) => {
|
||||||
|
if (e?.message === "No rocket config found in the archive") return null
|
||||||
|
|
||||||
|
throw e
|
||||||
|
})
|
||||||
const configHavePromptParameters = config?.parameters?.some((param) => param.resolver.operation === "prompt")
|
const configHavePromptParameters = config?.parameters?.some((param) => param.resolver.operation === "prompt")
|
||||||
if (configHavePromptParameters) {
|
if (configHavePromptParameters) {
|
||||||
vscode.window.showInformationMessage(`"${item.name}" is configurable, opening UI form...`)
|
vscode.window.showInformationMessage(`"${item.name}" is configurable, opening UI form...`)
|
||||||
|
|
@ -685,16 +689,17 @@ export class MarketplaceManager {
|
||||||
mcps: [],
|
mcps: [],
|
||||||
files: [],
|
files: [],
|
||||||
}
|
}
|
||||||
customHookable.hook("onFileOutput", ({ filePath, parsedData }) => {
|
customHookable.hook("onFileOutput", ({ filePath, data }) => {
|
||||||
const pD = parsedData as Record<string, any>
|
|
||||||
if (filePath.endsWith("/.roomodes")) {
|
if (filePath.endsWith("/.roomodes")) {
|
||||||
if (pD?.customModes?.length) {
|
const parsedData = yaml.parse(data)
|
||||||
pD.customModes.forEach((mode: any) => {
|
if (parsedData?.customModes?.length) {
|
||||||
|
parsedData.customModes.forEach((mode: any) => {
|
||||||
itemInstalledMetadata.modes?.push(mode.slug)
|
itemInstalledMetadata.modes?.push(mode.slug)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (filePath.endsWith("/.roo/mcp.json")) {
|
} else if (filePath.endsWith("/.roo/mcp.json")) {
|
||||||
const mcpSlugs = Object.keys(pD?.mcpServers ?? {})
|
const parsedData = JSON.parse(data)
|
||||||
|
const mcpSlugs = Object.keys(parsedData?.mcpServers ?? {})
|
||||||
if (mcpSlugs.length) {
|
if (mcpSlugs.length) {
|
||||||
mcpSlugs.forEach((mcpSlug: any) => {
|
mcpSlugs.forEach((mcpSlug: any) => {
|
||||||
itemInstalledMetadata.mcps?.push(mcpSlug)
|
itemInstalledMetadata.mcps?.push(mcpSlug)
|
||||||
|
|
@ -711,7 +716,7 @@ export class MarketplaceManager {
|
||||||
nonAssemblyBehavior: true,
|
nonAssemblyBehavior: true,
|
||||||
cwd,
|
cwd,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
_IMM.addInstalledItem("project", item.id, itemInstalledMetadata)
|
_IMM.addInstalledItem(target, item.id, itemInstalledMetadata)
|
||||||
})
|
})
|
||||||
vscode.window.showInformationMessage(`"${item.name}" installed successfully`)
|
vscode.window.showInformationMessage(`"${item.name}" installed successfully`)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue