🚑 fix keep existing config option

This commit is contained in:
Nate Sesti 2024-04-11 11:59:30 -07:00
parent 0180d86e34
commit e453ff9768
3 changed files with 12 additions and 3 deletions

View file

@ -90,7 +90,14 @@ export type WebviewProtocol = Protocol &
copyText: [{ text: string }, void];
"jetbrains/editorInsetHeight": [{ height: number }, void];
completeOnboarding: [
{ mode: "local" | "optimized" | "custom" | "optimizedExistingUser" },
{
mode:
| "local"
| "optimized"
| "custom"
| "localExistingUser"
| "optimizedExistingUser";
},
void,
];
};

View file

@ -566,7 +566,7 @@ export class VsCodeWebviewProtocol {
this.on("completeOnboarding", (msg) => {
const mode = msg.data.mode;
if (mode === "custom") {
if (mode === "custom" || mode === "localExistingUser") {
return;
}
editConfigJson(

View file

@ -128,7 +128,9 @@ Alternatively, you can enter your own API keys:
disabled={selected < 0}
onClick={() => {
postToIde("completeOnboarding", {
mode: ["local", "optimizedExistingUser"][selected] as any,
mode: ["localExistingUser", "optimizedExistingUser"][
selected
] as any,
});
postToIde("openConfigJson", undefined);
setLocalStorage("onboardingComplete", true);