Skip to content

Commit d441153

Browse files
Disable followup questions in the inputOnTop mode (microsoft#187884)
For now, until we iron out what they should look like.
1 parent 14a1c7e commit d441153

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

src/vs/workbench/contrib/chat/browser/chatInputPart.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
7777

7878
constructor(
7979
// private readonly editorOptions: ChatEditorOptions, // TODO this should be used
80-
private readonly options: { renderFollowupsBelow: boolean },
80+
private readonly options: { renderFollowups: boolean },
8181
@IChatWidgetHistoryService private readonly historyService: IChatWidgetHistoryService,
8282
@IModelService private readonly modelService: IModelService,
8383
@IInstantiationService private readonly instantiationService: IInstantiationService,
@@ -178,14 +178,8 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
178178
render(container: HTMLElement, initialValue: string, widget: IChatWidget) {
179179
this.container = dom.append(container, $('.interactive-input-part'));
180180

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'));
189183

190184
const inputScopedContextKeyService = this._register(this.contextKeyService.createScoped(inputContainer));
191185
CONTEXT_IN_CHAT_INPUT.bindTo(inputScopedContextKeyService).set(true);
@@ -256,6 +250,9 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
256250
}
257251

258252
async renderFollowups(items?: IChatReplyFollowup[]): Promise<void> {
253+
if (!this.options.renderFollowups) {
254+
return;
255+
}
259256
this.followupsDisposables.clear();
260257
dom.clearNode(this.followupsContainer);
261258

src/vs/workbench/contrib/chat/browser/chatWidget.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export class ChatWidget extends Disposable implements IChatWidget {
142142

143143
this.container = dom.append(parent, $('.interactive-session'));
144144
if (renderInputOnTop) {
145-
this.createInput(this.container, { renderFollowupsBelow: true });
145+
this.createInput(this.container, { renderFollowups: false });
146146
this.listContainer = dom.append(this.container, $(`.interactive-list`));
147147
} else {
148148
this.listContainer = dom.append(this.container, $(`.interactive-list`));
@@ -334,8 +334,8 @@ export class ChatWidget extends Disposable implements IChatWidget {
334334
this.previousTreeScrollHeight = this.tree.scrollHeight;
335335
}
336336

337-
private createInput(container: HTMLElement, options?: { renderFollowupsBelow: boolean }): void {
338-
this.inputPart = this.instantiationService.createInstance(ChatInputPart, { renderFollowupsBelow: options?.renderFollowupsBelow ?? false });
337+
private createInput(container: HTMLElement, options?: { renderFollowups: boolean }): void {
338+
this.inputPart = this.instantiationService.createInstance(ChatInputPart, { renderFollowups: options?.renderFollowups ?? true });
339339
this.inputPart.render(container, '', this);
340340

341341
this._register(this.inputPart.onDidFocus(() => this._onDidFocus.fire()));

0 commit comments

Comments
 (0)