google-gemini/gemini-cli

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

开放

#24,333 创建于 2026年3月31日

 (5 条评论) (0 个反应) (1 位负责人)TypeScript (13,657 个派生)batch import
area/coreeffort/smallhelp wantedkind/bugpriority/p2status/bot-triagedstatus/need-informationtype/bug

仓库指标

星标
 (103,992 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南