package com.gzzm.lobster.context;

import com.gzzm.lobster.llm.LobsterMessage;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * ContextAssembly —— 组装结果 / Output of ContextAssembler.
 */
public final class ContextAssembly {

    private final List<LobsterMessage> sendView;
    private final Map<String, Integer> tokenBreakdown;
    private final List<String> compactionLog;
    private final int totalTokens;

    public ContextAssembly(List<LobsterMessage> sendView, Map<String, Integer> tokenBreakdown,
                           List<String> compactionLog, int totalTokens) {
        this.sendView = sendView == null ? new ArrayList<LobsterMessage>() : sendView;
        this.tokenBreakdown = tokenBreakdown == null ? new LinkedHashMap<String, Integer>() : tokenBreakdown;
        this.compactionLog = compactionLog == null ? new ArrayList<String>() : compactionLog;
        this.totalTokens = totalTokens;
    }

    public List<LobsterMessage> getSendView() { return sendView; }
    public Map<String, Integer> getTokenBreakdown() { return tokenBreakdown; }
    public List<String> getCompactionLog() { return compactionLog; }
    public int getTotalTokens() { return totalTokens; }
}
