Created greet tool outputting 'hi'.
BuildAdded custom red rendering for tool output.
EditConfirmed tool output displays in red.
Verifyi want to create a simple custom tool in an extension called greet.ts in .pi/extensions. the tool should just output "hi"
Created .pi/extensions/greet.ts with a simple greet tool that returns "hi".
The extension will be auto-discovered when you run pi from this directory. Alternatively, test it with:
pi -e .pi/extensions/greet.tswell use the tool now
Done! The tool returned "hi" as expected.
add simple custom rendering for the tool result, make the output red
Done. Added renderResult that uses theme.fg("error", "hi") to render the output in red. The tool result should now display in red in the TUI.
use the greet tool again
Done. You should see "hi" rendered in red now.
pi -e .pi/extensions/greet.ts