Skip to content

Commit d41bee1

Browse files
danny-avilaolivierhub
authored andcommitted
🔧 fix: Streamline Builder Links and Enhance UI Consistency (danny-avila#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
1 parent 45268d4 commit d41bee1

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed

api/server/services/Endpoints/bedrock/initialize.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const initializeClient = async ({ req, res, endpointOption }) => {
6161
eventHandlers,
6262
collectedUsage,
6363
spec: endpointOption.spec,
64+
iconURL: endpointOption.iconURL,
6465
endpoint: EModelEndpoint.bedrock,
6566
resendFiles: endpointOption.resendFiles,
6667
maxContextTokens:

client/src/components/SidePanel/Agents/FileSearch.tsx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
EToolResources,
66
mergeFileConfig,
77
AgentCapabilities,
8-
retrievalMimeTypes,
98
fileConfig as defaultFileConfig,
109
} from 'librechat-data-provider';
1110
import type { ExtendedFile, AgentForm } from '~/common';
@@ -77,6 +76,15 @@ export default function FileSearch({
7776
</div>
7877
<FileSearchCheckbox />
7978
<div className="flex flex-col gap-3">
79+
{/* File Search (RAG API) Files */}
80+
<FileRow
81+
files={files}
82+
setFiles={setFiles}
83+
setFilesLoading={setFilesLoading}
84+
agent_id={agent_id}
85+
tool_resource={EToolResources.file_search}
86+
Wrapper={({ children }) => <div className="flex flex-wrap gap-2">{children}</div>}
87+
/>
8088
<div>
8189
<button
8290
type="button"
@@ -105,18 +113,6 @@ export default function FileSearch({
105113
{localize('com_agents_file_search_disabled')}
106114
</div>
107115
)}
108-
{/* Knowledge Files */}
109-
<FileRow
110-
files={files}
111-
setFiles={setFiles}
112-
setFilesLoading={setFilesLoading}
113-
agent_id={agent_id}
114-
tool_resource={EToolResources.file_search}
115-
fileFilter={(file: ExtendedFile) =>
116-
retrievalMimeTypes.some((regex) => regex.test(file.type ?? ''))
117-
}
118-
Wrapper={({ children }) => <div className="flex flex-wrap gap-2">{children}</div>}
119-
/>
120116
</div>
121117
</div>
122118
);

client/src/components/SidePanel/SidePanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ const SidePanel = ({
183183
<ResizablePanelGroup
184184
direction="horizontal"
185185
onLayout={(sizes) => throttledSaveLayout(sizes)}
186-
className="transition-width relative h-full w-full flex-1 overflow-auto bg-white dark:bg-gray-800"
186+
className="transition-width relative h-full w-full flex-1 overflow-auto bg-presentation"
187187
>
188188
<ResizablePanel
189189
defaultSize={currentLayout[0]}
@@ -195,7 +195,7 @@ const SidePanel = ({
195195
</ResizablePanel>
196196
{artifacts != null && (
197197
<>
198-
<ResizableHandleAlt withHandle className="ml-3 bg-border-medium dark:text-white" />
198+
<ResizableHandleAlt withHandle className="ml-3 bg-border-medium text-text-primary" />
199199
<ResizablePanel
200200
defaultSize={currentLayout[1]}
201201
minSize={minSizeMain}
@@ -227,7 +227,7 @@ const SidePanel = ({
227227
/>
228228
</div>
229229
{(!isCollapsed || minSize > 0) && !isSmallScreen && !fullCollapse && (
230-
<ResizableHandleAlt withHandle className="bg-transparent dark:text-white" />
230+
<ResizableHandleAlt withHandle className="bg-transparent text-text-primary" />
231231
)}
232232
<ResizablePanel
233233
tagName="nav"

client/src/hooks/Nav/useSideNavLinks.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ export default function useSideNavLinks({
5959
isAssistantsEndpoint(endpoint) &&
6060
assistants &&
6161
assistants.disableBuilder !== true &&
62-
keyProvided &&
63-
interfaceConfig.parameters === true
62+
keyProvided
6463
) {
6564
links.push({
6665
title: 'com_sidepanel_assistant_builder',
@@ -76,9 +75,7 @@ export default function useSideNavLinks({
7675
hasAccessToCreateAgents &&
7776
isAgentsEndpoint(endpoint) &&
7877
agents &&
79-
agents.disableBuilder !== true &&
80-
keyProvided &&
81-
interfaceConfig.parameters === true
78+
agents.disableBuilder !== true
8279
) {
8380
links.push({
8481
title: 'com_sidepanel_agent_builder',

0 commit comments

Comments
 (0)