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}
/>