Merge pull request #526 from RooVetGit/switch_mode_tool

Add a tool to switch modes
This commit is contained in:
Matt Rubens
2025-01-24 12:50:57 -05:00
committed by GitHub
9 changed files with 300 additions and 1 deletions

View File

@@ -443,6 +443,27 @@ export const ChatRowContent = ({
// </div>
// </>
// )
case "switchMode":
return (
<>
<div style={headerStyle}>
{toolIcon("symbol-enum")}
<span style={{ fontWeight: "bold" }}>
{message.type === "ask" ? (
<>
Roo wants to switch to <code>{tool.mode}</code> mode
{tool.reason ? ` because: ${tool.reason}` : ""}
</>
) : (
<>
Roo switched to <code>{tool.mode}</code> mode
{tool.reason ? ` because: ${tool.reason}` : ""}
</>
)}
</span>
</div>
</>
)
default:
return null
}