Skip to content

Commit e950bcd

Browse files
committed
more work
1 parent acdf4ba commit e950bcd

4 files changed

Lines changed: 761 additions & 508 deletions

File tree

commands/coldbox/ai/install.cfc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ component extends="coldbox-cli.models.BaseAICommand" {
8787
print.indentedLine( " • #agent#" );
8888
} );
8989

90-
// If only 1 agent, show it was set as active
91-
if ( result.agents.len() == 1 ) {
92-
printSuccess( " ✓ Automatically set as active agent" );
93-
}
9490
print.line();
9591

9692
// Show MCP servers

commands/coldbox/ai/skills/find.cfc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

models/BaseCommand.cfc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,41 +122,47 @@ component accessors="true" {
122122
.green1onDodgerBlue2( " INFO " )
123123
.line( " #arguments.message#" )
124124
.line()
125+
.toConsole()
125126
}
126127

127128
function printError( required message ){
128129
variables.print
129130
.whiteOnRed2( " ERROR " )
130131
.line( " #arguments.message#" )
131132
.line()
133+
.toConsole()
132134
}
133135

134136
function printWarn( required message ){
135137
variables.print
136138
.blackOnWheat1( " WARN " )
137139
.line( " #arguments.message#" )
138140
.line()
141+
.toConsole()
139142
}
140143

141144
function printSuccess( required message ){
142145
variables.print
143146
.blackOnSeaGreen2( " SUCCESS " )
144147
.line( " #arguments.message#" )
145148
.line()
149+
.toConsole()
146150
}
147151

148152
function printTip( required string message ){
149153
variables.print
150154
.blackOnAquamarine2( " TIP " )
151155
.line( " #arguments.message#" )
152156
.line()
157+
.toConsole()
153158
}
154159

155160
function printHelp( required message ){
156161
variables.print
157162
.blackOnLightSkyBlue1( " HELP " )
158163
.line( " #arguments.message#" )
159164
.line()
165+
.toConsole()
160166
}
161167

162168
function toBoxLangClass( required content ){
@@ -297,7 +303,7 @@ component accessors="true" {
297303
)
298304
}
299305

300-
variables.print.line()
306+
variables.print.line().toConsole()
301307
}
302308

303309
}

0 commit comments

Comments
 (0)