-
Prompt copied
+
Prompt copied
Create a repository, then paste the copied prompt into the starter text box to start setting up your control
plane.
From 04c9b0de982c784e4682334c527f88f9fccfc770 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 27 Aug 2026 21:15:52 +0000
Subject: [PATCH 4/4] Reset copy state when dialog closes
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
---
docs/components/OpsWizard.astro | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/docs/components/OpsWizard.astro b/docs/components/OpsWizard.astro
index b73a9ce..051169a 100644
--- a/docs/components/OpsWizard.astro
+++ b/docs/components/OpsWizard.astro
@@ -292,6 +292,11 @@ const agents = [
}
}
+ function resetCopyState() {
+ if (copyLabel) copyLabel.textContent = "Copy prompt";
+ copyButton?.classList.remove("is-copied");
+ }
+
function render() {
const operation = selected(form, "operation");
const agent = selected(form, "agent");
@@ -319,16 +324,17 @@ const agents = [
if (copyLabel) copyLabel.textContent = "Copied";
copyButton.classList.add("is-copied");
openCopyDialog();
- resetCopyLabel = setTimeout(() => {
- if (copyLabel) copyLabel.textContent = "Copy prompt";
- copyButton.classList.remove("is-copied");
- }, 2400);
+ resetCopyLabel = setTimeout(resetCopyState, 2400);
} catch {
if (status) status.textContent = "Copy failed. Select the prompt text and copy it manually.";
}
});
copyDialogClose?.addEventListener("click", () => copyDialog?.close());
+ copyDialog?.addEventListener("close", () => {
+ clearTimeout(resetCopyLabel);
+ resetCopyState();
+ });
copyDialog?.addEventListener("click", (event) => {
if (event.target === copyDialog) copyDialog.close();
});