File size: 601 Bytes
fdc8b59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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>
  )
}