From 42cbfbb8d8e5a5004a25379bbf418ee55e663c98 Mon Sep 17 00:00:00 2001 From: cryptooda Date: Tue, 6 Jan 2026 19:00:35 +0700 Subject: [PATCH] Refactor progress update messages and improve UI opacity in AiChat component - Simplified progress update messages in LlmController by removing iteration details for clarity. - Enhanced the visual appearance of the AiChat component by adjusting opacity levels for progress indicators and text elements, improving overall readability and user experience. - Updated styling for tool name and error messages to ensure consistent visual feedback during chat interactions. --- src/Managing.Api/Controllers/LlmController.cs | 8 +++---- .../src/components/organism/AiChat.tsx | 22 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Managing.Api/Controllers/LlmController.cs b/src/Managing.Api/Controllers/LlmController.cs index af54c471..33ab0b18 100644 --- a/src/Managing.Api/Controllers/LlmController.cs +++ b/src/Managing.Api/Controllers/LlmController.cs @@ -187,7 +187,7 @@ public class LlmController : BaseController await SendProgressUpdate(connectionId, new LlmProgressUpdate { Type = "iteration_start", - Message = $"Iteration {iteration}/{maxIterations}: Analyzing your request and determining next steps...", + Message = "Analyzing your request and determining next steps...", Iteration = iteration, MaxIterations = maxIterations }); @@ -215,7 +215,7 @@ public class LlmController : BaseController await SendProgressUpdate(connectionId, new LlmProgressUpdate { Type = "thinking", - Message = $"Iteration {iteration}: Sending request to LLM...", + Message = "Sending request to LLM...", Iteration = iteration, MaxIterations = maxIterations }); @@ -247,7 +247,7 @@ public class LlmController : BaseController await SendProgressUpdate(connectionId, new LlmProgressUpdate { Type = "thinking", - Message = $"Iteration {iteration}: LLM requested {response.ToolCalls.Count} tool call(s). Executing tools...", + Message = $"LLM requested {response.ToolCalls.Count} tool call(s). Executing tools...", Iteration = iteration, MaxIterations = maxIterations }); @@ -316,7 +316,7 @@ public class LlmController : BaseController await SendProgressUpdate(connectionId, new LlmProgressUpdate { Type = "thinking", - Message = $"Iteration {iteration}: All tools completed. Analyzing results...", + Message = "All tools completed. Analyzing results...", Iteration = iteration, MaxIterations = maxIterations }); diff --git a/src/Managing.WebApp/src/components/organism/AiChat.tsx b/src/Managing.WebApp/src/components/organism/AiChat.tsx index 4778e97a..ace47b17 100644 --- a/src/Managing.WebApp/src/components/organism/AiChat.tsx +++ b/src/Managing.WebApp/src/components/organism/AiChat.tsx @@ -238,7 +238,7 @@ function AiChat({ onClose }: AiChatProps): JSX.Element { {/* Progress Updates */} {isLoading && currentProgress && (
-
+
@@ -321,31 +321,31 @@ function ProgressIndicator({ progress }: { progress: LlmProgressUpdate }): JSX.E } return ( -
+
- {getIcon()} - + {getIcon()} + {progress.message}
{progress.iteration && progress.maxIterations && ( -
+
- Iteration {progress.iteration}/{progress.maxIterations} + Iteration {progress.iteration}/{progress.maxIterations}
)} {progress.toolName && ( -
- +
+ {progress.toolName} {progress.toolArguments && Object.keys(progress.toolArguments).length > 0 && ( - + ({Object.keys(progress.toolArguments).length} args) )} @@ -354,7 +354,7 @@ function ProgressIndicator({ progress }: { progress: LlmProgressUpdate }): JSX.E )} {progress.error && ( -
+
{progress.error}
)}