andy-stack_vaultkeeper-ai/Conversations/Reference.ts
Andrew Beal ea9cd211fc refactor: extract MIME type mappings and improve attachment handling
- Move MimeTypeToFileTypes and FileTypeToMimeType mappings to dedicated FileTypeMimeTypeMapping enum file
- Add empty content validation for file attachments
- Add PDF support for Gemini
- Display attachment references in user messages with file info
- Fix OpenAI unsupported mime type message formatting
- Improve URI list handling in InputService to include text/plain
- Update chat area padding and styling for better attachment display
- Prevent drag selection on chat padding element
- Update test assertions for new unsupported mime type message format
2025-12-23 12:04:29 +00:00

24 lines
No EOL
592 B
TypeScript

export class Reference {
public fileName: string;
public size: number;
public constructor(fileName: string, size: number) {
this.fileName = fileName;
this.size = size;
}
public static isReferenceData(this: void, data: unknown): data is {
fileName: string;
size: number;
} {
return (
data !== null &&
typeof data === "object" &&
"fileName" in data &&
"size" in data &&
typeof data.fileName === "string" &&
typeof data.size === "number"
);
}
}