From 6633dd4bcb1adee3a5d4c8c88ec250f7870d0168 Mon Sep 17 00:00:00 2001 From: marko-kraemer Date: Mon, 21 Apr 2025 18:25:25 +0100 Subject: [PATCH] wip --- .../components/thread/tool-views/FileOperationToolView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/thread/tool-views/FileOperationToolView.tsx b/frontend/src/components/thread/tool-views/FileOperationToolView.tsx index 1e8c01c7..4e1d8c8d 100644 --- a/frontend/src/components/thread/tool-views/FileOperationToolView.tsx +++ b/frontend/src/components/thread/tool-views/FileOperationToolView.tsx @@ -141,10 +141,10 @@ export function FileOperationToolView({ const hasHighlighting = language !== 'text'; // Construct HTML file preview URL if we have a sandbox and the file is HTML const htmlPreviewUrl = (isHtml && project?.sandbox?.sandbox_url && processedFilePath) - ? `${project.sandbox.sandbox_url}/${processedFilePath}` + ? `${project.sandbox.sandbox_url}/${encodeURIComponent(processedFilePath)}` : undefined; - // console.log('HTML Preview URL:', htmlPreviewUrl); + console.log('HTML Preview URL:', htmlPreviewUrl); // Add state for view mode toggle (code or preview) const [viewMode, setViewMode] = useState<'code' | 'preview'>(isHtml || isMarkdown || isCsv ? 'preview' : 'code');