@@ -123,19 +123,21 @@ func commandQuery(c *cli.Context) error {
123123 } else {
124124 // Display command with info about why it's not auto-running
125125 displayCommand (newCommand )
126- if actionType != model .ActionOther {
126+ if shouldShowTips ( cfg ) && actionType != model .ActionOther {
127127 color .Yellow .Printf ("\n 💡 Tip: This is a %s command. Enable 'ai.agent.%s' in your config to auto-run it.\n " ,
128128 actionType , actionType )
129129 }
130130 }
131131 } else {
132132 // No auto-run configured, display the command and tip
133133 displayCommand (newCommand )
134- color .Yellow .Printf ("\n 💡 Tip: You can enable AI auto-run in your config file:\n " )
135- color .Yellow .Printf (" [ai.agent]\n " )
136- color .Yellow .Printf (" view = true # Auto-run view commands\n " )
137- color .Yellow .Printf (" edit = true # Auto-run edit commands\n " )
138- color .Yellow .Printf (" delete = true # Auto-run delete commands\n " )
134+ if shouldShowTips (cfg ) {
135+ color .Yellow .Printf ("\n 💡 Tip: You can enable AI auto-run in your config file:\n " )
136+ color .Yellow .Printf (" [ai.agent]\n " )
137+ color .Yellow .Printf (" view = true # Auto-run view commands\n " )
138+ color .Yellow .Printf (" edit = true # Auto-run edit commands\n " )
139+ color .Yellow .Printf (" delete = true # Auto-run delete commands\n " )
140+ }
139141 }
140142
141143 return nil
@@ -146,6 +148,14 @@ func displayCommand(command string) {
146148 color .Cyan .Printf ("%s\n " , command )
147149}
148150
151+ func shouldShowTips (cfg model.ShellTimeConfig ) bool {
152+ // If ShowTips is not set (nil), default to true
153+ if cfg .AI == nil || cfg .AI .ShowTips == nil {
154+ return true
155+ }
156+ return * cfg .AI .ShowTips
157+ }
158+
149159func executeCommand (ctx context.Context , command string ) error {
150160 // Get the shell to use
151161 shell := os .Getenv ("SHELL" )
0 commit comments