<commit_before>import { Component, OnInit, EventEmitter } from '@angular/core';
import { Channel } from 'models';
import { ChannelService } from 'services';
import { ActivatedRoute } from '@angular/router';

@Component({
    selector: 'social-app',
    templateUrl: 'social-app.html'
})
export class SocialAppComponent implements OnInit {
    channels: Channel[] = [];
    
    constructor(
        private channelService: ChannelService,
        private route: ActivatedRoute
    ) {
    }

    async ngOnInit() { 
        this.channels = await this.channelService.getAll();<commit_msg>Get the first channel<commit_after>import { Component, OnInit, EventEmitter } from '@angular/core';
import { Channel } from 'models';
import { ChannelService } from 'services';
import { ActivatedRoute } from '@angular/router';
import { Router } from '@angular/router';

@Component({
    selector: 'social-app',
    templateUrl: 'social-app.html'
})
export class SocialAppComponent implements OnInit {
    channels: Channel[] = [];
    
    constructor(
        private channelService: ChannelService,
        private route: ActivatedRoute,
        private router : Router
    ) {
    }

    async ngOnInit() {
        this.channels = await this.channelService.getAll();
        // Redirect toward the first channel
        if (this.channels[0] != undefined) this.router.navigate(['channel/' + this.channels[0].id]);
{'fraction_non_alphanumeric': 0.12196861626248216, 'fraction_numerical': 0.0014265335235378032, 'mean_word_length': 3.5112540192926045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '517533', 'n_tokens_mistral': 377, 'n_tokens_neox': 375, 'n_words': 103}