@@ -4,10 +4,10 @@ import styles from './Progress.module.scss'
44type Props = {
55 progress_items : {
66 id : string
7- title : string
7+ status : string
8+ provider_name : string
89 tokens_per_second ?: number
910 total_tokens ?: number
10- provider_name : string
1111 model ?: string
1212 reasoning_effort ?: string
1313 } [ ]
@@ -26,62 +26,47 @@ export const Progress: React.FC<Props> = (props) => {
2626 const { start_times, now } = use_progress_times ( props . progress_items )
2727
2828 return (
29- < div
30- className = { styles . overlay }
31- onKeyDown = { ( e ) => {
32- if ( e . key == 'Escape' ) {
33- e . stopPropagation ( )
34- }
35- } }
36- >
37- < div className = { styles . container } >
38- < div className = { styles [ 'requests-container' ] } >
39- { props . progress_items . map ( ( item ) => {
40- const item_start_time = start_times [ item . id ]
41- const current_start_time = item_start_time || Date . now ( )
42- const elapsed_ms = now - current_start_time
29+ < div className = { styles . container } >
30+ { props . progress_items . map ( ( item ) => {
31+ const item_start_time = start_times [ item . id ]
32+ const current_start_time = item_start_time || Date . now ( )
33+ const elapsed_ms = now - current_start_time
4334
44- const description_parts = [ item . provider_name ]
45- if ( item . reasoning_effort ) {
46- description_parts . push ( item . reasoning_effort )
47- }
48- const description = description_parts . join ( ' · ' )
35+ const description_parts = [ item . provider_name ]
36+ if ( item . reasoning_effort ) {
37+ description_parts . push ( item . reasoning_effort )
38+ }
39+ const description = description_parts . join ( ' · ' )
4940
50- return (
51- < div key = { item . id } className = { styles . item } >
52- < div className = { styles . item__top } >
53- < div className = { styles . item__top__left } >
54- < span > { item . model } </ span >
55- < span > { description } </ span >
56- </ div >
57- < div className = { styles . item__close } >
58- < button
59- className = { styles . item__close__button }
60- onClick = { ( ) => props . on_cancel ( item . id ) }
61- />
62- </ div >
63- </ div >
64- < div className = { styles . item__bottom } >
65- < div className = { styles . item__bottom__status } >
66- { item . title }
67- </ div >
68- < div className = { styles . item__bottom__right } >
69- { item . tokens_per_second !== undefined && (
70- < div >
71- { format_tokens ( item . tokens_per_second ) } tokens/s
72- </ div >
73- ) }
74- { item . total_tokens !== undefined && (
75- < div > ({ format_tokens ( item . total_tokens ) } )</ div >
76- ) }
77- < div > { ( elapsed_ms / 1000 ) . toFixed ( 1 ) } s</ div >
78- </ div >
79- </ div >
41+ return (
42+ < div key = { item . id } className = { styles . item } >
43+ < div className = { styles . item__top } >
44+ < div className = { styles . item__top__left } >
45+ < span > { item . model } </ span >
46+ < span > { description } </ span >
47+ </ div >
48+ < div className = { styles . item__close } >
49+ < button
50+ className = { styles . item__close__button }
51+ onClick = { ( ) => props . on_cancel ( item . id ) }
52+ />
53+ </ div >
54+ </ div >
55+ < div className = { styles . item__bottom } >
56+ < div className = { styles . item__bottom__status } > { item . status } </ div >
57+ < div className = { styles . item__bottom__right } >
58+ { item . tokens_per_second !== undefined && (
59+ < div > { format_tokens ( item . tokens_per_second ) } tokens/s</ div >
60+ ) }
61+ { item . total_tokens !== undefined && (
62+ < div > ({ format_tokens ( item . total_tokens ) } )</ div >
63+ ) }
64+ < div > { ( elapsed_ms / 1000 ) . toFixed ( 1 ) } s</ div >
8065 </ div >
81- )
82- } ) }
83- </ div >
84- </ div >
66+ </ div >
67+ </ div >
68+ )
69+ } ) }
8570 </ div >
8671 )
8772}
0 commit comments