Skip to content

Commit d388a9c

Browse files
committed
💬 Redesign chat interface to match ChatGPT's subtle style
- Replace colorful gradients and chat bubbles with subtle gray alternation - User messages: darker gray background (#2c2e33) - Assistant messages: main background (#1a1b1e) - Full-width messages with subtle border separators - Increased font size (16px) and padding (24px) for better readability - Centered content with 800px max-width container - Remove floating message bubbles for seamless conversation flow - Professional, minimal design that's easy to scan and read ✨ Much cleaner, ChatGPT-inspired conversation interface
1 parent 6a97f78 commit d388a9c

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

src/index.ts

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,27 +1104,27 @@ export default {
11041104
const MessageComponent = ({ message }) => {
11051105
const getMessageStyle = (type) => {
11061106
const base = {
1107-
padding: '16px',
1108-
borderRadius: '12px',
1109-
marginBottom: '16px',
1110-
maxWidth: '85%',
1111-
lineHeight: '1.6'
1107+
padding: '24px',
1108+
marginBottom: '0',
1109+
maxWidth: '100%',
1110+
lineHeight: '1.6',
1111+
fontSize: '16px'
11121112
};
11131113
11141114
switch (type) {
11151115
case 'user':
11161116
return {
11171117
...base,
1118-
background: 'linear-gradient(135deg, #339af0 0%, #1c7ed6 100%)',
1119-
color: 'white',
1120-
marginLeft: 'auto'
1118+
background: '#2c2e33',
1119+
color: '#c1c2c5',
1120+
borderBottom: '1px solid #373a40'
11211121
};
11221122
case 'assistant':
11231123
return {
11241124
...base,
1125-
background: '#25262b',
1125+
background: '#1a1b1e',
11261126
color: '#c1c2c5',
1127-
border: '1px solid #373a40'
1127+
borderBottom: '1px solid #373a40'
11281128
};
11291129
case 'system':
11301130
return {
@@ -1134,22 +1134,27 @@ export default {
11341134
border: '1px solid #339af0',
11351135
fontStyle: 'italic',
11361136
textAlign: 'center',
1137-
maxWidth: '100%'
1137+
borderRadius: '12px',
1138+
margin: '16px 0'
11381139
};
11391140
case 'thinking':
11401141
return {
11411142
...base,
11421143
background: '#2d1e00',
11431144
color: '#ffd43b',
11441145
border: '1px solid #fab005',
1145-
fontStyle: 'italic'
1146+
fontStyle: 'italic',
1147+
borderRadius: '8px',
1148+
margin: '16px 0'
11461149
};
11471150
case 'error':
11481151
return {
11491152
...base,
11501153
background: '#2d0e0e',
11511154
color: '#ff6b6b',
1152-
border: '1px solid #e03131'
1155+
border: '1px solid #e03131',
1156+
borderRadius: '8px',
1157+
margin: '16px 0'
11531158
};
11541159
default:
11551160
return base;
@@ -1186,11 +1191,17 @@ export default {
11861191
11871192
return (
11881193
<div style={getMessageStyle(message.type)}>
1189-
{message.type === 'assistant' ? (
1190-
<div dangerouslySetInnerHTML={renderContent(message.content, message.type)} />
1191-
) : (
1192-
renderContent(message.content, message.type)
1193-
)}
1194+
<div style={{
1195+
maxWidth: '800px',
1196+
margin: '0 auto',
1197+
width: '100%'
1198+
}}>
1199+
{message.type === 'assistant' ? (
1200+
<div dangerouslySetInnerHTML={renderContent(message.content, message.type)} />
1201+
) : (
1202+
renderContent(message.content, message.type)
1203+
)}
1204+
</div>
11941205
</div>
11951206
);
11961207
};

0 commit comments

Comments
 (0)