rename to optInNextEditFeature
This commit is contained in:
parent
8ae5b4e06f
commit
11a28c8551
6 changed files with 19 additions and 18 deletions
|
|
@ -20,7 +20,8 @@ export const sharedConfigSchema = z
|
|||
promptPath: z.string(),
|
||||
useCurrentFileAsContext: z.boolean(),
|
||||
logEditingData: z.boolean(),
|
||||
optInContinueFeature: z.boolean(), // special features reserved for internal testing only
|
||||
// add internal features below
|
||||
optInNextEditFeature: z.boolean(),
|
||||
|
||||
// `ui` in `ContinueConfig`
|
||||
showSessionTabs: z.boolean(),
|
||||
|
|
@ -176,9 +177,9 @@ export function modifyAnyConfigWithSharedConfig<
|
|||
if (sharedConfig.logEditingData !== undefined) {
|
||||
configCopy.experimental.logEditingData = sharedConfig.logEditingData;
|
||||
}
|
||||
if (sharedConfig.optInContinueFeature !== undefined) {
|
||||
configCopy.experimental.optInContinueFeature =
|
||||
sharedConfig.optInContinueFeature;
|
||||
if (sharedConfig.optInNextEditFeature !== undefined) {
|
||||
configCopy.experimental.optInNextEditFeature =
|
||||
sharedConfig.optInNextEditFeature;
|
||||
}
|
||||
|
||||
return configCopy;
|
||||
|
|
|
|||
4
core/index.d.ts
vendored
4
core/index.d.ts
vendored
|
|
@ -1378,9 +1378,9 @@ export interface ExperimentalConfig {
|
|||
logEditingData?: boolean;
|
||||
|
||||
/**
|
||||
* If enabled, will enable internal features under testing
|
||||
* If enabled, will enable next edit in place of autocomplete
|
||||
*/
|
||||
optInContinueFeature?: boolean;
|
||||
optInNextEditFeature?: boolean;
|
||||
}
|
||||
|
||||
export interface AnalyticsConfig {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export type ToIdeFromWebviewProtocol = ToIdeFromWebviewOrCoreProtocol & {
|
|||
];
|
||||
"edit/addCurrentSelection": [undefined, void];
|
||||
"edit/clearDecorations": [undefined, void];
|
||||
optInContinueFeature: [
|
||||
optInNextEditFeature: [
|
||||
{
|
||||
email: string;
|
||||
optIn: boolean;
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ export class VsCodeMessenger {
|
|||
editDecorationManager.clear();
|
||||
});
|
||||
|
||||
this.onWebview("optInContinueFeature", async (msg) => {
|
||||
this.onWebview("optInNextEditFeature", async (msg) => {
|
||||
if (msg.data.optIn) {
|
||||
// Set up next edit window manager only for Continue team members
|
||||
setupNextEditWindowManager(context, {
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ import { useAuth } from "../../context/Auth";
|
|||
import { IdeMessengerContext } from "../../context/IdeMessenger";
|
||||
|
||||
interface ContinueFeaturesMenuProps {
|
||||
optInContinueFeature: boolean;
|
||||
optInNextEditFeature: boolean;
|
||||
handleUpdate: (sharedConfig: SharedConfigSchema) => void;
|
||||
}
|
||||
|
||||
export function ContinueFeaturesMenu({
|
||||
optInContinueFeature,
|
||||
optInNextEditFeature,
|
||||
handleUpdate,
|
||||
}: ContinueFeaturesMenuProps) {
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
|
|
@ -19,12 +19,12 @@ export function ContinueFeaturesMenu({
|
|||
|
||||
const handleOptInToggle = (value: boolean) => {
|
||||
handleUpdate({
|
||||
optInContinueFeature: value,
|
||||
optInNextEditFeature: value,
|
||||
});
|
||||
// Send message to VSCode extension with the email
|
||||
const continueEmail = (session as HubSessionInfo)?.account?.id ?? null;
|
||||
if (continueEmail) {
|
||||
ideMessenger.post("optInContinueFeature", {
|
||||
ideMessenger.post("optInNextEditFeature", {
|
||||
email: continueEmail,
|
||||
optIn: value,
|
||||
});
|
||||
|
|
@ -34,12 +34,12 @@ export function ContinueFeaturesMenu({
|
|||
return (
|
||||
<div className="flex w-full flex-col gap-y-4">
|
||||
<div className="my-2 text-center text-xs font-medium text-slate-400">
|
||||
🚧 CHECKPOINT CHARLIE 🚧
|
||||
🚧 INTERNAL SETTINGS 🚧
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<ToggleSwitch
|
||||
isToggled={optInContinueFeature}
|
||||
onToggle={() => handleOptInToggle(!optInContinueFeature)}
|
||||
isToggled={optInNextEditFeature}
|
||||
onToggle={() => handleOptInToggle(!optInNextEditFeature)}
|
||||
text="Opt In to Special Feature"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ export function UserSettingsForm() {
|
|||
const disableSessionTitles = config.disableSessionTitles ?? false;
|
||||
const useCurrentFileAsContext =
|
||||
config.experimental?.useCurrentFileAsContext ?? false;
|
||||
const optInContinueFeature =
|
||||
config.experimental?.optInContinueFeature ?? false;
|
||||
const optInNextEditFeature =
|
||||
config.experimental?.optInNextEditFeature ?? false;
|
||||
|
||||
const allowAnonymousTelemetry = config.allowAnonymousTelemetry ?? true;
|
||||
const disableIndexing = config.disableIndexing ?? false;
|
||||
|
|
@ -423,7 +423,7 @@ export function UserSettingsForm() {
|
|||
|
||||
{hasContinueEmail && (
|
||||
<ContinueFeaturesMenu
|
||||
optInContinueFeature={optInContinueFeature}
|
||||
optInNextEditFeature={optInNextEditFeature}
|
||||
handleUpdate={handleUpdate}
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue