Assorted inline chat fixes (#208769)

* fix/workaround https://github.com/microsoft/vscode/issues/208549

* fixes https://github.com/microsoft/vscode/issues/208656

* add minHeight to inline chat widget

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

* fixes https://github.com/microsoft/vscode/issues/208606

* only honor `refer` flag when its command is the first and only

fixes https://github.com/microsoft/vscode/issues/208574
This commit is contained in:
Johannes Rieken
2024-03-26 12:38:26 +01:00
committed by GitHub
parent 4a6ebe0ee5
commit 7a3a29fee3
6 changed files with 41 additions and 14 deletions

View File

@@ -114,9 +114,8 @@ export class InlineChatZoneWidget extends ZoneWidget {
const chatContentHeight = this.widget.contentHeight;
const editorHeight = this.editor.getLayoutInfo().height;
const contentHeight = Math.min(chatContentHeight, editorHeight * 0.42);
const contentHeight = Math.min(chatContentHeight, Math.max(this.widget.minHeight, editorHeight * 0.42));
const heightInLines = contentHeight / this.editor.getOption(EditorOption.lineHeight);
// console.log('ZONE#_computeHeightInLines', { chatContentHeight, editorHeight, contentHeight, heightInLines });
return heightInLines;
}