{meta.tool === 'bash'
? 'Command:'
: meta.tool === 'task'
? 'Task Details:'
: 'Input:'}
{meta.tool === 'bash' && getInputValue('command') ? (
{getInputValue('command')!}
) : meta.tool === 'task' && getInputValue('prompt') ? (
{getInputValue('description') ? `Task: ${getInputValue('description')}\n` : ''}
{getInputValue('subagent_type') ? `Agent Type: ${getInputValue('subagent_type')}\n` : ''}
{`Instructions:\n${getInputValue('prompt')}`}
) : meta.tool === 'write' && getInputValue('content') ? (
) : (
{formatInputForDisplay(input, meta.tool as string)}
)}
);
})() : null}
{popup.isDiff ? (
{(() => {
const tool = popup.metadata?.tool;
if (tool === 'todowrite' || tool === 'todoread') {
return (
renderTodoOutput(popup.content) || (
{popup.content}
)
);
}
if (tool === 'list') {
return (
renderListOutput(popup.content) || (
{popup.content}
)
);
}
if (tool === 'grep') {
return (
renderGrepOutput(popup.content, isMobile) || (
{popup.content}
)
);
}
if (tool === 'glob') {
return (
renderGlobOutput(popup.content, isMobile) || (
{popup.content}
)
);
}
if (tool === 'task' || tool === 'reasoning') {
return (
);
}
if (tool === 'web-search' || tool === 'websearch' || tool === 'search_web') {
return (
renderWebSearchOutput(popup.content, syntaxTheme) || (
{popup.content}
)
);
}
if (tool === 'read') {
return
;
}
// JSON tree viewer for generic JSON outputs
const jsonResult = popup.content ? tryParseJsonOutput(popup.content) : { data: null, isJson: false };
if (jsonResult.isJson) {
return (
);
}
return (
{popup.content}
);
})()}
) : (