File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ import type { ModeConfig } from "@roo-code/types"
55import { getAllModesWithPrompts } from "../../../shared/modes"
66import { ensureSettingsDirectoryExists } from "../../../utils/globalContext"
77
8- export async function getModesSection ( context : vscode . ExtensionContext ) : Promise < string > {
8+ export async function getModesSection (
9+ context : vscode . ExtensionContext ,
10+ skipXmlExamples : boolean = false ,
11+ ) : Promise < string > {
912 // Make sure path gets created
1013 await ensureSettingsDirectoryExists ( context )
1114
@@ -31,12 +34,18 @@ ${allModes
3134 } )
3235 . join ( "\n" ) } `
3336
34- modesContent += `
37+ if ( ! skipXmlExamples ) {
38+ modesContent += `
3539If the user asks you to create or edit a new mode for this project, you should read the instructions by using the fetch_instructions tool, like this:
3640<fetch_instructions>
3741<task>create_mode</task>
3842</fetch_instructions>
3943`
44+ } else {
45+ modesContent += `
46+ If the user asks you to create or edit a new mode for this project, you should read the instructions by using the fetch_instructions tool.
47+ `
48+ }
4049
4150 return modesContent
4251}
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ async function generatePrompt(
8686 const effectiveProtocol = getEffectiveProtocol ( settings ?. toolProtocol )
8787
8888 const [ modesSection , mcpServersSection ] = await Promise . all ( [
89- getModesSection ( context ) ,
89+ getModesSection ( context , isNativeProtocol ( effectiveProtocol ) ) ,
9090 shouldIncludeMcp
9191 ? getMcpServersSection (
9292 mcpHub ,
You can’t perform that action at this time.
0 commit comments