fix: pass character_name to template — portrait button was broken

Root cause: charFilename was empty in JS because character_name
wasn't passed to the Jinja2 template. This caused:
- POST /api/character//portrait → 404
- The 'Generierung fehlgeschlagen' error

Fix: Add character_name to template context.
This commit is contained in:
arch_agent
2026-07-24 22:05:53 +02:00
parent 7755d2be64
commit f454d7b785
2 changed files with 1 additions and 0 deletions
+1
View File
@@ -305,6 +305,7 @@ async def chat_page(request: Request, character_name: str, session_id: str = Coo
long_term = get_long_term_memory(sid, character_name)
response = templates.TemplateResponse(request, "chat.html", {
"character": char,
"character_name": character_name,
"history": history,
"long_term": long_term,
"session_id": sid,
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 346 KiB