File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,37 @@ evalite("AI Run Filter", {
216216 } ,
217217 } ) ,
218218 } ,
219+ // Time-specific queries with hours
220+ {
221+ input : "tasks that started around 8am today" ,
222+ expected : JSON . stringify ( {
223+ success : true ,
224+ filters : {
225+ from : new Date ( new Date ( ) . toDateString ( ) + " 07:00:00" ) . getTime ( ) ,
226+ to : new Date ( new Date ( ) . toDateString ( ) + " 09:00:00" ) . getTime ( ) ,
227+ } ,
228+ } ) ,
229+ } ,
230+ {
231+ input : "runs that started at 2pm yesterday" ,
232+ expected : JSON . stringify ( {
233+ success : true ,
234+ filters : {
235+ from : new Date ( new Date ( Date . now ( ) - 24 * 60 * 60 * 1000 ) . toDateString ( ) + " 14:00:00" ) . getTime ( ) ,
236+ to : new Date ( new Date ( Date . now ( ) - 24 * 60 * 60 * 1000 ) . toDateString ( ) + " 14:59:59" ) . getTime ( ) ,
237+ } ,
238+ } ) ,
239+ } ,
240+ {
241+ input : "any runs started this morning" ,
242+ expected : JSON . stringify ( {
243+ success : true ,
244+ filters : {
245+ from : new Date ( new Date ( ) . toDateString ( ) + " 06:00:00" ) . getTime ( ) ,
246+ to : new Date ( new Date ( ) . toDateString ( ) + " 12:00:00" ) . getTime ( ) ,
247+ } ,
248+ } ) ,
249+ } ,
219250 // Ambiguous cases that should return errors
220251 {
221252 input : "Show me something" ,
You can’t perform that action at this time.
0 commit comments