File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ import { fileExistsAtPath } from "../../../utils/fs"
55
66export type PromptVariables = {
77 workspace ?: string
8+ mode ?: string
9+ language ?: string
10+ shell ?: string
11+ operatingSystem ?: string
812}
913
1014function interpolatePromptContent ( content : string , variables : PromptVariables ) : string {
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { DiffStrategy } from "../../shared/tools"
1414import { McpHub } from "../../services/mcp/McpHub"
1515import { getToolDescriptionsForMode } from "./tools"
1616import * as vscode from "vscode"
17+ import * as os from "os"
1718import {
1819 getRulesSection ,
1920 getSystemInfoSection ,
@@ -128,6 +129,10 @@ export const SYSTEM_PROMPT = async (
128129 // Try to load custom system prompt from file
129130 const variablesForPrompt : PromptVariables = {
130131 workspace : cwd ,
132+ mode : mode ,
133+ language : language ?? formatLanguage ( vscode . env . language ) ,
134+ shell : vscode . env . shell ,
135+ operatingSystem : os . type ( ) ,
131136 }
132137 const fileCustomSystemPrompt = await loadSystemPromptFile ( cwd , mode , variablesForPrompt )
133138
You can’t perform that action at this time.
0 commit comments