diff --git a/package-lock.json b/package-lock.json index 72e4f3cb..690c8230 100644 --- a/package-lock.json +++ b/package-lock.json @@ -760,16 +760,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -1009,16 +999,13 @@ "license": "MIT" }, "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.7.tgz", + "integrity": "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==", "dev": true, "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, "engines": { - "node": ">=0.6.0" + "node": ">=14.14" } }, "node_modules/tr46": { diff --git a/package.json b/package.json index 323c3d63..7a452143 100644 --- a/package.json +++ b/package.json @@ -48,5 +48,8 @@ "js-yaml": "^5.2.2", "vfile": "^6.0.3", "vfile-matter": "^5.0.1" + }, + "overrides": { + "tmp": "0.2.7" } } diff --git a/website/src/components/pages/PluginInstall.astro b/website/src/components/pages/PluginInstall.astro index 12e4598c..8e367491 100644 --- a/website/src/components/pages/PluginInstall.astro +++ b/website/src/components/pages/PluginInstall.astro @@ -8,7 +8,7 @@ */ export interface PluginInstallProps { isExternal?: boolean; - /** awesome-copilot plugin id (internal installs). */ + /** awesome-copilot plugin id. */ pluginId?: string | null; /** Upstream marketplace source (owner/repo or git URL) for external installs. */ externalSource?: string | null; @@ -36,6 +36,11 @@ let insidersUrl: string | null = null; let ghappUrl: string | null = null; if (isExternal) { + if (pluginId) { + ghappUrl = `ghapp://plugins/install?source=${encodeURIComponent( + `${pluginId}@${MARKETPLACE}` + )}`; + } if (externalSource) { vscodeUrl = `vscode://chat-plugin/install?source=${encodeURIComponent( externalSource @@ -43,9 +48,6 @@ if (isExternal) { insidersUrl = `vscode-insiders://chat-plugin/install?source=${encodeURIComponent( externalSource )}`; - ghappUrl = `ghapp://plugins/marketplace/add?source=${encodeURIComponent( - externalSource - )}`; } } else if (pluginId) { const plugin = encodeURIComponent(pluginId); diff --git a/website/src/pages/extension/[id].astro b/website/src/pages/extension/[id].astro index 9b38d341..eecdeb05 100644 --- a/website/src/pages/extension/[id].astro +++ b/website/src/pages/extension/[id].astro @@ -264,6 +264,7 @@ if (!isExternal && item.ref) { diff --git a/website/src/scripts/pages/extensions-render.ts b/website/src/scripts/pages/extensions-render.ts index 0c7a5cfc..c0362f56 100644 --- a/website/src/scripts/pages/extensions-render.ts +++ b/website/src/scripts/pages/extensions-render.ts @@ -100,9 +100,9 @@ export function renderExtensionsHtml(items: RenderableExtension[]): string { const pluginId = item.pluginName || item.id; const ghappInstallUrl = item.external - ? externalSource - ? `ghapp://plugins/marketplace/add?source=${encodeURIComponent( - externalSource + ? pluginId + ? `ghapp://plugins/install?source=${encodeURIComponent( + `${pluginId}@awesome-copilot` )}` : "" : pluginId