<commit_before>({
	doInit : function(component, event, helper) {


		//Fetch the insight list from the Apex controller
		helper.getInsightList(component);

	},

	postScript: function(component, event, helper) {


	},

	insightsChanged : function (component, event, helper) {
		console.log('POST Insights CHANGED');
		var count_event = $A.get("e.c:InsightCountEvent");
		var insights = component.get("v.insights");
		var count = insights.length;
		count_event.setParams({"count": count});
		count_event.fire();
	},

	openModal : function(component, event, helper) {
		$A.createComponent(
			"c:InsightModal",
			{<commit_msg>fire select event on list load<commit_after>({
	doInit : function(component, event, helper) {
		//Fetch the insight list from the Apex controller
		helper.getInsightList(component);

	},

	postScript: function(component, event, helper) {

	},

	insightsChanged : function (component, event, helper) {
		console.log('POST Insights CHANGED');
		var count_event = $A.get("e.c:InsightCountEvent");
		var insights = component.get("v.insights");
		var count = insights.length;
		count_event.setParams({"count": count});
		count_event.fire();

		if (insights.length > 0) {
			_.defer( function () {
				var selectEvent = $A.get("e.c:InsightEvent");
				selectEvent.setParams({ "insight": insights[0] });
				selectEvent.fire();
			});
		}

	},

	openModal : function(component, event, helper) {
		$A.createComponent(
			"c:InsightModal",
			{
{'fraction_non_alphanumeric': 0.1487320082248115, 'fraction_numerical': 0.0013708019191226869, 'mean_word_length': 4.4275092936802976, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 4, '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': '5628587', 'n_tokens_mistral': 528, 'n_tokens_neox': 469, 'n_words': 105}