@@ -20,17 +20,17 @@ const TEST_EVENT: DevDataLogEvent = {
2020} ;
2121
2222const TEST_AGENT_INTERACTION_EVENT : DevDataLogEvent = {
23- name : ' chatInteraction' ,
23+ name : " chatInteraction" ,
2424 data : {
2525 prompt : "Hello, world!" ,
2626 completion : "Hello, world!" ,
2727 modelProvider : "openai" ,
2828 modelTitle : "gpt-4" ,
2929 sessionId : "1234" ,
30- tools : [ ' test-tool1' ]
30+ tools : [ " test-tool1" ] ,
3131 } ,
32- }
33-
32+ } ;
33+
3434const SCHEMA = "0.2.0" ;
3535
3636describe ( "DataLogger" , ( ) => {
@@ -171,22 +171,25 @@ describe("DataLogger", () => {
171171 expect ( fileContent ) . toContain ( '"eventName":"tokensGenerated"' ) ;
172172 } ) ;
173173
174- it ( ' should write agent interaction data to local file' , async ( ) => {
174+ it ( " should write agent interaction data to local file" , async ( ) => {
175175 // Call the method to log data locally
176176 await dataLogger . logLocalData ( TEST_AGENT_INTERACTION_EVENT ) ;
177177
178178 // Verify the file was created
179- const filepath = getDevDataFilePath ( TEST_AGENT_INTERACTION_EVENT . name , SCHEMA ) ;
179+ const filepath = getDevDataFilePath (
180+ TEST_AGENT_INTERACTION_EVENT . name ,
181+ SCHEMA ,
182+ ) ;
180183 expect ( fs . existsSync ( filepath ) ) . toBe ( true ) ;
181184
182185 // Read file contents and verify
183186 const fileContent = fs . readFileSync ( filepath , "utf8" ) ;
184- console . log ( ' debug1 filecontent' , fileContent )
187+ console . log ( " debug1 filecontent" , fileContent ) ;
185188 expect ( fileContent ) . toContain ( '"eventName":"chatInteraction"' ) ;
186189 expect ( fileContent ) . toContain ( '"prompt":"Hello, world!"' ) ;
187190 expect ( fileContent ) . toContain ( '"completion":"Hello, world!"' ) ;
188191 expect ( fileContent ) . toContain ( '"tools":["test-tool1"]' ) ;
189- } )
192+ } ) ;
190193 } ) ;
191194
192195 describe ( "logDevData" , ( ) => {
0 commit comments