MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / outIsTTY

Function outIsTTY

internal/cli/launch.go:166–172  ·  view source on GitHub ↗

outIsTTY reports whether the provided writer is a *os.File backed by a terminal. Tests pass *bytes.Buffer, which returns false; the live CLI passes os.Stdout, which returns true on an interactive console.

(out io.Writer)

Source from the content-addressed store, hash-verified

164// a terminal. Tests pass *bytes.Buffer, which returns false; the live
165// CLI passes os.Stdout, which returns true on an interactive console.
166func outIsTTY(out io.Writer) bool {
167 file, ok := out.(*os.File)
168 if !ok {
169 return false
170 }
171 return isTerminal(file)
172}
173
174// cacheTTLFromCommon reads provider metadata cache_ttl_seconds from the store-backed file shape.
175// Default: 24h.

Callers 2

launchCommandMethod · 0.85
resolveLaunchSelectionFunction · 0.85

Calls 1

isTerminalFunction · 0.85

Tested by

no test coverage detected