Skip to content

Make username configurable in non-collaborative mode #866

Open
@dlqqq

Description

@dlqqq

Problem

Currently, when jupyter_collaboration is not installed in the environment, we use the getpass.getuser() method to retrieve the username shown instead of the Jupyter Server IdentityProvider. This is because we wanted to avoid showing "Anonymous XYZ" in the chat UI to avoid confusing users who are unfamiliar with the default IdentityProvider implementation, which is typically only used by jupyter_collaboration.

However, some server operators have informed us of use-cases where they have a custom IdentityProvider configured but do not want to install jupyter_collaboration in their deployment environment. Currently there is no way to use the JServer IdentityProvider when jupyter_collaboration is not installed.

Proposed Solution

Implement a new boolean trait on the root AiExtension class via traitlets that ensures the JServer IdentityProvider is always used to retrieve the username and avatar color. I would recommend defining it as

always_use_identity_provider = Bool(..., default_value=False)

on the root AiExtension class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions