currentSessionTask returns the task bound to this Claude session via tasks.session_id. Returns sql.ErrNoRows if the current session is unbound (dispatch session) or the env var is missing. This is the canonical "what task am I on?" lookup — replaces the legacy $FLOW_TASK env var.
(db *sql.DB)
| 31 | // the canonical "what task am I on?" lookup — replaces the legacy |
| 32 | // $FLOW_TASK env var. |
| 33 | func currentSessionTask(db *sql.DB) (*flowdb.Task, error) { |
| 34 | return flowdb.TaskBySessionID(db, currentSessionID()) |
| 35 | } |
| 36 | |
| 37 | // isNoBindingErr is a small predicate for the dispatch-session case. |
| 38 | // Callers use it to differentiate "no current binding" from real |
no test coverage detected