File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -488,9 +488,11 @@ If CALLBACK is non-nil it will be called after the command finishes."
488
488
(processed-command (aidermacs--process-message-if-multi-line command)))
489
489
; ; Check if command may edit files and prepare accordingly
490
490
(with-current-buffer buffer
491
- ; ; Attempt to wait out transient commands or server lag
492
- (when (not aidermacs--ready)
493
- (sit-for 0.5 ))
491
+ ; ; Attempt to wait out transient commands or server lag for max 3s
492
+ (let ((max-wait-count 30 ))
493
+ (while (and (not aidermacs--ready) (> max-wait-count 0 ))
494
+ (sit-for 0.1 )
495
+ (setq max-wait-count (1- max-wait-count))))
494
496
(if (not aidermacs--ready)
495
497
(progn (aidermacs-switch-to-buffer buffer-name)
496
498
(message " Aider process is not currently accepting commands " ))
You can’t perform that action at this time.
0 commit comments