@@ -72,13 +72,7 @@ function AnimatedNumber({
7272 } , [ watchValue ] ) ;
7373
7474 return (
75- < span
76- style = { {
77- display : "inline-block" ,
78- transform : pulse ? "scale(1.1)" : "scale(1)" ,
79- transition : "transform 200ms ease" ,
80- } }
81- >
75+ < span className = { `sf-telemetry-animated-number ${ pulse ? "is-pulse" : "" } ` } >
8276 { display }
8377 </ span >
8478 ) ;
@@ -155,24 +149,13 @@ export function TelemetryPanel({ jobId, isDemo = false }: { jobId?: string; isDe
155149
156150 return (
157151 < aside
158- style = { {
159- position : "fixed" ,
160- right : "20px" ,
161- bottom : "20px" ,
162- width : "min(360px, calc(100vw - 32px))" ,
163- zIndex : 40 ,
164- background : "#12121b" ,
165- border : "1px solid #23232f" ,
166- borderRadius : "14px" ,
167- boxShadow : "0 14px 38px rgba(0, 0, 0, 0.45)" ,
168- padding : "16px" ,
169- } }
152+ className = "sf-telemetry-panel"
170153 >
171- < div style = { { fontSize : "15px" , fontWeight : 700 , marginBottom : "12px" , color : "#f0f0f5" } } >
154+ < div className = "sf-telemetry-title" >
172155 📊 This Run
173156 </ div >
174157
175- < div style = { { borderTop : "1px solid #23232f" , borderBottom : "1px solid #23232f" , padding : "12px 0" } } >
158+ < div className = "sf-telemetry-stats-wrap" >
176159 < StatRow
177160 label = "Total tokens"
178161 value = { < AnimatedNumber display = { formatInt ( telemetry . totalTokensUsed ) } watchValue = { telemetry . totalTokensUsed } /> }
@@ -196,34 +179,34 @@ export function TelemetryPanel({ jobId, isDemo = false }: { jobId?: string; isDe
196179 />
197180 </ div >
198181
199- < div style = { { marginTop : "12px" } } >
200- < div style = { { fontSize : "13px" , color : "#9898a8" , marginBottom : "10px" } } > Provider breakdown:</ div >
182+ < div className = "sf-telemetry-group" >
183+ < div className = "sf-telemetry-group-title" > Provider breakdown:</ div >
201184 { providerRows . length === 0 && (
202- < div style = { { fontSize : "12px" , color : "#6f6f84" } } > No provider calls yet</ div >
185+ < div className = "sf-telemetry-empty" > No provider calls yet</ div >
203186 ) }
204187 { providerRows . map ( ( row , index ) => (
205188 < ProviderRow
206189 key = { `provider-${ row . name } ` }
207190 name = { toDisplayName ( row . name ) }
208191 calls = { row . calls }
209192 ratio = { providerTotalCalls > 0 ? ( row . calls / providerTotalCalls ) * 100 : 0 }
210- color = { index % 2 === 0 ? "#3b82f6 " : "#a855f7 " }
193+ variant = { index % 2 === 0 ? "provider-a " : "provider-b " }
211194 />
212195 ) ) }
213196 </ div >
214197
215- < div style = { { marginTop : "10px" } } >
216- < div style = { { fontSize : "13px" , color : "#9898a8" , marginBottom : "10px" } } > Model breakdown:</ div >
198+ < div className = "sf-telemetry-group sf-telemetry-group-tight" >
199+ < div className = "sf-telemetry-group-title" > Model breakdown:</ div >
217200 { modelRows . length === 0 && (
218- < div style = { { fontSize : "12px" , color : "#6f6f84" } } > No model calls yet</ div >
201+ < div className = "sf-telemetry-empty" > No model calls yet</ div >
219202 ) }
220203 { modelRows . map ( ( row , index ) => (
221204 < ProviderRow
222205 key = { `model-${ row . name } ` }
223206 name = { row . name }
224207 calls = { row . calls }
225208 ratio = { modelTotalCalls > 0 ? ( row . calls / modelTotalCalls ) * 100 : 0 }
226- color = { index % 2 === 0 ? "#22c55e " : "#14b8a6 " }
209+ variant = { index % 2 === 0 ? "model-a " : "model-b " }
227210 />
228211 ) ) }
229212 </ div >
@@ -233,18 +216,9 @@ export function TelemetryPanel({ jobId, isDemo = false }: { jobId?: string; isDe
233216
234217function StatRow ( { label, value } : { label : string ; value : React . ReactNode } ) {
235218 return (
236- < div
237- style = { {
238- display : "flex" ,
239- alignItems : "center" ,
240- justifyContent : "space-between" ,
241- fontSize : "13px" ,
242- color : "#f0f0f5" ,
243- marginBottom : "7px" ,
244- } }
245- >
246- < span style = { { color : "#9898a8" } } > { label } </ span >
247- < strong style = { { fontWeight : 700 } } > { value } </ strong >
219+ < div className = "sf-telemetry-stat-row" >
220+ < span className = "sf-telemetry-stat-label" > { label } </ span >
221+ < strong className = "sf-telemetry-stat-value" > { value } </ strong >
248222 </ div >
249223 ) ;
250224}
@@ -253,31 +227,23 @@ function ProviderRow({
253227 name,
254228 calls,
255229 ratio,
256- color ,
230+ variant ,
257231} : {
258232 name : string ;
259233 calls : number ;
260234 ratio : number ;
261- color : string ;
235+ variant : "provider-a" | "provider-b" | "model-a" | "model-b" ;
262236} ) {
263237 return (
264- < div style = { { display : "grid" , gridTemplateColumns : "minmax(84px, 1fr) 2fr auto" , alignItems : "center" , gap : "8px" , marginBottom : "8px" } } >
238+ < div className = "sf-telemetry-provider-row" >
265239 < span
266240 title = { name }
267- style = { {
268- fontSize : "12px" ,
269- color : "#f0f0f5" ,
270- whiteSpace : "nowrap" ,
271- overflow : "hidden" ,
272- textOverflow : "ellipsis" ,
273- } }
241+ className = "sf-telemetry-provider-name"
274242 >
275243 { name }
276244 </ span >
277- < div style = { { background : "#1d1d2a" , borderRadius : "999px" , height : "10px" , overflow : "hidden" } } >
278- < div style = { { width : `${ ratio } %` , height : "100%" , transition : "width 300ms ease" , background : color } } />
279- </ div >
280- < span style = { { fontSize : "12px" , color : "#9898a8" , minWidth : "56px" , textAlign : "right" } } > { calls } calls</ span >
245+ < progress className = { `sf-telemetry-provider-progress is-${ variant } ` } max = { 100 } value = { ratio } />
246+ < span className = "sf-telemetry-provider-calls" > { calls } calls</ span >
281247 </ div >
282248 ) ;
283249}
0 commit comments