package tech.easyflow.core.runtime;

import java.util.Collections;
import java.util.List;

public interface ChatRuntimeListener {

    default void onSessionPrepared(ChatRuntimeContext context) {
    }

    default void onUserMessage(ChatRuntimeContext context, ChatRuntimeMessage message) {
    }

    default void onAssistantDelta(ChatRuntimeContext context, ChatRuntimeMessage message) {
    }

    default void onAssistantCompleted(ChatRuntimeContext context, ChatRuntimeMessage message) {
    }

    default void onChatFailed(ChatRuntimeContext context, Throwable throwable) {
    }

    default void onChatCompleted(ChatRuntimeContext context) {
    }

    default List<ChatRuntimeMessage> loadMessages(ChatRuntimeContext context, int limit) {
        return Collections.emptyList();
    }
}
