fix: add preview to delete response for MCP server compatibility

This commit is contained in:
Viktor Barzin 2026-03-14 11:14:05 +00:00
parent 3207ecf3e9
commit 58ea218044
No known key found for this signature in database
GPG key ID: 0EB088298288D958
2 changed files with 6 additions and 4 deletions

View file

@ -194,7 +194,7 @@ async def test_list_returns_only_user_memories(client):
@pytest.mark.asyncio
async def test_delete_only_user_memories(client):
ac, conn, app_mod = client
conn.fetchrow.return_value = _make_memory_row(id=10, vault_path=None)
conn.fetchrow.return_value = _make_memory_row(id=10, vault_path=None, preview="test content")
conn.execute.return_value = None
async with ac:
@ -204,7 +204,9 @@ async def test_delete_only_user_memories(client):
)
assert resp.status_code == 200
assert resp.json() == {"deleted": 10}
data = resp.json()
assert data["deleted"] == 10
assert "preview" in data
# Verify both SELECT and DELETE include user_id
fetchrow_args = conn.fetchrow.call_args