<commit_before>package todolist

import (
	"fmt"
	"regexp"
	"strconv"
	"time"
)

type App struct {
	TodoStore *FileStore
	TodoList  *TodoList
}

func NewApp() *App {
	app := &App{TodoList: &TodoList{}, TodoStore: NewFileStore()}
	return app
}

func (a *App) InitializeRepo() {
	a.TodoStore.Initialize()
}

func (a *App) AddTodo(input string) {
	a.Load()
	parser := &Parser{}
	todo := parser.ParseNewTodo(input)
	if todo == nil {
		fmt.Println("What to do?")
		return
	}

	a.TodoList.Add(todo)
	a.Save()
	fmt.Println("Todo added.")
}

func (a *App) DeleteTodo(input string) {
	a.Load()
	id := a.getId(input)
	if id != -1 {
		a.TodoList.Delete(id)
		a.Save()
		fmt.Println("Todo deleted.")
	} else {
		fmt.Println("Could not find id.")
	}
}

func (a *App) CompleteTodo(input string) {
	a.Load()<commit_msg>Provide a more helpful message<commit_after>package todolist

import (
	"fmt"
	"regexp"
	"strconv"
	"time"
)

type App struct {
	TodoStore *FileStore
	TodoList  *TodoList
}

func NewApp() *App {
	app := &App{TodoList: &TodoList{}, TodoStore: NewFileStore()}
	return app
}

func (a *App) InitializeRepo() {
	a.TodoStore.Initialize()
}

func (a *App) AddTodo(input string) {
	a.Load()
	parser := &Parser{}
	todo := parser.ParseNewTodo(input)
	if todo == nil {
		fmt.Println("I need more information. Try something like 'todo a chat with @bob due tom'")
		return
	}

	a.TodoList.Add(todo)
	a.Save()
	fmt.Println("Todo added.")
}

func (a *App) DeleteTodo(input string) {
	a.Load()
	id := a.getId(input)
	if id != -1 {
		a.TodoList.Delete(id)
		a.Save()
		fmt.Println("Todo deleted.")
	} else {
		fmt.Println("Could not find id.")
	}
}

func (a *App) CompleteTodo(input string) {
	a.Load()
{'fraction_non_alphanumeric': 0.16637063351095321, 'fraction_numerical': 0.0011841326228537595, 'mean_word_length': 3.8703170028818445, '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': '1150264', 'n_tokens_mistral': 720, 'n_tokens_neox': 712, 'n_words': 166}