IsBackground reports whether flow should spawn this session as a terminal-free background agent ($FLOW_TERM=bg) rather than opening a terminal tab. bg mode is NOT a terminal backend — it bypasses SpawnTab entirely (see do.go's bg branch), so it lives in its own predicate rather than as a Detect() ca
()
| 61 | // rather than as a Detect() case. The match is exact and case-sensitive, |
| 62 | // mirroring Detect's $FLOW_TERM handling. |
| 63 | func IsBackground() bool { |
| 64 | if BackgroundOverride != nil { |
| 65 | return *BackgroundOverride |
| 66 | } |
| 67 | return os.Getenv("FLOW_TERM") == "bg" |
| 68 | } |
| 69 | |
| 70 | // Detect returns the backend that SpawnTab will use for the current |
| 71 | // process environment. Exposed so callers (and tests) can inspect the |
no outgoing calls