From 5bff7cadc09c416f83c8d7440b7994f15a77c4f0 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 25 Feb 2026 15:54:09 +1100 Subject: [PATCH] Remove prompts from website Remove the prompts page, navigation link, homepage card, and all references to prompts across the website source code. The repo no longer contains prompt files, so the website should not reference them. Files removed: - website/src/pages/prompts.astro - website/src/scripts/pages/prompts.ts Files updated: - BaseLayout.astro: remove nav link and update description - index.astro: remove prompts card and update text - llms.txt.ts: remove prompts import and section - plugins.astro: update description text - utils.ts: remove prompt type from install config, icons, labels - pages/index.ts: remove prompts from counts - modal.ts: update JSDoc comment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- website/src/layouts/BaseLayout.astro | 6 +- website/src/pages/index.astro | 12 +-- website/src/pages/llms.txt.ts | 16 +-- website/src/pages/plugins.astro | 4 +- website/src/pages/prompts.astro | 50 --------- website/src/scripts/modal.ts | 2 +- website/src/scripts/pages/index.ts | 3 +- website/src/scripts/pages/prompts.ts | 149 --------------------------- website/src/scripts/utils.ts | 9 +- 9 files changed, 9 insertions(+), 242 deletions(-) delete mode 100644 website/src/pages/prompts.astro delete mode 100644 website/src/scripts/pages/prompts.ts diff --git a/website/src/layouts/BaseLayout.astro b/website/src/layouts/BaseLayout.astro index d89f0cc8..6f114e9c 100644 --- a/website/src/layouts/BaseLayout.astro +++ b/website/src/layouts/BaseLayout.astro @@ -9,7 +9,7 @@ interface Props { const { title, - description = "Community-driven collection of custom agents, prompts, and instructions for GitHub Copilot", + description = "Community-driven collection of custom agents, instructions, and skills for GitHub Copilot", activeNav = "", } = Astro.props; const base = import.meta.env.BASE_URL; @@ -57,10 +57,6 @@ try { href={`${base}agents/`} class:list={[{ active: activeNav === "agents" }]}>Agents - Prompts

Awesome GitHub Copilot

-

Community-contributed instructions, prompts, agents, and skills to enhance your GitHub Copilot experience

+

Community-contributed agents, instructions, and skills to enhance your GitHub Copilot experience

-
- - -
-

Prompts

-

Ready-to-use prompt templates for development tasks

-
-
-
-
@@ -103,7 +95,7 @@ const base = import.meta.env.BASE_URL;

Browse

-

Explore agents, prompts, instructions, and skills

+

Explore agents, instructions, skills, and plugins

diff --git a/website/src/pages/llms.txt.ts b/website/src/pages/llms.txt.ts index 3cf5a9b8..bd5a0647 100644 --- a/website/src/pages/llms.txt.ts +++ b/website/src/pages/llms.txt.ts @@ -1,6 +1,5 @@ import type { APIRoute } from "astro"; import agentsData from "../../public/data/agents.json"; -import promptsData from "../../public/data/prompts.json"; import instructionsData from "../../public/data/instructions.json"; import skillsData from "../../public/data/skills.json"; @@ -9,7 +8,6 @@ const GITHUB_RAW_BASE = "https://raw.githubusercontent.com/github/awesome-copilo export const GET: APIRoute = () => { const agents = agentsData.items; - const prompts = promptsData.items; const instructions = instructionsData.items; const skills = skillsData.items; @@ -22,7 +20,7 @@ export const GET: APIRoute = () => { // Summary blockquote (optional but recommended) content += - "> A community-driven collection of custom agents, prompts, instructions, and skills to enhance GitHub Copilot experiences across various domains, languages, and use cases.\n\n"; + "> A community-driven collection of custom agents, instructions, and skills to enhance GitHub Copilot experiences across various domains, languages, and use cases.\n\n"; // Add overview section content += "## Overview\n\n"; @@ -30,8 +28,6 @@ export const GET: APIRoute = () => { "This repository provides resources to customize and enhance GitHub Copilot:\n\n"; content += "- **Agents**: Specialized GitHub Copilot agents that integrate with MCP servers\n"; - content += - "- **Prompts**: Task-specific prompts for code generation and problem-solving\n"; content += "- **Instructions**: Coding standards and best practices applied to specific file patterns\n"; content += @@ -47,16 +43,6 @@ export const GET: APIRoute = () => { } content += "\n"; - // Process Prompts - content += "## Prompts\n\n"; - for (const prompt of prompts) { - const description = (prompt.description || "No description available") - .replace(/\s+/g, " ") - .trim(); - content += `- [${prompt.title}](${url(prompt.path)}): ${description}\n`; - } - content += "\n"; - // Process Instructions content += "## Instructions\n\n"; for (const instruction of instructions) { diff --git a/website/src/pages/plugins.astro b/website/src/pages/plugins.astro index 27e20371..f95aa956 100644 --- a/website/src/pages/plugins.astro +++ b/website/src/pages/plugins.astro @@ -3,12 +3,12 @@ import BaseLayout from '../layouts/BaseLayout.astro'; import Modal from '../components/Modal.astro'; --- - +
diff --git a/website/src/pages/prompts.astro b/website/src/pages/prompts.astro deleted file mode 100644 index 9b7b390a..00000000 --- a/website/src/pages/prompts.astro +++ /dev/null @@ -1,50 +0,0 @@ ---- -import BaseLayout from '../layouts/BaseLayout.astro'; -import Modal from '../components/Modal.astro'; ---- - - -
- - -
-
- - -
-
- - -
-
- - -
- -
- -
-
-
Loading prompts...
-
-
-
-
- - - - -
diff --git a/website/src/scripts/modal.ts b/website/src/scripts/modal.ts index 3aafc100..f6c48a14 100644 --- a/website/src/scripts/modal.ts +++ b/website/src/scripts/modal.ts @@ -287,7 +287,7 @@ export function setupInstallDropdown(containerId: string): void { /** * Open file viewer modal * @param filePath - Path to the file - * @param type - Resource type (agent, prompt, instruction, etc.) + * @param type - Resource type (agent, instruction, etc.) * @param updateUrl - Whether to update the URL hash (default: true) * @param trigger - The element that triggered the modal (for focus return) */ diff --git a/website/src/scripts/pages/index.ts b/website/src/scripts/pages/index.ts index e44d4de5..82fbcd12 100644 --- a/website/src/scripts/pages/index.ts +++ b/website/src/scripts/pages/index.ts @@ -8,7 +8,6 @@ import { setupModal, openFileModal } from '../modal'; interface Manifest { counts: { agents: number; - prompts: number; instructions: number; skills: number; hooks: number; @@ -36,7 +35,7 @@ export async function initHomepage(): Promise { const manifest = await fetchData('manifest.json'); if (manifest && manifest.counts) { // Populate counts in cards - const countKeys = ['agents', 'prompts', 'instructions', 'skills', 'hooks', 'plugins', 'tools'] as const; + const countKeys = ['agents', 'instructions', 'skills', 'hooks', 'plugins', 'tools'] as const; countKeys.forEach(key => { const countEl = document.querySelector(`.card-count[data-count="${key}"]`); if (countEl && manifest.counts[key] !== undefined) { diff --git a/website/src/scripts/pages/prompts.ts b/website/src/scripts/pages/prompts.ts deleted file mode 100644 index 02799ad6..00000000 --- a/website/src/scripts/pages/prompts.ts +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Prompts page functionality - */ -import { createChoices, getChoicesValues, type Choices } from '../choices'; -import { FuzzySearch, SearchItem } from '../search'; -import { fetchData, debounce, escapeHtml, getGitHubUrl, getInstallDropdownHtml, setupDropdownCloseHandlers, getActionButtonsHtml, setupActionHandlers, getLastUpdatedHtml } from '../utils'; -import { setupModal, openFileModal } from '../modal'; - -interface Prompt extends SearchItem { - path: string; - tools?: string[]; - lastUpdated?: string | null; -} - -interface PromptsData { - items: Prompt[]; - filters: { - tools: string[]; - }; -} - -type SortOption = 'title' | 'lastUpdated'; - -const resourceType = 'prompt'; -let allItems: Prompt[] = []; -let search = new FuzzySearch(); -let toolSelect: Choices; -let currentFilters = { tools: [] as string[] }; -let currentSort: SortOption = 'title'; - -function sortItems(items: Prompt[]): Prompt[] { - return [...items].sort((a, b) => { - if (currentSort === 'lastUpdated') { - const dateA = a.lastUpdated ? new Date(a.lastUpdated).getTime() : 0; - const dateB = b.lastUpdated ? new Date(b.lastUpdated).getTime() : 0; - return dateB - dateA; - } - return a.title.localeCompare(b.title); - }); -} - -function applyFiltersAndRender(): void { - const searchInput = document.getElementById('search-input') as HTMLInputElement; - const countEl = document.getElementById('results-count'); - const query = searchInput?.value || ''; - - let results = query ? search.search(query) : [...allItems]; - - if (currentFilters.tools.length > 0) { - results = results.filter(item => - item.tools?.some(tool => currentFilters.tools.includes(tool)) - ); - } - - results = sortItems(results); - - renderItems(results, query); - let countText = `${results.length} of ${allItems.length} prompts`; - if (currentFilters.tools.length > 0) { - countText += ` (filtered by ${currentFilters.tools.length} tool${currentFilters.tools.length > 1 ? 's' : ''})`; - } - if (countEl) countEl.textContent = countText; -} - -function renderItems(items: Prompt[], query = ''): void { - const list = document.getElementById('resource-list'); - if (!list) return; - - if (items.length === 0) { - list.innerHTML = '

No prompts found

Try a different search term or adjust filters

'; - return; - } - - list.innerHTML = items.map(item => ` -
- `).join(''); - - // Add click handlers - list.querySelectorAll('.resource-item').forEach(el => { - el.addEventListener('click', () => { - const path = (el as HTMLElement).dataset.path; - if (path) openFileModal(path, resourceType); - }); - }); -} - -export async function initPromptsPage(): Promise { - const list = document.getElementById('resource-list'); - const searchInput = document.getElementById('search-input') as HTMLInputElement; - const clearFiltersBtn = document.getElementById('clear-filters'); - const sortSelect = document.getElementById('sort-select') as HTMLSelectElement; - - const data = await fetchData('prompts.json'); - if (!data || !data.items) { - if (list) list.innerHTML = '

Failed to load data

'; - return; - } - - allItems = data.items; - search.setItems(allItems); - - toolSelect = createChoices('#filter-tool', { placeholderValue: 'All Tools' }); - toolSelect.setChoices(data.filters.tools.map(t => ({ value: t, label: t })), 'value', 'label', true); - document.getElementById('filter-tool')?.addEventListener('change', () => { - currentFilters.tools = getChoicesValues(toolSelect); - applyFiltersAndRender(); - }); - - sortSelect?.addEventListener('change', () => { - currentSort = sortSelect.value as SortOption; - applyFiltersAndRender(); - }); - - applyFiltersAndRender(); - searchInput?.addEventListener('input', debounce(() => applyFiltersAndRender(), 200)); - - clearFiltersBtn?.addEventListener('click', () => { - currentFilters = { tools: [] }; - currentSort = 'title'; - toolSelect.removeActiveItems(); - if (searchInput) searchInput.value = ''; - if (sortSelect) sortSelect.value = 'title'; - applyFiltersAndRender(); - }); - - setupModal(); - setupDropdownCloseHandlers(); - setupActionHandlers(); -} - -// Auto-initialize when DOM is ready -document.addEventListener('DOMContentLoaded', initPromptsPage); diff --git a/website/src/scripts/utils.ts b/website/src/scripts/utils.ts index 7c17f6fd..ee6fe2a9 100644 --- a/website/src/scripts/utils.ts +++ b/website/src/scripts/utils.ts @@ -15,10 +15,6 @@ const VSCODE_INSTALL_CONFIG: Record< baseUrl: "https://aka.ms/awesome-copilot/install/instructions", scheme: "chat-instructions", }, - prompt: { - baseUrl: "https://aka.ms/awesome-copilot/install/prompt", - scheme: "chat-prompt", - }, agent: { baseUrl: "https://aka.ms/awesome-copilot/install/agent", scheme: "chat-agent", @@ -93,7 +89,7 @@ export async function copyToClipboard(text: string): Promise { /** * Generate VS Code install URL - * @param type - Resource type (agent, prompt, instructions) + * @param type - Resource type (agent, instructions) * @param filePath - Path to the file * @param insiders - Whether to use VS Code Insiders */ @@ -227,7 +223,6 @@ export function truncate(text: string | undefined, maxLength: number): string { */ export function getResourceType(filePath: string): string { if (filePath.endsWith(".agent.md")) return "agent"; - if (filePath.endsWith(".prompt.md")) return "prompt"; if (filePath.endsWith(".instructions.md")) return "instruction"; if (/(^|\/)skills\//.test(filePath) && filePath.endsWith("SKILL.md")) return "skill"; @@ -246,7 +241,6 @@ export function getResourceType(filePath: string): string { export function formatResourceType(type: string): string { const labels: Record = { agent: "🤖 Agent", - prompt: "🎯 Prompt", instruction: "📋 Instruction", skill: "⚡ Skill", hook: "🪝 Hook", @@ -261,7 +255,6 @@ export function formatResourceType(type: string): string { export function getResourceIcon(type: string): string { const icons: Record = { agent: "🤖", - prompt: "🎯", instruction: "📋", skill: "⚡", hook: "🪝",