@@ -857,7 +857,7 @@ export function Session() {
857857 } else {
858858 const exportDir = process . cwd ( )
859859 const filename = options . filename . trim ( )
860- const filepath = path . join ( exportDir , filename )
860+ const filepath = Filesystem . join ( exportDir , filename )
861861
862862 await Bun . write ( filepath , transcript )
863863
@@ -1675,7 +1675,7 @@ function Bash(props: ToolProps<typeof BashTool>) {
16751675 const base = sync . data . path . directory
16761676 if ( ! base ) return undefined
16771677
1678- const absolute = path . resolve ( base , workdir )
1678+ const absolute = Filesystem . resolve ( base , workdir )
16791679 if ( absolute === base ) return undefined
16801680
16811681 const home = Global . Path . home
@@ -1730,7 +1730,7 @@ function Write(props: ToolProps<typeof WriteTool>) {
17301730 } )
17311731
17321732 const diagnostics = createMemo ( ( ) => {
1733- const filePath = Filesystem . normalizePath ( props . input . filePath ?? "" )
1733+ const filePath = Filesystem . realpath ( props . input . filePath ?? "" )
17341734 return props . metadata . diagnostics ?. [ filePath ] ?? [ ]
17351735 } )
17361736
@@ -1940,7 +1940,7 @@ function Edit(props: ToolProps<typeof EditTool>) {
19401940 const diffContent = createMemo ( ( ) => props . metadata . diff )
19411941
19421942 const diagnostics = createMemo ( ( ) => {
1943- const filePath = Filesystem . normalizePath ( props . input . filePath ?? "" )
1943+ const filePath = Filesystem . realpath ( props . input . filePath ?? "" )
19441944 const arr = props . metadata . diagnostics ?. [ filePath ] ?? [ ]
19451945 return arr . filter ( ( x ) => x . severity === 1 ) . slice ( 0 , 3 )
19461946 } )
@@ -2133,7 +2133,7 @@ function Skill(props: ToolProps<typeof SkillTool>) {
21332133function normalizePath ( input ?: string ) {
21342134 if ( ! input ) return ""
21352135 if ( path . isAbsolute ( input ) ) {
2136- return path . relative ( process . cwd ( ) , input ) || "."
2136+ return Filesystem . relative ( process . cwd ( ) , input ) || "."
21372137 }
21382138 return input
21392139}
0 commit comments