Class SessionUiCommons

java.lang.Object
ai.mindconnect.adminui.assembler.session.SessionUiCommons

public final class SessionUiCommons extends Object
Shared static helpers used by every session-related UI assembler (chat, working memory, traces) and by the cross-package UI components in ai.mindconnect.adminui.ui.component. Kept tiny on purpose — anything that grows here either belongs in a dedicated assembler or in a domain helper.

Made public (with public members) so the components package can share the same Jackson instance and time formatter without each component carrying its own copy.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final DateTimeFormatter
    Time formatter used in conversation, memory and trace headers.
    static final com.fasterxml.jackson.databind.ObjectMapper
    Single Jackson instance shared across the assemblers.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    codeBlock(String body, String lang)
    Wraps a body in a markdown code-fence with optional language hint.
    static String
    Squashes whitespace and truncates s to 120 chars (with an ellipsis) so it fits one line in a list-item description.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MAPPER

      public static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
      Single Jackson instance shared across the assemblers. None of them mutate it, and Jackson's ObjectMapper is documented as thread-safe for read/write of normal records.
    • DT_FMT

      public static final DateTimeFormatter DT_FMT
      Time formatter used in conversation, memory and trace headers.
  • Method Details

    • previewOf

      public static String previewOf(String s)
      Squashes whitespace and truncates s to 120 chars (with an ellipsis) so it fits one line in a list-item description.
    • codeBlock

      public static String codeBlock(String body, String lang)
      Wraps a body in a markdown code-fence with optional language hint.