Skip to content

Commit c195e2c

Browse files
committed
Fix for errors returned from searching time specific queries
1 parent a3ef6ea commit c195e2c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

apps/webapp/evals/aiRunFilter.eval.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff 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",

0 commit comments

Comments
 (0)