@@ -68,7 +68,7 @@ component extends="coldbox-cli.models.BaseAICommand" {
6868 // Filter by query (name or description)
6969 if ( arguments .query .len () ) {
7070 allSkills = allSkills .filter ( ( s ) = > {
71- var q = lcase ( arguments . query )
71+ var q = lcase ( query )
7272 return lcase ( s .name ?: " " ).findNoCase ( q ) ||
7373 lcase ( s .description ?: " " ).findNoCase ( q ) ||
7474 lcase ( s .category ?: " " ).findNoCase ( q )
@@ -89,30 +89,29 @@ component extends="coldbox-cli.models.BaseAICommand" {
8989
9090 // Group by category for display
9191 var grouped = {}
92- allSkills .sortBy ( " category " ). each ( ( s ) = > {
93- var cat = s .category ?: " other"
92+ allSkills .each ( ( s ) = > {
93+ var cat = s ? .category ?: " other"
9494 if ( ! grouped .keyExists ( cat ) ) grouped [ cat ] = []
9595 grouped [ cat ].append ( s )
9696 } )
9797
9898 var totalCount = allSkills .len ()
99- printInfo ( " Found #totalCount # skill(s):" )
99+ printInfo ( " Found [ #totalCount #] skill(s):" )
100100 print .line ()
101101
102102 var tableData = []
103103 for ( var cat in grouped ) {
104104 grouped [ cat ].each ( ( s ) = > {
105105 tableData .append ( [
106106 s .name ?: " " ,
107- s .category ?: " " ,
108107 s .ownerRepo ?: " " ,
109108 left ( s .description ?: " " , 60 )
110109 ] )
111110 } )
112111 }
113112
114113 print .table (
115- headers = [ " Name" , " Category " , " Owner/ Repo" , " Description" ],
114+ headerNames = [ " Name" , " Repo" , " Description" ],
116115 data = tableData
117116 )
118117
0 commit comments