🔧 fix: Streamline Builder Links and Enhance UI Consistency (#5229)

* fix: Include iconURL in Bedrock client initialization

* fix: unnecessary filtering for agent file_search files

* chore: use theme bg colors

* refactor: rely on endpoint config for enabling builder links in side navigation instead of parameters

* fix: remove unnecessary keyProvided check for agent builder link
This commit is contained in:
Danny Avila 2025-01-09 12:03:35 -05:00 committed by GitHub
parent dd927583a7
commit 687ab32bd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 21 deletions

View file

@ -61,6 +61,7 @@ const initializeClient = async ({ req, res, endpointOption }) => {
eventHandlers,
collectedUsage,
spec: endpointOption.spec,
iconURL: endpointOption.iconURL,
endpoint: EModelEndpoint.bedrock,
resendFiles: endpointOption.resendFiles,
maxContextTokens:

View file

@ -5,7 +5,6 @@ import {
EToolResources,
mergeFileConfig,
AgentCapabilities,
retrievalMimeTypes,
fileConfig as defaultFileConfig,
} from 'librechat-data-provider';
import type { ExtendedFile, AgentForm } from '~/common';
@ -77,6 +76,15 @@ export default function FileSearch({
</div>
<FileSearchCheckbox />
<div className="flex flex-col gap-3">
{/* File Search (RAG API) Files */}
<FileRow
files={files}
setFiles={setFiles}
setFilesLoading={setFilesLoading}
agent_id={agent_id}
tool_resource={EToolResources.file_search}
Wrapper={({ children }) => <div className="flex flex-wrap gap-2">{children}</div>}
/>
<div>
<button
type="button"
@ -105,18 +113,6 @@ export default function FileSearch({
{localize('com_agents_file_search_disabled')}
</div>
)}
{/* Knowledge Files */}
<FileRow
files={files}
setFiles={setFiles}
setFilesLoading={setFilesLoading}
agent_id={agent_id}
tool_resource={EToolResources.file_search}
fileFilter={(file: ExtendedFile) =>
retrievalMimeTypes.some((regex) => regex.test(file.type ?? ''))
}
Wrapper={({ children }) => <div className="flex flex-wrap gap-2">{children}</div>}
/>
</div>
</div>
);

View file

@ -183,7 +183,7 @@ const SidePanel = ({
<ResizablePanelGroup
direction="horizontal"
onLayout={(sizes) => throttledSaveLayout(sizes)}
className="transition-width relative h-full w-full flex-1 overflow-auto bg-white dark:bg-gray-800"
className="transition-width relative h-full w-full flex-1 overflow-auto bg-presentation"
>
<ResizablePanel
defaultSize={currentLayout[0]}
@ -195,7 +195,7 @@ const SidePanel = ({
</ResizablePanel>
{artifacts != null && (
<>
<ResizableHandleAlt withHandle className="ml-3 bg-border-medium dark:text-white" />
<ResizableHandleAlt withHandle className="ml-3 bg-border-medium text-text-primary" />
<ResizablePanel
defaultSize={currentLayout[1]}
minSize={minSizeMain}
@ -227,7 +227,7 @@ const SidePanel = ({
/>
</div>
{(!isCollapsed || minSize > 0) && !isSmallScreen && !fullCollapse && (
<ResizableHandleAlt withHandle className="bg-transparent dark:text-white" />
<ResizableHandleAlt withHandle className="bg-transparent text-text-primary" />
)}
<ResizablePanel
tagName="nav"

View file

@ -59,8 +59,7 @@ export default function useSideNavLinks({
isAssistantsEndpoint(endpoint) &&
assistants &&
assistants.disableBuilder !== true &&
keyProvided &&
interfaceConfig.parameters === true
keyProvided
) {
links.push({
title: 'com_sidepanel_assistant_builder',
@ -76,9 +75,7 @@ export default function useSideNavLinks({
hasAccessToCreateAgents &&
isAgentsEndpoint(endpoint) &&
agents &&
agents.disableBuilder !== true &&
keyProvided &&
interfaceConfig.parameters === true
agents.disableBuilder !== true
) {
links.push({
title: 'com_sidepanel_agent_builder',