@@ -96,19 +96,24 @@ export const Presets: React.FC<Presets.Props> = (props) => {
9696 is_group : boolean
9797 } > ( )
9898
99- const ungrouped_selected_count = ( ( ) => {
100- let count = 0
99+ const { ungrouped_selected_count, ungrouped_preset_count } = ( ( ) => {
100+ let selected_count = 0
101+ let preset_count = 0
101102 if ( props . presets [ 0 ] ?. chatbot !== undefined ) {
102103 for ( const p of props . presets ) {
103104 if ( ! p . chatbot ) {
104105 break
105106 }
107+ preset_count ++
106108 if ( p . is_selected ) {
107- count ++
109+ selected_count ++
108110 }
109111 }
110112 }
111- return count
113+ return {
114+ ungrouped_selected_count : selected_count ,
115+ ungrouped_preset_count : preset_count
116+ }
112117 } ) ( )
113118
114119 const pinned_presets = props . presets . filter ( ( p ) => p . is_pinned && p . chatbot )
@@ -510,8 +515,15 @@ export const Presets: React.FC<Presets.Props> = (props) => {
510515 < div className = { styles . presets__item__left__text } >
511516 < span > Ungrouped</ span >
512517 < span >
513- { ungrouped_selected_count > 0 &&
514- `${ ungrouped_selected_count } selected` }
518+ { `${ ungrouped_preset_count } ${
519+ ungrouped_preset_count === 1
520+ ? 'preset'
521+ : 'presets'
522+ } ${
523+ ungrouped_selected_count > 0
524+ ? ` · ${ ungrouped_selected_count } selected`
525+ : ''
526+ } `}
515527 </ span >
516528 </ div >
517529 </ div >
@@ -523,7 +535,7 @@ export const Presets: React.FC<Presets.Props> = (props) => {
523535 >
524536 < IconButton
525537 codicon_icon = "run-coverage"
526- title = "Run"
538+ title = "Run selected presets in this group "
527539 on_click = { ( e ) => {
528540 e . stopPropagation ( )
529541 props . on_group_click ( 'Ungrouped' )
@@ -626,6 +638,7 @@ export const Presets: React.FC<Presets.Props> = (props) => {
626638 )
627639
628640 if ( group_index !== - 1 ) {
641+ let preset_count = 0
629642 let selected_count = 0
630643 for (
631644 let i = group_index + 1 ;
@@ -636,13 +649,18 @@ export const Presets: React.FC<Presets.Props> = (props) => {
636649 if ( ! child_preset . chatbot ) {
637650 break
638651 }
652+ preset_count ++
639653 if ( child_preset . is_selected ) {
640654 selected_count ++
641655 }
642656 }
643- if ( selected_count > 0 ) {
644- return `${ selected_count } selected`
645- }
657+ return `${ preset_count } ${
658+ preset_count == 1 ? 'preset' : 'presets'
659+ } ${
660+ selected_count > 0
661+ ? ` · ${ selected_count } selected`
662+ : ''
663+ } `
646664 }
647665 return model || ''
648666 }
0 commit comments