From 87e5b715075fb56343d2d10a6a532d04d8fc615b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 16:55:40 +0100 Subject: feat(assistant): the transcript as chat bubbles with avatars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Questions sit on the right in an accent bubble with the user's avatar (`[assistant] user_avatar`, served at /api/avatar); replies on the left in a surface bubble with the assistant's, a "…" bubble while a reply has no text yet. The assistant's avatar is the background picture itself, zoomed by CSS onto `[assistant] face` ([centre x, centre y, size] in its pixels), so nothing is cropped on the PC; the page loads the picture once for its real size. Unset, both are plain circles. Co-Authored-By: Claude Opus 5.5 --- tests/test_server.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/test_server.py') diff --git a/tests/test_server.py b/tests/test_server.py index 0881849..4755a03 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -114,6 +114,8 @@ class Server(unittest.TestCase): self.assertEqual(self.req("GET", "/api/bg", {"Host": "127.0.0.1:8765"})[0], 401) with mock.patch.dict(srv.CFG, {"assistant": {"background": ""}}): self.assertEqual(self.req("GET", "/api/bg", HOST)[0], 404) + with mock.patch.dict(srv.CFG, {"assistant": {"user_avatar": str(f)}}): + self.assertEqual(self.req("GET", "/api/avatar", HOST), (200, b"\xff\xd8jpeg")) def test_module_images(self): self.assertEqual(self.req("GET", "/api/demo/image/k1", HOST), (200, b"img")) -- cgit v1.2.3