🚑 fix keep existing config option
This commit is contained in:
parent
0180d86e34
commit
e453ff9768
3 changed files with 12 additions and 3 deletions
|
|
@ -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,
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue