Skip to content

Commit

Permalink
🎨 Bump for glazed refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
wesen committed Feb 12, 2023
1 parent 478cb10 commit 482b7e6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pkg/cmds/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
)

type GeppettoCommandDescription struct {
Name string `yaml:"name"`
Short string `yaml:"short"`
Long string `yaml:"long,omitempty"`
Flags []*glazedcmds.Parameter `yaml:"flags,omitempty"`
Arguments []*glazedcmds.Parameter `yaml:"arguments,omitempty"`
Name string `yaml:"name"`
Short string `yaml:"short"`
Long string `yaml:"long,omitempty"`
Flags []*glazedcmds.ParameterDefinition `yaml:"flags,omitempty"`
Arguments []*glazedcmds.ParameterDefinition `yaml:"arguments,omitempty"`

// TODO(manuel, 2023-02-04) This now has a hack to switch the step type
Step *steps.StepDescription `yaml:"step,omitempty"`
Expand Down Expand Up @@ -58,13 +58,13 @@ func (g *GeppettoCommand) RunFromCobra(cmd *cobra.Command, args []string) error
}
}

return g.Run(parameters)
return g.Run(parameters, nil)
}

//go:embed templates/dyno.tmpl.html
var dynoTemplate string

func (g *GeppettoCommand) Run(parameters map[string]interface{}) error {
func (g *GeppettoCommand) Run(parameters map[string]interface{}, _ *glazedcmds.GlazeProcessor) error {
openaiCompletionStepFactory_, ok := g.Factories["openai-completion-step"]
if !ok {
return errors.Errorf("No openai-completion-step factory defined")
Expand Down Expand Up @@ -194,8 +194,8 @@ func (g *GeppettoCommandLoader) LoadCommandFromYAML(s io.Reader) ([]glazedcmds.C

buf := strings.NewReader(string(yamlContent))
scd := &GeppettoCommandDescription{
Flags: []*glazedcmds.Parameter{},
Arguments: []*glazedcmds.Parameter{},
Flags: []*glazedcmds.ParameterDefinition{},
Arguments: []*glazedcmds.ParameterDefinition{},
}
err = yaml.NewDecoder(buf).Decode(scd)
if err != nil {
Expand Down

0 comments on commit 482b7e6

Please sign in to comment.