-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Problem (one or two sentences)
In src/core/webview/ClineProvider.ts, the comment above the command merge logic states that global state "takes precedence over workspace configuration". However, the implementation performs a Set union with no override logic. Neither source takes precedence; both are combined and deduplicated.
Context (who is affected and when)
Affects anyone reading the codebase or relying on the comment to understand command merge behavior. The comment implies override semantics that do not exist, which could lead to incorrect assumptions during future development.
Reproduction steps
- Open
src/core/webview/ClineProvider.tsand locate themergeCommandLists()method (near line ~1982). - Read the comment: "Global state takes precedence over workspace configuration."
- Observe the implementation:
const mergedCommands = [...new Set([...validGlobalCommands, ...validWorkspaceCommands])] - This is a Set union — neither source takes precedence. After merging, the origin (global vs workspace) is not preserved.
Expected result
Comment accurately describes the union behavior with no implication of source priority.
Actual result
Comment states global state takes precedence over workspace configuration, but the implementation performs a Set union with no precedence.
Variations tried (optional)
Confirmed downstream conflict resolution (longest-prefix matching in getSingleCommandDecision) does not use source priority.
App Version
v3.47.3
API Provider (optional)
None
Model Used (optional)
N/A
Roo Code Task Links (optional)
No response
Relevant logs or errors (optional)
N/A — comment-only change, no functional impact.
Location: src/core/webview/ClineProvider.ts, mergeCommandLists() method, near line ~1982