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

Function newProviderModelsStatusCommand

internal/cli/provider_models.go:96–114  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

94}
95
96func newProviderModelsStatusCommand(deps commandDeps) *cobra.Command {
97 cmd := &cobra.Command{
98 Use: "status [provider]",
99 Short: "Show provider model catalog source status",
100 Args: optionalProviderArg(),
101 RunE: func(cmd *cobra.Command, args []string) error {
102 client, err := clientFromDeps(deps)
103 if err != nil {
104 return err
105 }
106 record, err := client.ProviderModelStatus(cmd.Context(), providerArgValue(args))
107 if err != nil {
108 return err
109 }
110 return writeCommandOutput(cmd, providerModelStatusBundle(record))
111 },
112 }
113 return cmd
114}
115
116func providerModelListBundle(record ProviderModelListRecord) outputBundle {
117 return listBundle(

Callers 1

newProviderModelsCommandFunction · 0.85

Calls 6

optionalProviderArgFunction · 0.85
clientFromDepsFunction · 0.85
providerArgValueFunction · 0.85
writeCommandOutputFunction · 0.85
ProviderModelStatusMethod · 0.65

Tested by

no test coverage detected