Skip to content

Commit fb75c7d

Browse files
authored
Merge pull request #274 from platformsh/init-add-context-option
Add --context option to the init command
2 parents 056a46c + 17c9361 commit fb75c7d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

commands/init.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ func newInitCommand(cnf *config.Config, assets *vendorization.VendorAssets) *cob
4747
}
4848

4949
cmd.Flags().BoolVar(&useAI, "ai", false, "Use AI configuration")
50+
cmd.Flags().StringVar(&initOptions.ExtraContext, "context", "",
51+
"Add extra context for AI configuration")
5052
cmd.Flags().BoolVar(&initOptions.OnlyShowDigest, "digest", false,
5153
"Only show the repository digest (the AI configuration input), without sending it")
5254

commands/list_models.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ func innerProjectInitCommand(cnf *config.Config) Command {
4141
Commandline: "--ai=false",
4242
Description: "Disable AI mode",
4343
},
44+
{
45+
Commandline: "--ai --context='Use PostgreSQL for the database'",
46+
Description: "Add context for AI configuration",
47+
},
4448
},
4549
Definition: Definition{
4650
Arguments: &orderedmap.OrderedMap[string, Argument]{},
@@ -54,6 +58,16 @@ func innerProjectInitCommand(cnf *config.Config) Command {
5458
Default: Any{any: false},
5559
},
5660
},
61+
orderedmap.Pair[string, Option]{
62+
Key: "context",
63+
Value: Option{
64+
Name: "--context",
65+
AcceptValue: true,
66+
IsValueRequired: true,
67+
Description: "Add extra context for AI configuration",
68+
Default: Any{any: ""},
69+
},
70+
},
5771
orderedmap.Pair[string, Option]{
5872
Key: "digest",
5973
Value: Option{

0 commit comments

Comments
 (0)