<commit_before>import UUID from 'uuid-js';

const initialState = {
    ['h4rdc0d3d']: {
      draft: 'Hey, I just wanted to check in if ',
      messages: [0, 1]    // <-- access 'last' sent message (first in the Array) for sorting the conversation
    },
    ['h4rdc0d3d2']: {
      draft: '',
      messages: [0]
    }
}

const actionsMap = {
	addMessage(state, action) {
		// console.log('conversation action -->',action);
		// console.log('conversation state  -->',state);
		return {
			// here I need to add the message to the conversation
			// action.conversation[]\
		}
	}
}

export default (state = initialState, action) => {

	// map the "action.type" to an action within the "actionsMap" and create reduceFn
	const reduceFn = actionsMap[action.type];
 	// console.log('conversation reducer', state)
	// return the original state if "action.type" doesn't map to any action
	if (!reduceFn) return state;	
<commit_msg>change the conversation reducer function name<commit_after>import UUID from 'uuid-js';

const initialState = {
    ['h4rdc0d3d']: {
      draft: 'Hey, I just wanted to check in if ',
      messages: [0, 1]    // <-- access 'last' sent message (first in the Array) for sorting the conversation
    },
    ['h4rdc0d3d2']: {
      draft: '',
      messages: [0]
    }
}

const actionsMap = {
	addMessageKeyToTheConversation(state, action) {
		// console.log('conversation action -->',action);
		// console.log('conversation state  -->',state);
		return {
			// here I need to add the message to the conversation
			// action.conversation[]\
		}
	}
}

export default (state = initialState, action) => {

	// map the "action.type" to an action within the "actionsMap" and create reduceFn
	const reduceFn = actionsMap[action.type];
 	// console.log('conversation reducer', state)
	// return the original state if "action.type" doesn't map to any action
	if (!reduceFn) return state;	

{'fraction_non_alphanumeric': 0.13550420168067226, 'fraction_numerical': 0.01050420168067227, 'mean_word_length': 3.1593886462882095, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '4796379', 'n_tokens_mistral': 622, 'n_tokens_neox': 595, 'n_words': 195}