mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
28 lines
807 B
TypeScript
28 lines
807 B
TypeScript
import { Box, Text } from "ink"
|
|
|
|
import * as theme from "../../theme.js"
|
|
import { Icon } from "../Icon.js"
|
|
|
|
import type { ToolRendererProps } from "./types.js"
|
|
import { getToolIconName } from "./utils.js"
|
|
|
|
export function ModeTool({ toolData }: ToolRendererProps) {
|
|
const iconName = getToolIconName(toolData.tool)
|
|
const mode = toolData.mode || ""
|
|
const isSwitch = toolData.tool.includes("switch") || toolData.tool.includes("Switch")
|
|
|
|
return (
|
|
<Box flexDirection="row" gap={1} paddingX={1} marginBottom={1}>
|
|
<Icon name={iconName} color={theme.toolHeader} />
|
|
{isSwitch && mode && (
|
|
<Box gap={1}>
|
|
<Text color={theme.dimText}>Switching to</Text>
|
|
<Text color={theme.userHeader} bold>
|
|
{mode}
|
|
</Text>
|
|
<Text color={theme.dimText}>mode</Text>
|
|
</Box>
|
|
)}
|
|
</Box>
|
|
)
|
|
}
|