Support completed by via natural language

This commit is contained in:
Jorge Manrubia
2025-07-03 15:52:11 +02:00
parent 5ccb69a8d4
commit f4147bda27
29 changed files with 329436 additions and 954 deletions
@@ -152,6 +152,11 @@ class Command::Ai::TranslatorTest < ActionDispatch::IntegrationTest
assert_command({ commands: [ "/user kevin" ] }, "view kevin")
end
test "filter by closed by" do
assert_command({ context: { closer_ids: [ users(:david).to_gid.to_s ], indexed_by: "closed" } }, "cards closed by me")
assert_command({ context: { closure: "thisweek", closer_ids: [ "Jorge", "Kevin" ], indexed_by: "closed" } }, "cards closed by Jorge or Kevin this week")
end
private
def assert_command(expected, query, context: :list)
assert_equal expected, translate(query, context:)