Currently the ToolOutput component implementation has a guard statement:
export const ToolOutput = ({
className,
output,
errorText,
...props
}: ToolOutputProps) => {
if (!(output || errorText)) {
return null;
}
...
The expression !(output || errorText) will wrongly returns true when the output is an empty string.
And for example, I have a read_file tool, and the agent use it to read a empty text file, sometimes the tool implementation will return an empty string here, and this expression will make the tool result be hidden.