Merge pull request #2447 from continuedev/pe/gh-sign-in-errors
fix: show error is GH sign in failed in vscode
This commit is contained in:
commit
0432cdc054
3 changed files with 9 additions and 2 deletions
|
|
@ -87,6 +87,7 @@ class VsCodeIde implements IDE {
|
|||
const session = await vscode.authentication.getSession("github", [], {
|
||||
silent: true,
|
||||
});
|
||||
|
||||
if (session) {
|
||||
this.authToken = session.accessToken;
|
||||
return this.authToken;
|
||||
|
|
|
|||
|
|
@ -40,8 +40,14 @@ function QuickstartSubmitButton() {
|
|||
const result = await ideMessenger.request("getGitHubAuthToken", {
|
||||
force: true,
|
||||
});
|
||||
if (result.status === "success") {
|
||||
|
||||
if (result.status === "success" && typeof result.content === "string") {
|
||||
onComplete();
|
||||
} else {
|
||||
ideMessenger.post("showToast", [
|
||||
"error",
|
||||
"Failed to sign up for Continue free trial through GitHub",
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ function MoreHelpRow({ title, description, onClick, Icon }: MoreHelpRowProps) {
|
|||
className="flex items-center gap-2 justify-between cursor-pointer"
|
||||
onClick={onClick}
|
||||
>
|
||||
<div className="w-4/5 truncate flex flex-col justify-center">
|
||||
<div className="w-4/5 flex flex-col justify-center">
|
||||
<h3 className="text-sm my-0">{title}</h3>
|
||||
<span className="text-stone-500 py-1">{description}</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue