from __future__ import annotations

from analogai.deepthink.messaging.fact.services.fact_context_assembler import FactContextBuilder


class FactResponseDecorator:
    def __init__(self, assembler: FactContextBuilder):
        self._assembler = assembler

    def decorate_belief_line(self, belief_line: str, belief) -> str:
        extra = self._assembler.build_belief_context(belief)
        if not extra:
            return belief_line
        return f"{belief_line} ({extra})"
