@@ -77,7 +77,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
77
77
78
78
constructor (
79
79
// private readonly editorOptions: ChatEditorOptions, // TODO this should be used
80
- private readonly options : { renderFollowupsBelow : boolean } ,
80
+ private readonly options : { renderFollowups : boolean } ,
81
81
@IChatWidgetHistoryService private readonly historyService : IChatWidgetHistoryService ,
82
82
@IModelService private readonly modelService : IModelService ,
83
83
@IInstantiationService private readonly instantiationService : IInstantiationService ,
@@ -178,14 +178,8 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
178
178
render ( container : HTMLElement , initialValue : string , widget : IChatWidget ) {
179
179
this . container = dom . append ( container , $ ( '.interactive-input-part' ) ) ;
180
180
181
- let inputContainer : HTMLElement ;
182
- if ( this . options . renderFollowupsBelow ) {
183
- inputContainer = dom . append ( this . container , $ ( '.interactive-input-and-toolbar' ) ) ;
184
- this . followupsContainer = dom . append ( this . container , $ ( '.interactive-input-followups' ) ) ;
185
- } else {
186
- this . followupsContainer = dom . append ( this . container , $ ( '.interactive-input-followups' ) ) ;
187
- inputContainer = dom . append ( this . container , $ ( '.interactive-input-and-toolbar' ) ) ;
188
- }
181
+ this . followupsContainer = dom . append ( this . container , $ ( '.interactive-input-followups' ) ) ;
182
+ const inputContainer = dom . append ( this . container , $ ( '.interactive-input-and-toolbar' ) ) ;
189
183
190
184
const inputScopedContextKeyService = this . _register ( this . contextKeyService . createScoped ( inputContainer ) ) ;
191
185
CONTEXT_IN_CHAT_INPUT . bindTo ( inputScopedContextKeyService ) . set ( true ) ;
@@ -256,6 +250,9 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
256
250
}
257
251
258
252
async renderFollowups ( items ?: IChatReplyFollowup [ ] ) : Promise < void > {
253
+ if ( ! this . options . renderFollowups ) {
254
+ return ;
255
+ }
259
256
this . followupsDisposables . clear ( ) ;
260
257
dom . clearNode ( this . followupsContainer ) ;
261
258
0 commit comments