mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Chat with the default agent by default from web app home
Had temporarily updated the default selected agent to last used. Revert for now as 1. The previous logic was buggy. It didn't select the default agent even when the last used agent was the default agent. Which would require more work. 2. It maybe too early anyway to set the default agent to last used.
This commit is contained in:
@@ -132,8 +132,8 @@ function ChatBodyData(props: ChatBodyDataProps) {
|
||||
useEffect(() => {
|
||||
const agents = (agentsData || []).filter((agent) => agent !== null && agent !== undefined);
|
||||
setAgents(agents);
|
||||
// set the selected agent to the most recently used agent, first agent is always khoj
|
||||
setSelectedAgent(agents.length > 1 ? agents[1].slug : "khoj");
|
||||
// set the first agent, which is always the default agent, as the default for chat
|
||||
setSelectedAgent(agents.length > 1 ? agents[0].slug : "khoj");
|
||||
|
||||
// generate colored icons for the available agents
|
||||
const agentIcons = agents.map((agent) => getIconFromIconName(agent.icon, agent.color)!);
|
||||
|
||||
Reference in New Issue
Block a user