Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

Fix: Update image preview alt text in FileItemPreview component

Salman-Ahamedc31f8b85882c
diff --git a/packages/app/src/react/features/ai-chat/components/file-item-preview.tsx b/packages/app/src/react/features/ai-chat/components/file-item-preview.tsx
index 4b23d329..0b8a1189 100644
--- a/packages/app/src/react/features/ai-chat/components/file-item-preview.tsx
+++ b/packages/app/src/react/features/ai-chat/components/file-item-preview.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable max-len */
import { FileWithMetadata } from '@react/shared/types/chat.types';
import classNames from 'classnames';
import { FC, useEffect, useMemo, useState } from 'react';
@@ -95,10 +94,10 @@ export const FileItemPreview: FC<FileItemPreviewProps> = ({
if (isImage) {
return (
<div className="relative group w-16 h-16 min-w-[4rem] min-h-[4rem]">
- {!!preview && (
+ {preview && (
<img
src={preview}
- alt={file.file?.name}
+ alt={file.file?.name || 'Image preview'}
className="w-full h-full object-cover rounded-lg"
/>
)}