Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] AI chat #12322

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Update ChatGPT code base

2561e34
Select commit
Failed to load commit list.
Draft

[UI] AI chat #12322

Update ChatGPT code base
2561e34
Select commit
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (master) failed May 3, 2024 in 58s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 9 findings(s) 🚩

View detailed results in CodeScene

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

Check warning on line 1 in WalletWasabi.Fluent/AI/ChatGPT.Core/ViewModels/Chat/ChatMessageViewModel.cs

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 1 in WalletWasabi.Fluent/AI/ChatGPT.Core/ViewModels/Chat/ChatMessageViewModel.cs

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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.