Make Viewer always accessible (#4468)

# Description of Changes
Make Viewer always accessible. Also deletes some dead code I noticed
while I was working.

---------

Co-authored-by: EthanHealy01 <[email protected]>
Co-authored-by: Reece Browne <[email protected]>
This commit is contained in:
James Brunton
2025-09-22 12:11:34 +01:00
committed by GitHub
co-authored by EthanHealy01 Reece Browne
parent 28177d9509
commit f6df414425
4 changed files with 50 additions and 117 deletions
@@ -1,28 +0,0 @@
import { FileId } from '../types/file';
import { FileOperation } from '../types/fileContext';
/**
* Creates operation tracking data for FileContext integration
*/
export const createOperation = <TParams = void>(
operationType: string,
_params: TParams,
selectedFiles: File[]
): { operation: FileOperation; operationId: string; fileId: FileId } => {
const operationId = `${operationType}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
const fileId = selectedFiles.map(f => f.name).join(',') as FileId;
const operation: FileOperation = {
id: operationId,
type: operationType,
timestamp: Date.now(),
fileIds: selectedFiles.map(f => f.name),
status: 'pending',
metadata: {
originalFileName: selectedFiles[0]?.name,
fileSize: selectedFiles.reduce((sum, f) => sum + f.size, 0)
}
} as any /* FIX ME*/;
return { operation, operationId, fileId };
};