Interface AiConversationService

All Known Implementing Classes:
AiConversationDataService, AiConversationEmptyService

public interface AiConversationService
Provides access to the current user's AI conversations for the chat UI.

Operates purely on the AiConversation model. List operations are implicitly scoped to the current user.

  • Method Details

    • loadConversation

      @Nullable AiConversation loadConversation(UUID conversationId)
      Loads a conversation by id.
      Parameters:
      conversationId - id of the conversation to load
      Returns:
      the conversation, or null if it does not exist or is not accessible to the current user
    • loadConversations

      List<AiConversation> loadConversations()
      Loads the current user's conversations, newest first. Messages are not loaded; use AiChatMessageService to fetch a conversation's messages on demand.
      Returns:
      the conversations, newest first; empty if there are none
    • create

      AiConversation create()
      Creates a new conversation owned by the current user.
      Returns:
      the created conversation
    • save

      AiConversation save(AiConversation conversation)
      Persists the given conversation (insert or update).
      Parameters:
      conversation - conversation to save
      Returns:
      the saved conversation
    • remove

      void remove(AiConversation conversation)
      Removes the given conversation together with its messages.
      Parameters:
      conversation - conversation to remove