<commit_before>import { decrementIndex, incrementIndex, viewCommit } from '../redux/action-creators';
import { store } from '../redux/store';
import { IAction, IListElement } from '../types/types';
import { stash } from '../util/stash';
import { getListElement } from './interface-elements';
import { notifyInfo } from './notification';

let commitListElement: IListElement;

const NAV_INTERVAL: string = 'NAV_INTERVAL';

export function getCommitListElement(): IListElement {
	if (commitListElement) {
		return commitListElement;
	}

	commitListElement = getListElement({
		bottom: 0,
		left: 0,
		mouse: true,
		right: 0,
		style: {
			selected: {
				bg: '#555',
			},
		},
		top: 0,
	});

	function doUpdateIndex(action: (interval: number) => IAction) {
		let interval = 1;

		const intervalFromStash: number | undefined = stash.get(NAV_INTERVAL);

		if (intervalFromStash) {
			interval = intervalFromStash;
		}

		store.dispatch(action(interval));

		if (intervalFromStash) {
			stash.delete(NAV_INTERVAL);

			notifyInfo(`Movement interval reset.`);
		}

	}

	commitListElement.key('1234567890'.split(''), (keyName: string) => {
		let newInterval = keyName;

		const intervalFromStash: number | undefined = stash.get(NAV_INTERVAL);

		if (intervalFromStash) {<commit_msg>list-view.ts - SF<commit_after>import { decrementIndex, incrementIndex, viewCommit } from '../redux/action-creators';
import { store } from '../redux/store';
import { IAction, IListElement } from '../types/types';
import { stash } from '../util/stash';
import { getListElement } from './interface-elements';
import { notifyInfo } from './notification';

let commitListElement: IListElement;

const NAV_INTERVAL: string = 'NAV_INTERVAL';

export function getCommitListElement(): IListElement {
	if (commitListElement) {
		return commitListElement;
	}

	commitListElement = getListElement({
		bottom: 0,
		left: 0,
		mouse: true,
		right: 0,
		style: {
			selected: {
				bg: '#555',
			},
		},
		top: 0,
	});

	function doUpdateIndex(action: (interval: number) => IAction) {
		let interval = 1;

		const intervalFromStash: number | undefined = stash.get(NAV_INTERVAL);

		if (intervalFromStash) {
			interval = intervalFromStash;
		}

		store.dispatch(action(interval));

		if (intervalFromStash) {
			stash.delete(NAV_INTERVAL);

			notifyInfo(`Movement interval reset.`);
		}
	}

	commitListElement.key('1234567890'.split(''), (keyName: string) => {
		let newInterval = keyName;

		const intervalFromStash: number | undefined = stash.get(NAV_INTERVAL);

		if (intervalFromStash) {
{'fraction_non_alphanumeric': 0.13872606486908948, 'fraction_numerical': 0.01406799531066823, 'mean_word_length': 4.3222453222453225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '894116', 'n_tokens_mistral': 932, 'n_tokens_neox': 824, 'n_words': 191}