refactor(cmd): replace global vars with flags for agent mode params
Use command-line flags for edit instructions and scaffold descriptions instead of global variables to improve modularity and avoid globals.
This commit is contained in:
parent
2809b55912
commit
426288b356
@ -19,8 +19,6 @@ var editCmd = &cobra.Command{
|
|||||||
Run: runEdit,
|
Run: runEdit,
|
||||||
}
|
}
|
||||||
|
|
||||||
var editInstruction string // set by agent mode when calling from chat --agent
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
editCmd.Flags().String("instruction", "", "Edit instruction (used internally by agent mode)")
|
editCmd.Flags().String("instruction", "", "Edit instruction (used internally by agent mode)")
|
||||||
rootCmd.AddCommand(editCmd)
|
rootCmd.AddCommand(editCmd)
|
||||||
|
|||||||
@ -19,8 +19,6 @@ var scaffoldCmd = &cobra.Command{
|
|||||||
Run: runScaffold,
|
Run: runScaffold,
|
||||||
}
|
}
|
||||||
|
|
||||||
var scaffoldDescription string // set by agent mode when calling from chat --agent
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
scaffoldCmd.Flags().String("description", "", "Scaffold description (used internally by agent mode)")
|
scaffoldCmd.Flags().String("description", "", "Scaffold description (used internally by agent mode)")
|
||||||
rootCmd.AddCommand(scaffoldCmd)
|
rootCmd.AddCommand(scaffoldCmd)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user