-
Notifications
You must be signed in to change notification settings - Fork 34.9k
Description
In the new chat mode, it would be nice if I could add some additional contexts to the .md
file that would be used with the request so that I don't have to specify them every time I use the chat mode.
---
description: Generate an implementation plan for new features or refactoring existing code.
tools: ['codebase', 'findTestFiles', 'githubRepo', 'search', 'usages']
contexts: ['#codebase', '#my-file.yaml', '#other-file.md', '#my-folder']
---
# My Custom Chat Mode
The is an example custom chat mode
Real World Example
I have a website that has a database, I then have a file that contains MySQL CREATE TABLE
commands. When I update that .sql
file, the Custom Chat Mode would look at that file, and know what my database structure looks like so that It could output MySQL insert/update commands that I could copy/paste and then execute on my database. As of now, I have to manage two files, the actual sql file and the chat mode, so for example say I add a new column or delete a column; I would then have to make the changes in two files.
Here would be an example Chat Mode:
---
description: Search the web for documentation.
tools: ['fetch']
contexts: ['./mysql/structure.sql'] # Assumed to be based on the root of the workspace
---
# Workflow
1. Fetch any URL's provided by the user using the `fetch_webpage` tool.
2. Do a google search based on keywords provided by the user.
3. Compile all the information into a structured format to provide detailed information.
# Result
Return a MySQL insert code block that would add the found documentation to the `docs` table.
Here would be the sql within the provided context:
CREATE TABLE `docs` (
`title` VARCHAR(50),
`documentation` TEXT COMMENT 'A markdown string',
`references` JSON COMMENT 'An array of string arrays where the first item is the label and the second item is the url'
);