@@ -64,7 +64,7 @@ internal sealed class SemanticSearchToolWindowImpl(
64
64
IStreamingFindUsagesPresenter resultsPresenter ,
65
65
ITextUndoHistoryRegistry undoHistoryRegistry ,
66
66
ISemanticSearchCopilotService copilotService ,
67
- ISemanticSearchCopilotUIProvider copilotUIProvider ,
67
+ Lazy < ISemanticSearchCopilotUIProvider > copilotUIProvider , // lazy to avoid loading Microsoft.VisualStudio.LanguageServices.ExternalAccess.Copilot
68
68
IVsService < SVsUIShell , IVsUIShell > vsUIShellProvider ) : ISemanticSearchWorkspaceHost , OptionsProvider < ClassificationOptions >
69
69
{
70
70
private const int ToolBarHeight = 26 ;
@@ -193,7 +193,7 @@ public async Task<FrameworkElement> InitializeAsync(CancellationToken cancellati
193
193
194
194
private CopilotUI ? CreateCopilotUI ( )
195
195
{
196
- if ( ! copilotUIProvider . IsAvailable || ! copilotService . IsAvailable )
196
+ if ( ! copilotUIProvider . Value . IsAvailable || ! copilotService . IsAvailable )
197
197
{
198
198
return null ;
199
199
}
@@ -221,7 +221,7 @@ public async Task<FrameworkElement> InitializeAsync(CancellationToken cancellati
221
221
promptGrid . ColumnDefinitions . Add ( new ColumnDefinition { MaxWidth = 600 , Width = GridLength . Auto } ) ;
222
222
promptGrid . ColumnDefinitions . Add ( new ColumnDefinition { Width = GridLength . Auto } ) ;
223
223
224
- var promptTextBox = copilotUIProvider . GetTextBox ( ) ;
224
+ var promptTextBox = copilotUIProvider . Value . GetTextBox ( ) ;
225
225
226
226
var panel = new StackPanel ( )
227
227
{
0 commit comments