by aarong11 · 3y ago · 0 comments
They couldn't have released this at a better time, I have about 30 plugins and i'd say it manages to get the right one about 90% of the time as opposed to about 70 with my hacked together version (but I guess I wrote it and know what to say so maybe that's a bit skewed)
@Tool
def add_todo(title, project=None) -> str:
"""
Add a new TODO.
Args:
title (str): A brief description of the task
project (str, optional): A project to add the todo to, if requested
"""
logger.debug(f"Adding task: {title}")
task = Task(tw, description=title, project=project)
task.save()
return f"Added [ {title} ] to the { project + ' ' if project else '' }TODO list."