mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 16:30:27 +00:00
- 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
24 lines
No EOL
592 B
TypeScript
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"
|
|
);
|
|
}
|
|
} |