Skip to content

[Enhancement]: Hide "Attach Files" from sidebar using librechat.yaml #11823

@espenhk

Description

@espenhk

What features would you like to see added?

We would like to simplify down the interface for our users, and to do so we would like to hide the Attach Files portion of the sidebar. We still want to keep the ability for a user to upload a file and use it in a specific chat. Essentially, have a way of hiding this part from the sidebar:

Image

The aim is to not have users start building file storage in another location, as opposed to keeping them where they should be kept. We'd rather prefer they upload a file again and again to add it to a specific chat, than the drawbacks that comes with essentially giving them a messy file storage area.

We are managing file retention settings at the storage level (Blob Storage), so eventually the Attach Files section would either get filled with references to files that no longer exist, or things would start "disappearing" for users that use that part of the sidebar. We want the files to get removed, but preferably that should just happen under the hood with a restrictive retention policy that cleans things away on behalf of our users (governance reasons). Exposing the file management area to our users risks creating the expectation that those files will just stick around, causing them to use it as an extra drive with later potential for frustrations when things disappear.

More details

Disabling + hiding the prompts feature is done via librechat.yaml using the prompts parameter, for instance like so:

interface:
  prompts: false

The request is to add a similar config for Attach Files, i.e. removing that part of the interface. Looks like this is the part where the check is made to see if the Prompts section should show up:

const hasAccessToPrompts = useHasAccess({
permissionType: PermissionTypes.PROMPTS,
permission: Permissions.USE,
});

and this portion has an if check around the component:

if (hasAccessToPrompts) {
links.push({
title: 'com_ui_prompts',
label: '',
icon: MessageSquareQuote,
id: 'prompts',
Component: PromptsAccordion,
});
}

Similarly for the files panel, there is no if check and no parameter:

links.push({
title: 'com_sidepanel_attach_files',
label: '',
icon: AttachmentIcon,
id: 'files',
Component: FilesPanel,
});

There could definitely be other portions of the code relevant for this change, though.

Which components are impacted by your request?

UI

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions