mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
Add a new_task tool
This commit is contained in:
@@ -75,10 +75,11 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
|
||||
},
|
||||
{
|
||||
id: "switchModes",
|
||||
label: "Switch between modes",
|
||||
label: "Switch modes & create tasks",
|
||||
shortName: "Modes",
|
||||
enabled: alwaysAllowModeSwitch ?? false,
|
||||
description: "Allows automatic switching between different AI modes without requiring approval.",
|
||||
description:
|
||||
"Allows automatic switching between different AI modes and creating new tasks without requiring approval.",
|
||||
},
|
||||
{
|
||||
id: "retryRequests",
|
||||
|
||||
@@ -473,6 +473,20 @@ export const ChatRowContent = ({
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
case "newTask":
|
||||
return (
|
||||
<>
|
||||
<div style={headerStyle}>
|
||||
{toolIcon("new-file")}
|
||||
<span style={{ fontWeight: "bold" }}>
|
||||
Roo wants to create a new task in <code>{tool.mode}</code> mode:
|
||||
</span>
|
||||
</div>
|
||||
<div style={{ paddingLeft: "26px", marginTop: "4px" }}>
|
||||
<code>{tool.content}</code>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
default:
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -569,7 +569,8 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
||||
(alwaysAllowMcp && message.ask === "use_mcp_server" && isMcpToolAlwaysAllowed(message)) ||
|
||||
(alwaysAllowModeSwitch &&
|
||||
message.ask === "tool" &&
|
||||
JSON.parse(message.text || "{}")?.tool === "switchMode")
|
||||
(JSON.parse(message.text || "{}")?.tool === "switchMode" ||
|
||||
JSON.parse(message.text || "{}")?.tool === "newTask"))
|
||||
)
|
||||
},
|
||||
[
|
||||
|
||||
@@ -344,10 +344,11 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
|
||||
<VSCodeCheckbox
|
||||
checked={alwaysAllowModeSwitch}
|
||||
onChange={(e: any) => setAlwaysAllowModeSwitch(e.target.checked)}>
|
||||
<span style={{ fontWeight: "500" }}>Always approve mode switching</span>
|
||||
<span style={{ fontWeight: "500" }}>Always approve mode switching & task creation</span>
|
||||
</VSCodeCheckbox>
|
||||
<p style={{ fontSize: "12px", marginTop: "5px", color: "var(--vscode-descriptionForeground)" }}>
|
||||
Automatically switch between different AI modes without requiring approval
|
||||
Automatically switch between different AI modes and create new tasks without requiring
|
||||
approval
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user