From b98b3d7f7050909406d62b8817e93ccf99fc5589 Mon Sep 17 00:00:00 2001
From: jesusalvino <96534278+jesusalvino@users.noreply.github.com>
Date: Wed, 23 Nov 2022 18:47:53 -0500
Subject: [PATCH] Dyn 5427 confidence threshold autocomplete ml (#13562)
* Hide Nodes
* Update UI with Expander
* Node Autocomplete Section Done
* Set default number of results as 10
* restoring version
* restoring entire file
* Connect the confidence level and nuber of result settings
* Fix
* Labels
* Naming changes
* Updating the Settings properties for copy test
---
.../Configuration/PreferenceSettings.cs | 18 +++
.../NodeAutoCompleteSearchControl.xaml | 2 +-
.../Properties/Resources.Designer.cs | 62 ++++++--
.../Properties/Resources.en-US.resx | 25 ++-
src/DynamoCoreWpf/Properties/Resources.resx | 25 ++-
.../ViewModels/Menu/PreferencesViewModel.cs | 149 ++++++++++++++----
.../Search/NodeAutoCompleteSearchViewModel.cs | 7 +-
.../Views/Menu/PreferencesView.xaml | 143 ++++++++++++++---
.../Views/Menu/PreferencesView.xaml.cs | 39 +++++
test/settings/DynamoSettings-NewSettings.xml | 3 +
10 files changed, 382 insertions(+), 91 deletions(-)
diff --git a/src/DynamoCore/Configuration/PreferenceSettings.cs b/src/DynamoCore/Configuration/PreferenceSettings.cs
index d643381379f..0db5ad20c50 100644
--- a/src/DynamoCore/Configuration/PreferenceSettings.cs
+++ b/src/DynamoCore/Configuration/PreferenceSettings.cs
@@ -497,6 +497,21 @@ public string PythonTemplateFilePath
///
public bool EnableNodeAutoComplete { get; set; }
+ ///
+ /// This defines if user wants to hide the nodes below a specific confidenc level.
+ ///
+ public bool HideNodesBelowSpecificConfidenceLevel { get; set; }
+
+ ///
+ /// This defines the level of confidence related to the ML recommendation.
+ ///
+ public int MLRecommendationConfidenceLevel { get; set; }
+
+ ///
+ /// This defines the number of results of the ML recommendation
+ ///
+ public int MLRecommendationNumberOfResults { get; set; }
+
///
/// This defines if user wants to see the enabled Dynamo Notification Center.
///
@@ -736,6 +751,9 @@ public PreferenceSettings()
IsIronPythonDialogDisabled = false;
ShowTabsAndSpacesInScriptEditor = false;
EnableNodeAutoComplete = true;
+ HideNodesBelowSpecificConfidenceLevel = false;
+ MLRecommendationConfidenceLevel = 10;
+ MLRecommendationNumberOfResults = 10;
EnableNotificationCenter = true;
isStaticSplashScreenEnabled = true;
DefaultPythonEngine = string.Empty;
diff --git a/src/DynamoCoreWpf/Controls/NodeAutoCompleteSearchControl.xaml b/src/DynamoCoreWpf/Controls/NodeAutoCompleteSearchControl.xaml
index ddda2794b65..a6565988f5d 100644
--- a/src/DynamoCoreWpf/Controls/NodeAutoCompleteSearchControl.xaml
+++ b/src/DynamoCoreWpf/Controls/NodeAutoCompleteSearchControl.xaml
@@ -330,7 +330,7 @@
-