[UI] AI chat #12322
[UI] AI chat #12322
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 9 findings(s) 🚩
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method ChatViewModel.cs: GetResponseDataAsync
- Primitive Obsession ChatMessageViewModel.cs
- String Heavy Function Arguments ChatMessageViewModel.cs
- Primitive Obsession ChatViewModel.cs
- Constructor Over-Injection ChatViewModel.cs: ChatViewModel
- Complex Method ChatService.cs: SendApiRequestAsync
- Excess Number of Function Arguments ChatService.cs: SendApiRequestAsync
- Complex Method ChatViewModel.cs: SendAsync
- Bumpy Road Ahead ChatViewModel.cs: SendAsync
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
❌ New issue: Primitive Obsession
In this module, 64.7% of all function arguments are primitive types, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
❌ New issue: String Heavy Function Arguments
In this module, 64.7% of all arguments to its 22 functions are strings. The threshold for string arguments is 39.0%. The functions in this file have a high ratio of strings as arguments. Avoid adding more.
Check warning on line 275 in WalletWasabi.Fluent/AI/ChatGPT.Core/ViewModels/Chat/ChatViewModel.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
❌ New issue: Complex Method
GetResponseDataAsync has a cyclomatic complexity of 14, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
Check warning on line 189 in WalletWasabi.Fluent/AI/ChatGPT.Core/ViewModels/Chat/ChatViewModel.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
❌ New issue: Complex Method
SendAsync has a cyclomatic complexity of 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
Check warning on line 189 in WalletWasabi.Fluent/AI/ChatGPT.Core/ViewModels/Chat/ChatViewModel.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
❌ New issue: Bumpy Road Ahead
SendAsync has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
Check warning on line 1 in WalletWasabi.Fluent/AI/ChatGPT.Core/ViewModels/Chat/ChatViewModel.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
❌ New issue: Primitive Obsession
In this module, 42.4% of all function arguments are primitive types, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.
Check warning on line 74 in WalletWasabi.Fluent/AI/ChatGPT.Core/ViewModels/Chat/ChatViewModel.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
❌ New issue: Constructor Over-Injection
ChatViewModel has 10 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.
Check warning on line 116 in WalletWasabi.Fluent/AI/ChatGPT/Services/ChatService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
❌ New issue: Complex Method
SendApiRequestAsync has a cyclomatic complexity of 11, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
Check warning on line 116 in WalletWasabi.Fluent/AI/ChatGPT/Services/ChatService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
❌ New issue: Excess Number of Function Arguments
SendApiRequestAsync has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.