From 6ca5e4b6ea5fd88c00cd873adf60ada519ca6c28 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Thu, 16 Apr 2026 00:40:22 -0600 Subject: [PATCH] feat: expose message source field in messages API Co-Authored-By: Claude Sonnet 4.6 --- prompt/api.py | 1 + prompt/schemas.py | 1 + 2 files changed, 2 insertions(+) diff --git a/prompt/api.py b/prompt/api.py index 6be56f9..1558583 100644 --- a/prompt/api.py +++ b/prompt/api.py @@ -43,6 +43,7 @@ def list_messages(request, conversation_id: UUID): { "id": m.id, "role": m.role, + "source": m.source, "content": m.content, "code_html": m.code_html, "code_css": m.code_css, diff --git a/prompt/schemas.py b/prompt/schemas.py index 6b67c4a..3b7559f 100644 --- a/prompt/schemas.py +++ b/prompt/schemas.py @@ -6,6 +6,7 @@ from ninja import Schema class MessageOut(Schema): id: int role: str + source: str content: str code_html: Optional[str] = None code_css: Optional[str] = None