MCPcopy
hub / github.com/callumalpass/tasknotes / archiveTask

Method archiveTask

src/api/TaskNotesAPI.ts:1999–2013  ·  view source on GitHub ↗
(
		path: string,
		archived: boolean,
		context?: TaskNotesMutationContext
	)

Source from the content-addressed store, hash-verified

1997 }
1998
1999 async archiveTask(
2000 path: string,
2001 archived: boolean,
2002 context?: TaskNotesMutationContext
2003 ): Promise<TaskInfo> {
2004 const task = await this.requireTask(path);
2005 if (task.archived === archived) {
2006 return copyTaskInfo(task);
2007 }
2008
2009 const updatedTask = await this.withMutationContext([task.path], context, () =>
2010 this.plugin.taskService.toggleArchive(task)
2011 );
2012 return copyTaskInfo(updatedTask);
2013 }
2014
2015 async moveTask(
2016 path: string,

Callers 1

TaskNotesAPIClass · 0.95

Calls 4

requireTaskMethod · 0.95
withMutationContextMethod · 0.95
copyTaskInfoFunction · 0.85
toggleArchiveMethod · 0.45

Tested by

no test coverage detected