[agents] Show agent sessions on homepage with first-prompt title
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user