mirror of https://github.com/kortix-ai/suna.git
fix
This commit is contained in:
parent
7d1c096c8c
commit
5c8a82ffc4
|
@ -22,20 +22,26 @@ export type FileType =
|
||||||
| 'csv'
|
| 'csv'
|
||||||
| 'xlsx';
|
| '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 {
|
interface FileRendererProps {
|
||||||
content: string | null;
|
content: string | null;
|
||||||
binaryUrl: string | null;
|
binaryUrl: string | null;
|
||||||
fileName: string;
|
fileName: string;
|
||||||
filePath?: string;
|
filePath?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
project?: {
|
project?: FileRendererProject;
|
||||||
sandbox?: {
|
|
||||||
id?: string;
|
|
||||||
sandbox_url?: string;
|
|
||||||
vnc_preview?: string;
|
|
||||||
pass?: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
markdownRef?: React.RefObject<HTMLDivElement>;
|
markdownRef?: React.RefObject<HTMLDivElement>;
|
||||||
onDownload?: () => void;
|
onDownload?: () => void;
|
||||||
isDownloading?: boolean;
|
isDownloading?: boolean;
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { ScrollArea } from '@/components/ui/scroll-area';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
import { CodeRenderer } from './code-renderer';
|
import { CodeRenderer } from './code-renderer';
|
||||||
import { useImageContent } from '@/hooks/use-image-content';
|
import { useImageContent } from '@/hooks/use-image-content';
|
||||||
import type { Project } from '@/lib/api';
|
import type { FileRendererProject } from './index';
|
||||||
|
|
||||||
// Process Unicode escape sequences in content
|
// Process Unicode escape sequences in content
|
||||||
export const processUnicodeContent = (content: string): string => {
|
export const processUnicodeContent = (content: string): string => {
|
||||||
|
@ -36,7 +36,7 @@ interface AuthenticatedImageProps {
|
||||||
src: string;
|
src: string;
|
||||||
alt?: string;
|
alt?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
project?: Project;
|
project?: FileRendererProject;
|
||||||
}
|
}
|
||||||
|
|
||||||
function AuthenticatedImage({ src, alt, className, project }: AuthenticatedImageProps) {
|
function AuthenticatedImage({ src, alt, className, project }: AuthenticatedImageProps) {
|
||||||
|
@ -80,7 +80,7 @@ function AuthenticatedImage({ src, alt, className, project }: AuthenticatedImage
|
||||||
interface MarkdownRendererProps {
|
interface MarkdownRendererProps {
|
||||||
content: string;
|
content: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
project?: Project;
|
project?: FileRendererProject;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const MarkdownRenderer = forwardRef<
|
export const MarkdownRenderer = forwardRef<
|
||||||
|
|
Loading…
Reference in New Issue