markdown-copilot-vscode

MCP.Pizza Chef: kurusugawa-computer

markdown-copilot-vscode is a Visual Studio Code client that integrates the OpenAI ChatGPT API to provide AI-powered assistance specifically tailored for Markdown editing. It enables developers and content creators to leverage advanced language models directly within their VSCode environment, enhancing productivity by generating, refining, and managing Markdown content with natural language prompts. This client supports seamless interaction with AI models, facilitating smarter documentation, note-taking, and content generation workflows. It is designed to work smoothly within VSCode, making it an essential tool for users who want to combine the power of AI with their Markdown editing tasks.

Use This MCP client To

Generate Markdown content from natural language prompts Refine and improve existing Markdown documents Assist in writing technical documentation Create notes and summaries in Markdown format Automate repetitive Markdown formatting tasks Integrate AI suggestions directly in VSCode editor

README

en ja zh-cn

Markdown Copilot for Visual Studio Code

Version Downloads GitHub Workflow Status GitHub stars GitHub Contributors

Markdown Copilot is an OpenAI ChatGPT API client for VSCode.

Basic Usage

Markdown Copilot enables you to fully replace the OpenAI ChatGPT WebUI, offering superior features such as:

  1. Using Model Context Protocol Servers
  2. Saving conversation histories in Markdown
  3. Conducting multiple conversations simultaneously
  4. Branching out conversations
  5. Editing previous conversations at any point and continuing the conversation
  6. Nameing files based on conversations
  7. Titling conversations
  8. Pasting clipboard content intelligently based on file type

Note: An OpenAI, Azure OpenAI, OpenRouter, or local Ollama instance is required to use this extension. For configuration:

🌟 Key Features

⚡ Model Context Protocol Server Using

Markdown Copilot can extend its functionality through Model Context Protocol (MCP) servers. By enabling access to external tools and data sources via MCP servers, you can have more powerful and accurate conversations.

To use override tools, include a JSON code block labeled json copilot-tools with your desired settings, then select this block along with your text and choose 💡 Markdown Copilot: Continue from the code action proposals.

Example: List available tools using override tools

List all tools you can use.

```json copilot-tools
["^copilot"]
```

For instructions on adding an MCP server, please refer to the Use MCP servers in VS Code: Add an MCP server.

🔀 Parallel Editing

Execute multiple auto-edits simultaneously, enhancing your productivity by not having to wait for one edit to complete before starting another.

Parallel Editing

📝 Contextual Editing

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.

Contextual Editing

Or use shortcuts for quick access:

Command Windows / Linux Mac
Trigger suggestion Ctrl+Space or Ctrl+I +Space or +I

Contextual Editing Shortcut

ᝰ Override Options

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 or YAML code block labeled json copilot-options or yaml copilot-options respectively 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 (JSON)

Introduce yourself.

```json copilot-options
{"max_tokens":50,"model":"gpt-3.5-turbo"}
```

Example: Let Markdown Copilot introduce itself with customized response length and model (YAML)

Introduce yourself.

```yaml copilot-options
max_tokens: 50
model: gpt-3.5-turbo
```

Example: Using the o1-preview model (JSON)

The o1-preview model do not support system messages, so we will use **System(Override):** to clear the system messages.

**System(Override):**

**User:**
Introduce yourself.

```json copilot-options
{"model":"o1-preview","temperature":1}
```

Example: Using local Ollama with llama2 model (JSON)

Introduce yourself.

```json copilot-options
{"model":"llama2","baseURL":"http://localhost:11434/v1"}
```

Example: Using local Ollama with llama2 model (YAML)

Introduce yourself.

```yaml copilot-options
model: llama2
baseURL: http://localhost:11434/v1
```

For more configuration options, please refer to the OpenAI API: Create chat completion.

📛 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
Ctrl+Shift+P > Name and Save As ++P > Name and Save As

🏷️ 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
Ctrl+Shift+P > Title active context ++P > Title active context

🪄 Summarize and New Context

Markdown Copilot allows you to summarize the current context and start a new context based on the summary. This feature helps prevent the conversation context from becoming excessively long, which can impair the model's ability to process the conversation effectively, while also making it easier for you to grasp the conversation's essence.

To use, move the cursor to the context you want to summarize and use the Markdown Copilot: Summarize and New Context command.

Windows / Linux Mac
Ctrl+Shift+P > Summarize and New Context ++P > Summarize and New Context

📋⤵ Paste as Pretty Text

Markdown Copilot allows you to paste clipboard content into your document in an intelligent way, adapting to the file type. This feature ensures that pasted content integrates seamlessly into your editing files, avoiding unnecessary formatting issues.

To use this feature, select the location where you want to paste the content and use the Markdown Copilot: Paste as Pretty Text command.

Or use shortcuts for quick access:

Windows / Linux Mac
Ctrl+Shift+P > Paste as pretty ++P > Paste as pretty

📥 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.

@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.

🎛 Context Control

Manage conversational contexts hierarchically, using quote indentation and syntax colors for visual context highlighting.

Context Control

♯ Context Notation in Markdown

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.

Example: take care

If you select Then say "take care". and choose 💡 Markdown Copilot: Continue, you will get the following output: hellogood byetake care.

Example: take care

More complex example: the context continues across take care line.

Example: see you again

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

⤷ Quote Indentation

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.

Quote Indentation

Or use these shortcuts:

Command Windows / Linux Mac
Indent Quote Line Ctrl+Alt+L ++L
Outdent Quote Line Ctrl+Alt+Shift+L +++L

Quote Indentation Shortcut

📋 Prerequisites

🔌 Enhance Your Markdown Experience

Combine Markdown Copilot with these extensions for an even more powerful Markdown experience:

  • Markdown All in One: Comprehensive Markdown support (keyboard shortcuts, table of contents, auto preview, and more).
  • Snippets: Supercharge your Snippets in VS Code — Manage your code snippets without quitting your editor.
  • Markdown Preview Mermaid Support: Adds Mermaid diagram and flowchart support to VS Code's built-in markdown preview.
  • Markdown Preview Enhanced: Markdown Preview Enhanced is a SUPER POWERFUL markdown extension for Visual Studio Code. The goal of this project is to bring you a wonderful markdown writing experience.
  • Markdown+Math: Enhance your Markdown with LaTeX Math ... including macros and more.

🔄 Changelog

For detailed updates, refer to the CHANGELOG.

🤝 Get Involved

markdown-copilot-vscode FAQ

How do I install markdown-copilot-vscode in Visual Studio Code?
You can install markdown-copilot-vscode from the VSCode Marketplace by searching for 'markdown-copilot' and clicking install. It requires an active internet connection to access the OpenAI ChatGPT API.
Does markdown-copilot-vscode support models other than OpenAI ChatGPT?
While primarily designed for OpenAI ChatGPT API, markdown-copilot-vscode can be configured to work with other LLM providers like Anthropic Claude and Google Gemini through custom API settings.
How does markdown-copilot-vscode handle user data and privacy?
The client sends your Markdown content to the AI API for processing. It is recommended to review the privacy policies of the AI providers such as OpenAI, Anthropic, and Google to understand data handling practices.
Can I customize the AI prompts or behavior in markdown-copilot-vscode?
Yes, markdown-copilot-vscode allows customization of prompts and interaction settings to tailor AI responses to your specific Markdown editing needs.
Is markdown-copilot-vscode free to use?
The extension itself is free, but usage of the OpenAI ChatGPT API or other LLM APIs may incur costs depending on your subscription or usage plan.
Does markdown-copilot-vscode support real-time collaboration?
Currently, markdown-copilot-vscode focuses on individual AI-assisted editing and does not include built-in real-time collaboration features.
What versions of Visual Studio Code are compatible with markdown-copilot-vscode?
It supports recent stable versions of Visual Studio Code. Check the extension's marketplace page for specific version requirements.
How do I report issues or contribute to markdown-copilot-vscode?
You can report issues or contribute via the GitHub repository at https://github.com/kurusugawa-computer/markdown-copilot-vscode.