Add PromptKit single smoke test command
This commit is contained in:
@@ -53,8 +53,8 @@ type inputAssignment struct {
|
||||
}
|
||||
|
||||
// Command captures the optional PromptKit catalogs, named inspection,
|
||||
// requirements discovery, and concrete request validation callbacks and adds
|
||||
// only supplied operations. Discovery and validation share the
|
||||
// requirements discovery, concrete request validation, and smoke-test
|
||||
// callbacks and adds only supplied operations. Discovery and validation share the
|
||||
// `requirements` group and remain independently optional. An absent suite
|
||||
// claims no namespace; attached construction issues remain reportable. It adds
|
||||
// no configuration family; callers compose ConfigScope independently.
|
||||
@@ -67,7 +67,7 @@ type inputAssignment struct {
|
||||
// render YAML with `yaml` as the only format and default. Named-show formats are
|
||||
// unchanged.
|
||||
func Command[I, S any](suite Suite[I, S]) commandkit.Command {
|
||||
if suite.InspectPrompt == nil && suite.InspectProfile == nil && suite.InspectRequirements == nil && suite.ValidateRequest == nil && suite.ListPrompts == nil && suite.ListProfiles == nil && suite.ListBackends == nil && suite.ListNamespaces == nil && suite.ListCollections == nil {
|
||||
if suite.InspectPrompt == nil && suite.InspectProfile == nil && suite.InspectRequirements == nil && suite.ValidateRequest == nil && suite.SmokeTest == nil && suite.ListPrompts == nil && suite.ListProfiles == nil && suite.ListBackends == nil && suite.ListNamespaces == nil && suite.ListCollections == nil {
|
||||
command := commandkit.NoCommand()
|
||||
for _, issue := range suite.issues {
|
||||
command = commandkit.WithError(command, issue)
|
||||
@@ -116,7 +116,10 @@ func Command[I, S any](suite Suite[I, S]) commandkit.Command {
|
||||
if len(requirementsCommands) != 0 {
|
||||
rootCommands = append(rootCommands, commandkit.Group("requirements", "Inspect and validate prompt requirements.", requirementsCommands...))
|
||||
}
|
||||
command := commandkit.RootGroup("promptkit", "Inspect, validate, and list PromptKit definitions and requirements.", rootCommands...)
|
||||
if suite.SmokeTest != nil {
|
||||
rootCommands = append(rootCommands, newSmokeTestCommand(suite))
|
||||
}
|
||||
command := commandkit.RootGroup("promptkit", "Inspect, list, validate requests, and run PromptKit smoke tests.", rootCommands...)
|
||||
for _, issue := range suite.issues {
|
||||
command = commandkit.WithError(command, issue)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user