chore: publish from main

This commit is contained in:
github-actions[bot]
2026-07-03 02:25:08 +00:00
parent c919c0c570
commit 700e6f19dd
27 changed files with 748 additions and 687 deletions
+14 -1
View File
@@ -37,6 +37,8 @@ export interface RenderableExtension {
} | null;
imageUrl?: string | null;
assetPath?: string | null;
pluginName?: string | null;
installCommand?: string | null;
installUrl?: string | null;
sourceUrl?: string | null;
external?: boolean;
@@ -78,6 +80,9 @@ export function renderExtensionsHtml(items: RenderableExtension[]): string {
"/"
)}`
: "");
const installCommand =
item.installCommand ||
(item.pluginName ? `copilot plugin install ${item.pluginName}@awesome-copilot` : "");
const sourceUrl =
item.sourceUrl || (item.path ? getGitHubUrl(item.path) : "");
@@ -126,8 +131,16 @@ export function renderExtensionsHtml(items: RenderableExtension[]): string {
const actionsHtml = `
<button
class="btn btn-primary btn-small copy-install-url-btn"
data-install-command="${escapeHtml(installCommand)}"
title="Copy plugin install command"
${installCommand ? "" : "disabled"}
>
Copy Install
</button>
<button
class="btn btn-secondary btn-small copy-install-url-btn"
data-install-url="${escapeHtml(installUrl)}"
title="Copy install URL"
title="Copy fallback URL install target"
${installUrl ? "" : "disabled"}
>
Copy URL
+48 -14
View File
@@ -78,6 +78,13 @@ function getInstallUrl(item: Extension): string {
);
}
function getInstallCommand(item: Extension): string {
return (
item.installCommand ||
(item.pluginName ? `copilot plugin install ${item.pluginName}@awesome-copilot` : "")
);
}
function getSourceUrl(item: Extension): string {
return item.sourceUrl || (item.path ? getGitHubUrl(item.path) : "");
}
@@ -207,6 +214,7 @@ function openDetailsModal(
}
const installUrl = getInstallUrl(item);
const installCommand = getInstallCommand(item);
const sourceUrl = getSourceUrl(item);
const detailsHtml = `
<div class="extension-details-body">
@@ -223,16 +231,18 @@ function openDetailsModal(
""
)}</div>
<div class="resource-actions extension-details-actions">
<button id="extension-details-install" class="btn btn-primary btn-small" type="button" data-install-url="${escapeHtml(
<button id="extension-details-install" class="btn btn-primary btn-small" type="button" data-install-command="${escapeHtml(
installCommand
)}" ${installCommand ? "" : "disabled"}>Copy Install</button>
<button id="extension-details-copy-url" class="btn btn-secondary btn-small" type="button" data-install-url="${escapeHtml(
installUrl
)}" ${installUrl ? "" : "disabled"}>Install</button>
${
sourceUrl
? `<a id="extension-details-source" class="btn btn-secondary btn-small" href="${escapeHtml(
sourceUrl
)}" target="_blank" rel="noopener noreferrer">Source</a>`
: ""
}
)}" ${installUrl ? "" : "disabled"}>Copy URL</button>
${sourceUrl
? `<a id="extension-details-source" class="btn btn-secondary btn-small" href="${escapeHtml(
sourceUrl
)}" target="_blank" rel="noopener noreferrer">Source</a>`
: ""
}
</div>
</div>
</div>
@@ -304,14 +314,20 @@ function setupActionHandlers(list: HTMLElement | null): void {
if (!installButton) return;
event.stopPropagation();
const installCommand = installButton.dataset.installCommand || "";
const installUrl = installButton.dataset.installUrl || "";
if (!installUrl) {
showToast("No install URL available for this extension", "error");
const contentToCopy = installCommand || installUrl;
if (!contentToCopy) {
showToast("No install target available for this extension", "error");
return;
}
const success = await copyToClipboard(installUrl);
const success = await copyToClipboard(contentToCopy);
showToast(
success ? "Extension URL copied!" : "Failed to copy extension URL",
success
? installCommand
? "Install command copied!"
: "Extension URL copied!"
: "Failed to copy install target",
success ? "success" : "error"
);
return;
@@ -371,7 +387,25 @@ function setupActionHandlers(list: HTMLElement | null): void {
"#extension-details-install"
) as HTMLButtonElement | null;
if (detailsInstallButton) {
const installUrl = detailsInstallButton.dataset.installUrl || "";
const installCommand = detailsInstallButton.dataset.installCommand || "";
if (!installCommand) {
showToast("No plugin install command available for this extension", "error");
return;
}
const success = await copyToClipboard(installCommand);
showToast(
success ? "Install command copied!" : "Failed to copy install command",
success ? "success" : "error"
);
return;
}
const detailsCopyUrlButton = target.closest(
"#extension-details-copy-url"
) as HTMLButtonElement | null;
if (detailsCopyUrlButton) {
const installUrl = detailsCopyUrlButton.dataset.installUrl || "";
if (!installUrl) {
showToast("No install URL available for this extension", "error");
return;