fix: surface Claude Grep results in search detail body

The Claude SDK delivers Grep tool_result content as a plain string, which
claude-agent.ts wraps as { output: <string> } for unrecognized tools. The
canonical ToolGrepOutputSchema requires structured fields, so parsing fell
through to an unknown detail and the UI rendered only the redundant query.
This commit is contained in:
Mohamed Boudra
2026-04-26 11:56:01 +07:00
parent 18903bcecb
commit 712cb8fc86
4 changed files with 83 additions and 19 deletions
@@ -382,15 +382,6 @@ interface SearchDetail {
function buildSearchSections(detail: SearchDetail, ds: DetailStyles): ReactNode[] {
const out: ReactNode[] = [];
if (detail.query) {
out.push(
<View key="search-query" style={styles.section}>
<Text selectable style={styles.scrollText}>
{detail.query}
</Text>
</View>,
);
}
if (detail.content) {
out.push(
<View key="search-content" style={styles.section}>