chore: Update version to 1.6.8 and enhance conversation handling in BaseAgent

This commit is contained in:
extio-de
2025-09-13 17:56:30 +02:00
parent aca661d929
commit a417b95dda
3 changed files with 8 additions and 4 deletions

View File

@@ -272,6 +272,10 @@ public interface BaseAgent {
}
split.context().setConversation(conversation);
}
else if (this.agentType(split.context()) == AgentType.START_CONVERSATION_WITH_SYSTEM_PROMPT) {
conversation = Conversation.create(this.systemPrompt(), split.text());
split.context().setConversation(conversation);
}
else {
if (conversation.getConversation().get(0).type() == TurnType.SYSTEM && this.agentType(split.context()) != AgentType.CONVERSATION_WITH_SYSTEM_PROMPT) {
final String mergedSysAndUser;
@@ -332,7 +336,7 @@ public interface BaseAgent {
context.setConversation(null);
}
case final BaseAgent a when a.agentType(context) == AgentType.START_CONVERSATION -> {
case final BaseAgent a when a.agentType(context) == AgentType.START_CONVERSATION || a.agentType(context) == AgentType.START_CONVERSATION_WITH_SYSTEM_PROMPT -> {
context.getGraph().add("🗨");
context.setConversation(null);
}