<commit_before>from conjureup import controllers
from conjureup.app_config import app
from conjureup.telemetry import track_screen
from conjureup.ui.views.addons import AddonsView
from conjureup.utils import setup_metadata_controller


class AddonsController:
    def __init__(self):
        self.view = AddonsView(self.finish, self.back)

    def render(self):
        if not app.addons:
            return self.finish()

        track_screen('Addons')
        self.view.show()

    def finish(self):
        app.selected_addons = self.view.selected
        if app.selected_addons:
            # reload the bundle data w/ addons merged
            setup_metadata_controller()
        controllers.use('clouds').render()<commit_msg>tracks addon selections<commit_after>from conjureup import controllers
from conjureup.app_config import app
from conjureup.telemetry import track_event, track_screen
from conjureup.ui.views.addons import AddonsView
from conjureup.utils import setup_metadata_controller


class AddonsController:
    def __init__(self):
        self.view = AddonsView(self.finish, self.back)

    def render(self):
        if not app.addons:
            return self.finish()

        track_screen('Addons')
        self.view.show()

    def finish(self):
        app.selected_addons = self.view.selected
        if app.selected_addons:
            for addon in app.selected_addons:
                track_event("Addon Selected", addon, "")
            # reload the bundle data w/ addons merged
            setup_metadata_controller()
        controllers.use('clouds').render()
{'fraction_non_alphanumeric': 0.0787153652392947, 'fraction_numerical': 0.0, 'mean_word_length': 2.9234567901234567, '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': '5431586', 'n_tokens_mistral': 455, 'n_tokens_neox': 438, 'n_words': 111}