mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-03 07:32:44 -07:00
Improve screen normalization in UserSimulator to prevent polling loops
This commit is contained in:
committed by
Mahima Shanware
parent
7cc657add2
commit
27ed3a4d07
@@ -101,8 +101,11 @@ export class UserSimulator {
|
||||
.replace(/\n([ \t]*\n)+/g, '\n\n');
|
||||
|
||||
const normalizedScreen = strippedScreen
|
||||
.replace(/[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]/g, '')
|
||||
.replace(/\[?\s*\b\d+(\.\d+)?s\b\s*\]?/g, '')
|
||||
.replace(/[\u2800-\u28FF]/g, '')
|
||||
.replace(/[|/-\\]/g, '')
|
||||
.replace(/\b\d+(\.\d+)?s\b/g, '')
|
||||
.replace(/\b\d+m\s+\d+s\b/g, '')
|
||||
.replace(/\(\s*\)/g, '')
|
||||
.trim();
|
||||
|
||||
if (normalizedScreen === this.lastScreenContent) return;
|
||||
|
||||
Reference in New Issue
Block a user