From 4e9eead3ab3c4b60cc668f2189c504c00f414541 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 12 May 2026 14:36:42 -0400 Subject: [PATCH] feat(profile): GET /api/profile/observations returns recent raw entries Co-Authored-By: Claude Opus 4.7 (1M context) --- src/fabledassistant/routes/profile.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/fabledassistant/routes/profile.py b/src/fabledassistant/routes/profile.py index 4359599..56ea9d2 100644 --- a/src/fabledassistant/routes/profile.py +++ b/src/fabledassistant/routes/profile.py @@ -59,3 +59,13 @@ async def clear_observations(): uid = get_current_user_id() await clear_learned_data(uid) return jsonify({"status": "ok"}) + + +@profile_bp.route("/observations", methods=["GET"]) +@login_required +async def list_observations(): + uid = get_current_user_id() + profile = await get_profile(uid) + raw = list(profile.observations_raw or []) + # Newest first, last 14 entries + return jsonify({"observations": list(reversed(raw[-14:]))})