Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align input part content with list content #190299

Merged
merged 3 commits into from
Aug 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/vs/workbench/contrib/chat/browser/chatInputPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,18 +270,19 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
const followupsHeight = this.followupsContainer.offsetHeight;

const inputPartBorder = 1;
const inputPartPadding = 24;
const inputEditorHeight = Math.min(this._inputEditor.getContentHeight(), height - followupsHeight - inputPartPadding - inputPartBorder, INPUT_EDITOR_MAX_HEIGHT);
const inputPartHorizontalPadding = 40;
const inputPartVerticalPadding = 24;
const inputEditorHeight = Math.min(this._inputEditor.getContentHeight(), height - followupsHeight - inputPartHorizontalPadding - inputPartBorder, INPUT_EDITOR_MAX_HEIGHT);

const inputEditorBorder = 2;
const inputPartHeight = followupsHeight + inputEditorHeight + inputPartPadding + inputPartBorder + inputEditorBorder;
const inputPartHeight = followupsHeight + inputEditorHeight + inputPartVerticalPadding + inputPartBorder + inputEditorBorder;

const editorBorder = 2;
const editorPadding = 8;
const executeToolbarWidth = 25;

const initialEditorScrollWidth = this._inputEditor.getScrollWidth();
this._inputEditor.layout({ width: width - inputPartPadding - editorBorder - editorPadding - executeToolbarWidth, height: inputEditorHeight });
this._inputEditor.layout({ width: width - inputPartHorizontalPadding - editorBorder - editorPadding - executeToolbarWidth, height: inputEditorHeight });

if (allowRecurse && initialEditorScrollWidth < 10) {
// This is probably the initial layout. Now that the editor is layed out with its correct width, it should report the correct contentHeight
Expand Down
5 changes: 1 addition & 4 deletions src/vs/workbench/contrib/chat/browser/media/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,12 @@
display: flex;
box-sizing: border-box;
cursor: text;
margin: 0px 12px;
margin: 0px 20px;
background-color: var(--vscode-input-background);
border: 1px solid var(--vscode-input-border, transparent);
border-radius: 2px;
position: relative;
padding: 0 4px;
margin-bottom: 4px;
align-items: center;
justify-content: space-between;
}
Expand Down Expand Up @@ -297,8 +296,6 @@
padding: 12px 0px;
display: flex;
flex-direction: column;
border-top: solid 1px var(--vscode-chat-requestBorder);
border-bottom: solid 1px var(--vscode-chat-requestBorder);
}

.interactive-session-followups {
Expand Down