@@ -11,14 +11,15 @@ import { Iterable } from 'vs/base/common/iterator';
11
11
import { IDisposable , toDisposable } from 'vs/base/common/lifecycle' ;
12
12
import { URI } from 'vs/base/common/uri' ;
13
13
import { Location } from 'vs/editor/common/languages' ;
14
- import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat' ;
14
+ import { IChatWidgetService , showChatView } from 'vs/workbench/contrib/chat/browser/chat' ;
15
15
import { ChatDynamicVariableModel } from 'vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables' ;
16
16
import { ChatAgentLocation } from 'vs/workbench/contrib/chat/common/chatAgents' ;
17
17
import { IChatModel , IChatRequestVariableData , IChatRequestVariableEntry } from 'vs/workbench/contrib/chat/common/chatModel' ;
18
18
import { ChatRequestDynamicVariablePart , ChatRequestVariablePart , IParsedChatRequest } from 'vs/workbench/contrib/chat/common/chatParserTypes' ;
19
19
import { IChatContentReference } from 'vs/workbench/contrib/chat/common/chatService' ;
20
20
import { IChatRequestVariableValue , IChatVariableData , IChatVariableResolver , IChatVariableResolverProgress , IChatVariablesService , IDynamicVariable } from 'vs/workbench/contrib/chat/common/chatVariables' ;
21
21
import { ChatContextAttachments } from 'vs/workbench/contrib/chat/browser/contrib/chatContextAttachments' ;
22
+ import { IViewsService } from 'vs/workbench/services/views/common/viewsService' ;
22
23
23
24
interface IChatData {
24
25
data : IChatVariableData ;
@@ -31,7 +32,8 @@ export class ChatVariablesService implements IChatVariablesService {
31
32
private _resolver = new Map < string , IChatData > ( ) ;
32
33
33
34
constructor (
34
- @IChatWidgetService private readonly chatWidgetService : IChatWidgetService
35
+ @IChatWidgetService private readonly chatWidgetService : IChatWidgetService ,
36
+ @IViewsService private readonly viewsService : IViewsService ,
35
37
) {
36
38
}
37
39
@@ -155,6 +157,7 @@ export class ChatVariablesService implements IChatVariablesService {
155
157
return ;
156
158
}
157
159
160
+ await showChatView ( this . viewsService ) ;
158
161
const widget = this . chatWidgetService . lastFocusedWidget ;
159
162
if ( ! widget || ! widget . viewModel ) {
160
163
return ;
0 commit comments