mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-22 13:21:07 -05:00
Add a tool to switch modes
This commit is contained in:
@@ -166,11 +166,14 @@ export interface ClineSayTool {
|
||||
| "listFilesRecursive"
|
||||
| "listCodeDefinitionNames"
|
||||
| "searchFiles"
|
||||
| "switchMode"
|
||||
path?: string
|
||||
diff?: string
|
||||
content?: string
|
||||
regex?: string
|
||||
filePattern?: string
|
||||
mode?: string
|
||||
reason?: string
|
||||
}
|
||||
|
||||
// must keep in sync with system prompt
|
||||
|
||||
@@ -15,6 +15,7 @@ export const TOOL_DISPLAY_NAMES = {
|
||||
access_mcp_resource: "access mcp resources",
|
||||
ask_followup_question: "ask questions",
|
||||
attempt_completion: "complete tasks",
|
||||
switch_mode: "switch modes",
|
||||
} as const
|
||||
|
||||
// Define available tool groups
|
||||
@@ -29,7 +30,7 @@ export const TOOL_GROUPS: Record<string, ToolGroupValues> = {
|
||||
export type ToolGroup = keyof typeof TOOL_GROUPS
|
||||
|
||||
// Tools that are always available to all modes
|
||||
export const ALWAYS_AVAILABLE_TOOLS = ["ask_followup_question", "attempt_completion"] as const
|
||||
export const ALWAYS_AVAILABLE_TOOLS = ["ask_followup_question", "attempt_completion", "switch_mode"] as const
|
||||
|
||||
// Tool name types for type safety
|
||||
export type ToolName = keyof typeof TOOL_DISPLAY_NAMES
|
||||
|
||||
Reference in New Issue
Block a user