refactor: improve type safety in document extraction and UI components

- Introduced Zod schemas for type-safe parsing of mentioned document information in chat messages.
- Updated the extractMentionedDocuments function to utilize the new schemas for better validation.
- Made the 'alt' property optional in image-related components for improved flexibility and fallback handling.
This commit is contained in:
Anish Sarkar 2025-12-26 00:18:47 +05:30
parent bea18960a4
commit 9bc3f193c3
3 changed files with 29 additions and 15 deletions

View file

@ -23,7 +23,7 @@ interface DisplayImageResult {
id: string;
assetId: string;
src: string;
alt?: string; // Made optional - parseSerializableImage provides fallback
alt?: string; // Made optional - parseSerializableImage provides fallback
title?: string;
description?: string;
domain?: string;