Skip to content

Commit faa957d

Browse files
committed
refactor: complete Wave AI widget remake
- Overhaul chat interface with improved message containers and styling - Enhance responsive layout for better space utilization - Redesign typing indicator with new animation and visual appearance - Add message actions for copy, edit, and repeat functionality
1 parent 639086b commit faa957d

File tree

4 files changed

+646
-153
lines changed

4 files changed

+646
-153
lines changed
+33-25
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,54 @@
11
// Copyright 2024, Command Line Inc.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
$dot-width: 11px;
5-
$dot-color: var(--success-color);
6-
$speed: 1.5s;
4+
.typing-indicator {
5+
display: inline-flex;
6+
align-items: center;
7+
gap: 8px;
8+
margin: 0;
9+
padding: 0;
710

8-
.typing {
9-
position: relative;
10-
height: $dot-width;
11+
&-bubble {
12+
display: flex;
13+
align-items: center;
14+
justify-content: center;
15+
background-color: rgba(from var(--accent-color) r g b / 0.1);
16+
border-radius: 20px;
17+
padding: 6px 12px;
18+
gap: 4px;
19+
}
1120

12-
span {
13-
content: "";
14-
animation: blink $speed infinite;
15-
animation-fill-mode: both;
16-
height: $dot-width;
17-
width: $dot-width;
18-
background: $dot-color;
19-
position: absolute;
20-
left: 0;
21-
top: 0;
21+
&-dot {
22+
width: 6px;
23+
height: 6px;
2224
border-radius: 50%;
25+
background-color: var(--accent-color);
26+
opacity: 0.7;
27+
28+
&:nth-child(1) {
29+
animation: typing-animation 1.4s infinite ease-in-out;
30+
animation-delay: 0s;
31+
}
2332

2433
&:nth-child(2) {
34+
animation: typing-animation 1.4s infinite ease-in-out;
2535
animation-delay: 0.2s;
26-
margin-left: $dot-width * 1.5;
2736
}
2837

2938
&:nth-child(3) {
39+
animation: typing-animation 1.4s infinite ease-in-out;
3040
animation-delay: 0.4s;
31-
margin-left: $dot-width * 3;
3241
}
3342
}
3443
}
3544

36-
@keyframes blink {
37-
0% {
38-
opacity: 0.1;
45+
@keyframes typing-animation {
46+
0%,
47+
100% {
48+
transform: translateY(0);
3949
}
40-
20% {
50+
50% {
51+
transform: translateY(-5px);
4152
opacity: 1;
4253
}
43-
100% {
44-
opacity: 0.1;
45-
}
4654
}

frontend/app/element/typingindicator.tsx

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
// Copyright 2025, Command Line Inc.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import { clsx } from "clsx";
5-
4+
import React from "react";
65
import "./typingindicator.scss";
76

8-
type TypingIndicatorProps = {
7+
export interface TypingIndicatorProps {
8+
style?: React.CSSProperties;
99
className?: string;
10-
};
11-
const TypingIndicator = ({ className }: TypingIndicatorProps) => {
10+
}
11+
12+
export const TypingIndicator: React.FC<TypingIndicatorProps> = ({ style, className }) => {
1213
return (
13-
<div className={clsx("typing", className)}>
14-
<span></span>
15-
<span></span>
16-
<span></span>
14+
<div className={`typing-indicator ${className || ""}`} style={style}>
15+
<div className="typing-indicator-bubble">
16+
<div className="typing-indicator-dot"></div>
17+
<div className="typing-indicator-dot"></div>
18+
<div className="typing-indicator-dot"></div>
19+
</div>
1720
</div>
1821
);
1922
};
20-
21-
export { TypingIndicator };

0 commit comments

Comments
 (0)