From 969ea533029bbaa5b62d3284df0bd6c5f0c160f5 Mon Sep 17 00:00:00 2001 From: kdunn926 Date: Fri, 6 Feb 2026 07:58:05 -0700 Subject: [PATCH] fix: handle toolnames without underscores (#7015) Signed-off-by: Kyle Dunn --- ui/desktop/src/utils/toolIconMapping.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/desktop/src/utils/toolIconMapping.tsx b/ui/desktop/src/utils/toolIconMapping.tsx index c8f456cd..d3ba7b23 100644 --- a/ui/desktop/src/utils/toolIconMapping.tsx +++ b/ui/desktop/src/utils/toolIconMapping.tsx @@ -109,7 +109,8 @@ export const getExtensionIcon = (extensionName: string): React.ComponentType { - return toolCallName.substring(toolCallName.lastIndexOf('__') + 2); + const lastIndex = toolCallName.lastIndexOf('__'); + return lastIndex === -1 ? toolCallName : toolCallName.substring(lastIndex + 2); }; /**