From fcfb4ccf02a6fb439dff80186d1e1ed536015808 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Tue, 1 Jul 2025 12:40:41 +1000 Subject: [PATCH 1/2] Adding PostgreSQL DBA chatmode Fixed updater script to handle whitespace filenames Fixed a previously added instruction file that was hand-updated in the readme --- README.md | 3 ++- chatmodes/PostgreSQL DBA.chatmode.md | 15 +++++++++++++++ .../copilot-thought-logging.instructions.md | 1 + update-readme.js | 6 +++--- 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 chatmodes/PostgreSQL DBA.chatmode.md diff --git a/README.md b/README.md index e205cfe..5a15236 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Team and project-specific instructions to enhance GitHub Copilot's behavior for - [Bicep Code Best Practices](instructions/bicep-code-best-practices.md) - Infrastructure as Code with Bicep - [Blazor](instructions/blazor.md) - Blazor component and application patterns - [Cmake Vcpkg](instructions/cmake-vcpkg.md) - C++ project configuration and package management -- [Copilot thought logging](instructions/copilot-thought-logging.instructions.md) see process Copilot is following where you can edit this to reshape the interaction or save when follow up may be needed +- [Copilot Process tracking Instructions](instructions/copilot-thought-logging.instructions.md) - See process Copilot is following where you can edit this to reshape the interaction or save when follow up may be needed - [Genaiscript](instructions/genaiscript.md) - AI-powered script generation guidelines - [Generate Modern Terraform Code For Azure](instructions/generate-modern-terraform-code-for-azure.md) - Guidelines for generating modern Terraform code for Azure - [Markdown](instructions/markdown.md) - Documentation and content creation standards @@ -67,6 +67,7 @@ Ready-to-use prompt templates for specific development scenarios and tasks. Thes Custom chat modes define specific behaviors and tools for GitHub Copilot Chat, enabling enhanced context-aware assistance for particular tasks or workflows. These `.chatmode.md` files can be loaded by selecting "Chat with Custom Mode" from the Copilot menu. +- [Database Administrator Chat Mode](chatmodes/PostgreSQL%20DBA.chatmode.md) - Work with PostgreSQL databases using the PostgreSQL extension. - [Planning mode instructions](chatmodes/planner.chatmode.md) - Generate an implementation plan for new features or refactoring existing code. diff --git a/chatmodes/PostgreSQL DBA.chatmode.md b/chatmodes/PostgreSQL DBA.chatmode.md new file mode 100644 index 0000000..e43766e --- /dev/null +++ b/chatmodes/PostgreSQL DBA.chatmode.md @@ -0,0 +1,15 @@ +--- +description: 'Work with PostgreSQL databases using the PostgreSQL extension.' +tools: ['codebase', 'editFiles', 'githubRepo', 'runCommands', 'database', 'pgsql_bulkLoadCsv', 'pgsql_connect', 'pgsql_describeCsv', 'pgsql_disconnect', 'pgsql_listDatabases', 'pgsql_listServers', 'pgsql_modifyDatabase', 'pgsql_open_script', 'pgsql_query', 'pgsql_visualizeSchema'] +--- + +# Database Administrator Chat Mode + +You are a PostgreSQL Database Administrator (DBA) with expertise in managing and maintaining PostgreSQL database systems. You can perform tasks such as: +- Creating and managing databases +- Writing and optimizing SQL queries +- Performing database backups and restores +- Monitoring database performance +- Implementing security measures + +You have access to various tools that allow you to interact with databases, execute queries, and manage database configurations. **Always** use the tools to inspect the database, do not look into the codebase. diff --git a/instructions/copilot-thought-logging.instructions.md b/instructions/copilot-thought-logging.instructions.md index e877b76..1a69ab8 100644 --- a/instructions/copilot-thought-logging.instructions.md +++ b/instructions/copilot-thought-logging.instructions.md @@ -1,6 +1,7 @@ --- applyTo: '**' mode: "agent" +description: 'See process Copilot is following where you can edit this to reshape the interaction or save when follow up may be needed' --- # Copilot Process tracking Instructions diff --git a/update-readme.js b/update-readme.js index 83a12bb..fc777e1 100755 --- a/update-readme.js +++ b/update-readme.js @@ -177,7 +177,7 @@ function generateReadme() { for (const file of instructionFiles) { const filePath = path.join(instructionsDir, file); const title = extractTitle(filePath); - const link = `instructions/${file}`; + const link = `instructions/${file}`.replace(/ /g, "%20"); // Check if there's a description in the frontmatter const customDescription = extractDescription(filePath); @@ -237,7 +237,7 @@ function generateReadme() { const filePath = path.join(promptsDir, file); const title = extractTitle(filePath); const description = extractDescription(filePath); - const link = `prompts/${file}`; + const link = `prompts/${file}`.replace(/ /g, "%20"); if (description) { newPromptsContent += `- [${title}](${link}) - ${description}\n`; @@ -359,7 +359,7 @@ function generateReadme() { for (const file of chatmodeFiles) { const filePath = path.join(chatmodesDir, file); const title = extractTitle(filePath); - const link = `chatmodes/${file}`; + const link = `chatmodes/${file}`.replace(/ /g, "%20"); // Check if there's a description in the frontmatter const customDescription = extractDescription(filePath); From 9787f42f9819648be9335eaa4a53fe8c29612593 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 09:14:25 +1000 Subject: [PATCH 2/2] Better encoding --- update-readme.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update-readme.js b/update-readme.js index fc777e1..c87c84c 100755 --- a/update-readme.js +++ b/update-readme.js @@ -177,7 +177,7 @@ function generateReadme() { for (const file of instructionFiles) { const filePath = path.join(instructionsDir, file); const title = extractTitle(filePath); - const link = `instructions/${file}`.replace(/ /g, "%20"); + const link = encodeURI(`instructions/${file}`); // Check if there's a description in the frontmatter const customDescription = extractDescription(filePath); @@ -237,7 +237,7 @@ function generateReadme() { const filePath = path.join(promptsDir, file); const title = extractTitle(filePath); const description = extractDescription(filePath); - const link = `prompts/${file}`.replace(/ /g, "%20"); + const link = encodeURI(`prompts/${file}`); if (description) { newPromptsContent += `- [${title}](${link}) - ${description}\n`; @@ -359,7 +359,7 @@ function generateReadme() { for (const file of chatmodeFiles) { const filePath = path.join(chatmodesDir, file); const title = extractTitle(filePath); - const link = `chatmodes/${file}`.replace(/ /g, "%20"); + const link = encodeURI(`chatmodes/${file}`); // Check if there's a description in the frontmatter const customDescription = extractDescription(filePath);