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

Function isInteractive

internal/cli/management.go:1987–1997  ·  view source on GitHub ↗

isInteractive returns true if stdin is a TTY (interactive terminal).

(stdin io.Reader)

Source from the content-addressed store, hash-verified

1985
1986// isInteractive returns true if stdin is a TTY (interactive terminal).
1987func isInteractive(stdin io.Reader) bool {
1988 file, ok := stdin.(*os.File)
1989 if !ok {
1990 return false
1991 }
1992 fi, err := file.Stat()
1993 if err != nil {
1994 return false
1995 }
1996 return fi.Mode()&os.ModeCharDevice != 0
1997}
1998
1999// confirmOverwrite asks the user whether to overwrite an already-installed
2000// entity. Returns true if the user confirms. Only called in interactive mode.

Callers 6

entitySearchCommandFunction · 0.85
entityInstallCommandFunction · 0.85
installFromLocalFunction · 0.85
installFromGitHubFunction · 0.85
selectItemsFunction · 0.85
entityUninstallCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected