package com.seer.teach.teacher.resolver.impl;

import com.seer.teach.common.context.PromptContextHolder;
import com.seer.teach.teacher.common.dto.ArticleDTO;
import com.seer.teach.teacher.resolver.PromptVariableResolver;
import org.springframework.stereotype.Component;

/**
 *
 * <p>
 *
 * </p >
 *
 * @author Captain
 * @since 2025-11-05 11:26
 */
@Component
public class ArticleNameResolver implements PromptVariableResolver {
    @Override
    public String supportKey() {
        return "article_name";
    }

    @Override
    public String resolve() {
        ArticleDTO article = (ArticleDTO) PromptContextHolder.get(PromptContextHolder.ARTICLE_KEY);
        return article.getArticleName();
    }

}
