Add scoped PromptKit flag aliases
This commit is contained in:
@@ -249,7 +249,7 @@ func newAppWithEngineLoader(
|
||||
if smokeTest != nil {
|
||||
definitions.SmokeTest = smokeTest
|
||||
}
|
||||
definitionCommand := ckprompt.Command(definitions)
|
||||
definitionDeclarations := ckprompt.Declarations(definitions)
|
||||
|
||||
store := map[string]session{
|
||||
"session-42": {ID: "session-42", Campaign: "spring", Summary: "A synthetic planning session."},
|
||||
@@ -291,7 +291,6 @@ func newAppWithEngineLoader(
|
||||
})
|
||||
declarations := []commandkit.Declaration{
|
||||
configCommand,
|
||||
definitionCommand,
|
||||
commandkit.Completion("composed-example"),
|
||||
commandkit.Group("session", "Manage saved sessions.", restore),
|
||||
commandkit.Alias("list collections", "promptkit list collections"),
|
||||
@@ -301,6 +300,7 @@ func newAppWithEngineLoader(
|
||||
commandkit.FlagAliasFor("promptkit show prompt", "--fmt", "--format"),
|
||||
commandkit.FlagAlias("--hlep", "--help"),
|
||||
}
|
||||
declarations = append(declarations, definitionDeclarations...)
|
||||
return commandkit.New(commandkit.Identity{Name: "composed-example", Version: "1.0"}, declarations...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user