...
    for msg in messages:
        if msg["role"] != "USER":
            continue
        c = msg.get("content", "").strip()
        if not c:
            continue

        # wörtlich übernehmen (kein Ich-Zwang)
        q = c.replace("\n", " ").strip()
        q = q if len(q) <= 500 else q[:497] + "..."
        quotes.append(q)

        if len(quotes) >= max_quotes:
            break
    return quotes...