News
Prompt Engineering? See VS Code Team's System Prompts for Copilot Chat, Now Open Source
"Now that the code is open source, what does it mean for you? Explore the codebase and learn how agent mode is implemented, what context is sent to LLMs, and how we engineer our prompts. Everything, from our system prompts, implementation details, to the telemetry we capture, is available in all transparency. In fact, why not use agent mode itself for helping you understand and explore the codebase!"
-- Microsoft, June 30, 2025
Code exploration is one of the benefits for developers resulting from Microsoft's ongoing initiative to transform Visual Studio Code into an open-source AI development environment (see "VS Code Goes Transparent as Open-Source AI Editor").
With "prompt engineering" having already had its moment in the sun and fallen into the trough of disillusionment, there is still interest in how to get the most from your LLM of choice, so Microsoft's opening up the source code for Chat is a goldmine for certain developers. There are still articles appearing regularly on how to prompt advanced AI, but there is no better source of inspiration than the professional coders who design this stuff from the ground up.
Now inquisitive developers can look for pro secrets and techniques in tons of source code, including system prompts.
To give you a taste, here's the abbreviated and trimmed code for just one such prompt, presented in TypeScript, in the vscode-copilot-chat/src/extension/prompt/node/summarizer.ts folder of the GitHub project. For example, the import lead-in code and non-prompt-related code has been excluded.
'You are an expert at summarizing chat conversations'
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Simple prompt template for summarization
// Consider adopting the more sophisticated summarizedConversationHistory.tsx
class SummaryPrompt {
render() {
return {
messages: [
{
role: 'system' as const,
content: `You are an expert at summarizing chat conversations.
You will be provided:
- A series of user/assistant message pairs in chronological order
- A final user message indicating the user's intent.
Your task is to:
- Create a detailed summary of the conversation that captures the user's intent and key information.
Keep in mind:
- The user is iterating on a feature specification, bug fix, or other common programming task.
- There may be relevant code snippets or files referenced in the conversation.
- The user is collaborating with the assistant to refine their ideas and solutions, course-correcting the assistant as needed.
- The user will provide feedback on the assistant's suggestions and may request changes or improvements.
- Disregard messages that the user has indicated are incorrect, irrelevant, or unhelpful.
- Preserve relevant and actionable context and key information.
- If the conversation is long or discusses several tasks, keep the summary focused on the task indicated by the user's intent.
- Always prefer decisions in later messages over earlier ones.
Structure your summary using the following format:
TITLE: A brief title for the summary
USER INTENT: The user's goal or intent for the conversation
TASK DESCRIPTION: Main technical goals and user requirements
EXISTING: What has already been accomplished. Include file paths and other direct references.
PENDING: What still needs to be done. Include file paths and other direct references.
CODE STATE: A list of all files discussed or modified. Provide code snippets or diffs that illustrate important context.
RELEVANT CODE/DOCUMENTATION SNIPPETS: Key code or documentation snippets from referenced files or discussions.
OTHER NOTES: Any additional context or information that may be relevant.`
}
]
};
}
}
After that there is a bunch of code for exporting and so on, providing no clues into prompting. However, other such prompts are sprinkled throughout the codebase, providing a treasure trove to developers of a certain inquisitive mind.
Enjoy.
About the Author
David Ramel is an editor and writer at Converge 360.