UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

22 lines • 771 B
const STATUSES = new Set(["pending", "in_progress", "completed", "abandoned"]); const DEFAULT_PHASE_NAME = "Tasks"; export function phasesFromCursorTodos(todos) { if (!Array.isArray(todos)) { return undefined; } const tasks = []; for (const item of todos) { if (!item || typeof item !== "object") { continue; } const raw = item; const content = typeof raw.content === "string" ? raw.content.trim() : ""; if (!content) { continue; } const status = STATUSES.has(raw.status) ? raw.status : "pending"; tasks.push({ content, status }); } return tasks.length > 0 ? [{ name: DEFAULT_PHASE_NAME, tasks }] : []; } //# sourceMappingURL=native-todo-mirror.js.map