Skip to content
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

[JB] Release Omnibox: remove feature flag #6850

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/shared/src/experimentation/FeatureFlagProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ export enum FeatureFlag {
* Whether the user will see the CTA about upgrading to Sourcegraph Teams
*/
SourcegraphTeamsUpgradeCTA = 'teams-upgrade-available-cta',

TempCodyExperimentalOnebox = 'cody-experimental-one-box',
}

const ONE_HOUR = 60 * 60 * 1000
Expand Down
10 changes: 1 addition & 9 deletions vscode/src/chat/chat-view/ChatController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
DOTCOM_URL,
type DefaultChatCommands,
type EventSource,
FeatureFlag,
type Guardrails,
ModelUsage,
type NLSSearchDynamicFilter,
Expand Down Expand Up @@ -59,7 +58,6 @@ import {
skip,
skipPendingOperation,
startWith,
storeLastValue,
subscriptionDisposable,
telemetryRecorder,
tracer,
Expand Down Expand Up @@ -195,7 +193,6 @@ export class ChatController implements vscode.Disposable, vscode.WebviewViewProv

public dispose(): void {
vscode.Disposable.from(...this.disposables).dispose()
this.featureCodyExperimentalOneBox.subscription.unsubscribe()
this.disposables = []
}

Expand Down Expand Up @@ -696,15 +693,10 @@ export class ChatController implements vscode.Disposable, vscode.WebviewViewProv
})
}

// TODO(naman/tom): Remove this FF check before the Cody release on 29th.
private featureCodyExperimentalOneBox = storeLastValue(
featureFlagProvider.evaluatedFeatureFlag(FeatureFlag.TempCodyExperimentalOnebox)
)

private async isOmniBoxEnabled(): Promise<boolean> {
const config = await ClientConfigSingleton.getInstance().getConfig()

return !!config?.omniBoxEnabled && !!this.featureCodyExperimentalOneBox.value.last
return !!config?.omniBoxEnabled
}

private async getIntentAndScores({
Expand Down
4 changes: 1 addition & 3 deletions vscode/webviews/utils/useOmniBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import { useFeatureFlag } from './useFeatureFlags'

export const useOmniBox = (): boolean => {
const config = useClientConfig()
// TODO(naman/tom): Remove this FF check before the Cody release on 29th.
const tempFFCheck = useFeatureFlag(FeatureFlag.TempCodyExperimentalOnebox)

return !!config?.omniBoxEnabled && !!tempFFCheck
return !!config?.omniBoxEnabled
}

export const useOmniBoxDebug = (): boolean | undefined => {
Expand Down
Loading