Future<String?> createThread([List<Message>? messages]) async { final result = await _repository.createThread(messages); return result.fold( (l) => null, (r) => r.id, ); }