task

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package task iterates pending tasks from TASKS.md for MCP tool responses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsOverlap

func ContainsOverlap(action, taskText string) bool

ContainsOverlap checks if two strings share meaningful words.

Uses word-set intersection rather than substring matching to avoid false positives (e.g., "test" matching inside "contestant").

Parameters:

  • action: the recent action description
  • taskText: the task text to compare against

Returns:

  • bool: true if at least 2 significant words overlap

func ForEachPending

func ForEachPending(lines []string, fn func(Pending) bool)

ForEachPending iterates pending top-level tasks in TASKS.md, skipping the Completed section and subtasks. It calls fn for each match; if fn returns true, iteration stops early.

Parameters:

  • lines: TASKS.md split by newline
  • fn: visitor called with each pending task; return true to stop

Types

type Pending

type Pending struct {
	Index   int
	Content string
}

Pending holds the index and content of a Pending top-level task.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL