Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/server/services/Endpoints/bedrock/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 9 additions & 13 deletions client/src/components/SidePanel/Agents/FileSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
EToolResources,
mergeFileConfig,
AgentCapabilities,
retrievalMimeTypes,
fileConfig as defaultFileConfig,
} from 'librechat-data-provider';
import type { ExtendedFile, AgentForm } from '~/common';
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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>
);
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/SidePanel/SidePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]}
Expand All @@ -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}
Expand Down Expand Up @@ -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"
Expand Down
7 changes: 2 additions & 5 deletions client/src/hooks/Nav/useSideNavLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
Loading