export const formatTransportLabel = (mode) => {
    return mode === 'stdio' ? 'STDIO process' : 'HTTP(S) streaming';
};
export const formatConnectionTarget = (options) => {
    if (!options) {
        return 'Not configured';
    }
    if (options.transportMode === 'stdio') {
        const stdioLike = options.stdio ?? options.stdioConfig;
        const command = stdioLike?.command?.trim() ?? '';
        const args = Array.isArray(stdioLike?.args) ? stdioLike?.args.join(' ') : '';
        const summary = [command, args].filter((segment) => segment.length > 0).join(' ').trim();
        return summary.length > 0 ? summary : 'Local STDIO process';
    }
    const url = options.url?.trim();
    return url && url.length > 0 ? url : 'No endpoint configured';
};
