format continue for teams profile name

This commit is contained in:
Nate 2024-10-22 14:04:52 -07:00
parent 46d63245a1
commit c1d90ff7ae
4 changed files with 18 additions and 7 deletions

View file

@ -98,7 +98,7 @@
"@aws-sdk/client-bedrock-runtime": "^3.620.1",
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
"@aws-sdk/credential-providers": "^3.620.1",
"@continuedev/config-types": "^1.0.10",
"@continuedev/config-types": "^1.0.13",
"@continuedev/llm-info": "^1.0.2",
"@mozilla/readability": "^0.5.0",
"@octokit/rest": "^20.0.2",

View file

@ -249,6 +249,13 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable {
};
}
private _formatProfileLabel(
firstName: string | null,
lastName: string | null,
) {
return ((firstName ?? "") + " " + (lastName ?? "")).trim();
}
/**
* Create a new auth session
* @param scopes
@ -275,7 +282,7 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable {
expiresInMs: this.getExpirationTimeMs(access_token),
loginNeeded: false,
account: {
label: user.first_name + " " + user.last_name,
label: this._formatProfileLabel(user.first_name, user.last_name),
id: user.email,
},
scopes: [],

2
gui/package-lock.json generated
View file

@ -99,7 +99,7 @@
"@aws-sdk/client-bedrock-runtime": "^3.620.1",
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
"@aws-sdk/credential-providers": "^3.620.1",
"@continuedev/config-types": "^1.0.10",
"@continuedev/config-types": "^1.0.13",
"@continuedev/llm-info": "^1.0.2",
"@mozilla/readability": "^0.5.0",
"@octokit/rest": "^20.0.2",

View file

@ -116,7 +116,7 @@ function ListBoxOption({
setHovered(false);
}}
>
<div className="flex items-center justify-between gap-3 h-5 relative">
<div className="relative flex h-5 items-center justify-between gap-3">
{option.title}
</div>
</StyledListboxOption>
@ -249,10 +249,14 @@ function ProfileSwitcher() {
(session?.account ? (
<ButtonWithTooltip
tooltipPlacement="top-end"
text={`Logged in as ${session.account.label}`}
text={
session.account.label === ""
? "Logged in"
: `Logged in as ${session.account.label}`
}
onClick={logout}
>
<UserCircleIconSolid className="w-4 h-4" />
<UserCircleIconSolid className="h-4 w-4" />
</ButtonWithTooltip>
) : (
<ButtonWithTooltip
@ -260,7 +264,7 @@ function ProfileSwitcher() {
text="Click to login to Continue"
onClick={login}
>
<UserCircleIconOutline className="w-4 h-4" />
<UserCircleIconOutline className="h-4 w-4" />
</ButtonWithTooltip>
))}
</>