MCPcopy Create free account
hub / github.com/Facets-cloud/flow / currentSessionTask

Function currentSessionTask

internal/app/helpers.go:33–35  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

31// the canonical "what task am I on?" lookup — replaces the legacy
32// $FLOW_TASK env var.
33func 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

Callers 3

showTaskCmdFunction · 0.85
showProjectCmdFunction · 0.85
cmdTranscriptFunction · 0.85

Calls 2

TaskBySessionIDFunction · 0.92
currentSessionIDFunction · 0.85

Tested by

no test coverage detected