-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(models): ensure Tool Cody is only added when enabled (#6753)
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 <!-- Required. See https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles. --> 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" />
- Loading branch information
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