Fix layout of chat content when scrollbar becomes visible

This commit is contained in:
Saoud Rizwan
2024-07-22 07:59:06 -04:00
parent c11ab41d01
commit 612db6d070
3 changed files with 4 additions and 2 deletions

View File

@@ -343,7 +343,7 @@ const ChatRow: React.FC<ChatRowProps> = ({ message, syntaxHighlighterStyle }) =>
return ( return (
<div <div
style={{ style={{
padding: "10px 15px 10px 15px", padding: "10px 0px 10px 0px",
}}> }}>
{renderContent()} {renderContent()}
{isExpanded && message.say === "api_req_started" && ( {isExpanded && message.say === "api_req_started" && (

View File

@@ -330,7 +330,8 @@ const ChatView = ({ messages, isHidden, vscodeThemeName }: ChatViewProps) => {
className="scrollable" className="scrollable"
style={{ style={{
flexGrow: 1, flexGrow: 1,
overflowY: "auto", overflowY: "scroll",
padding: "0 6px 0 15px",
}}> }}>
{modifiedMessages.map((message, index) => ( {modifiedMessages.map((message, index) => (
<ChatRow key={index} message={message} syntaxHighlighterStyle={syntaxHighlighterStyle} /> <ChatRow key={index} message={message} syntaxHighlighterStyle={syntaxHighlighterStyle} />

View File

@@ -146,6 +146,7 @@ const CodeBlock = ({ code, diff, language, path, syntaxHighlighterStyle }: CodeB
borderRadius: 0, borderRadius: 0,
fontSize: "var(--vscode-editor-font-size)", fontSize: "var(--vscode-editor-font-size)",
lineHeight: "var(--vscode-editor-line-height)", lineHeight: "var(--vscode-editor-line-height)",
fontFamily: "var(--vscode-editor-font-family)",
}}> }}>
{code ?? diff ?? ""} {code ?? diff ?? ""}
</SyntaxHighlighter> </SyntaxHighlighter>