Skip to content

Commit f903871

Browse files
committed
fix: prevent removed commands from reappearing due to workspace config merging
- Fixed issue where removed command patterns would reappear in the UI - The problem was caused by workspace configuration being merged after UI state updates - Now properly filters out removed patterns when merging workspace config - Added comprehensive tests to verify the fix handles all edge cases - Ensures user's removal actions are preserved across config updates Fixes #5480
1 parent 0b714fd commit f903871

File tree

2 files changed

+400
-4
lines changed

2 files changed

+400
-4
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,8 +1439,8 @@ export class ClineProvider
14391439

14401440
const telemetryKey = process.env.POSTHOG_API_KEY
14411441
const machineId = vscode.env.machineId
1442-
const mergedAllowedCommands = this.mergeAllowedCommands(allowedCommands)
1443-
const mergedDeniedCommands = this.mergeDeniedCommands(deniedCommands)
1442+
// For settings UI, we should only show the global state commands without merging
1443+
// The merging with workspace configuration should only happen when commands are used
14441444
const cwd = this.cwd
14451445

14461446
// Check if there's a system prompt override for the current mode
@@ -1480,8 +1480,8 @@ export class ClineProvider
14801480
enableCheckpoints: enableCheckpoints ?? true,
14811481
shouldShowAnnouncement:
14821482
telemetrySetting !== "unset" && lastShownAnnouncementId !== this.latestAnnouncementId,
1483-
allowedCommands: mergedAllowedCommands,
1484-
deniedCommands: mergedDeniedCommands,
1483+
allowedCommands: allowedCommands,
1484+
deniedCommands: deniedCommands,
14851485
soundVolume: soundVolume ?? 0.5,
14861486
browserViewportSize: browserViewportSize ?? "900x600",
14871487
screenshotQuality: screenshotQuality ?? 75,

0 commit comments

Comments
 (0)