Skip to content

Commit 65b3e48

Browse files
authored
Remove the survey related cmd from suggestion (Azure#16862)
1 parent 0fda86f commit 65b3e48

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

tools/Az.Tools.Predictor/Az.Tools.Predictor/AzPredictorService.cs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -250,35 +250,6 @@ public virtual CommandLineSuggestion GetSuggestion(PredictionContext context, in
250250
}
251251
}
252252

253-
if (suggestionCount > 1)
254-
{
255-
// Add the survey/feedback cmdlet at the end if the user isn't typing it.
256-
bool isSurveyCmdletFound = false;
257-
258-
if (result != null)
259-
{
260-
foreach (var predictiveCommand in result.SourceTexts)
261-
{
262-
if (string.Equals(predictiveCommand, _surveyCmdlets[_azContext.Cohort].Command, StringComparison.Ordinal))
263-
{
264-
isSurveyCmdletFound = true;
265-
break;
266-
}
267-
}
268-
}
269-
else
270-
{
271-
result = new CommandLineSuggestion();
272-
}
273-
274-
if (!isSurveyCmdletFound)
275-
{
276-
var toAddCmdlet = _surveyCmdlets[_azContext.Cohort].Command;
277-
var toAddDescription = _surveyCmdlets[_azContext.Cohort].Description;
278-
result.AddSuggestion(new PredictiveSuggestion($"{toAddCmdlet} # {toAddDescription}", toAddCmdlet), toAddCmdlet, SuggestionSource.StaticCommands);
279-
}
280-
}
281-
282253
return result;
283254
}
284255

0 commit comments

Comments
 (0)