forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskExtractionScene.tsx
More file actions
253 lines (238 loc) · 7.03 KB
/
Copy pathTaskExtractionScene.tsx
File metadata and controls
253 lines (238 loc) · 7.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
import {
AbsoluteFill,
interpolate,
spring,
useCurrentFrame,
useVideoConfig,
} from "remotion";
const TaskItem: React.FC<{
text: string;
source: string;
priority: "high" | "medium" | "low";
delay: number;
}> = ({ text, source, priority, delay }) => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const entrance = spring({
frame,
fps,
delay,
config: { damping: 15 },
});
const x = interpolate(entrance, [0, 1], [-50, 0]);
const opacity = interpolate(entrance, [0, 1], [0, 1]);
// Checkbox animation
const checkDelay = delay + Math.round(0.6 * fps);
const checkProgress = spring({
frame,
fps,
delay: checkDelay,
config: { damping: 12 },
});
const priorityColors = {
high: "#ef4444",
medium: "#f59e0b",
low: "#22c55e",
};
return (
<div
style={{
opacity,
transform: `translateX(${x}px)`,
background: "rgba(30, 30, 46, 0.8)",
borderRadius: 8,
padding: 10,
border: "1px solid rgba(99, 102, 241, 0.1)",
display: "flex",
alignItems: "center",
gap: 8,
}}
>
{/* Checkbox */}
<div
style={{
width: 16,
height: 16,
borderRadius: 4,
border: `2px solid ${checkProgress > 0.5 ? "#6366f1" : "#4b5563"}`,
background: checkProgress > 0.5 ? "#6366f1" : "transparent",
display: "flex",
alignItems: "center",
justifyContent: "center",
flexShrink: 0,
transition: "none",
}}
>
{checkProgress > 0.5 && (
<span style={{ color: "white", fontSize: 10, fontWeight: 700 }}>✓</span>
)}
</div>
<div style={{ flex: 1 }}>
<div
style={{
color: checkProgress > 0.5 ? "#6b7280" : "white",
fontSize: 10,
fontWeight: 500,
textDecoration: checkProgress > 0.5 ? "line-through" : "none",
}}
>
{text}
</div>
<div style={{ display: "flex", alignItems: "center", gap: 5, marginTop: 2 }}>
<span style={{ color: "#6b7280", fontSize: 8 }}>from: {source}</span>
<div
style={{
width: 4,
height: 4,
borderRadius: "50%",
background: priorityColors[priority],
}}
/>
<span style={{ color: priorityColors[priority], fontSize: 8, fontWeight: 500 }}>{priority}</span>
</div>
</div>
</div>
);
};
export const TaskExtractionScene: React.FC = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const headerOpacity = interpolate(frame, [0, 0.3 * fps], [0, 1], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
});
// Animated connection lines
const lineProgress = interpolate(frame, [0.3 * fps, 1.5 * fps], [0, 1], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
});
return (
<AbsoluteFill
style={{
background: "linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%)",
fontFamily: "Inter, sans-serif",
}}
>
{/* Section label */}
<div
style={{
position: "absolute",
top: 20,
left: 30,
display: "flex",
alignItems: "center",
gap: 6,
opacity: headerOpacity,
}}
>
<div
style={{
width: 6,
height: 6,
borderRadius: "50%",
background: "#f59e0b",
boxShadow: "0 0 8px rgba(245, 158, 11, 0.5)",
}}
/>
<span style={{ color: "#6366f1", fontSize: 10, fontWeight: 600, letterSpacing: 1.5, textTransform: "uppercase" }}>
Task Extraction
</span>
</div>
<div style={{ display: "flex", height: "100%", alignItems: "center", padding: "0 30px", gap: 20, marginTop: 10 }}>
{/* Conversation snippet */}
<div
style={{
flex: 1,
opacity: headerOpacity,
}}
>
<h2 style={{ color: "white", fontSize: 20, fontWeight: 800, margin: 0, letterSpacing: -0.5, marginBottom: 10 }}>
Conversations
<br />
<span style={{ color: "#f59e0b" }}>become tasks</span>
</h2>
{/* Conversation bubble */}
<div
style={{
background: "rgba(30, 30, 46, 0.8)",
borderRadius: 10,
padding: 12,
border: "1px solid rgba(99, 102, 241, 0.15)",
}}
>
<div style={{ color: "#6b7280", fontSize: 8, marginBottom: 6 }}>Team Standup — 10:32 AM</div>
<p style={{ color: "#d1d5db", fontSize: 9, lineHeight: 1.6, margin: 0 }}>
"...so we need to <span style={{ color: "#f59e0b", fontWeight: 600 }}>update the API docs</span> before the release.
Also, <span style={{ color: "#f59e0b", fontWeight: 600 }}>Mike should review the PR</span> by end of day, and
someone needs to <span style={{ color: "#f59e0b", fontWeight: 600 }}>set up the staging environment</span> for QA."
</p>
</div>
{/* Arrow / connection */}
<div
style={{
display: "flex",
justifyContent: "center",
padding: "6px 0",
opacity: lineProgress,
}}
>
<svg width="24" height="24" viewBox="0 0 40 40">
<path
d="M20 5 L20 30 M12 22 L20 30 L28 22"
stroke="#6366f1"
strokeWidth="2"
fill="none"
strokeDasharray={`${lineProgress * 50}`}
strokeLinecap="round"
/>
</svg>
</div>
</div>
{/* Extracted tasks */}
<div
style={{
flex: 1,
display: "flex",
flexDirection: "column",
gap: 8,
}}
>
<div
style={{
color: "#6b7280",
fontSize: 9,
fontWeight: 600,
textTransform: "uppercase",
letterSpacing: 1,
marginBottom: 2,
opacity: interpolate(frame, [0.8 * fps, 1 * fps], [0, 1], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
}),
}}
>
Auto-extracted Tasks
</div>
<TaskItem
text="Update API docs before release"
source="Sarah, standup"
priority="high"
delay={Math.round(1 * fps)}
/>
<TaskItem
text="Review PR (assigned: Mike)"
source="Sarah, standup"
priority="high"
delay={Math.round(1.4 * fps)}
/>
<TaskItem
text="Set up staging environment for QA"
source="Sarah, standup"
priority="medium"
delay={Math.round(1.8 * fps)}
/>
</div>
</div>
</AbsoluteFill>
);
};