-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport jb-v7.12.x] fix(models): ensure Tool Cody is only added whe…
…n enabled (#6759) FIX https://linear.app/sourcegraph/issue/CODY-4737 The issue was that the Tool Cody model was being added to the list of primary models regardless of whether the feature was enabled or not. The root cause was that the check for the existence of the Tool Cody model was not properly scoped to the `isToolCodyEnabled` flag but was checking the observable instead, which would always returns true as the observable is defined. This change fixes the issue by only adding the Tool Cody model to the list of primary models if the `isToolCodyEnabled` flag is true and the Tool Cody model is not already present in the list of primary models. Included some minor clean up. ## Test plan Verify Tool Cody is not showing up in your model dropdown if you don't have the configuration in your settings: <img width="603" alt="image" src="https://github.com/user-attachments/assets/6ebdbb6e-650d-4bc4-ad62-40a285a13f5f" /> <br> Backport ae351c2 from #6753 Co-authored-by: Beatrix <[email protected]>
- Loading branch information
1 parent
bfa18e6
commit 60bbda0
Showing
1 changed file
with
41 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters