mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-15 00:21:09 -07:00
feat(core): add setting to disable loop detection (#18008)
This commit is contained in:
@@ -147,7 +147,7 @@ export class LoopDetectionService {
|
||||
* @returns true if a loop is detected, false otherwise
|
||||
*/
|
||||
addAndCheck(event: ServerGeminiStreamEvent): boolean {
|
||||
if (this.disabledForSession) {
|
||||
if (this.disabledForSession || this.config.getDisableLoopDetection()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ export class LoopDetectionService {
|
||||
* @returns A promise that resolves to `true` if a loop is detected, and `false` otherwise.
|
||||
*/
|
||||
async turnStarted(signal: AbortSignal) {
|
||||
if (this.disabledForSession) {
|
||||
if (this.disabledForSession || this.config.getDisableLoopDetection()) {
|
||||
return false;
|
||||
}
|
||||
this.turnsInCurrentPrompt++;
|
||||
|
||||
Reference in New Issue
Block a user