package com.infoepoch.pms.agent.domain.care.orchestrator;

import com.infoepoch.pms.agent.domain.care.stream.CareStreamingResponseAssembler;
import org.junit.jupiter.api.Test;

import java.lang.reflect.Method;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

class GeneralConversationExecutorTest {

    @Test
    void shouldBuildPromptWithOnlyRoleAndUserMessage() throws Exception {
        GeneralConversationExecutor executor = new GeneralConversationExecutor(
                new CareStreamingResponseAssembler(),
                null
        );
        Method method = GeneralConversationExecutor.class.getDeclaredMethod("buildPrompt", String.class);
        method.setAccessible(true);

        String prompt = (String) method.invoke(executor, "活动历史有哪些");

        assertTrue(prompt.contains("请以精准关爱智能体的身份回复用户。"));
        assertTrue(prompt.contains("用户输入：活动历史有哪些"));
        assertFalse(prompt.contains("你只有以下三个技能"));
        assertFalse(prompt.contains("有限通用对话"));
        assertFalse(prompt.contains("暂无推荐"));
        assertFalse(prompt.contains("不扩展成百科问答或开放世界知识回答"));
        assertFalse(prompt.contains("引导用户改问"));
    }
}
