8000 add manage custom chat modes command by aeschli · Pull Request #249569 · microsoft/vscode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

add manage custom chat modes command #249569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025
Merged

add manage custom chat modes command #249569

merged 1 commit into from
May 22, 2025

Conversation

aeschli
Copy link
Contributor
@aeschli aeschli commented May 22, 2025

FYI @roblourens @legomushroom @digitarald

This adds new commands

  • New Custom Chat Mode
  • Manage Custom Chat Modes

Based on my thinking that prompt files and mode files are not exactly the same (see https://github.com/microsoft/vscode-copilot/issues/17638#issuecomment-2900355023), I decided to start with a new file extension .chatmode.md.

  • A prompt file represents a chat request and consists of a user query, tool selection and context (files, rules (aka instructions, The prompt file body consists of the user query that also lists context (via # and md-links).
  • A mode file has selected tools and contexts but no user query.
    The prompt file body defines additional context via # and md-links.

Using separate file extensions has the following advantages:

  • allows the user to place prompt files and mode files in the same folder
  • customize editing support for prompt files and mode files
  • looking at the file name is enough to know what the file was designed for

I'm happy to discuss this and change this.

There's also a new setting 'chat.modeFilesLocations'.

For @roblourens there API to access modes:

IPromptsService.getCustomChatModes and IPromptsService.onDidChangeCustomChatModes

Still TODO:

  • Make labels consistent, Right now it mostly uses 'Custom Change Mode', but not everywhere
  • onDidChangeCustomChatModes not implemented
  • editor is not yet aware of the new mode. No mode specific validation, code assist, etc.

@aeschli aeschli self-assigned this May 22, 2025
@aeschli aeschli enabled auto-merge (squash) May 22, 2025 17:48
@vs-code-engineering vs-code-engineering bot added this to the May 2025 milestone May 22, 2025
@aeschli aeschli merged commit dd95553 into main May 22, 2025
8 checks passed
@aeschli aeschli deleted the aeschli/consistent-dolphin branch May 22, 2025 19:23
@@ -187,11 +185,28 @@ export class PromptsService extends Disposable implements IPromptsService {
});
}

private readonly _onDidChangeCustomChatModesEmitter: Emitter<void> = new Emitter<void>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_register the Emitter disposable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0