From 87d62514dbce9fc0222a99d092c86ea7e6314cbb Mon Sep 17 00:00:00 2001 From: Jay V Date: Fri, 27 Jun 2025 13:25:15 -0400 Subject: docs: share page write tool bug --- packages/web/src/components/Share.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'packages/web/src/components') diff --git a/packages/web/src/components/Share.tsx b/packages/web/src/components/Share.tsx index 9b953bd2d..e8879c50a 100644 --- a/packages/web/src/components/Share.tsx +++ b/packages/web/src/components/Share.tsx @@ -85,7 +85,7 @@ function scrollToAnchor(id: string) { el.scrollIntoView({ behavior: "smooth" }) } -function stripWorkingDirectory(filePath: string, workingDir?: string) { +function stripWorkingDirectory(filePath?: string, workingDir?: string) { if (filePath === undefined || workingDir === undefined) return filePath const prefix = workingDir.endsWith("/") ? workingDir : workingDir + "/" @@ -1307,9 +1307,9 @@ export default function Share(props: { const path = createMemo(() => toolData()?.args.path !== data().rootDir ? stripWorkingDirectory( - toolData()?.args.path, - data().rootDir, - ) + toolData()?.args.path, + data().rootDir, + ) : toolData()?.args.path, ) @@ -1470,7 +1470,7 @@ export default function Share(props: { {(_part) => { const filePath = createMemo(() => stripWorkingDirectory( - toolData()?.args.filePath, + toolData()?.args?.filePath, data().rootDir, ), ) @@ -1509,7 +1509,7 @@ export default function Share(props: {
{formatErrorString( - toolData()?.result, + toolData()?.result )}
@@ -1528,7 +1528,7 @@ export default function Share(props: {
-- cgit v1.2.3