Skip to content

Commit d343330

Browse files
bra1nDumpclaude
andcommitted
fix(happy-app): hide internal Claude Code ToolSearch from UI
Add hidden property to knownTools so internal tools like ToolSearch render nothing instead of showing raw INPUT/OUTPUT JSON. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9e99583 commit d343330

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

packages/happy-app/sources/components/tools/ToolView.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ export const ToolView = React.memo<ToolViewProps>((props) => {
4444

4545
let knownTool = knownTools[tool.name as keyof typeof knownTools] as any;
4646

47+
// Internal Claude Code tools (e.g. ToolSearch) are completely hidden from the UI
48+
if (knownTool?.hidden) {
49+
return null;
50+
}
51+
4752
let description: string | null = null;
4853
let status: string | null = null;
4954
let minimal = false;

packages/happy-app/sources/components/tools/knownTools.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,12 +935,18 @@ export const knownTools = {
935935
}
936936
return null;
937937
}
938+
},
939+
// Internal Claude Code tool for loading deferred tools - no user-visible output
940+
'ToolSearch': {
941+
icon: ICON_SEARCH,
942+
hidden: true,
938943
}
939944
} satisfies Record<string, {
940945
title?: string | ((opts: { metadata: Metadata | null, tool: ToolCall }) => string);
941946
icon: (size: number, color: string) => React.ReactNode;
942947
noStatus?: boolean;
943948
hideDefaultError?: boolean;
949+
hidden?: boolean;
944950
isMutable?: boolean;
945951
input?: z.ZodObject<any>;
946952
result?: z.ZodObject<any>;

packages/happy-cli/src/agent/acp/runAcp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function formatTextForConsole(text: string): string {
104104
return JSON.stringify(truncateForConsole(toSingleLine(text), ACP_EVENT_PREVIEW_CHARS));
105105
}
106106

107-
function formatOptionalDetail(text: string | undefined, limit = ACP_EVENT_PREVIEW_CHARS): string {
107+
function formatOptionalDetail(text: string | null | undefined, limit = ACP_EVENT_PREVIEW_CHARS): string {
108108
if (!text) {
109109
return '';
110110
}

0 commit comments

Comments
 (0)