Properly set state when reseting ollama URL to default.

This commit is contained in:
Bartosz Taudul
2025-05-11 19:27:35 +02:00
parent 6ce5c345a5
commit fd291f225e

View File

@@ -869,7 +869,13 @@ static void DrawContents()
ImGui::Indent();
ImGui::TextUnformatted( "Ollama URL" );
ImGui::SameLine();
if( ImGui::Button( ICON_FA_HOUSE ) ) s_config.llmAddress = "http://localhost:11434";
if( ImGui::Button( ICON_FA_HOUSE ) )
{
llmstatus = 0;
llmModels.clear();
s_config.llmAddress = "http://localhost:11434";
SaveConfig();
}
ImGui::SameLine();
char llmAddress[1024];
snprintf( llmAddress, sizeof( llmAddress ), "%s", s_config.llmAddress.c_str() );