mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Add a tool to switch modes
This commit is contained in:
@@ -21,6 +21,7 @@ export const toolUseNames = [
|
||||
"access_mcp_resource",
|
||||
"ask_followup_question",
|
||||
"attempt_completion",
|
||||
"switch_mode",
|
||||
] as const
|
||||
|
||||
// Converts array of tool call names into a union type ("execute_command" | "read_file" | ...)
|
||||
@@ -47,6 +48,8 @@ export const toolParamNames = [
|
||||
"diff",
|
||||
"start_line",
|
||||
"end_line",
|
||||
"mode_slug",
|
||||
"reason",
|
||||
] as const
|
||||
|
||||
export type ToolParamName = (typeof toolParamNames)[number]
|
||||
@@ -114,3 +117,8 @@ export interface AttemptCompletionToolUse extends ToolUse {
|
||||
name: "attempt_completion"
|
||||
params: Partial<Pick<Record<ToolParamName, string>, "result" | "command">>
|
||||
}
|
||||
|
||||
export interface SwitchModeToolUse extends ToolUse {
|
||||
name: "switch_mode"
|
||||
params: Partial<Pick<Record<ToolParamName, string>, "mode_slug" | "reason">>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user