@@ -8,12 +8,14 @@ import { IChatDebugFileLoggerService } from '../../../../platform/chat/common/ch
88import { ICustomInstructionsService } from '../../../../platform/customInstructions/common/customInstructionsService' ;
99import { IFileSystemService } from '../../../../platform/filesystem/common/fileSystemService' ;
1010import { MockFileSystemService } from '../../../../platform/filesystem/node/test/mockFileSystemService' ;
11+ import { IPromptPathRepresentationService } from '../../../../platform/prompts/common/promptPathRepresentationService' ;
1112import { MockCustomInstructionsService } from '../../../../platform/test/common/testCustomInstructionsService' ;
1213import { ITestingServicesAccessor } from '../../../../platform/test/node/services' ;
1314import { TestWorkspaceService } from '../../../../platform/test/node/testWorkspaceService' ;
1415import { IWorkspaceService } from '../../../../platform/workspace/common/workspaceService' ;
1516import { createTextDocumentData } from '../../../../util/common/test/shims/textDocument' ;
1617import { CancellationToken } from '../../../../util/vs/base/common/cancellation' ;
18+ import { dirname } from '../../../../util/vs/base/common/resources' ;
1719import { URI } from '../../../../util/vs/base/common/uri' ;
1820import { SyncDescriptor } from '../../../../util/vs/platform/instantiation/common/descriptors' ;
1921import { IInstantiationService } from '../../../../util/vs/platform/instantiation/common/instantiation' ;
@@ -734,10 +736,12 @@ suite('ReadFile', () => {
734736 getActiveSessionIds : ( ) => [ ] ,
735737 isDebugLogUri : ( ) => false ,
736738 getSessionDirForResource : ( ) => expectedLogDir ,
739+ debugLogsDir : dirname ( expectedLogDir ) ,
737740 } satisfies IChatDebugFileLoggerService ) ;
738741
739742 const testAccessor = services . createTestingAccessor ( ) ;
740743 const readFileTool = testAccessor . get ( IInstantiationService ) . createInstance ( ReadFileTool ) ;
744+ const promptPathRepresentationService = testAccessor . get ( IPromptPathRepresentationService ) ;
741745
742746 // Set up prompt context with a sessionResource
743747 await readFileTool . resolveInput (
@@ -752,7 +756,7 @@ suite('ReadFile', () => {
752756 ) ;
753757
754758 const text = await toolResultToString ( testAccessor , result ) ;
755- expect ( text ) . toContain ( expectedLogDir . toString ( ) ) ;
759+ expect ( text ) . toContain ( promptPathRepresentationService . getFilePath ( expectedLogDir ) ) ;
756760 expect ( text ) . not . toContain ( '{{CURRENT_SESSION_LOG}}' ) ;
757761
758762 testAccessor . dispose ( ) ;
@@ -804,6 +808,7 @@ suite('ReadFile', () => {
804808 getActiveSessionIds : ( ) => [ ] ,
805809 isDebugLogUri : ( ) => false ,
806810 getSessionDirForResource : ( ) => URI . file ( '/should/not/appear' ) ,
811+ debugLogsDir : URI . file ( '/should/not/appear' ) ,
807812 } satisfies IChatDebugFileLoggerService ) ;
808813
809814 const testAccessor = services . createTestingAccessor ( ) ;
0 commit comments