Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions tools/Az.Tools.Predictor/Az.Tools.Predictor/AzPredictorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,35 +250,6 @@ public virtual CommandLineSuggestion GetSuggestion(PredictionContext context, in
}
}

if (suggestionCount > 1)
{
// Add the survey/feedback cmdlet at the end if the user isn't typing it.
bool isSurveyCmdletFound = false;

if (result != null)
{
foreach (var predictiveCommand in result.SourceTexts)
{
if (string.Equals(predictiveCommand, _surveyCmdlets[_azContext.Cohort].Command, StringComparison.Ordinal))
{
isSurveyCmdletFound = true;
break;
}
}
}
else
{
result = new CommandLineSuggestion();
}

if (!isSurveyCmdletFound)
{
var toAddCmdlet = _surveyCmdlets[_azContext.Cohort].Command;
var toAddDescription = _surveyCmdlets[_azContext.Cohort].Description;
result.AddSuggestion(new PredictiveSuggestion($"{toAddCmdlet} # {toAddDescription}", toAddCmdlet), toAddCmdlet, SuggestionSource.StaticCommands);
}
}

return result;
}

Expand Down