mirror of https://github.com/kortix-ai/suna.git
wip
This commit is contained in:
parent
276c740e57
commit
6633dd4bcb
|
@ -141,10 +141,10 @@ export function FileOperationToolView({
|
||||||
const hasHighlighting = language !== 'text';
|
const hasHighlighting = language !== 'text';
|
||||||
// Construct HTML file preview URL if we have a sandbox and the file is HTML
|
// Construct HTML file preview URL if we have a sandbox and the file is HTML
|
||||||
const htmlPreviewUrl = (isHtml && project?.sandbox?.sandbox_url && processedFilePath)
|
const htmlPreviewUrl = (isHtml && project?.sandbox?.sandbox_url && processedFilePath)
|
||||||
? `${project.sandbox.sandbox_url}/${processedFilePath}`
|
? `${project.sandbox.sandbox_url}/${encodeURIComponent(processedFilePath)}`
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
// console.log('HTML Preview URL:', htmlPreviewUrl);
|
console.log('HTML Preview URL:', htmlPreviewUrl);
|
||||||
// Add state for view mode toggle (code or preview)
|
// Add state for view mode toggle (code or preview)
|
||||||
const [viewMode, setViewMode] = useState<'code' | 'preview'>(isHtml || isMarkdown || isCsv ? 'preview' : 'code');
|
const [viewMode, setViewMode] = useState<'code' | 'preview'>(isHtml || isMarkdown || isCsv ? 'preview' : 'code');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue