MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / startPomodoro

Method startPomodoro

src/api/TaskNotesAPI.ts:2440–2449  ·  view source on GitHub ↗
(
		options?: PomodoroStartOptions,
		context?: TaskNotesMutationContext
	)

Source from the content-addressed store, hash-verified

2438 }
2439
2440 private async startPomodoro(
2441 options?: PomodoroStartOptions,
2442 context?: TaskNotesMutationContext
2443 ): Promise<PomodoroState> {
2444 const task = options?.taskPath ? await this.requireTask(options.taskPath) : undefined;
2445 await this.withMutationContext(task ? [task.path] : [], context, () =>
2446 this.plugin.pomodoroService.startPomodoro(task, options?.duration)
2447 );
2448 return this.copyPomodoroState(this.plugin.pomodoroService.getState());
2449 }
2450
2451 private async stopPomodoro(context?: TaskNotesMutationContext): Promise<PomodoroState> {
2452 await this.withMutationContext([], context, () =>

Calls 4

requireTaskMethod · 0.95
withMutationContextMethod · 0.95
copyPomodoroStateMethod · 0.95
getStateMethod · 0.45

Tested by

no test coverage detected