package com.seer.teach.common.context;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * <p>
 *
 * </p >
 *
 * @author Captain
 * @since 2025-11-05 10:18
 */
public class PromptContextHolder {

    public static final String ARTICLE_KEY = "article";

    public static final String OCR_TEXT = "ocrText";

    public static final String KNOW_POINT = "know_point";

    public static final String LOST_POINT = "lost_point";

    public static final String NESS = "ness";

    public static final String LESSON = "lesson";

    private static final ThreadLocal<Map<String,Object>> CTX =
            ThreadLocal.withInitial(HashMap::new);

    public static void put(String key, Object value){
        CTX.get().put(key, value);
    }

    public static Object get(String key){
        return CTX.get().get(key);
    }

    public static Map<String,Object> all(){
        return CTX.get();
    }

    public static void clear(){
        CTX.remove();
    }
}