Skip to main content

Module todo

Module todo 

Source
Expand description

Session todo list (sticky TUI panel).

Tools write through TodoSink; the host maps that onto crate::todo events. Storage is session-scoped under .whycodes/todos/<session_id>.json.

Structs§

TodoItem
One row in the session todo list.
TodoList
On-disk envelope.

Enums§

TodoStatus
Status of one todo item.

Functions§

all_terminal
True when every item is completed or cancelled (and the list is non-empty).
apply_todo_update
Merge incoming items into existing by id (an id written twice keeps the last). Empty ids always append, under a fresh numeric id so a later update can reach them. merge: false starts from an empty list.
apply_todowrite_args
Apply a todowrite / todo tool argument object.
has_open
True when any item is still pending or in progress.
load_todos
Load todos. Missing or invalid files yield an empty list.
progress_line
2/5 done · next: write tests, or all 5 done when nothing is open.
save_todos
Persist the full list. Creates .whycodes / .whycodes/todos as needed.
terminal_count
Completed + cancelled count.
todo_warnings
Problems in a list the model just wrote, worded as fixes for it.
todos_path
Path of the session todo file.

Type Aliases§

TodoSink
Callback the host (agent loop) installs so todowrite can reach the TUI.