🔧 refactor: Centralize Default Agent Capabilities and Better Logging (#7598)

* refactor: Simplify grid column calculation in SourcesGroup component

* refactor: Centralize default agent capabilities and simplify capability assignment

* Edge case: use defined/fallback capabilities for ephemeral agents when the "agents" endpoint is not enabled

* refactor: consolidate gemini 2 vision check

* feat: enhance capability check logging for agents

* chore: update librechat-data-provider version to 0.7.86

* refactor: import default agent capabilities for enhanced capability management

* chore: standardize quotes in error message check for consistency

* fix: improve error logging both client and api-side for mistral ocr upload errors

* ci: update error handling in MistralOCR tests to use specific error message
This commit is contained in:
Danny Avila 2025-05-27 15:48:43 -04:00 committed by GitHub
parent 077b7e7e79
commit 2f462c9b3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 57 additions and 44 deletions

View file

@ -190,12 +190,8 @@ function SourcesGroup({ sources, limit = 3 }: { sources: ValidSource[]; limit?:
const remainingSources = sources.slice(limit);
const hasMoreSources = remainingSources.length > 0;
/** Calculate grid columns based on number of items (including the +X sources button if present) */
const totalItems = hasMoreSources ? visibleSources.length + 1 : visibleSources.length;
const gridCols = `grid-cols-${Math.min(totalItems, 4)}`;
return (
<div className={`grid ${gridCols} scrollbar-none w-full gap-2 overflow-x-auto`}>
<div className="scrollbar-none grid w-full grid-cols-4 gap-2 overflow-x-auto">
<OGDialog>
{visibleSources.map((source, i) => (
<div key={`source-${i}`} className="w-full min-w-[120px]">