feat: add solo and co-op taste profiles

Filter recommendation candidates and taste weights by play context, with taste_profile in the API, --taste in the CLI and a selector in the UI.
This commit is contained in:
strsv committed 2026-11-07 00:53:18 +03:00
1 parent 02af4bde09
commit 54a7b36aae
12 files changed
+105 -4

No files matched your search

+8
View File
@@ -487,6 +487,14 @@ class ApiTests(unittest.TestCase):
finally:
con.close()
def test_recommend_taste_profile(self):
data = self.post("/api/recommend", {
"preset": "dark-fantasy", "limit": 5, "taste_profile": "solo"})
self.assertIsInstance(data["results"], list)
self.assertEqual(self.post("/api/recommend", {
"preset": "dark-fantasy", "taste_profile": "nope"}, expect=400)["error"],
"unknown taste profile")
def test_compare_presets(self):
data = self.get("/api/compare?a=dark-fantasy&b=story-heavy&limit=5")
self.assertEqual(data["a"], "dark-fantasy")