-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(models): ensure Tool Cody is only added when enabled #6753
Merged
Conversation
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
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.
umpox
approved these changes
Jan 22, 2025
This was referenced Jan 22, 2025
umpox
pushed a commit
that referenced
this pull request
Jan 22, 2025
… when enabled (#6758) 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]>
umpox
pushed a commit
that referenced
this pull request
Jan 22, 2025
…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]>
taiyab
pushed a commit
that referenced
this pull request
Jan 23, 2025
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" />
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: