Download src/tools/GoalCreateTool/UI.tsx from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 601 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/tools/GoalCreateTool/UI.tsx
- Command line
-
hf download hf://chenbhao/codev@afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/tools/GoalCreateTool/UI.tsx
-
curl -L -o UI.tsx https://huggingface.co/chenbhao/codev/resolve/afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/tools/GoalCreateTool/UI.tsx
601 Bytes
| import React from 'react' | |
| import { MessageResponse } from '../../components/MessageResponse.js' | |
| import { Text } from '../../ink.js' | |
| import type { Output } from './GoalCreateTool.js' | |
| export function renderToolUseMessage(input: { | |
| objective: string | |
| }): React.ReactNode { | |
| return ( | |
| <Text dimColor> | |
| creating goal: {input.objective}... | |
| </Text> | |
| ) | |
| } | |
| export function renderToolResultMessage(output: Output): React.ReactNode { | |
| const color = output.success ? 'green' : 'yellow' | |
| return ( | |
| <MessageResponse> | |
| <Text color={color}>{output.message}</Text> | |
| </MessageResponse> | |
| ) | |
| } |