mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
fix: decode URL
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user