🔄 fix: Avatar & Error Handling Enhancements (#6687)

* fix: Ensure safe access to agent capabilities in AgentConfig

* fix: don't show agent builder if agents endpoint is not enabled

* fix: Improve error logging for MCP tool calls

* fix: Enhance error message for MCP tool failures

* feat: Add optional spec and iconURL properties to TEndpointOption type

* chore: Update condition to use constant for new conversation parameter

* feat: Enhance abort error handling with additional endpoint options to properly render error message fields

* fix: Throw error instead of returning message for failed MCP tool calls

* refactor: separate logic to generate new S3 URLs for expired links

* feat: Implement S3 URL refresh for user avatars with error handling

* fix: authcontext error in chats where agent chain is used

* refactor: streamline balance configuration logic in getBalanceConfig function

* fix: enhance icon resolution logic in SpecIcon component

* fix: allow null values for spec and iconURL in TEndpointOption type

* fix: update balance check to allow null tokenCredits
This commit is contained in:
Danny Avila 2025-04-02 18:44:13 -04:00 committed by GitHub
parent cfa44de1c9
commit c4f1da26b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 184 additions and 75 deletions

View file

@ -8,7 +8,7 @@ import {
EModelEndpoint,
Permissions,
} from 'librechat-data-provider';
import type { TConfig, TInterfaceConfig } from 'librechat-data-provider';
import type { TConfig, TInterfaceConfig, TEndpointsConfig } from 'librechat-data-provider';
import type { NavLink } from '~/common';
import AgentPanelSwitch from '~/components/SidePanel/Agents/AgentPanelSwitch';
import BookmarkPanel from '~/components/SidePanel/Bookmarks/BookmarkPanel';
@ -27,6 +27,7 @@ export default function useSideNavLinks({
endpoint,
endpointType,
interfaceConfig,
endpointsConfig,
}: {
hidePanel: () => void;
assistants?: TConfig | null;
@ -35,6 +36,7 @@ export default function useSideNavLinks({
endpoint?: EModelEndpoint | null;
endpointType?: EModelEndpoint | null;
interfaceConfig: Partial<TInterfaceConfig>;
endpointsConfig: TEndpointsConfig;
}) {
const hasAccessToPrompts = useHasAccess({
permissionType: PermissionTypes.PROMPTS,
@ -70,7 +72,13 @@ export default function useSideNavLinks({
});
}
if (hasAccessToAgents && hasAccessToCreateAgents && agents && agents.disableBuilder !== true) {
if (
endpointsConfig?.[EModelEndpoint.agents] &&
hasAccessToAgents &&
hasAccessToCreateAgents &&
agents &&
agents.disableBuilder !== true
) {
links.push({
title: 'com_sidepanel_agent_builder',
label: '',
@ -133,6 +141,7 @@ export default function useSideNavLinks({
return links;
}, [
endpointsConfig?.[EModelEndpoint.agents],
interfaceConfig.parameters,
keyProvided,
assistants,