<commit_before>import Commandant
import Foundation
import TaskManagement
import Result

struct AddCommand: CommandProtocol {
  let verb = "add"
  let function = "Create a new task"

  func run(_ options: Options) -> Result<Void, String> {
    return Result {
      var manager = try TaskManager()
      let task = try manager.add(title: options.title)
      print(task)
    }
  }

  struct Options: OptionsProtocol {
    let title: String
<commit_msg>require title for new tasks<commit_after>import Commandant
import Foundation
import TaskManagement
import Result

struct AddCommand: CommandProtocol {
  let verb = "add"
  let function = "Create a new task"

  func run(_ options: Options) -> Result<Void, String> {
    return Result {
      guard !options.title.isEmpty
        else { throw "Provide a non-empty title for the task" }
      var manager = try TaskManager()
      let task = try manager.add(title: options.title)
      print(task)
    }
  }

  struct Options: OptionsProtocol {
    let title: String

{'fraction_non_alphanumeric': 0.08078817733990148, 'fraction_numerical': 0.0, 'mean_word_length': 3.2869198312236287, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1657610', 'n_tokens_mistral': 282, 'n_tokens_neox': 279, 'n_words': 103}