Class RecapRenderer

java.lang.Object
com.axelor.ai.chat.RecapRenderer

public final class RecapRenderer extends Object
Links the records a recap names, and converts the result to HTML for the activity stream.

One text throughout: what the transcript shows is what gets stored and what gets posted, so a second rendering from the structure cannot diverge from what was on screen.

  • Method Details

    • link

      public static String link(String summary, List<Recap.Ref> records)
      Links every record the ledger recorded, wherever the summary names it. The model is never asked to produce a link: it writes names, and the names it was given are the ones matched here, so every link resolves.

      A record is linked once - a second mention in the same paragraph is prose, not navigation.

    • provenanceLine

      public static String provenanceLine(Recap.Provenance provenance)
      Names the range the card was built from. Not part of the summary's text: the card has a footer for it, and on a record it would describe a conversation those readers cannot open.
    • toHtml

      public static String toHtml(String markdown)
      The recap's own markdown subset - bullets, bold, italic and links - as HTML for the activity stream's card.

      Deliberately not a general markdown parser: this runs over text a person edited, so everything is escaped first and only the recap's own constructs are re-admitted. Only relative hash links survive, a link being the one construct that could carry a reader somewhere else.