MCPcopy Create free account
hub / github.com/compozy/agh / newSessionStatusCommand

Function newSessionStatusCommand

internal/cli/session.go:253–276  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

251}
252
253func newSessionStatusCommand(deps commandDeps) *cobra.Command {
254 return &cobra.Command{
255 Use: "status <id>",
256 Short: "Show session status",
257 Example: ` # Show current state for one session
258 agh session status sess_1234
259
260 # Read status as JSON for scripts
261 agh session status sess_1234 -o json`,
262 Args: exactOneNonBlankArg(),
263 RunE: func(cmd *cobra.Command, args []string) error {
264 client, err := clientFromDeps(deps)
265 if err != nil {
266 return err
267 }
268
269 info, err := client.GetSessionStatus(cmd.Context(), args[0])
270 if err != nil {
271 return err
272 }
273 return writeCommandOutput(cmd, sessionStatusBundle(info))
274 },
275 }
276}
277
278func newSessionResumeCommand(deps commandDeps) *cobra.Command {
279 var (

Callers 1

newSessionCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
sessionStatusBundleFunction · 0.85
GetSessionStatusMethod · 0.65

Tested by

no test coverage detected