MCPcopy Create free account
hub / github.com/cli/cli / SessionStateString

Function SessionStateString

pkg/cmd/agent-task/shared/display.go:28–49  ·  view source on GitHub ↗

SessionStateString returns the humane/capitalised form of the given session state.

(state string)

Source from the content-addressed store, hash-verified

26
27// SessionStateString returns the humane/capitalised form of the given session state.
28func SessionStateString(state string) string {
29 switch state {
30 case "queued":
31 return "Queued"
32 case "in_progress":
33 return "In progress"
34 case "completed":
35 return "Ready for review"
36 case "failed":
37 return "Failed"
38 case "idle":
39 return "Idle"
40 case "waiting_for_user":
41 return "Waiting for user"
42 case "timed_out":
43 return "Timed out"
44 case "cancelled":
45 return "Cancelled"
46 default:
47 return state
48 }
49}
50
51type ColorFunc func(string) string
52

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected