1515const path = require ( 'path' ) ;
1616const { ScenarioBuilder, registerScenario } = require ( './mock-llm-server' ) ;
1717
18- const ROOT = path . join ( __dirname , '..' , '..' , '.. ') ;
18+ const FIXTURES_DIR = path . join ( __dirname , '..' , 'fixtures ' ) ;
1919
2020// -- Content-only scenarios ---------------------------------------------------
2121
@@ -232,14 +232,14 @@ const TOOL_CALL_SCENARIOS = {
232232 // a real agent gathering context before answering.
233233 'tool-read-file' : /** @type {import('./mock-llm-server').MultiTurnScenario } */ ( ( ( ) => {
234234 const filesToRead = [
235- 'src/vs/base/common/ lifecycle.ts' ,
236- 'src/vs/base/common/ event.ts' ,
237- 'src/vs/base/common/ uri.ts' ,
238- 'src/vs/base/common/ errors.ts' ,
239- 'src/vs/base/common/ async.ts' ,
240- 'src/vs/base/common/ strings.ts' ,
241- 'src/vs/base/common/ arrays.ts' ,
242- 'src/vs/base/common/ types.ts' ,
235+ 'lifecycle.ts' ,
236+ 'event.ts' ,
237+ 'uri.ts' ,
238+ 'errors.ts' ,
239+ 'async.ts' ,
240+ 'strings.ts' ,
241+ 'arrays.ts' ,
242+ 'types.ts' ,
243243 ] ;
244244 // Round 1: parallel read of first 4 files
245245 // Round 2: parallel read of next 4 files
@@ -251,14 +251,14 @@ const TOOL_CALL_SCENARIOS = {
251251 kind : 'tool-calls' ,
252252 toolCalls : filesToRead . slice ( 0 , 4 ) . map ( f => ( {
253253 toolNamePattern : / r e a d .? f i l e / i,
254- arguments : { filePath : path . join ( ROOT , f ) , startLine : 1 , endLine : 50 } ,
254+ arguments : { filePath : path . join ( FIXTURES_DIR , f ) , startLine : 1 , endLine : 50 } ,
255255 } ) ) ,
256256 } ,
257257 {
258258 kind : 'tool-calls' ,
259259 toolCalls : filesToRead . slice ( 4 ) . map ( f => ( {
260260 toolNamePattern : / r e a d .? f i l e / i,
261- arguments : { filePath : path . join ( ROOT , f ) , startLine : 1 , endLine : 50 } ,
261+ arguments : { filePath : path . join ( FIXTURES_DIR , f ) , startLine : 1 , endLine : 50 } ,
262262 } ) ) ,
263263 } ,
264264 {
@@ -296,9 +296,9 @@ const TOOL_CALL_SCENARIOS = {
296296 // a real agent reading context and making multiple edits.
297297 'tool-edit-file' : /** @type {import('./mock-llm-server').MultiTurnScenario } */ ( ( ( ) => {
298298 const readFiles = [
299- 'src/vs/base/common/ lifecycle.ts' ,
300- 'src/vs/base/common/ event.ts' ,
301- 'src/vs/base/common/ errors.ts' ,
299+ 'lifecycle.ts' ,
300+ 'event.ts' ,
301+ 'errors.ts' ,
302302 ] ;
303303 return {
304304 type : 'multi-turn' ,
@@ -308,7 +308,7 @@ const TOOL_CALL_SCENARIOS = {
308308 kind : 'tool-calls' ,
309309 toolCalls : readFiles . map ( f => ( {
310310 toolNamePattern : / r e a d .? f i l e / i,
311- arguments : { filePath : path . join ( ROOT , f ) , startLine : 1 , endLine : 40 } ,
311+ arguments : { filePath : path . join ( FIXTURES_DIR , f ) , startLine : 1 , endLine : 40 } ,
312312 } ) ) ,
313313 } ,
314314 // Round 2: edit 2 files in parallel
@@ -318,7 +318,7 @@ const TOOL_CALL_SCENARIOS = {
318318 {
319319 toolNamePattern : / r e p l a c e .? s t r i n g | a p p l y .? p a t c h | i n s e r t .? e d i t / i,
320320 arguments : {
321- filePath : path . join ( ROOT , 'src/vs/base/common/ lifecycle.ts' ) ,
321+ filePath : path . join ( FIXTURES_DIR , 'lifecycle.ts' ) ,
322322 oldString : '// perf-benchmark-marker' ,
323323 newString : '// perf-benchmark-marker (updated)' ,
324324 explanation : 'Update the benchmark marker comment in lifecycle.ts' ,
@@ -327,7 +327,7 @@ const TOOL_CALL_SCENARIOS = {
327327 {
328328 toolNamePattern : / r e p l a c e .? s t r i n g | a p p l y .? p a t c h | i n s e r t .? e d i t / i,
329329 arguments : {
330- filePath : path . join ( ROOT , 'src/vs/base/common/ event.ts' ) ,
330+ filePath : path . join ( FIXTURES_DIR , 'event.ts' ) ,
331331 oldString : '// perf-benchmark-marker' ,
332332 newString : '// perf-benchmark-marker (updated)' ,
333333 explanation : 'Update the benchmark marker comment in event.ts' ,
@@ -399,7 +399,7 @@ const MULTI_TURN_SCENARIOS = {
399399 {
400400 toolNamePattern : / r e a d .? f i l e / i,
401401 arguments : {
402- filePath : path . join ( ROOT , 'src/vs/base/common/ lifecycle.ts' ) ,
402+ filePath : path . join ( FIXTURES_DIR , 'lifecycle.ts' ) ,
403403 offset : 1 ,
404404 limit : 50 ,
405405 } ,
0 commit comments