remove feature flags
This commit is contained in:
parent
ded47fd80b
commit
8dd3e409b5
8 changed files with 21 additions and 54 deletions
4
binary/package-lock.json
generated
4
binary/package-lock.json
generated
|
|
@ -48,13 +48,13 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.49",
|
||||
"@continuedev/config-yaml": "^1.0.50",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
"@modelcontextprotocol/sdk": "^1.5.0",
|
||||
"@mozilla/readability": "^0.5.0",
|
||||
"@octokit/rest": "^20.0.2",
|
||||
"@octokit/rest": "^20.1.1",
|
||||
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||
"@xenova/transformers": "2.14.0",
|
||||
"adf-to-md": "^1.1.0",
|
||||
|
|
|
|||
|
|
@ -68,16 +68,24 @@ export async function getControlPlaneEnv(
|
|||
ideSettingsPromise: Promise<IdeSettings>,
|
||||
): Promise<ControlPlaneEnv> {
|
||||
const ideSettings = await ideSettingsPromise;
|
||||
return getControlPlaneEnvSync(ideSettings.continueTestEnvironment);
|
||||
return getControlPlaneEnvSync(
|
||||
ideSettings.continueTestEnvironment,
|
||||
ideSettings.enableControlServerBeta,
|
||||
);
|
||||
}
|
||||
|
||||
export function getControlPlaneEnvSync(
|
||||
ideTestEnvironment: IdeSettings["continueTestEnvironment"],
|
||||
enableControlServerBeta: IdeSettings["enableControlServerBeta"],
|
||||
): ControlPlaneEnv {
|
||||
if (fs.existsSync(getStagingEnvironmentDotFilePath())) {
|
||||
return STAGING_ENV;
|
||||
}
|
||||
|
||||
if (enableControlServerBeta === true) {
|
||||
return PRODUCTION_ENV;
|
||||
}
|
||||
|
||||
const env =
|
||||
ideTestEnvironment === "production"
|
||||
? "hub"
|
||||
|
|
|
|||
|
|
@ -99,20 +99,12 @@ class IntelliJIDE(
|
|||
val settings = service<ContinueExtensionSettings>()
|
||||
|
||||
|
||||
var continueTestEnvironment = settings.continueState.continueTestEnvironment
|
||||
if (continueTestEnvironment != "production") {
|
||||
val enableHub = enableHubContinueDev()
|
||||
if (enableHub) {
|
||||
continueTestEnvironment = "production"
|
||||
}
|
||||
}
|
||||
|
||||
return IdeSettings(
|
||||
remoteConfigServerUrl = settings.continueState.remoteConfigServerUrl,
|
||||
remoteConfigSyncPeriod = settings.continueState.remoteConfigSyncPeriod,
|
||||
userToken = settings.continueState.userToken ?: "",
|
||||
enableControlServerBeta = settings.continueState.enableContinueTeamsBeta,
|
||||
continueTestEnvironment = continueTestEnvironment,
|
||||
continueTestEnvironment = "production",
|
||||
pauseCodebaseIndexOnStart = false, // TODO: Needs to be implemented
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ class ContinueSettingsComponent : DumbAware {
|
|||
val enableOSR: JCheckBox = JCheckBox("Enable Off-Screen Rendering")
|
||||
val displayEditorTooltip: JCheckBox = JCheckBox("Display Editor Tooltip")
|
||||
val showIDECompletionSideBySide: JCheckBox = JCheckBox("Show IDE completions side-by-side")
|
||||
val enableContinueHub: JCheckBox = JCheckBox("Enable Continue Hub")
|
||||
|
||||
init {
|
||||
val constraints = GridBagConstraints()
|
||||
|
|
@ -68,8 +67,6 @@ class ContinueSettingsComponent : DumbAware {
|
|||
constraints.gridy++
|
||||
panel.add(showIDECompletionSideBySide, constraints)
|
||||
constraints.gridy++
|
||||
panel.add(enableContinueHub, constraints)
|
||||
constraints.gridy++
|
||||
|
||||
// Add a "filler" component that takes up all remaining vertical space
|
||||
constraints.weighty = 1.0
|
||||
|
|
@ -102,7 +99,7 @@ open class ContinueExtensionSettings : PersistentStateComponent<ContinueExtensio
|
|||
var enableOSR: Boolean = shouldRenderOffScreen()
|
||||
var displayEditorTooltip: Boolean = true
|
||||
var showIDECompletionSideBySide: Boolean = false
|
||||
var continueTestEnvironment: String = "none"
|
||||
var continueTestEnvironment: String = "production"
|
||||
}
|
||||
|
||||
var continueState: ContinueState = ContinueState()
|
||||
|
|
@ -216,8 +213,7 @@ class ContinueExtensionConfigurable : Configurable {
|
|||
mySettingsComponent?.enableContinueTeamsBeta?.isSelected != settings.continueState.enableContinueTeamsBeta ||
|
||||
mySettingsComponent?.enableOSR?.isSelected != settings.continueState.enableOSR ||
|
||||
mySettingsComponent?.displayEditorTooltip?.isSelected != settings.continueState.displayEditorTooltip ||
|
||||
mySettingsComponent?.showIDECompletionSideBySide?.isSelected != settings.continueState.showIDECompletionSideBySide ||
|
||||
(if (mySettingsComponent?.enableContinueHub?.isSelected == true) settings.continueState.continueTestEnvironment != "production" else settings.continueState.continueTestEnvironment == "production")
|
||||
mySettingsComponent?.showIDECompletionSideBySide?.isSelected != settings.continueState.showIDECompletionSideBySide
|
||||
return modified
|
||||
}
|
||||
|
||||
|
|
@ -233,8 +229,6 @@ class ContinueExtensionConfigurable : Configurable {
|
|||
settings.continueState.displayEditorTooltip = mySettingsComponent?.displayEditorTooltip?.isSelected ?: true
|
||||
settings.continueState.showIDECompletionSideBySide =
|
||||
mySettingsComponent?.showIDECompletionSideBySide?.isSelected ?: false
|
||||
settings.continueState.continueTestEnvironment =
|
||||
if (mySettingsComponent?.enableContinueHub?.isSelected == true) "production" else "none"
|
||||
|
||||
ApplicationManager.getApplication().messageBus.syncPublisher(SettingsListener.TOPIC)
|
||||
.settingsUpdated(settings.continueState)
|
||||
|
|
@ -252,8 +246,6 @@ class ContinueExtensionConfigurable : Configurable {
|
|||
mySettingsComponent?.displayEditorTooltip?.isSelected = settings.continueState.displayEditorTooltip
|
||||
mySettingsComponent?.showIDECompletionSideBySide?.isSelected =
|
||||
settings.continueState.showIDECompletionSideBySide
|
||||
mySettingsComponent?.enableContinueHub?.isSelected =
|
||||
settings.continueState.continueTestEnvironment == "production"
|
||||
|
||||
ContinueExtensionSettings.instance.addRemoteSyncJob()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,11 +96,6 @@
|
|||
"default": false,
|
||||
"markdownDescription": "Enable Continue for teams beta features. To sign in, click the gear icon to go to the settings page, and click Sign In."
|
||||
},
|
||||
"continue.enableContinueHub": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Enable Continue Hub (internal)"
|
||||
},
|
||||
"continue.showInlineTip": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import * as child_process from "node:child_process";
|
|||
import { exec } from "node:child_process";
|
||||
|
||||
import { Range } from "core";
|
||||
import { enableHubContinueDev, EXTENSION_NAME } from "core/control-plane/env";
|
||||
import { EXTENSION_NAME } from "core/control-plane/env";
|
||||
import { GetGhTokenArgs } from "core/protocol/ide";
|
||||
import { editConfigJson, getConfigJsonPath } from "core/util/paths";
|
||||
import * as vscode from "vscode";
|
||||
|
|
@ -645,9 +645,7 @@ class VsCodeIde implements IDE {
|
|||
"enableContinueForTeams",
|
||||
false,
|
||||
),
|
||||
continueTestEnvironment: settings.get<boolean>("enableContinueHub")
|
||||
? "production"
|
||||
: "none",
|
||||
continueTestEnvironment: "production",
|
||||
pauseCodebaseIndexOnStart: settings.get<boolean>(
|
||||
"pauseCodebaseIndexOnStart",
|
||||
false,
|
||||
|
|
@ -662,15 +660,6 @@ class VsCodeIde implements IDE {
|
|||
|
||||
async getIdeSettings(): Promise<IdeSettings> {
|
||||
const ideSettings = this.getIdeSettingsSync();
|
||||
|
||||
// Feature flag for when hub is enabled
|
||||
if (ideSettings.continueTestEnvironment !== "production") {
|
||||
const enableHub = await enableHubContinueDev();
|
||||
if (enableHub) {
|
||||
ideSettings.continueTestEnvironment = "production";
|
||||
}
|
||||
}
|
||||
|
||||
return ideSettings;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -362,9 +362,6 @@ export class VsCodeExtension {
|
|||
void this.core.invoke("didChangeActiveTextEditor", { filepath });
|
||||
});
|
||||
|
||||
const enableContinueHub = vscode.workspace
|
||||
.getConfiguration(EXTENSION_NAME)
|
||||
.get<boolean>("enableContinueHub");
|
||||
vscode.workspace.onDidChangeConfiguration(async (event) => {
|
||||
if (event.affectsConfiguration(EXTENSION_NAME)) {
|
||||
const settings = await this.ide.getIdeSettings();
|
||||
|
|
@ -372,14 +369,6 @@ export class VsCodeExtension {
|
|||
void webviewProtocol.request("didChangeIdeSettings", {
|
||||
settings,
|
||||
});
|
||||
|
||||
if (
|
||||
enableContinueHub
|
||||
? settings.continueTestEnvironment !== "production"
|
||||
: settings.continueTestEnvironment === "production"
|
||||
) {
|
||||
await vscode.commands.executeCommand("workbench.action.reloadWindow");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,10 +25,12 @@ import { SecretStorage } from "./SecretStorage";
|
|||
|
||||
const AUTH_NAME = "Continue";
|
||||
|
||||
const enableControlServerBeta = workspace
|
||||
.getConfiguration(EXTENSION_NAME)
|
||||
.get<boolean>("enableContinueForTeams", false);
|
||||
const controlPlaneEnv = getControlPlaneEnvSync(
|
||||
workspace.getConfiguration(EXTENSION_NAME).get<boolean>("enableContinueHub")
|
||||
? "production"
|
||||
: "none",
|
||||
true ? "production" : "none",
|
||||
enableControlServerBeta,
|
||||
);
|
||||
|
||||
const SESSIONS_SECRET_KEY = `${controlPlaneEnv.AUTH_TYPE}.sessions`;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue