This commit is contained in:
marko-kraemer 2025-08-27 15:12:47 -07:00
parent 7d1c096c8c
commit 5c8a82ffc4
2 changed files with 17 additions and 11 deletions

View File

@ -22,20 +22,26 @@ export type FileType =
| 'csv'
| 'xlsx';
export interface FileRendererProject {
id?: string;
name?: string;
description?: string;
created_at?: string;
sandbox?: {
id?: string;
sandbox_url?: string;
vnc_preview?: string;
pass?: string;
};
}
interface FileRendererProps {
content: string | null;
binaryUrl: string | null;
fileName: string;
filePath?: string;
className?: string;
project?: {
sandbox?: {
id?: string;
sandbox_url?: string;
vnc_preview?: string;
pass?: string;
};
};
project?: FileRendererProject;
markdownRef?: React.RefObject<HTMLDivElement>;
onDownload?: () => void;
isDownloading?: boolean;

View File

@ -9,7 +9,7 @@ import { ScrollArea } from '@/components/ui/scroll-area';
import { cn } from '@/lib/utils';
import { CodeRenderer } from './code-renderer';
import { useImageContent } from '@/hooks/use-image-content';
import type { Project } from '@/lib/api';
import type { FileRendererProject } from './index';
// Process Unicode escape sequences in content
export const processUnicodeContent = (content: string): string => {
@ -36,7 +36,7 @@ interface AuthenticatedImageProps {
src: string;
alt?: string;
className?: string;
project?: Project;
project?: FileRendererProject;
}
function AuthenticatedImage({ src, alt, className, project }: AuthenticatedImageProps) {
@ -80,7 +80,7 @@ function AuthenticatedImage({ src, alt, className, project }: AuthenticatedImage
interface MarkdownRendererProps {
content: string;
className?: string;
project?: Project;
project?: FileRendererProject;
}
export const MarkdownRenderer = forwardRef<