mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Ensure we read the observable on the right input part (#291748)
Hoping to fix a layout issue reported by Harald but I don't think this is it.
This commit is contained in:
@@ -561,11 +561,17 @@ export class ChatWidget extends Disposable implements IChatWidget {
|
||||
return this._attachmentCapabilities;
|
||||
}
|
||||
|
||||
/**
|
||||
* Either the inline input (when editing) or the main input part
|
||||
*/
|
||||
get input(): ChatInputPart {
|
||||
return this.viewModel?.editing && this.configurationService.getValue<string>('chat.editRequests') !== 'input' ? this.inlineInputPart : this.inputPart;
|
||||
}
|
||||
|
||||
private get inputPart(): ChatInputPart {
|
||||
/**
|
||||
* The main input part at the buttom of the chat widget. Use `input` to get the active input (main or inline editing part).
|
||||
*/
|
||||
get inputPart(): ChatInputPart {
|
||||
return this.inputPartDisposable.value!;
|
||||
}
|
||||
|
||||
|
||||
@@ -606,7 +606,7 @@ export class ChatViewPane extends ViewPane implements IViewWelcomeDelegate {
|
||||
|
||||
// When showing sessions stacked, adjust the height of the sessions list to make room for chat input
|
||||
this._register(autorun(reader => {
|
||||
chatWidget.input.height.read(reader);
|
||||
chatWidget.inputPart.height.read(reader);
|
||||
if (this.sessionsViewerVisible && this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
||||
this.relayout();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user