|
@@ -14,6 +14,7 @@ import { DiffStrategy } from "../../shared/tools"
|
|
|
import { McpHub } from "../../services/mcp/McpHub"
|
|
import { McpHub } from "../../services/mcp/McpHub"
|
|
|
import { getToolDescriptionsForMode } from "./tools"
|
|
import { getToolDescriptionsForMode } from "./tools"
|
|
|
import * as vscode from "vscode"
|
|
import * as vscode from "vscode"
|
|
|
|
|
+import * as os from "os"
|
|
|
import {
|
|
import {
|
|
|
getRulesSection,
|
|
getRulesSection,
|
|
|
getSystemInfoSection,
|
|
getSystemInfoSection,
|
|
@@ -128,6 +129,10 @@ export const SYSTEM_PROMPT = async (
|
|
|
// Try to load custom system prompt from file
|
|
// Try to load custom system prompt from file
|
|
|
const variablesForPrompt: PromptVariables = {
|
|
const variablesForPrompt: PromptVariables = {
|
|
|
workspace: cwd,
|
|
workspace: cwd,
|
|
|
|
|
+ mode: mode,
|
|
|
|
|
+ language: language ?? formatLanguage(vscode.env.language),
|
|
|
|
|
+ shell: vscode.env.shell,
|
|
|
|
|
+ operatingSystem: os.type(),
|
|
|
}
|
|
}
|
|
|
const fileCustomSystemPrompt = await loadSystemPromptFile(cwd, mode, variablesForPrompt)
|
|
const fileCustomSystemPrompt = await loadSystemPromptFile(cwd, mode, variablesForPrompt)
|
|
|
|
|
|