File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -329,6 +329,16 @@ impl Agents {
329
329
}
330
330
331
331
let mut local_agents = ' local: {
332
+ // We could be launching from the home dir, in which case the global and local agents
333
+ // are the same set of agents. If that is the case, we simply skip this.
334
+ match ( std:: env:: current_dir ( ) , directories:: home_dir ( os) ) {
335
+ ( Ok ( cwd) , Ok ( home_dir) ) if cwd == home_dir => break ' local Vec :: < Agent > :: new ( ) ,
336
+ _ => {
337
+ // noop, we keep going with the extraction of local agents (even if we have an
338
+ // error retrieving cwd or home_dir)
339
+ } ,
340
+ }
341
+
332
342
let Ok ( path) = directories:: chat_local_agent_dir ( ) else {
333
343
break ' local Vec :: < Agent > :: new ( ) ;
334
344
} ;
@@ -361,6 +371,7 @@ impl Agents {
361
371
362
372
// Here we also want to make sure the example config is written to disk if it's not already
363
373
// there.
374
+ // Note that this config is not what q chat uses. It merely serves as an example.
364
375
' example_config: {
365
376
let Ok ( path) = directories:: example_agent_config ( os) else {
366
377
error ! ( "Error obtaining example agent path." ) ;
You can’t perform that action at this time.
0 commit comments