diff --git a/index.html b/index.html
index 08de940..faa3bcb 100644
--- a/index.html
+++ b/index.html
@@ -941,6 +941,25 @@
}
}
+function deepDivePrompt(p) {
+ const flowText = p.flow.map(f => f.label).join(' → ') + (p.loop ? ' → (loop) → Done' : '');
+ return `Explain the "${p.name}" AI agent design pattern with a real implementation example.\n\n`
+ + `Context: ${p.desc}\n`
+ + `Typical flow: ${flowText}\n`
+ + `Common uses: ${p.uses}`;
+}
+
+function copyDeepDive(idx, btn) {
+ const text = deepDivePrompt(PATTERNS[idx]);
+ const reset = (label) => {
+ btn.textContent = label;
+ setTimeout(() => { btn.textContent = 'Deep dive ↗'; }, 1600);
+ };
+ navigator.clipboard.writeText(text)
+ .then(() => reset('Copied ✓'))
+ .catch(() => reset('Copy failed'));
+}
+
function renderGrid() {
const grid = document.getElementById('grid');
grid.innerHTML = '';
@@ -986,7 +1005,7 @@
${p.desc}
Common uses: ${p.uses}
-