@@ -46,6 +46,10 @@ import { listAllWorkspaceFiles } from '@/lib/workspace-files/application/list-wo
4646import { readWorkspaceFileContent } from '@/lib/workspace-files/application/read-workspace-file-content'
4747import { downloadWorkspaceFileRecord } from '@/lib/workspace-files/application/read-workspace-file-record'
4848import { listWorkspaceFileFoldersOperation } from '@/lib/workspace-files/application/workspace-file-folders'
49+ import {
50+ buildWorkspaceFileFolderDisplayPath ,
51+ parseWorkspaceFileFolderDisplayPath ,
52+ } from '@/lib/workspace-files/folder-display-path'
4953import { extractCodeSecretNames } from '@/executor/utils/code-secret-references'
5054import { ResolvedSecretTraceRegistry } from '@/executor/utils/resolved-secret-trace-registry'
5155import { executeTool as executeAppTool } from '@/tools'
@@ -388,7 +392,7 @@ export async function resolveInputFiles(
388392 : undefined
389393 if ( ! dirPath ) continue
390394 const folderSegments = decodeVfsPathSegments ( dirPath . replace ( / ^ \/ ? f i l e s \/ ? / , '' ) )
391- const folderDisplayPath = folderSegments . join ( '/' )
395+ const folderDisplayPath = buildWorkspaceFileFolderDisplayPath ( folderSegments )
392396 const folder = folders . find ( ( candidate ) => candidate . path === folderDisplayPath )
393397 if ( ! folder ) {
394398 const unmountable = unmountableNamespaceReason ( dirPath )
@@ -403,7 +407,7 @@ export async function resolveInputFiles(
403407 dirRef !== null &&
404408 ( dirRef as CanonicalDirectoryInput ) . sandboxPath
405409 ? ( dirRef as CanonicalDirectoryInput ) . sandboxPath !
406- : `/home/user/files/${ encodeVfsPathSegments ( folder . path . split ( '/' ) ) } `
410+ : `/home/user/files/${ encodeVfsPathSegments ( parseWorkspaceFileFolderDisplayPath ( folder . path ) ) } `
407411 const descendants = allFiles . filter ( ( file ) => {
408412 if ( ! file . folderPath ) return false
409413 return file . folderPath === folder . path || file . folderPath . startsWith ( `${ folder . path } /` )
0 commit comments