From fa02825eadd2fe61ebb40eb3344de37638b436c5 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Fri, 31 Jul 2026 02:24:37 +0200 Subject: [PATCH] fix(client): friendly labels and correct arg parsing for native tools Map skill, read_file, create_file, edit_file, set_memory, and delete_memory to localized display names so summaries stop showing raw tool ids, and give the memory tools the Brain icon the Memories panel already uses. read_file and skill rows parse the arg the backend schemas actually emit (path, with file_path as a legacy fallback; skillName) and fall back to a generic noun instead of rendering an empty name in their labels. --- .../Chat/Messages/Content/Parts/ReadFileCall.tsx | 13 +++++++++++-- .../Chat/Messages/Content/Parts/SkillCall.tsx | 15 +++++++++++---- .../Chat/Messages/Content/ToolOutput/ToolIcon.tsx | 6 ++++++ client/src/locales/en/translation.json | 12 ++++++++++++ client/src/utils/__tests__/toolLabels.test.ts | 4 ++++ client/src/utils/toolLabels.ts | 6 ++++++ 6 files changed, 50 insertions(+), 6 deletions(-) diff --git a/client/src/components/Chat/Messages/Content/Parts/ReadFileCall.tsx b/client/src/components/Chat/Messages/Content/Parts/ReadFileCall.tsx index bcb5b4d11a..27a114b030 100644 --- a/client/src/components/Chat/Messages/Content/Parts/ReadFileCall.tsx +++ b/client/src/components/Chat/Messages/Content/Parts/ReadFileCall.tsx @@ -2,6 +2,7 @@ import { useMemo } from 'react'; import { FileText } from 'lucide-react'; import type { TAttachment, PartMetadata } from 'librechat-data-provider'; import ProgressText from '~/components/Chat/Messages/Content/ProgressText'; +import { toolPanelSpacingClassName } from '../disclosure'; import useToolCallState from './useToolCallState'; import useLazyHighlight from './useLazyHighlight'; import CodeWindowHeader from './CodeWindowHeader'; @@ -85,7 +86,10 @@ export default function ReadFileCall({ onExpand?: () => void; }) { const localize = useLocalize(); - const filePath = useMemo(() => parseJsonField(args, 'file_path'), [args]); + const filePath = useMemo( + () => parseJsonField(args, 'path') || parseJsonField(args, 'file_path'), + [args], + ); const intent = useToolCallIntent(args); const fileName = filePath.split('/').pop() || filePath; const lang = useMemo(() => langFromPath(filePath), [filePath]); @@ -130,7 +134,12 @@ export default function ReadFileCall({
diff --git a/client/src/components/Chat/Messages/Content/Parts/SkillCall.tsx b/client/src/components/Chat/Messages/Content/Parts/SkillCall.tsx
index 859605a33a..8a58ad08dc 100644
--- a/client/src/components/Chat/Messages/Content/Parts/SkillCall.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/SkillCall.tsx
@@ -2,6 +2,7 @@ import { useMemo } from 'react';
import { ScrollText } from 'lucide-react';
import type { TAttachment, PartMetadata } from 'librechat-data-provider';
import ProgressText from '~/components/Chat/Messages/Content/ProgressText';
+import { toolPanelSpacingClassName } from '../disclosure';
import useToolCallState from './useToolCallState';
import { AttachmentGroup } from './Attachment';
import parseJsonField from './parseJsonField';
@@ -33,14 +34,15 @@ export default function SkillCall({
onExpand?: () => void;
}) {
const localize = useLocalize();
- const skillName = useMemo(() => parseJsonField(args, 'skillName'), [args]);
+ const parsedSkillName = useMemo(() => parseJsonField(args, 'skillName'), [args]);
+ const skillName = parsedSkillName || localize('com_ui_skill').toLowerCase();
const intent = useToolCallIntent(args);
const { showCode, toggleCode, expandStyle, expandRef, phase, hasOutput } = useToolCallState({
initialProgress,
isSubmitting,
output,
- hasInput: !!skillName,
+ hasInput: !!parsedSkillName,
onExpand,
runStepStatus,
});
@@ -67,14 +69,19 @@ export default function SkillCall({
aria-hidden="true"
/>
}
- hasInput={!!skillName || hasOutput}
+ hasInput={!!parsedSkillName || hasOutput}
isExpanded={showCode}
/>