Skip to content

Commit

Permalink
capitalize initials
Browse files Browse the repository at this point in the history
  • Loading branch information
dlqqq committed Aug 3, 2023
1 parent 3360c40 commit f0c8994
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/jupyter-ai/jupyter_ai/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ def get_chat_user(self) -> ChatUser:

if collaborative:
names = self.current_user.name.split(" ", maxsplit=2)
initials = "".join([(name[0] if len(name) > 0 else "") for name in names])
initials = "".join(
[(name.capitalize()[0] if len(name) > 0 else "") for name in names]
)
chat_user_kwargs = {
# set in case IdentityProvider doesn't return initials, e.g.
# JupyterHub (#302)
Expand Down

0 comments on commit f0c8994

Please sign in to comment.