feat(chat): enhance chat interface with markdown support

- Add markdown rendering with react-markdown and remark-gfm
- Create ChatMessage component with code copy functionality
- Add typing indicator animation during AI response
- Create welcome screen for new users
- Add Textarea component for multi-line input
- Improve message styling with avatars and hover actions
- Add Gateway connection status awareness
- Add prose styling for markdown content
This commit is contained in:
Haze
2026-02-05 23:43:02 +08:00
Unverified
parent bad94e7e76
commit 727869f2b8
7 changed files with 1418 additions and 94 deletions

View File

@@ -95,3 +95,66 @@
.focus-ring {
@apply focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2;
}
/* Prose styling for markdown */
.prose {
line-height: 1.6;
}
.prose p {
margin-bottom: 0.75em;
}
.prose p:last-child {
margin-bottom: 0;
}
.prose ul,
.prose ol {
margin-top: 0.5em;
margin-bottom: 0.5em;
padding-left: 1.5em;
}
.prose li {
margin-bottom: 0.25em;
}
.prose pre {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.prose blockquote {
border-left: 3px solid hsl(var(--border));
padding-left: 1em;
margin: 0.5em 0;
color: hsl(var(--muted-foreground));
}
.prose table {
width: 100%;
border-collapse: collapse;
margin: 0.5em 0;
}
.prose th,
.prose td {
border: 1px solid hsl(var(--border));
padding: 0.5em;
text-align: left;
}
.prose th {
background: hsl(var(--muted));
}
/* Typing indicator animation */
@keyframes bounce {
0%, 60%, 100% {
transform: translateY(0);
}
30% {
transform: translateY(-4px);
}
}