Add a tool to switch modes

This commit is contained in:
Matt Rubens
2025-01-24 02:38:15 -05:00
parent 0a32e24c6d
commit d1754cace0
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
}