google-gemini/gemini-cli

fix(cli): reset slash-command conflict dedupe when conflicts reappear

Aberta

#24.333 aberto em 31 de mar. de 2026

 (5 comentários) (0 reação) (1 responsável)TypeScript (13.657 forks)batch import
area/coreeffort/smallhelp wantedkind/bugpriority/p2status/bot-triagedstatus/need-informationtype/bug

Métricas do repositório

Stars
 (103.992 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Summary

SlashCommandConflictHandler permanently records every conflict key it has ever notified in notifiedConflicts, but it never expires or resets those entries when a conflict disappears and later reappears.

Evidence

In packages/cli/src/services/SlashCommandConflictHandler.ts, notifiedConflicts is a process-lifetime Set<string>. handleConflicts(...) skips any conflict key that has ever been seen before, even if that conflict was resolved earlier in the session.

Impact

If an extension, workspace command, or MCP prompt conflict is resolved and then reintroduced later, the user may never receive a second notification. The set also grows monotonically over the life of the process.

Expected behavior

Users should be notified again when a previously-resolved conflict reappears, and the dedupe state should track currently-active conflicts rather than every historical conflict forever.

Suggested fix

Track active conflict keys per flush or per current conflict state instead of using an unbounded permanent set, and add a regression test for reintroduced conflicts.

Guia do colaborador