@@ -8,15 +8,15 @@ import makeWASocket, {
88} from "@whiskeysockets/baileys" ;
99import chalk from "chalk" ;
1010import qrcode from "qrcode-terminal" ;
11+ import type { MCPServerEntry } from "../../shared/types" ;
1112import { setApiKey , setBotToken } from "../../utils/keychain" ;
13+ import { loadMCPServersCatalog , type MCPCatalogServer } from "../../utils/mcp-catalog-loader" ;
1214import {
1315 discoverHuggingFaceModels ,
1416 discoverOpenRouterModels ,
1517} from "../../utils/model-discovery-util" ;
1618import { loadModelsCatalog } from "../../utils/models-catalog-loader" ;
17- import { loadMCPServersCatalog , type MCPCatalogServer } from "../../utils/mcp-catalog-loader" ;
1819import { showCenteredList , showCenteredInput , showCenteredConfirm } from "../tui" ;
19- import type { MCPServerEntry } from "../../shared/types" ;
2020
2121const CONFIG_DIR = path . join ( os . homedir ( ) , ".txtcode" ) ;
2222const CONFIG_FILE = path . join ( CONFIG_DIR , "config.json" ) ;
@@ -907,7 +907,9 @@ async function configureMCPServers(): Promise<MCPServerEntry[]> {
907907
908908 console . log ( chalk . cyan ( "MCP Servers (optional)" ) ) ;
909909 console . log ( ) ;
910- console . log ( chalk . gray ( "Connect external tools to your AI provider (GitHub, databases, cloud, etc.)" ) ) ;
910+ console . log (
911+ chalk . gray ( "Connect external tools to your AI provider (GitHub, databases, cloud, etc.)" ) ,
912+ ) ;
911913 console . log ( ) ;
912914
913915 const categoryNames = catalog . categories as Record < string , string > ;
@@ -951,17 +953,22 @@ async function configureMCPServers(): Promise<MCPServerEntry[]> {
951953 }
952954
953955 const selected = await showCenteredList ( {
954- message : selectedServers . length > 0
955- ? `Add another MCP server: (Use arrow keys)`
956- : `Select MCP server to connect: (Use arrow keys)` ,
956+ message :
957+ selectedServers . length > 0
958+ ? `Add another MCP server: (Use arrow keys)`
959+ : `Select MCP server to connect: (Use arrow keys)` ,
957960 choices,
958961 pageSize : 10 ,
959962 } ) ;
960963
961964 if ( selected === "__SKIP__" ) {
962965 if ( selectedServers . length === 0 ) {
963966 console . log ( ) ;
964- console . log ( chalk . gray ( "You can configure MCP servers anytime from 'txtcode config' → 'Manage MCP Servers'." ) ) ;
967+ console . log (
968+ chalk . gray (
969+ "You can configure MCP servers anytime from 'txtcode config' → 'Manage MCP Servers'." ,
970+ ) ,
971+ ) ;
965972 console . log ( ) ;
966973 }
967974 continueSelecting = false ;
0 commit comments