From f55c98563404b3a3e8137ae0bb2eb45a15d5b9a9 Mon Sep 17 00:00:00 2001 From: Shirone Date: Sun, 25 Jan 2026 22:32:46 +0100 Subject: [PATCH] refactor(types): Make FeatureImage extend ImageAttachment Address Gemini review feedback - reduce code duplication by having FeatureImage extend ImageAttachment instead of duplicating properties. Co-Authored-By: Claude Opus 4.5 --- apps/ui/src/store/types/chat-types.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/ui/src/store/types/chat-types.ts b/apps/ui/src/store/types/chat-types.ts index 5227f23e..bd4cc206 100644 --- a/apps/ui/src/store/types/chat-types.ts +++ b/apps/ui/src/store/types/chat-types.ts @@ -33,11 +33,8 @@ export interface ChatSession { archived: boolean; } -// UI-specific: base64-encoded images (not in shared types) -export interface FeatureImage { - id: string; - data: string; // base64 encoded - mimeType: string; - filename: string; - size: number; +// UI-specific: base64-encoded images with required id and size (extends ImageAttachment) +export interface FeatureImage extends ImageAttachment { + id: string; // Required (overrides optional in ImageAttachment) + size: number; // Required (overrides optional in ImageAttachment) }