File tree Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,11 @@ describe('pickFromColumnLikes', () => {
4949 expect ( mockedQuickPickValue ) . toHaveBeenCalledWith (
5050 [
5151 {
52- description : epochsParamPath ,
53- label : 'epochs' ,
52+ label : epochsParamPath ,
5453 value : epochsParam
5554 } ,
5655 {
57- description : paramsYamlPath ,
58- label : paramsYaml ,
56+ label : paramsYamlPath ,
5957 value : paramsYamlParam
6058 }
6159 ] ,
Original file line number Diff line number Diff line change @@ -13,12 +13,22 @@ export const pickFromColumnLikes = (
1313 if ( ! definedAndNonEmpty ( columnLikes ) ) {
1414 return Toast . showError ( 'There are no columns to select from.' )
1515 }
16- return quickPickValue < ColumnLike > (
17- columnLikes . map ( columnLike => ( {
18- description : columnLike . path ,
19- label : columnLike . label ,
16+
17+ const items = [ ]
18+ for ( const columnLike of columnLikes ) {
19+ if ( columnLike . path === 'starred' ) {
20+ items . push ( {
21+ description : columnLike . path ,
22+ label : columnLike . label ,
23+ value : columnLike
24+ } )
25+ continue
26+ }
27+ items . push ( {
28+ label : columnLike . path ,
2029 value : columnLike
21- } ) ) ,
22- quickPickOptions
23- )
30+ } )
31+ }
32+
33+ return quickPickValue < ColumnLike > ( items , quickPickOptions )
2434}
Original file line number Diff line number Diff line change @@ -231,18 +231,15 @@ describe('pickMetricAndParam', () => {
231231 1 ,
232232 [
233233 {
234- description : 'metrics:summary.json:loss' ,
235- label : 'loss' ,
234+ label : 'metrics:summary.json:loss' ,
236235 value : { label : 'loss' , path : 'metrics:summary.json:loss' }
237236 } ,
238237 {
239- description : 'metrics:summary.json:accuracy' ,
240- label : 'accuracy' ,
238+ label : 'metrics:summary.json:accuracy' ,
241239 value : { label : 'accuracy' , path : 'metrics:summary.json:accuracy' }
242240 } ,
243241 {
244- description : 'metrics:summary.json:val_loss' ,
245- label : 'val_loss' ,
242+ label : 'metrics:summary.json:val_loss' ,
246243 value : { label : 'val_loss' , path : 'metrics:summary.json:val_loss' }
247244 }
248245 ] ,
@@ -254,8 +251,7 @@ describe('pickMetricAndParam', () => {
254251 2 ,
255252 [
256253 {
257- description : 'params:params.yaml:epochs' ,
258- label : 'epochs' ,
254+ label : 'params:params.yaml:epochs' ,
259255 value : { label : 'epochs' , path : 'params:params.yaml:epochs' }
260256 }
261257 ] ,
You can’t perform that action at this time.
0 commit comments