File tree Expand file tree Collapse file tree
core/lib/remote-telemetry Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88} from "bailian-cli-core" ;
99import { failIfMissing } from "../../output/prompt.ts" ;
1010import { emitResult } from "../../output/output.ts" ;
11+ import { ensureApiKey } from "../../utils/ensure-key.ts" ;
1112
1213function parseArgFlags ( raw : string [ ] ) : Record < string , unknown > {
1314 const out : Record < string , unknown > = { } ;
@@ -106,6 +107,7 @@ export default defineCommand({
106107 return ;
107108 }
108109
110+ await ensureApiKey ( config ) ;
109111 const client = new McpClient ( config , url ) ;
110112 await client . initialize ( ) ;
111113 const result = await client . callTool ( toolName , toolArgs ) ;
Original file line number Diff line number Diff line change 88} from "bailian-cli-core" ;
99import { failIfMissing } from "../../output/prompt.ts" ;
1010import { emitResult } from "../../output/output.ts" ;
11+ import { ensureApiKey } from "../../utils/ensure-key.ts" ;
1112
1213export default defineCommand ( {
1314 name : "mcp tools" ,
@@ -40,6 +41,7 @@ export default defineCommand({
4041 return ;
4142 }
4243
44+ await ensureApiKey ( config ) ;
4345 const client = new McpClient ( config , url ) ;
4446 await client . initialize ( ) ;
4547 const tools = await client . listTools ( ) ;
Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ const NO_AUTH_SETUP = [
6060 [ "app" , "list" ] ,
6161 [ "console" , "call" ] ,
6262 [ "usage" , "free" ] ,
63+ [ "mcp" , "list" ] ,
64+ [ "mcp" , "tools" ] ,
65+ [ "mcp" , "call" ] ,
6366] ;
6467
6568async function main ( ) {
Original file line number Diff line number Diff line change @@ -1129,9 +1129,7 @@ module.exports = (function (e) {
11291129 method : "POST" ,
11301130 keepalive : true ,
11311131 body : JSON . stringify ( { gokey : encodeURIComponent ( e ) , gmkey : "EXP" } ) ,
1132- } ) . catch ( function ( e ) {
1133- console . warn ( "send fail" , e ) ;
1134- } )
1132+ } ) . catch ( function ( ) { } )
11351133 ) ;
11361134 } )
11371135 . catch ( function ( t ) {
You can’t perform that action at this time.
0 commit comments