Chats are not using specified Agent

The function createNewConversation is never called with the agentSlug specified so its always opening a new Conversation with the Base Agent
This commit is contained in:
Fh26697
2025-08-19 15:49:41 +02:00
committed by GitHub
parent fa143d45b9
commit 916534226a

View File

@@ -962,7 +962,9 @@ export class KhojChatView extends KhojPaneView {
let endpoint = `${this.setting.khojUrl}/api/chat/sessions`;
if (agentSlug) {
endpoint += `?agent_slug=${encodeURIComponent(agentSlug)}`;
}
} else if (this.currentAgent) {
endpoint += `?agent_slug=${encodeURIComponent(this.currentAgent)}`;
}
const response = await fetch(endpoint, {
method: "POST",