Markdown Copilot is an OpenAI ChatGPT API client for VSCode.
Markdown Copilot enables you to fully replace the OpenAI ChatGPT WebUI, offering superior features such as:
Note: An OpenAI or Azure OpenAI API key is required to use this extension. For more information, please refer to the OpenAI official FAQ or Azure OpenAI Quickstart.
Execute multiple auto-edits simultaneously, enhancing your productivity by not having to wait for one edit to complete before starting another.
Manage conversational contexts hierarchically, using quote indentation and syntax colors for visual context highlighting.
Markdown Copilot answers to selected text based on context.
To use, select a text range and choose ๐ก Markdown Copilot: Continue
from the code action proposals.
Or use shortcuts for quick access:
Command | Windows / Linux | Mac |
---|---|---|
Trigger suggestion |
Ctrl+Space or Ctrl+I | โ+Space or โ+I |
The active context is determined by tracing back the quote indent from the cursor line.
Can force a context guard with a line starting with # Copilot Context
.
If you select Then say "take care".
and choose ๐ก Markdown Copilot: Continue
, you will get the following output: hello
โ good bye
โ take care
.
More complex example: the context continues across take care
line.
Specifying a speaker: You can specify a speaker by placing a special Markdown notation at the beginning of a line.
Markdown | Meaning |
---|---|
**User:** |
User is the speaker |
**Copilot:** |
Markdown Copilot is the speaker |
**System(Override):** |
Overrides system message |
**System:** |
Specifies additional system message |
Customize Markdown Copilot's behavior with override options. This allows you to control settings like response length or the AI model directly within your document.
To use override options, simply include a JSON code block labeled json copilot-options
with your desired settings, then select this block along with your text and choose ๐ก Markdown Copilot: Continue
from the code action proposals.
Example: Let Markdown Copilot introduce itself with customized response length and model
Introduce yourself.
```json copilot-options
{"max_tokens":50,"model":"gpt-3.5-turbo"}
For more configuration options, please refer to the [OpenAI API: Create chat completion](https://platform.openai.com/docs/api-reference/chat/create).
### ๐ Name and Save File
Markdown Copilot allows you to name and save a file based on its contents.
To use, select the editor you want to name and save, and use the `Markdown Copilot: Name and Save As...` command.
Or use shortcuts for quick access:
| Windows / Linux | Mac |
| :-------------: | :---: |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> > <kbd>Name and Save As</kbd> | <kbd>โ</kbd>+<kbd>โง</kbd>+<kbd>P</kbd> > <kbd>Name and Save As</kbd> |
### ๐ท๏ธ Titling the Active Context
Markdown Copilot allows you to title a conversation based on the conversation history.
Conversation titles are represented as lines beginning with `# Copilot Context: `.
To use, move the cursor to the context you want to title and use the `Markdown Copilot: Title active context` command.
Or use shortcuts for quick access:
| Windows / Linux | Mac |
| :-------------: | :---: |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> > <kbd>Title active context</kbd> | <kbd>โ</kbd>+<kbd>โง</kbd>+<kbd>P</kbd> > <kbd>Title active context</kbd> |
### ๐ฅ Import Other Markdown Files
Markdown Copilot allows you to easily import other Markdown files into your current document.
This enables you to reference or reuse content from other documents.
To import another Markdown file, use the `@import` directive followed by the path to the file you want to import, enclosed in double quotes.
**Example with a relative path:** Import `another-markdown.md` located at a relative position from the current file.
```markdown
@import "path/to/another-markdown.md"
Example with an absolute path: Use an absolute path from the root directory of the workspace to import toplevel-markdown.md
.
@import "/toplevel-markdown.md"
When the current document is unsaved and thus lacks a confirmed file path, you must use an absolute path to specify other Markdown files to be imported.
Simplify the editing of quote indentation levels with intuitive actions.
Select text and choose ๐ก Markdown Copilot: Indent Quote Line
or ๐ก Markdown Copilot: Outdent Quote Line
from code action proposals.
Or use these shortcuts:
Command | Windows / Linux | Mac |
---|---|---|
Indent Quote Line |
Ctrl+Alt+L | โ+โฅ+L |
Outdent Quote Line |
Ctrl+Alt+Shift+L | โ+โฅ+โง+L |
Combine Markdown Copilot with these extensions for an even more powerful Markdown experience:
For detailed updates, refer to the CHANGELOG.