Skip to content

Commit 0cdc202

Browse files
committed
refactor: Simplify chat input styling and structure by removing unused CSS and optimizing layout for better usability
1 parent 822f330 commit 0cdc202

2 files changed

Lines changed: 6 additions & 52 deletions

File tree

src/renderer/src/components/pages/chat/ChatInput.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,7 @@ const ChatInput = React.memo(forwardRef<ChatInputRef, ChatInputProps>(
256256
/>
257257
)}
258258

259-
<div
260-
className="chat-input-container"
261-
style={{
262-
display: 'flex',
263-
flexDirection: 'column',
264-
alignItems: 'flex-start',
265-
gap: 8,
266-
flexWrap: 'wrap'
267-
}}
268-
>
259+
<div className="chat-input-container">
269260
<TextArea
270261
ref={textAreaRef}
271262
placeholder={

src/renderer/src/components/pages/chat/chat.css

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -161,22 +161,6 @@
161161
border-color: #d9d9d9;
162162
}
163163

164-
.chat-input-area {
165-
border-top: 1px solid #f0f0f0;
166-
padding: 16px;
167-
background: #fafafa;
168-
}
169-
170-
.chat-input-container {
171-
display: flex;
172-
gap: 12px;
173-
align-items: flex-end;
174-
}
175-
176-
.chat-input-container .ant-input {
177-
flex: 1;
178-
}
179-
180164
.chat-window-error {
181165
height: 100%;
182166
display: flex;
@@ -358,11 +342,13 @@
358342

359343
.chat-input-container {
360344
display: flex;
361-
gap: 12px;
345+
flex-direction: column;
346+
gap: 8px;
362347
}
363348

364-
.chat-input-container .ant-input {
365-
flex: 1;
349+
/* TextArea 自适应高度 */
350+
.chat-input-container textarea.ant-input {
351+
overflow-y: auto !important;
366352
}
367353

368354
/* Model Selector */
@@ -480,26 +466,3 @@
480466
margin-bottom: 4px;
481467
line-height: 1.5;
482468
}
483-
484-
/* Chat Input Warning Alerts */
485-
.chat-input-area .ant-alert {
486-
border-radius: 6px;
487-
}
488-
489-
.chat-input-area .ant-alert-warning {
490-
background: #fff7e6;
491-
border-color: #ffd591;
492-
}
493-
494-
.chat-input-area .ant-alert-info {
495-
background: #e6f7ff;
496-
border-color: #91d5ff;
497-
}
498-
499-
/* Disabled input styling */
500-
.chat-input-container .ant-input[disabled] {
501-
background: #f5f5f5;
502-
border-color: #d9d9d9;
503-
color: #bfbfbf;
504-
cursor: not-allowed;
505-
}

0 commit comments

Comments
 (0)