diff --git a/frontend/src/components/workspace/artifacts/artifact-file-detail.tsx b/frontend/src/components/workspace/artifacts/artifact-file-detail.tsx index a64a063..03b7c0a 100644 --- a/frontend/src/components/workspace/artifacts/artifact-file-detail.tsx +++ b/frontend/src/components/workspace/artifacts/artifact-file-detail.tsx @@ -46,7 +46,7 @@ export function ArtifactFileDetail({ const filepath = useMemo(() => { if (isWriteFile) { const url = new URL(filepathFromProps); - return url.pathname; + return decodeURIComponent(url.pathname); } return filepathFromProps; }, [filepathFromProps, isWriteFile]); diff --git a/frontend/src/components/workspace/artifacts/file-viewer.tsx b/frontend/src/components/workspace/artifacts/file-viewer.tsx index 49b1786..f1ae8a1 100644 --- a/frontend/src/components/workspace/artifacts/file-viewer.tsx +++ b/frontend/src/components/workspace/artifacts/file-viewer.tsx @@ -22,7 +22,7 @@ export function FileViewer({ const { isCodeFile, language } = useMemo(() => { if (isWriteFile) { const url = new URL(filepath); - const path = url.pathname; + const path = decodeURIComponent(url.pathname); return checkCodeFile(path); } return checkCodeFile(filepath);