mirror of
https://github.com/github/awesome-copilot.git
synced 2026-08-01 23:12:29 +00:00
Update external install deep links (#2499)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
export interface PluginInstallProps {
|
export interface PluginInstallProps {
|
||||||
isExternal?: boolean;
|
isExternal?: boolean;
|
||||||
/** awesome-copilot plugin id (internal installs). */
|
/** awesome-copilot plugin id. */
|
||||||
pluginId?: string | null;
|
pluginId?: string | null;
|
||||||
/** Upstream marketplace source (owner/repo or git URL) for external installs. */
|
/** Upstream marketplace source (owner/repo or git URL) for external installs. */
|
||||||
externalSource?: string | null;
|
externalSource?: string | null;
|
||||||
@@ -36,6 +36,11 @@ let insidersUrl: string | null = null;
|
|||||||
let ghappUrl: string | null = null;
|
let ghappUrl: string | null = null;
|
||||||
|
|
||||||
if (isExternal) {
|
if (isExternal) {
|
||||||
|
if (pluginId) {
|
||||||
|
ghappUrl = `ghapp://plugins/install?source=${encodeURIComponent(
|
||||||
|
`${pluginId}@${MARKETPLACE}`
|
||||||
|
)}`;
|
||||||
|
}
|
||||||
if (externalSource) {
|
if (externalSource) {
|
||||||
vscodeUrl = `vscode://chat-plugin/install?source=${encodeURIComponent(
|
vscodeUrl = `vscode://chat-plugin/install?source=${encodeURIComponent(
|
||||||
externalSource
|
externalSource
|
||||||
@@ -43,9 +48,6 @@ if (isExternal) {
|
|||||||
insidersUrl = `vscode-insiders://chat-plugin/install?source=${encodeURIComponent(
|
insidersUrl = `vscode-insiders://chat-plugin/install?source=${encodeURIComponent(
|
||||||
externalSource
|
externalSource
|
||||||
)}`;
|
)}`;
|
||||||
ghappUrl = `ghapp://plugins/marketplace/add?source=${encodeURIComponent(
|
|
||||||
externalSource
|
|
||||||
)}`;
|
|
||||||
}
|
}
|
||||||
} else if (pluginId) {
|
} else if (pluginId) {
|
||||||
const plugin = encodeURIComponent(pluginId);
|
const plugin = encodeURIComponent(pluginId);
|
||||||
|
|||||||
@@ -264,6 +264,7 @@ if (!isExternal && item.ref) {
|
|||||||
<PluginInstall
|
<PluginInstall
|
||||||
slot="install"
|
slot="install"
|
||||||
isExternal={true}
|
isExternal={true}
|
||||||
|
pluginId={item.pluginName ?? item.id}
|
||||||
externalSource={externalSource || null}
|
externalSource={externalSource || null}
|
||||||
label="Install this extension"
|
label="Install this extension"
|
||||||
note="This extension is maintained in an external repository."
|
note="This extension is maintained in an external repository."
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ if (isExternal) {
|
|||||||
installCommand={installCommand}
|
installCommand={installCommand}
|
||||||
label={isExternal ? "Install this plugin" : "Install"}
|
label={isExternal ? "Install this plugin" : "Install"}
|
||||||
note={isExternal
|
note={isExternal
|
||||||
? "This plugin is maintained in an external repository. Installing it adds the third-party marketplace before installing."
|
? "This plugin is maintained in an external repository."
|
||||||
: undefined}
|
: undefined}
|
||||||
/>
|
/>
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
|
|||||||
@@ -100,9 +100,9 @@ export function renderExtensionsHtml(items: RenderableExtension[]): string {
|
|||||||
const pluginId = item.pluginName || item.id;
|
const pluginId = item.pluginName || item.id;
|
||||||
const ghappInstallUrl =
|
const ghappInstallUrl =
|
||||||
item.external
|
item.external
|
||||||
? externalSource
|
? pluginId
|
||||||
? `ghapp://plugins/marketplace/add?source=${encodeURIComponent(
|
? `ghapp://plugins/install?source=${encodeURIComponent(
|
||||||
externalSource
|
`${pluginId}@awesome-copilot`
|
||||||
)}`
|
)}`
|
||||||
: ""
|
: ""
|
||||||
: pluginId
|
: pluginId
|
||||||
|
|||||||
Reference in New Issue
Block a user