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

Function newSessionRecapCommand

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

Source from the content-addressed store, hash-verified

341}
342
343func newSessionRecapCommand(deps commandDeps) *cobra.Command {
344 var limit int
345 cmd := &cobra.Command{
346 Use: "recap <id>",
347 Short: "Show deterministic session recap",
348 Example: ` # Show a bounded recap for one session
349 agh session recap sess_1234 --limit 20`,
350 Args: exactOneNonBlankArg(),
351 RunE: func(cmd *cobra.Command, args []string) error {
352 client, err := clientFromDeps(deps)
353 if err != nil {
354 return err
355 }
356 recap, err := client.SessionRecap(cmd.Context(), args[0], limit)
357 if err != nil {
358 return err
359 }
360 return writeCommandOutput(cmd, sessionRecapBundle(recap))
361 },
362 }
363 cmd.Flags().IntVar(&limit, "limit", 20, "Maximum recent messages to include")
364 return cmd
365}
366
367func newSessionRepairCommand(deps commandDeps) *cobra.Command {
368 var (

Callers 1

newSessionCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
sessionRecapBundleFunction · 0.85
SessionRecapMethod · 0.65

Tested by

no test coverage detected