[agents] Show agent sessions on homepage with first-prompt title
Some checks failed
ci / build-and-deploy (push) Has been cancelled
ci / test (push) Has been cancelled

This commit is contained in:
2026-07-31 00:26:58 -04:00
parent 0c92174440
commit eb991dbf0e
3 changed files with 24 additions and 0 deletions

View File

@ -451,6 +451,19 @@ def test_agent_session_list_view(mock_delay, client, user):
assert settings.LLM_MODEL.encode() in response.content
@patch("scrobbles.tasks.scrobble_agent_session_prompt.delay")
def test_homepage_shows_agent_sessions_with_first_prompt_title(mock_delay, client, user):
first_prompt = "tell me about the history of cheese making in europe"
_mk_scrobble(user, in_progress=False, title=first_prompt)
client.force_login(user)
response = client.get(reverse("vrobbler-home"))
assert response.status_code == 200
assert b"Agent Sessions" in response.content
assert first_prompt.encode() in response.content
assert settings.LLM_MODEL.encode() not in response.content
@patch("scrobbles.tasks.scrobble_agent_session_prompt.delay")
def test_agent_session_detail_view(mock_delay, client, user):
scrobble = _mk_scrobble(user, in_progress=True)