Browse Source

Add a 'when to use' section to mode definitions (#3571)

* Add a 'when to use' section to mode definitions

* Remove defaults for now
Matt Rubens 7 months ago
parent
commit
751afaa6ac

+ 5 - 0
.changeset/dark-swans-marry.md

@@ -0,0 +1,5 @@
+---
+"roo-cline": patch
+---
+
+Add a 'when to use' section to mode definitions

+ 4 - 1
src/core/prompts/instructions/create-mode.ts

@@ -25,7 +25,9 @@ If asked to create a project mode, create it in .roomodes in the workspace root.
   * roleDefinition: A detailed description of the mode's role and capabilities
   * roleDefinition: A detailed description of the mode's role and capabilities
   * groups: Array of allowed tool groups (can be empty). Each group can be specified either as a string (e.g., "edit" to allow editing any file) or with file restrictions (e.g., ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }] to only allow editing markdown files)
   * groups: Array of allowed tool groups (can be empty). Each group can be specified either as a string (e.g., "edit" to allow editing any file) or with file restrictions (e.g., ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }] to only allow editing markdown files)
 
 
-- The customInstructions field is optional.
+- The following fields are optional but highly recommended:
+  * whenToUse: A clear description of when this mode should be selected and what types of tasks it's best suited for. This helps the Orchestrator mode make better decisions.
+  * customInstructions: Additional instructions for how the mode should operate
 
 
 - For multi-line text, include newline characters in the string like "This is the first line.\\nThis is the next line.\\n\\nThis is a double line break."
 - For multi-line text, include newline characters in the string like "This is the first line.\\nThis is the next line.\\n\\nThis is a double line break."
 
 
@@ -36,6 +38,7 @@ Both files should follow this structure:
      "slug": "designer", // Required: unique slug with lowercase letters, numbers, and hyphens
      "slug": "designer", // Required: unique slug with lowercase letters, numbers, and hyphens
      "name": "Designer", // Required: mode display name
      "name": "Designer", // Required: mode display name
      "roleDefinition": "You are Roo, a UI/UX expert specializing in design systems and frontend development. Your expertise includes:\\n- Creating and maintaining design systems\\n- Implementing responsive and accessible web interfaces\\n- Working with CSS, HTML, and modern frontend frameworks\\n- Ensuring consistent user experiences across platforms", // Required: non-empty
      "roleDefinition": "You are Roo, a UI/UX expert specializing in design systems and frontend development. Your expertise includes:\\n- Creating and maintaining design systems\\n- Implementing responsive and accessible web interfaces\\n- Working with CSS, HTML, and modern frontend frameworks\\n- Ensuring consistent user experiences across platforms", // Required: non-empty
+     "whenToUse": "Use this mode when creating or modifying UI components, implementing design systems, or ensuring responsive web interfaces. This mode is especially effective with CSS, HTML, and modern frontend frameworks.", // Optional but recommended
      "groups": [ // Required: array of tool groups (can be empty)
      "groups": [ // Required: array of tool groups (can be empty)
        "read",    // Read files group (read_file, fetch_instructions, search_files, list_files, list_code_definition_names)
        "read",    // Read files group (read_file, fetch_instructions, search_files, list_files, list_code_definition_names)
        "edit",    // Edit files group (apply_diff, write_to_file) - allows editing any file
        "edit",    // Edit files group (apply_diff, write_to_file) - allows editing any file

+ 13 - 1
src/core/prompts/sections/modes.ts

@@ -16,7 +16,19 @@ export async function getModesSection(context: vscode.ExtensionContext): Promise
 MODES
 MODES
 
 
 - These are the currently available modes:
 - These are the currently available modes:
-${allModes.map((mode: ModeConfig) => `  * "${mode.name}" mode (${mode.slug}) - ${mode.roleDefinition.split(".")[0]}`).join("\n")}`
+${allModes
+	.map((mode: ModeConfig) => {
+		let description: string
+		if (mode.whenToUse && mode.whenToUse.trim() !== "") {
+			// Use whenToUse as the primary description, indenting subsequent lines for readability
+			description = mode.whenToUse.replace(/\n/g, "\n    ")
+		} else {
+			// Fallback to the first sentence of roleDefinition if whenToUse is not available
+			description = mode.roleDefinition.split(".")[0]
+		}
+		return `  * "${mode.name}" mode (${mode.slug}) - ${description}`
+	})
+	.join("\n")}`
 
 
 	modesContent += `
 	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:

+ 6 - 0
src/exports/roo-code.d.ts

@@ -138,6 +138,7 @@ type GlobalSettings = {
 				slug: string
 				slug: string
 				name: string
 				name: string
 				roleDefinition: string
 				roleDefinition: string
+				whenToUse?: string | undefined
 				customInstructions?: string | undefined
 				customInstructions?: string | undefined
 				groups: (
 				groups: (
 					| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
 					| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
@@ -157,6 +158,7 @@ type GlobalSettings = {
 				[x: string]:
 				[x: string]:
 					| {
 					| {
 							roleDefinition?: string | undefined
 							roleDefinition?: string | undefined
+							whenToUse?: string | undefined
 							customInstructions?: string | undefined
 							customInstructions?: string | undefined
 					  }
 					  }
 					| undefined
 					| undefined
@@ -822,6 +824,7 @@ type IpcMessage =
 											slug: string
 											slug: string
 											name: string
 											name: string
 											roleDefinition: string
 											roleDefinition: string
+											whenToUse?: string | undefined
 											customInstructions?: string | undefined
 											customInstructions?: string | undefined
 											groups: (
 											groups: (
 												| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
 												| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
@@ -841,6 +844,7 @@ type IpcMessage =
 											[x: string]:
 											[x: string]:
 												| {
 												| {
 														roleDefinition?: string | undefined
 														roleDefinition?: string | undefined
+														whenToUse?: string | undefined
 														customInstructions?: string | undefined
 														customInstructions?: string | undefined
 												  }
 												  }
 												| undefined
 												| undefined
@@ -1282,6 +1286,7 @@ type TaskCommand =
 								slug: string
 								slug: string
 								name: string
 								name: string
 								roleDefinition: string
 								roleDefinition: string
+								whenToUse?: string | undefined
 								customInstructions?: string | undefined
 								customInstructions?: string | undefined
 								groups: (
 								groups: (
 									| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
 									| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
@@ -1301,6 +1306,7 @@ type TaskCommand =
 								[x: string]:
 								[x: string]:
 									| {
 									| {
 											roleDefinition?: string | undefined
 											roleDefinition?: string | undefined
+											whenToUse?: string | undefined
 											customInstructions?: string | undefined
 											customInstructions?: string | undefined
 									  }
 									  }
 									| undefined
 									| undefined

+ 6 - 0
src/exports/types.ts

@@ -138,6 +138,7 @@ type GlobalSettings = {
 				slug: string
 				slug: string
 				name: string
 				name: string
 				roleDefinition: string
 				roleDefinition: string
+				whenToUse?: string | undefined
 				customInstructions?: string | undefined
 				customInstructions?: string | undefined
 				groups: (
 				groups: (
 					| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
 					| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
@@ -157,6 +158,7 @@ type GlobalSettings = {
 				[x: string]:
 				[x: string]:
 					| {
 					| {
 							roleDefinition?: string | undefined
 							roleDefinition?: string | undefined
+							whenToUse?: string | undefined
 							customInstructions?: string | undefined
 							customInstructions?: string | undefined
 					  }
 					  }
 					| undefined
 					| undefined
@@ -834,6 +836,7 @@ type IpcMessage =
 											slug: string
 											slug: string
 											name: string
 											name: string
 											roleDefinition: string
 											roleDefinition: string
+											whenToUse?: string | undefined
 											customInstructions?: string | undefined
 											customInstructions?: string | undefined
 											groups: (
 											groups: (
 												| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
 												| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
@@ -853,6 +856,7 @@ type IpcMessage =
 											[x: string]:
 											[x: string]:
 												| {
 												| {
 														roleDefinition?: string | undefined
 														roleDefinition?: string | undefined
+														whenToUse?: string | undefined
 														customInstructions?: string | undefined
 														customInstructions?: string | undefined
 												  }
 												  }
 												| undefined
 												| undefined
@@ -1296,6 +1300,7 @@ type TaskCommand =
 								slug: string
 								slug: string
 								name: string
 								name: string
 								roleDefinition: string
 								roleDefinition: string
+								whenToUse?: string | undefined
 								customInstructions?: string | undefined
 								customInstructions?: string | undefined
 								groups: (
 								groups: (
 									| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
 									| ("read" | "edit" | "browser" | "command" | "mcp" | "modes")
@@ -1315,6 +1320,7 @@ type TaskCommand =
 								[x: string]:
 								[x: string]:
 									| {
 									| {
 											roleDefinition?: string | undefined
 											roleDefinition?: string | undefined
+											whenToUse?: string | undefined
 											customInstructions?: string | undefined
 											customInstructions?: string | undefined
 									  }
 									  }
 									| undefined
 									| undefined

+ 2 - 0
src/schemas/index.ts

@@ -217,6 +217,7 @@ export const modeConfigSchema = z.object({
 	slug: z.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
 	slug: z.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
 	name: z.string().min(1, "Name is required"),
 	name: z.string().min(1, "Name is required"),
 	roleDefinition: z.string().min(1, "Role definition is required"),
 	roleDefinition: z.string().min(1, "Role definition is required"),
+	whenToUse: z.string().optional(),
 	customInstructions: z.string().optional(),
 	customInstructions: z.string().optional(),
 	groups: groupEntryArraySchema,
 	groups: groupEntryArraySchema,
 	source: z.enum(["global", "project"]).optional(),
 	source: z.enum(["global", "project"]).optional(),
@@ -256,6 +257,7 @@ export type CustomModesSettings = z.infer<typeof customModesSettingsSchema>
 
 
 export const promptComponentSchema = z.object({
 export const promptComponentSchema = z.object({
 	roleDefinition: z.string().optional(),
 	roleDefinition: z.string().optional(),
+	whenToUse: z.string().optional(),
 	customInstructions: z.string().optional(),
 	customInstructions: z.string().optional(),
 })
 })
 
 

+ 14 - 0
src/shared/modes.ts

@@ -233,6 +233,7 @@ export const defaultPrompts: Readonly<CustomModePrompts> = Object.freeze(
 			mode.slug,
 			mode.slug,
 			{
 			{
 				roleDefinition: mode.roleDefinition,
 				roleDefinition: mode.roleDefinition,
+				whenToUse: mode.whenToUse,
 				customInstructions: mode.customInstructions,
 				customInstructions: mode.customInstructions,
 			},
 			},
 		]),
 		]),
@@ -248,6 +249,7 @@ export async function getAllModesWithPrompts(context: vscode.ExtensionContext):
 	return allModes.map((mode) => ({
 	return allModes.map((mode) => ({
 		...mode,
 		...mode,
 		roleDefinition: customModePrompts[mode.slug]?.roleDefinition ?? mode.roleDefinition,
 		roleDefinition: customModePrompts[mode.slug]?.roleDefinition ?? mode.roleDefinition,
+		whenToUse: customModePrompts[mode.slug]?.whenToUse ?? mode.whenToUse,
 		customInstructions: customModePrompts[mode.slug]?.customInstructions ?? mode.customInstructions,
 		customInstructions: customModePrompts[mode.slug]?.customInstructions ?? mode.customInstructions,
 	}))
 	}))
 }
 }
@@ -271,6 +273,7 @@ export async function getFullModeDetails(
 
 
 	// Get the base custom instructions
 	// Get the base custom instructions
 	const baseCustomInstructions = promptComponent?.customInstructions || baseMode.customInstructions || ""
 	const baseCustomInstructions = promptComponent?.customInstructions || baseMode.customInstructions || ""
+	const baseWhenToUse = promptComponent?.whenToUse || baseMode.whenToUse || ""
 
 
 	// If we have cwd, load and combine all custom instructions
 	// If we have cwd, load and combine all custom instructions
 	let fullCustomInstructions = baseCustomInstructions
 	let fullCustomInstructions = baseCustomInstructions
@@ -288,6 +291,7 @@ export async function getFullModeDetails(
 	return {
 	return {
 		...baseMode,
 		...baseMode,
 		roleDefinition: promptComponent?.roleDefinition || baseMode.roleDefinition,
 		roleDefinition: promptComponent?.roleDefinition || baseMode.roleDefinition,
+		whenToUse: baseWhenToUse,
 		customInstructions: fullCustomInstructions,
 		customInstructions: fullCustomInstructions,
 	}
 	}
 }
 }
@@ -302,6 +306,16 @@ export function getRoleDefinition(modeSlug: string, customModes?: ModeConfig[]):
 	return mode.roleDefinition
 	return mode.roleDefinition
 }
 }
 
 
+// Helper function to safely get whenToUse
+export function getWhenToUse(modeSlug: string, customModes?: ModeConfig[]): string {
+	const mode = getModeBySlug(modeSlug, customModes)
+	if (!mode) {
+		console.warn(`No mode found for slug: ${modeSlug}`)
+		return ""
+	}
+	return mode.whenToUse ?? ""
+}
+
 // Helper function to safely get custom instructions
 // Helper function to safely get custom instructions
 export function getCustomInstructions(modeSlug: string, customModes?: ModeConfig[]): string {
 export function getCustomInstructions(modeSlug: string, customModes?: ModeConfig[]): string {
 	const mode = getModeBySlug(modeSlug, customModes)
 	const mode = getModeBySlug(modeSlug, customModes)

+ 79 - 1
webview-ui/src/components/prompts/PromptsView.tsx

@@ -7,6 +7,7 @@ import {
 	Mode,
 	Mode,
 	PromptComponent,
 	PromptComponent,
 	getRoleDefinition,
 	getRoleDefinition,
+	getWhenToUse,
 	getCustomInstructions,
 	getCustomInstructions,
 	getAllModes,
 	getAllModes,
 	ModeConfig,
 	ModeConfig,
@@ -106,6 +107,9 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 			if (updatedPrompt.roleDefinition === getRoleDefinition(mode)) {
 			if (updatedPrompt.roleDefinition === getRoleDefinition(mode)) {
 				delete updatedPrompt.roleDefinition
 				delete updatedPrompt.roleDefinition
 			}
 			}
+			if (updatedPrompt.whenToUse === getWhenToUse(mode)) {
+				delete updatedPrompt.whenToUse
+			}
 
 
 			vscode.postMessage({
 			vscode.postMessage({
 				type: "updatePrompt",
 				type: "updatePrompt",
@@ -195,6 +199,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 	const [newModeName, setNewModeName] = useState("")
 	const [newModeName, setNewModeName] = useState("")
 	const [newModeSlug, setNewModeSlug] = useState("")
 	const [newModeSlug, setNewModeSlug] = useState("")
 	const [newModeRoleDefinition, setNewModeRoleDefinition] = useState("")
 	const [newModeRoleDefinition, setNewModeRoleDefinition] = useState("")
+	const [newModeWhenToUse, setNewModeWhenToUse] = useState("")
 	const [newModeCustomInstructions, setNewModeCustomInstructions] = useState("")
 	const [newModeCustomInstructions, setNewModeCustomInstructions] = useState("")
 	const [newModeGroups, setNewModeGroups] = useState<GroupEntry[]>(availableGroups)
 	const [newModeGroups, setNewModeGroups] = useState<GroupEntry[]>(availableGroups)
 	const [newModeSource, setNewModeSource] = useState<ModeSource>("global")
 	const [newModeSource, setNewModeSource] = useState<ModeSource>("global")
@@ -212,6 +217,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 		setNewModeSlug("")
 		setNewModeSlug("")
 		setNewModeGroups(availableGroups)
 		setNewModeGroups(availableGroups)
 		setNewModeRoleDefinition("")
 		setNewModeRoleDefinition("")
+		setNewModeWhenToUse("")
 		setNewModeCustomInstructions("")
 		setNewModeCustomInstructions("")
 		setNewModeSource("global")
 		setNewModeSource("global")
 		// Reset error states
 		// Reset error states
@@ -258,6 +264,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 			slug: newModeSlug,
 			slug: newModeSlug,
 			name: newModeName,
 			name: newModeName,
 			roleDefinition: newModeRoleDefinition.trim(),
 			roleDefinition: newModeRoleDefinition.trim(),
+			whenToUse: newModeWhenToUse.trim() || undefined,
 			customInstructions: newModeCustomInstructions.trim() || undefined,
 			customInstructions: newModeCustomInstructions.trim() || undefined,
 			groups: newModeGroups,
 			groups: newModeGroups,
 			source,
 			source,
@@ -299,6 +306,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 		newModeName,
 		newModeName,
 		newModeSlug,
 		newModeSlug,
 		newModeRoleDefinition,
 		newModeRoleDefinition,
+		newModeWhenToUse, // Add whenToUse dependency
 		newModeCustomInstructions,
 		newModeCustomInstructions,
 		newModeGroups,
 		newModeGroups,
 		newModeSource,
 		newModeSource,
@@ -396,7 +404,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 		})
 		})
 	}
 	}
 
 
-	const handleAgentReset = (modeSlug: string, type: "roleDefinition" | "customInstructions") => {
+	const handleAgentReset = (modeSlug: string, type: "roleDefinition" | "whenToUse" | "customInstructions") => {
 		// Only reset for built-in modes
 		// Only reset for built-in modes
 		const existingPrompt = customModePrompts?.[modeSlug] as PromptComponent
 		const existingPrompt = customModePrompts?.[modeSlug] as PromptComponent
 		const updatedPrompt = { ...existingPrompt }
 		const updatedPrompt = { ...existingPrompt }
@@ -699,6 +707,61 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 							data-testid={`${getCurrentMode()?.slug || "code"}-prompt-textarea`}
 							data-testid={`${getCurrentMode()?.slug || "code"}-prompt-textarea`}
 						/>
 						/>
 					</div>
 					</div>
+
+					{/* When to Use section */}
+					<div className="mb-4">
+						<div className="flex justify-between items-center mb-1">
+							<div className="font-bold">{t("prompts:whenToUse.title")}</div>
+							{!findModeBySlug(visualMode, customModes) && (
+								<Button
+									variant="ghost"
+									size="icon"
+									onClick={() => {
+										const currentMode = getCurrentMode()
+										if (currentMode?.slug) {
+											handleAgentReset(currentMode.slug, "whenToUse")
+										}
+									}}
+									title={t("prompts:whenToUse.resetToDefault")}
+									data-testid="when-to-use-reset">
+									<span className="codicon codicon-discard"></span>
+								</Button>
+							)}
+						</div>
+						<div className="text-sm text-vscode-descriptionForeground mb-2">
+							{t("prompts:whenToUse.description")}
+						</div>
+						<VSCodeTextArea
+							value={(() => {
+								const customMode = findModeBySlug(visualMode, customModes)
+								const prompt = customModePrompts?.[visualMode] as PromptComponent
+								return customMode?.whenToUse ?? prompt?.whenToUse ?? getWhenToUse(visualMode)
+							})()}
+							onChange={(e) => {
+								const value =
+									(e as unknown as CustomEvent)?.detail?.target?.value ||
+									((e as any).target as HTMLTextAreaElement).value
+								const customMode = findModeBySlug(visualMode, customModes)
+								if (customMode) {
+									// For custom modes, update the JSON file
+									updateCustomMode(visualMode, {
+										...customMode,
+										whenToUse: value.trim() || undefined,
+										source: customMode.source || "global",
+									})
+								} else {
+									// For built-in modes, update the prompts
+									updateAgentPrompt(visualMode, {
+										whenToUse: value.trim() || undefined,
+									})
+								}
+							}}
+							className="resize-y w-full"
+							rows={3}
+							data-testid={`${getCurrentMode()?.slug || "code"}-when-to-use-textarea`}
+						/>
+					</div>
+
 					{/* Mode settings */}
 					{/* Mode settings */}
 					<>
 					<>
 						<div className="mb-3">
 						<div className="mb-3">
@@ -1258,6 +1321,21 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 									</div>
 									</div>
 								)}
 								)}
 							</div>
 							</div>
+
+							<div className="mb-4">
+								<div className="font-bold mb-1">{t("prompts:createModeDialog.whenToUse.label")}</div>
+								<div className="text-[13px] text-vscode-descriptionForeground mb-2">
+									{t("prompts:createModeDialog.whenToUse.description")}
+								</div>
+								<VSCodeTextArea
+									value={newModeWhenToUse}
+									onChange={(e) => {
+										setNewModeWhenToUse((e.target as HTMLTextAreaElement).value)
+									}}
+									rows={3}
+									className="w-full resize-y"
+								/>
+							</div>
 							<div className="mb-4">
 							<div className="mb-4">
 								<div className="font-bold mb-1">{t("prompts:createModeDialog.tools.label")}</div>
 								<div className="font-bold mb-1">{t("prompts:createModeDialog.tools.label")}</div>
 								<div className="text-[13px] text-vscode-descriptionForeground mb-2">
 								<div className="text-[13px] text-vscode-descriptionForeground mb-2">

+ 9 - 0
webview-ui/src/i18n/locales/ca/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Restablir a valors predeterminats",
 		"resetToDefault": "Restablir a valors predeterminats",
 		"description": "Definiu l'experiència i personalitat de Roo per a aquest mode. Aquesta descripció determina com Roo es presenta i aborda les tasques."
 		"description": "Definiu l'experiència i personalitat de Roo per a aquest mode. Aquesta descripció determina com Roo es presenta i aborda les tasques."
 	},
 	},
+	"whenToUse": {
+		"title": "Quan utilitzar (opcional)",
+		"description": "Descriviu quan s'hauria d'utilitzar aquest mode. Això ajuda l'Orchestrator a escollir el mode correcte per a una tasca.",
+		"resetToDefault": "Restablir la descripció 'Quan utilitzar' a valors predeterminats"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Instruccions personalitzades específiques del mode (opcional)",
 		"title": "Instruccions personalitzades específiques del mode (opcional)",
 		"resetToDefault": "Restablir a valors predeterminats",
 		"resetToDefault": "Restablir a valors predeterminats",
@@ -131,6 +136,10 @@
 			"label": "Definició de rol",
 			"label": "Definició de rol",
 			"description": "Definiu l'experiència i personalitat de Roo per a aquest mode."
 			"description": "Definiu l'experiència i personalitat de Roo per a aquest mode."
 		},
 		},
+		"whenToUse": {
+			"label": "Quan utilitzar (opcional)",
+			"description": "Proporcioneu una descripció clara de quan aquest mode és més efectiu i per a quins tipus de tasques excel·leix."
+		},
 		"tools": {
 		"tools": {
 			"label": "Eines disponibles",
 			"label": "Eines disponibles",
 			"description": "Seleccioneu quines eines pot utilitzar aquest mode."
 			"description": "Seleccioneu quines eines pot utilitzar aquest mode."

+ 9 - 0
webview-ui/src/i18n/locales/de/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Auf Standardwerte zurücksetzen",
 		"resetToDefault": "Auf Standardwerte zurücksetzen",
 		"description": "Definiere Roos Expertise und Persönlichkeit für diesen Modus. Diese Beschreibung prägt, wie Roo sich präsentiert und an Aufgaben herangeht."
 		"description": "Definiere Roos Expertise und Persönlichkeit für diesen Modus. Diese Beschreibung prägt, wie Roo sich präsentiert und an Aufgaben herangeht."
 	},
 	},
+	"whenToUse": {
+		"title": "Wann zu verwenden (optional)",
+		"description": "Beschreibe, wann dieser Modus verwendet werden sollte. Dies hilft dem Orchestrator, den richtigen Modus für eine Aufgabe auszuwählen.",
+		"resetToDefault": "Beschreibung 'Wann zu verwenden' auf Standardwerte zurücksetzen"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Modusspezifische benutzerdefinierte Anweisungen (optional)",
 		"title": "Modusspezifische benutzerdefinierte Anweisungen (optional)",
 		"resetToDefault": "Auf Standardwerte zurücksetzen",
 		"resetToDefault": "Auf Standardwerte zurücksetzen",
@@ -131,6 +136,10 @@
 			"label": "Rollendefinition",
 			"label": "Rollendefinition",
 			"description": "Definiere Roos Expertise und Persönlichkeit für diesen Modus."
 			"description": "Definiere Roos Expertise und Persönlichkeit für diesen Modus."
 		},
 		},
+		"whenToUse": {
+			"label": "Wann zu verwenden (optional)",
+			"description": "Gib eine klare Beschreibung, wann dieser Modus am effektivsten ist und für welche Arten von Aufgaben er sich besonders eignet."
+		},
 		"tools": {
 		"tools": {
 			"label": "Verfügbare Werkzeuge",
 			"label": "Verfügbare Werkzeuge",
 			"description": "Wähle, welche Werkzeuge dieser Modus verwenden kann."
 			"description": "Wähle, welche Werkzeuge dieser Modus verwenden kann."

+ 9 - 0
webview-ui/src/i18n/locales/en/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Reset to default",
 		"resetToDefault": "Reset to default",
 		"description": "Define Roo's expertise and personality for this mode. This description shapes how Roo presents itself and approaches tasks."
 		"description": "Define Roo's expertise and personality for this mode. This description shapes how Roo presents itself and approaches tasks."
 	},
 	},
+	"whenToUse": {
+		"title": "When to Use (optional)",
+		"description": "Describe when this mode should be used. This helps the Orchestrator choose the right mode for a task.",
+		"resetToDefault": "Reset to default 'When to Use' description"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Mode-specific Custom Instructions (optional)",
 		"title": "Mode-specific Custom Instructions (optional)",
 		"resetToDefault": "Reset to default",
 		"resetToDefault": "Reset to default",
@@ -131,6 +136,10 @@
 			"label": "Role Definition",
 			"label": "Role Definition",
 			"description": "Define Roo's expertise and personality for this mode."
 			"description": "Define Roo's expertise and personality for this mode."
 		},
 		},
+		"whenToUse": {
+			"label": "When to Use (optional)",
+			"description": "Provide a clear description of when this mode is most effective and what types of tasks it excels at."
+		},
 		"tools": {
 		"tools": {
 			"label": "Available Tools",
 			"label": "Available Tools",
 			"description": "Select which tools this mode can use."
 			"description": "Select which tools this mode can use."

+ 9 - 0
webview-ui/src/i18n/locales/es/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Restablecer a valores predeterminados",
 		"resetToDefault": "Restablecer a valores predeterminados",
 		"description": "Define la experiencia y personalidad de Roo para este modo. Esta descripción determina cómo Roo se presenta y aborda las tareas."
 		"description": "Define la experiencia y personalidad de Roo para este modo. Esta descripción determina cómo Roo se presenta y aborda las tareas."
 	},
 	},
+	"whenToUse": {
+		"title": "Cuándo usar (opcional)",
+		"description": "Describe cuándo se debe usar este modo. Esto ayuda al Orchestrator a elegir el modo correcto para una tarea.",
+		"resetToDefault": "Restablecer a valores predeterminados la descripción 'Cuándo usar'"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Instrucciones personalizadas para el modo (opcional)",
 		"title": "Instrucciones personalizadas para el modo (opcional)",
 		"resetToDefault": "Restablecer a valores predeterminados",
 		"resetToDefault": "Restablecer a valores predeterminados",
@@ -131,6 +136,10 @@
 			"label": "Definición de rol",
 			"label": "Definición de rol",
 			"description": "Define la experiencia y personalidad de Roo para este modo."
 			"description": "Define la experiencia y personalidad de Roo para este modo."
 		},
 		},
+		"whenToUse": {
+			"label": "Cuándo usar (opcional)",
+			"description": "Proporciona una descripción clara de cuándo este modo es más efectivo y para qué tipos de tareas es más adecuado."
+		},
 		"tools": {
 		"tools": {
 			"label": "Herramientas disponibles",
 			"label": "Herramientas disponibles",
 			"description": "Selecciona qué herramientas puede usar este modo."
 			"description": "Selecciona qué herramientas puede usar este modo."

+ 9 - 0
webview-ui/src/i18n/locales/fr/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Réinitialiser aux valeurs par défaut",
 		"resetToDefault": "Réinitialiser aux valeurs par défaut",
 		"description": "Définissez l'expertise et la personnalité de Roo pour ce mode. Cette description façonne la manière dont Roo se présente et aborde les tâches."
 		"description": "Définissez l'expertise et la personnalité de Roo pour ce mode. Cette description façonne la manière dont Roo se présente et aborde les tâches."
 	},
 	},
+	"whenToUse": {
+		"title": "Quand utiliser (optionnel)",
+		"description": "Décrivez quand ce mode doit être utilisé. Cela aide l'Orchestrateur à choisir le mode approprié pour une tâche.",
+		"resetToDefault": "Réinitialiser la description 'Quand utiliser' aux valeurs par défaut"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Instructions personnalisées spécifiques au mode (optionnel)",
 		"title": "Instructions personnalisées spécifiques au mode (optionnel)",
 		"resetToDefault": "Réinitialiser aux valeurs par défaut",
 		"resetToDefault": "Réinitialiser aux valeurs par défaut",
@@ -131,6 +136,10 @@
 			"label": "Définition du rôle",
 			"label": "Définition du rôle",
 			"description": "Définissez l'expertise et la personnalité de Roo pour ce mode."
 			"description": "Définissez l'expertise et la personnalité de Roo pour ce mode."
 		},
 		},
+		"whenToUse": {
+			"label": "Quand utiliser (optionnel)",
+			"description": "Fournissez une description claire de quand ce mode est le plus efficace et pour quels types de tâches il excelle."
+		},
 		"tools": {
 		"tools": {
 			"label": "Outils disponibles",
 			"label": "Outils disponibles",
 			"description": "Sélectionnez quels outils ce mode peut utiliser."
 			"description": "Sélectionnez quels outils ce mode peut utiliser."

+ 9 - 0
webview-ui/src/i18n/locales/hi/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "डिफ़ॉल्ट पर रीसेट करें",
 		"resetToDefault": "डिफ़ॉल्ट पर रीसेट करें",
 		"description": "इस मोड के लिए Roo की विशेषज्ञता और व्यक्तित्व परिभाषित करें। यह विवरण Roo के स्वयं को प्रस्तुत करने और कार्यों से निपटने के तरीके को आकार देता है।"
 		"description": "इस मोड के लिए Roo की विशेषज्ञता और व्यक्तित्व परिभाषित करें। यह विवरण Roo के स्वयं को प्रस्तुत करने और कार्यों से निपटने के तरीके को आकार देता है।"
 	},
 	},
+	"whenToUse": {
+		"title": "कब उपयोग करें (वैकल्पिक)",
+		"description": "बताएं कि इस मोड का उपयोग कब किया जाना चाहिए। यह Orchestrator को किसी कार्य के लिए सही मोड चुनने में मदद करता है।",
+		"resetToDefault": "'कब उपयोग करें' विवरण को डिफ़ॉल्ट पर रीसेट करें"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "मोड-विशिष्ट कस्टम निर्देश (वैकल्पिक)",
 		"title": "मोड-विशिष्ट कस्टम निर्देश (वैकल्पिक)",
 		"resetToDefault": "डिफ़ॉल्ट पर रीसेट करें",
 		"resetToDefault": "डिफ़ॉल्ट पर रीसेट करें",
@@ -131,6 +136,10 @@
 			"label": "भूमिका परिभाषा",
 			"label": "भूमिका परिभाषा",
 			"description": "इस मोड के लिए Roo की विशेषज्ञता और व्यक्तित्व परिभाषित करें।"
 			"description": "इस मोड के लिए Roo की विशेषज्ञता और व्यक्तित्व परिभाषित करें।"
 		},
 		},
+		"whenToUse": {
+			"label": "कब उपयोग करें (वैकल्पिक)",
+			"description": "स्पष्ट रूप से बताएं कि यह मोड कब सबसे प्रभावी है और किस प्रकार के कार्यों में यह उत्कृष्ट है।"
+		},
 		"tools": {
 		"tools": {
 			"label": "उपलब्ध टूल्स",
 			"label": "उपलब्ध टूल्स",
 			"description": "चुनें कि यह मोड कौन से टूल्स उपयोग कर सकता है।"
 			"description": "चुनें कि यह मोड कौन से टूल्स उपयोग कर सकता है।"

+ 9 - 0
webview-ui/src/i18n/locales/it/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Ripristina predefiniti",
 		"resetToDefault": "Ripristina predefiniti",
 		"description": "Definisci l'esperienza e la personalità di Roo per questa modalità. Questa descrizione modella come Roo si presenta e affronta i compiti."
 		"description": "Definisci l'esperienza e la personalità di Roo per questa modalità. Questa descrizione modella come Roo si presenta e affronta i compiti."
 	},
 	},
+	"whenToUse": {
+		"title": "Quando utilizzare (opzionale)",
+		"description": "Descrivi quando questa modalità dovrebbe essere utilizzata. Questo aiuta l'Orchestrator a scegliere la modalità giusta per un compito.",
+		"resetToDefault": "Ripristina la descrizione 'Quando utilizzare' ai valori predefiniti"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Istruzioni personalizzate specifiche per la modalità (opzionale)",
 		"title": "Istruzioni personalizzate specifiche per la modalità (opzionale)",
 		"resetToDefault": "Ripristina predefiniti",
 		"resetToDefault": "Ripristina predefiniti",
@@ -131,6 +136,10 @@
 			"label": "Definizione del ruolo",
 			"label": "Definizione del ruolo",
 			"description": "Definisci l'esperienza e la personalità di Roo per questa modalità."
 			"description": "Definisci l'esperienza e la personalità di Roo per questa modalità."
 		},
 		},
+		"whenToUse": {
+			"label": "Quando utilizzare (opzionale)",
+			"description": "Fornisci una chiara descrizione di quando questa modalità è più efficace e per quali tipi di compiti eccelle."
+		},
 		"tools": {
 		"tools": {
 			"label": "Strumenti disponibili",
 			"label": "Strumenti disponibili",
 			"description": "Seleziona quali strumenti questa modalità può utilizzare."
 			"description": "Seleziona quali strumenti questa modalità può utilizzare."

+ 9 - 0
webview-ui/src/i18n/locales/ja/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "デフォルトにリセット",
 		"resetToDefault": "デフォルトにリセット",
 		"description": "このモードのRooの専門知識と個性を定義します。この説明は、Rooが自身をどのように表現し、タスクにどのように取り組むかを形作ります。"
 		"description": "このモードのRooの専門知識と個性を定義します。この説明は、Rooが自身をどのように表現し、タスクにどのように取り組むかを形作ります。"
 	},
 	},
+	"whenToUse": {
+		"title": "使用タイミング(オプション)",
+		"description": "このモードをいつ使用すべきかを説明します。これはOrchestratorがタスクに適切なモードを選択するのに役立ちます。",
+		"resetToDefault": "「使用タイミング」説明をデフォルトにリセット"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "モード固有のカスタム指示(オプション)",
 		"title": "モード固有のカスタム指示(オプション)",
 		"resetToDefault": "デフォルトにリセット",
 		"resetToDefault": "デフォルトにリセット",
@@ -131,6 +136,10 @@
 			"label": "役割の定義",
 			"label": "役割の定義",
 			"description": "このモードのRooの専門知識と個性を定義します。"
 			"description": "このモードのRooの専門知識と個性を定義します。"
 		},
 		},
+		"whenToUse": {
+			"label": "使用タイミング(オプション)",
+			"description": "このモードが最も効果的なタイミングと、どのようなタイプのタスクに適しているかを明確に説明します。"
+		},
 		"tools": {
 		"tools": {
 			"label": "利用可能なツール",
 			"label": "利用可能なツール",
 			"description": "このモードが使用できるツールを選択します。"
 			"description": "このモードが使用できるツールを選択します。"

+ 9 - 0
webview-ui/src/i18n/locales/ko/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "기본값으로 재설정",
 		"resetToDefault": "기본값으로 재설정",
 		"description": "이 모드에 대한 Roo의 전문성과 성격을 정의하세요. 이 설명은 Roo가 자신을 어떻게 표현하고 작업에 접근하는지 형성합니다."
 		"description": "이 모드에 대한 Roo의 전문성과 성격을 정의하세요. 이 설명은 Roo가 자신을 어떻게 표현하고 작업에 접근하는지 형성합니다."
 	},
 	},
+	"whenToUse": {
+		"title": "사용 시기 (선택 사항)",
+		"description": "이 모드를 언제 사용해야 하는지 설명합니다. 이는 Orchestrator가 작업에 적합한 모드를 선택하는 데 도움이 됩니다.",
+		"resetToDefault": "'사용 시기' 설명을 기본값으로 재설정"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "모드별 사용자 지정 지침 (선택 사항)",
 		"title": "모드별 사용자 지정 지침 (선택 사항)",
 		"resetToDefault": "기본값으로 재설정",
 		"resetToDefault": "기본값으로 재설정",
@@ -131,6 +136,10 @@
 			"label": "역할 정의",
 			"label": "역할 정의",
 			"description": "이 모드에 대한 Roo의 전문성과 성격을 정의하세요."
 			"description": "이 모드에 대한 Roo의 전문성과 성격을 정의하세요."
 		},
 		},
+		"whenToUse": {
+			"label": "사용 시기 (선택 사항)",
+			"description": "이 모드가 가장 효과적인 시기와 어떤 유형의 작업에 적합한지에 대한 명확한 설명을 제공하세요."
+		},
 		"tools": {
 		"tools": {
 			"label": "사용 가능한 도구",
 			"label": "사용 가능한 도구",
 			"description": "이 모드가 사용할 수 있는 도구를 선택하세요."
 			"description": "이 모드가 사용할 수 있는 도구를 선택하세요."

+ 9 - 0
webview-ui/src/i18n/locales/nl/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Terugzetten naar standaard",
 		"resetToDefault": "Terugzetten naar standaard",
 		"description": "Definieer Roo's expertise en persoonlijkheid voor deze modus. Deze beschrijving bepaalt hoe Roo zich presenteert en taken benadert."
 		"description": "Definieer Roo's expertise en persoonlijkheid voor deze modus. Deze beschrijving bepaalt hoe Roo zich presenteert en taken benadert."
 	},
 	},
+	"whenToUse": {
+		"title": "Wanneer te gebruiken (optioneel)",
+		"description": "Beschrijf wanneer deze modus gebruikt moet worden. Dit helpt de Orchestrator om de juiste modus voor een taak te kiezen.",
+		"resetToDefault": "Beschrijving 'Wanneer te gebruiken' terugzetten naar standaard"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Modusspecifieke instructies (optioneel)",
 		"title": "Modusspecifieke instructies (optioneel)",
 		"resetToDefault": "Terugzetten naar standaard",
 		"resetToDefault": "Terugzetten naar standaard",
@@ -131,6 +136,10 @@
 			"label": "Roldefinitie",
 			"label": "Roldefinitie",
 			"description": "Definieer Roo's expertise en persoonlijkheid voor deze modus."
 			"description": "Definieer Roo's expertise en persoonlijkheid voor deze modus."
 		},
 		},
+		"whenToUse": {
+			"label": "Wanneer te gebruiken (optioneel)",
+			"description": "Geef een duidelijke beschrijving van wanneer deze modus het meest effectief is en voor welke soorten taken deze uitblinkt."
+		},
 		"tools": {
 		"tools": {
 			"label": "Beschikbare tools",
 			"label": "Beschikbare tools",
 			"description": "Selecteer welke tools deze modus kan gebruiken."
 			"description": "Selecteer welke tools deze modus kan gebruiken."

+ 9 - 0
webview-ui/src/i18n/locales/pl/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Przywróć domyślne",
 		"resetToDefault": "Przywróć domyślne",
 		"description": "Zdefiniuj wiedzę specjalistyczną i osobowość Roo dla tego trybu. Ten opis kształtuje, jak Roo prezentuje się i podchodzi do zadań."
 		"description": "Zdefiniuj wiedzę specjalistyczną i osobowość Roo dla tego trybu. Ten opis kształtuje, jak Roo prezentuje się i podchodzi do zadań."
 	},
 	},
+	"whenToUse": {
+		"title": "Kiedy używać (opcjonalne)",
+		"description": "Opisz, kiedy ten tryb powinien być używany. Pomaga to Orchestratorowi wybrać odpowiedni tryb dla zadania.",
+		"resetToDefault": "Przywróć domyślny opis 'Kiedy używać'"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Niestandardowe instrukcje dla trybu (opcjonalne)",
 		"title": "Niestandardowe instrukcje dla trybu (opcjonalne)",
 		"resetToDefault": "Przywróć domyślne",
 		"resetToDefault": "Przywróć domyślne",
@@ -131,6 +136,10 @@
 			"label": "Definicja roli",
 			"label": "Definicja roli",
 			"description": "Zdefiniuj wiedzę specjalistyczną i osobowość Roo dla tego trybu."
 			"description": "Zdefiniuj wiedzę specjalistyczną i osobowość Roo dla tego trybu."
 		},
 		},
+		"whenToUse": {
+			"label": "Kiedy używać (opcjonalne)",
+			"description": "Podaj jasny opis, kiedy ten tryb jest najbardziej efektywny i w jakich typach zadań się sprawdza."
+		},
 		"tools": {
 		"tools": {
 			"label": "Dostępne narzędzia",
 			"label": "Dostępne narzędzia",
 			"description": "Wybierz, których narzędzi może używać ten tryb."
 			"description": "Wybierz, których narzędzi może używać ten tryb."

+ 9 - 0
webview-ui/src/i18n/locales/pt-BR/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Restaurar para padrão",
 		"resetToDefault": "Restaurar para padrão",
 		"description": "Defina a expertise e personalidade do Roo para este modo. Esta descrição molda como o Roo se apresenta e aborda tarefas."
 		"description": "Defina a expertise e personalidade do Roo para este modo. Esta descrição molda como o Roo se apresenta e aborda tarefas."
 	},
 	},
+	"whenToUse": {
+		"title": "Quando usar (opcional)",
+		"description": "Descreva quando este modo deve ser usado. Isso ajuda o Orchestrator a escolher o modo certo para uma tarefa.",
+		"resetToDefault": "Restaurar descrição 'Quando usar' para padrão"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Instruções personalizadas específicas do modo (opcional)",
 		"title": "Instruções personalizadas específicas do modo (opcional)",
 		"resetToDefault": "Restaurar para padrão",
 		"resetToDefault": "Restaurar para padrão",
@@ -131,6 +136,10 @@
 			"label": "Definição de função",
 			"label": "Definição de função",
 			"description": "Defina a expertise e personalidade do Roo para este modo."
 			"description": "Defina a expertise e personalidade do Roo para este modo."
 		},
 		},
+		"whenToUse": {
+			"label": "Quando usar (opcional)",
+			"description": "Forneça uma descrição clara de quando este modo é mais eficaz e para quais tipos de tarefas ele se destaca."
+		},
 		"tools": {
 		"tools": {
 			"label": "Ferramentas disponíveis",
 			"label": "Ferramentas disponíveis",
 			"description": "Selecione quais ferramentas este modo pode usar."
 			"description": "Selecione quais ferramentas este modo pode usar."

+ 9 - 0
webview-ui/src/i18n/locales/ru/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Сбросить по умолчанию",
 		"resetToDefault": "Сбросить по умолчанию",
 		"description": "Определите экспертность и личность Roo для этого режима. Это описание формирует, как Roo будет себя вести и выполнять задачи."
 		"description": "Определите экспертность и личность Roo для этого режима. Это описание формирует, как Roo будет себя вести и выполнять задачи."
 	},
 	},
+	"whenToUse": {
+		"title": "Когда использовать (необязательно)",
+		"description": "Опишите, когда следует использовать этот режим. Это помогает Orchestrator выбрать правильный режим для задачи.",
+		"resetToDefault": "Сбросить описание 'Когда использовать' по умолчанию"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Пользовательские инструкции для режима (необязательно)",
 		"title": "Пользовательские инструкции для режима (необязательно)",
 		"resetToDefault": "Сбросить по умолчанию",
 		"resetToDefault": "Сбросить по умолчанию",
@@ -131,6 +136,10 @@
 			"label": "Определение роли",
 			"label": "Определение роли",
 			"description": "Определите экспертность и личность Roo для этого режима."
 			"description": "Определите экспертность и личность Roo для этого режима."
 		},
 		},
+		"whenToUse": {
+			"label": "Когда использовать (необязательно)",
+			"description": "Предоставьте четкое описание, когда этот режим наиболее эффективен и для каких типов задач он лучше всего подходит."
+		},
 		"tools": {
 		"tools": {
 			"label": "Доступные инструменты",
 			"label": "Доступные инструменты",
 			"description": "Выберите, какие инструменты может использовать этот режим."
 			"description": "Выберите, какие инструменты может использовать этот режим."

+ 9 - 0
webview-ui/src/i18n/locales/tr/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Varsayılana sıfırla",
 		"resetToDefault": "Varsayılana sıfırla",
 		"description": "Bu mod için Roo'nun uzmanlığını ve kişiliğini tanımlayın. Bu açıklama, Roo'nun kendini nasıl sunduğunu ve görevlere nasıl yaklaştığını şekillendirir."
 		"description": "Bu mod için Roo'nun uzmanlığını ve kişiliğini tanımlayın. Bu açıklama, Roo'nun kendini nasıl sunduğunu ve görevlere nasıl yaklaştığını şekillendirir."
 	},
 	},
+	"whenToUse": {
+		"title": "Ne zaman kullanılmalı (isteğe bağlı)",
+		"description": "Bu modun ne zaman kullanılması gerektiğini açıklayın. Bu, Orchestrator'ın bir görev için doğru modu seçmesine yardımcı olur.",
+		"resetToDefault": "'Ne zaman kullanılmalı' açıklamasını varsayılana sıfırla"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Moda özgü özel talimatlar (isteğe bağlı)",
 		"title": "Moda özgü özel talimatlar (isteğe bağlı)",
 		"resetToDefault": "Varsayılana sıfırla",
 		"resetToDefault": "Varsayılana sıfırla",
@@ -131,6 +136,10 @@
 			"label": "Rol Tanımı",
 			"label": "Rol Tanımı",
 			"description": "Bu mod için Roo'nun uzmanlığını ve kişiliğini tanımlayın."
 			"description": "Bu mod için Roo'nun uzmanlığını ve kişiliğini tanımlayın."
 		},
 		},
+		"whenToUse": {
+			"label": "Ne zaman kullanılmalı (isteğe bağlı)",
+			"description": "Bu modun ne zaman en etkili olduğu ve hangi tür görevlerde üstün olduğu hakkında net bir açıklama sağlayın."
+		},
 		"tools": {
 		"tools": {
 			"label": "Kullanılabilir Araçlar",
 			"label": "Kullanılabilir Araçlar",
 			"description": "Bu modun hangi araçları kullanabileceğini seçin."
 			"description": "Bu modun hangi araçları kullanabileceğini seçin."

+ 9 - 0
webview-ui/src/i18n/locales/vi/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "Đặt lại về mặc định",
 		"resetToDefault": "Đặt lại về mặc định",
 		"description": "Xác định chuyên môn và tính cách của Roo cho chế độ này. Mô tả này định hình cách Roo giới thiệu bản thân và tiếp cận nhiệm vụ."
 		"description": "Xác định chuyên môn và tính cách của Roo cho chế độ này. Mô tả này định hình cách Roo giới thiệu bản thân và tiếp cận nhiệm vụ."
 	},
 	},
+	"whenToUse": {
+		"title": "Khi nào nên sử dụng (tùy chọn)",
+		"description": "Mô tả khi nào nên sử dụng chế độ này. Điều này giúp Orchestrator chọn chế độ phù hợp cho một nhiệm vụ.",
+		"resetToDefault": "Đặt lại mô tả 'Khi nào nên sử dụng' về mặc định"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "Hướng dẫn tùy chỉnh dành riêng cho chế độ (tùy chọn)",
 		"title": "Hướng dẫn tùy chỉnh dành riêng cho chế độ (tùy chọn)",
 		"resetToDefault": "Đặt lại về mặc định",
 		"resetToDefault": "Đặt lại về mặc định",
@@ -131,6 +136,10 @@
 			"label": "Định nghĩa vai trò",
 			"label": "Định nghĩa vai trò",
 			"description": "Xác định chuyên môn và tính cách của Roo cho chế độ này."
 			"description": "Xác định chuyên môn và tính cách của Roo cho chế độ này."
 		},
 		},
+		"whenToUse": {
+			"label": "Khi nào nên sử dụng (tùy chọn)",
+			"description": "Cung cấp mô tả rõ ràng về thời điểm chế độ này hiệu quả nhất và những loại nhiệm vụ nào nó thực hiện tốt nhất."
+		},
 		"tools": {
 		"tools": {
 			"label": "Công cụ có sẵn",
 			"label": "Công cụ có sẵn",
 			"description": "Chọn công cụ nào chế độ này có thể sử dụng."
 			"description": "Chọn công cụ nào chế độ này có thể sử dụng."

+ 9 - 0
webview-ui/src/i18n/locales/zh-CN/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "重置为默认值",
 		"resetToDefault": "重置为默认值",
 		"description": "设定专业领域和应答风格"
 		"description": "设定专业领域和应答风格"
 	},
 	},
+	"whenToUse": {
+		"title": "使用场景(可选)",
+		"description": "描述何时应该使用此模式。这有助于 Orchestrator 为任务选择合适的模式。",
+		"resetToDefault": "重置\"使用场景\"描述为默认值"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "模式专属规则(可选)",
 		"title": "模式专属规则(可选)",
 		"resetToDefault": "重置为默认值",
 		"resetToDefault": "重置为默认值",
@@ -131,6 +136,10 @@
 			"label": "角色定义",
 			"label": "角色定义",
 			"description": "设定专业方向"
 			"description": "设定专业方向"
 		},
 		},
+		"whenToUse": {
+			"label": "使用场景(可选)",
+			"description": "清晰描述此模式最适合的场景和任务类型"
+		},
 		"tools": {
 		"tools": {
 			"label": "可用工具",
 			"label": "可用工具",
 			"description": "选择可用工具"
 			"description": "选择可用工具"

+ 9 - 0
webview-ui/src/i18n/locales/zh-TW/prompts.json

@@ -34,6 +34,11 @@
 		"resetToDefault": "重設為預設值",
 		"resetToDefault": "重設為預設值",
 		"description": "定義此模式下 Roo 的專業知識和個性。此描述會形塑 Roo 如何展現自己並處理工作。"
 		"description": "定義此模式下 Roo 的專業知識和個性。此描述會形塑 Roo 如何展現自己並處理工作。"
 	},
 	},
+	"whenToUse": {
+		"title": "使用時機(選用)",
+		"description": "描述何時應使用此模式。這有助於 Orchestrator 為任務選擇適當的模式。",
+		"resetToDefault": "重設「使用時機」描述為預設值"
+	},
 	"customInstructions": {
 	"customInstructions": {
 		"title": "模式專屬自訂指令(選用)",
 		"title": "模式專屬自訂指令(選用)",
 		"resetToDefault": "重設為預設值",
 		"resetToDefault": "重設為預設值",
@@ -131,6 +136,10 @@
 			"label": "角色定義",
 			"label": "角色定義",
 			"description": "定義此模式下 Roo 的專業知識和個性。"
 			"description": "定義此模式下 Roo 的專業知識和個性。"
 		},
 		},
+		"whenToUse": {
+			"label": "使用時機(選用)",
+			"description": "提供清晰的描述,說明此模式最適合什麼時候使用,以及適合哪些類型的任務。"
+		},
 		"tools": {
 		"tools": {
 			"label": "可用工具",
 			"label": "可用工具",
 			"description": "選擇此模式可使用的工具。"
 			"description": "選擇此模式可使用的工具。"

+ 2 - 2
webview-ui/src/utils/context-mentions.ts

@@ -135,13 +135,13 @@ export function getContextMenuOptions(
 					type: ContextMenuOptionType.Mode,
 					type: ContextMenuOptionType.Mode,
 					value: result.item.original.slug,
 					value: result.item.original.slug,
 					label: result.item.original.name,
 					label: result.item.original.name,
-					description: result.item.original.roleDefinition.split("\n")[0],
+					description: (result.item.original.whenToUse || result.item.original.roleDefinition).split("\n")[0],
 				}))
 				}))
 			: modes.map((mode) => ({
 			: modes.map((mode) => ({
 					type: ContextMenuOptionType.Mode,
 					type: ContextMenuOptionType.Mode,
 					value: mode.slug,
 					value: mode.slug,
 					label: mode.name,
 					label: mode.name,
-					description: mode.roleDefinition.split("\n")[0],
+					description: (mode.whenToUse || mode.roleDefinition).split("\n")[0],
 				}))
 				}))
 
 
 		return matchingModes.length > 0 ? matchingModes : [{ type: ContextMenuOptionType.NoResults }]
 		return matchingModes.length > 0 ? matchingModes : [{ type: ContextMenuOptionType.NoResults }]