jupyterlab / jupyter-chat

An extension to add a chat panel
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Path configuration for .chat files #61

Open mvallet91 opened 2 days ago

mvallet91 commented 2 days ago

Problem

The .chat files are created in the home directory of JupyterLab. It would be nice to be able to specify the path for chat files so users can put them into a chats folder, or admins (for instance using JupyterHub) can store them in a different path to minimize confusion for novice users.

Proposed Solution

Enable configuration or something like a jupyterlab_collaborative_chat_config.py that is processed on startup, where the path can be specified.

brichet commented 2 days ago

Thanks for opening this @mvallet91.

When creating a chat file, you can specify an existing directory in the dialog, like chats/general.chat if the chats directory already exists. We could add a setting for a default chat directory, and the path would be relative to this directory.

The left panel also provides a list of existing chat files, as a shortcut to open it (in the left panel). We have deliberately limited the exploration to the root directory, to avoid extra computation if jupyterlab run in a huge file system. If we provide a setting for a root chats directory, we should probably update also the directory to explore in the left panel.