Skip to content

Commit a202b69

Browse files
Merge pull request #14 from flowdevs-io/coordinator-agent
Coordinator agent
2 parents b2bde07 + bc10d7f commit a202b69

4 files changed

Lines changed: 265 additions & 78 deletions

File tree

FlowVision/Form1.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ private void allowUserInput(bool enable)
355355
private async void SendButton_Click(object sender, EventArgs e)
356356
{
357357
allowUserInput(false);
358+
var toolConfig = ToolConfig.LoadConfig("toolsconfig");
358359

359360
// Check if the user input is empty
360361
string userInput = userInputTextBox.Text;
@@ -367,16 +368,16 @@ private async void SendButton_Click(object sender, EventArgs e)
367368

368369
// Add user message to UI
369370
AddMessage("You", userInput, false);
370-
371371
try
372372
{
373373
string aiResponse = await GetAIResponseAsync(userInput);
374374
AddMessage("AI", aiResponse, true);
375375

376376
// Check if we should retain chat history
377-
var toolConfig = ToolConfig.LoadConfig("toolsconfig");
377+
378378
if (!toolConfig.RetainChatHistory)
379379
{
380+
380381
// Keep only the latest exchange in chat history
381382
if (chatHistory.Count > 2)
382383
{

0 commit comments

Comments
 (0)