fix(MAT-166): robust option matching + language-aware UI for article summary

Replace brittle exact-string matching with keyword/substring classifier
that handles edge cases (punctuation, partial matches, German variants).
Detect article language and present all prompts in the users language.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-03-10 14:41:54 +02:00
parent 62cc2a92fe
commit 21b8a4efb1
2 changed files with 141 additions and 25 deletions

View File

@@ -24,7 +24,8 @@ class ArticleSession:
url: str = ""
title: str = ""
content: str = ""
language: str = ""
language: str = "" # Audio output language (set by user choice)
ui_language: str = "en" # Detected from article content, used for UI strings
duration_minutes: int = 10
topics: list[str] = field(default_factory=list)
detected_topics: list[str] = field(default_factory=list)