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:
Rob Lourens
2026-01-29 22:36:56 +00:00
committed by GitHub
parent 07e6e58af5
commit aa328e0fed
2 changed files with 8 additions and 2 deletions
@@ -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();
}