authorgravatar for saiansh2525@gmail.comYash Singh <saiansh2525@gmail.com> 2026-09-06 18:34:00-05:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-06 18:34:00-05:00
log79394154dfe1e6373534995022f53ffdcf293e55
treeda656508d59a62ead2d7ab771ef29c90e613db8c
parent0a89364f153f7ba890ae4dedd33d16675d73744f
signature Signed by PGP key B5690EEEBB952194

fix(web): deduplicate expanded tool labels and keep errors expandable (#10420)


1 files changed, 2 insertions(+), 1 deletions(-)

apps/web/src/components/chat/MessagesTimeline.tsx+2-1
...@@ -2993,7 +2993,7 @@ function buildToolCallExpandedBody(...@@ -2993,7 +2993,7 @@ function buildToolCallExpandedBody(
2993 viewedImagePath: string | null,2993 viewedImagePath: string | null,
2994): string | null {2994): string | null {
2995 const blocks: string[] = [];2995 const blocks: string[] = [];
2996 const seen = new Set<string>();2996 const seen = new Set<string>([visibleLabel.trim()]);
2997 const addBlock = (value: string | null | undefined) => {2997 const addBlock = (value: string | null | undefined) => {
2998 const text = value?.trim();2998 const text = value?.trim();
2999 if (!text || seen.has(text)) return;2999 if (!text || seen.has(text)) return;
...@@ -3215,6 +3215,7 @@ const PlainWorkEntryRow = memo(function PlainWorkEntryRow(props: {...@@ -3215,6 +3215,7 @@ const PlainWorkEntryRow = memo(function PlainWorkEntryRow(props: {
3215 : null;3215 : null;
3216 const commandMatchesVisibleLabel = workEntry.command?.trim() === previewText.trim();3216 const commandMatchesVisibleLabel = workEntry.command?.trim() === previewText.trim();
3217 const canExpand =3217 const canExpand =
3218 (showFailedIndicator && previewText.trim().length > 0) ||
3218 (workEntry.itemType === "mcp_tool_call" && workEntry.toolData !== undefined) ||3219 (workEntry.itemType === "mcp_tool_call" && workEntry.toolData !== undefined) ||
3219 Boolean(3220 Boolean(
3220 (!commandMatchesVisibleLabel &&3221 (!commandMatchesVisibleLabel &&