|
@@ -5,7 +5,10 @@ import type { ModeConfig } from "@roo-code/types"
|
|
|
import { getAllModesWithPrompts } from "../../../shared/modes"
|
|
import { getAllModesWithPrompts } from "../../../shared/modes"
|
|
|
import { ensureSettingsDirectoryExists } from "../../../utils/globalContext"
|
|
import { ensureSettingsDirectoryExists } from "../../../utils/globalContext"
|
|
|
|
|
|
|
|
-export async function getModesSection(context: vscode.ExtensionContext): Promise<string> {
|
|
|
|
|
|
|
+export async function getModesSection(
|
|
|
|
|
+ context: vscode.ExtensionContext,
|
|
|
|
|
+ skipXmlExamples: boolean = false,
|
|
|
|
|
+): Promise<string> {
|
|
|
// Make sure path gets created
|
|
// Make sure path gets created
|
|
|
await ensureSettingsDirectoryExists(context)
|
|
await ensureSettingsDirectoryExists(context)
|
|
|
|
|
|
|
@@ -31,12 +34,18 @@ ${allModes
|
|
|
})
|
|
})
|
|
|
.join("\n")}`
|
|
.join("\n")}`
|
|
|
|
|
|
|
|
- modesContent += `
|
|
|
|
|
|
|
+ if (!skipXmlExamples) {
|
|
|
|
|
+ modesContent += `
|
|
|
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, like this:
|
|
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, like this:
|
|
|
<fetch_instructions>
|
|
<fetch_instructions>
|
|
|
<task>create_mode</task>
|
|
<task>create_mode</task>
|
|
|
</fetch_instructions>
|
|
</fetch_instructions>
|
|
|
`
|
|
`
|
|
|
|
|
+ } else {
|
|
|
|
|
+ modesContent += `
|
|
|
|
|
+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.
|
|
|
|
|
+`
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return modesContent
|
|
return modesContent
|
|
|
}
|
|
}
|