CmdPal: Remove support for "selection" TextToSuggest (#41956)

`TextToSuggest` has been nothing but pain. We need another approach.
I'm leaving the code, but just disabled behind an env flag. Same as
actions.

Closes #41659
This commit is contained in:
Mike Griese
2025-09-24 12:48:59 -05:00
committed by GitHub
parent 55251607a7
commit 314a6e73eb
5 changed files with 51 additions and 16 deletions

View File

@@ -25,7 +25,7 @@ public partial class ContentTreeViewModel(ITreeContent _tree, WeakReference<IPag
// This is the content that's actually bound in XAML. We needed a
// collection, even if the collection is just a single item.
public ObservableCollection<ContentViewModel> Root => [RootContent];
public ObservableCollection<ContentViewModel> Root => RootContent is not null ? [RootContent] : [];
public override void InitializeProperties()
{
@@ -122,7 +122,7 @@ public partial class ContentTreeViewModel(ITreeContent _tree, WeakReference<IPag
if (viewModel is not null)
{
viewModel.InitializeProperties();
newContent.Add(viewModel);
newContent.Add((ContentViewModel)viewModel);
}
}
}