Fix layout issues in inline chat (#214013)

* clamp followup height to three lines

fixes https://github.com/microsoft/vscode-copilot/issues/5522

* follow up question should not define the widget of the chat input part
This commit is contained in:
Johannes Rieken 2024-05-31 16:26:06 +02:00 committed by GitHub
parent 302d71ff5b
commit e33013da3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View file

@ -530,6 +530,8 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
const inputEditorHeight = Math.min(data.inputPartEditorHeight, height - data.followupsHeight - data.inputPartVerticalPadding);
this.followupsContainer.style.width = `${width}px`;
this._inputPartHeight = data.followupsHeight + inputEditorHeight + data.inputPartVerticalPadding + data.inputEditorBorder + data.implicitContextHeight;
const initialEditorScrollWidth = this._inputEditor.getScrollWidth();

View file

@ -555,6 +555,12 @@
display: block;
color: var(--vscode-textLink-foreground);
font-size: 12px;
/* clamp to max 3 lines */
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.interactive-session .interactive-input-part .interactive-input-followups .interactive-session-followups code {

View file

@ -136,7 +136,7 @@ export class InlineChatContentWidget implements IContentWidget {
const maxHeight = this._widget.input.inputEditor.getOption(EditorOption.lineHeight) * 5;
const inputEditorHeight = this._widget.contentHeight;
this._widget.layout(Math.min(maxHeight, inputEditorHeight), 360);
this._widget.layout(Math.min(maxHeight, inputEditorHeight), 390);
// const actualHeight = this._widget.inputPartHeight;
// return new dom.Dimension(width, actualHeight);