From e3acd18c07eb8e43eeaecc8a3e389baaa9c7a86a Mon Sep 17 00:00:00 2001 From: andresgit <9771158+andresgit@users.noreply.github.com> Date: Thu, 15 May 2025 16:35:48 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=8E=A8=20feat:=20add=20`copy-tex`=20t?= =?UTF-8?q?o=20improve=20copying=20KaTeX=20(#7308)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When selecting equations and using copy paste, uses the correct latex code. Co-authored-by: Ruben Talstra --- client/src/main.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/main.jsx b/client/src/main.jsx index 4c7bde0270..53b483f8d2 100644 --- a/client/src/main.jsx +++ b/client/src/main.jsx @@ -6,6 +6,7 @@ import './style.css'; import './mobile.css'; import { ApiErrorBoundaryProvider } from './hooks/ApiErrorBoundaryContext'; import 'katex/dist/katex.min.css'; +import 'katex/dist/contrib/copy-tex.js'; const container = document.getElementById('root'); const root = createRoot(container); From 71effb1a66f2ec3097e00d41007e88b335ca42ba Mon Sep 17 00:00:00 2001 From: matt burnett Date: Thu, 15 May 2025 09:37:14 -0400 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=94=83=20refactor:=20`AgentFooter`=20?= =?UTF-8?q?to=20conditionally=20render=20buttons=20based=20on=20`activePan?= =?UTF-8?q?el`=20(#7306)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SidePanel/Agents/AgentFooter.tsx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/client/src/components/SidePanel/Agents/AgentFooter.tsx b/client/src/components/SidePanel/Agents/AgentFooter.tsx index 062f81d253..75f10a3851 100644 --- a/client/src/components/SidePanel/Agents/AgentFooter.tsx +++ b/client/src/components/SidePanel/Agents/AgentFooter.tsx @@ -50,10 +50,12 @@ export default function AgentFooter({ return localize('com_ui_create'); }; + const showButtons = activePanel === Panel.builder; + return (
- {activePanel !== Panel.advanced && } - {user?.role === SystemRoles.ADMIN && } + {showButtons && } + {user?.role === SystemRoles.ADMIN && showButtons && } {/* Context Button */}
{(agent?.author === user?.id || user?.role === SystemRoles.ADMIN) && hasAccessToShareAgents && ( - - )} + + )} {agent && agent.author === user?.id && } {/* Submit Button */}
+ )} +
diff --git a/librechat.example.yaml b/librechat.example.yaml index 0b4963cb2a..ae14b0faae 100644 --- a/librechat.example.yaml +++ b/librechat.example.yaml @@ -71,6 +71,13 @@ interface: multiConvo: true agents: true +# Example Cloudflare turnstile (optional) +#turnstile: +# siteKey: "your-site-key-here" +# options: +# language: "auto" # "auto" or an ISO 639-1 language code (e.g. en) +# size: "normal" # Options: "normal", "compact", "flexible", or "invisible" + # Example Registration Object Structure (optional) registration: socialLogins: ['github', 'google', 'discord', 'openid', 'facebook', 'apple'] diff --git a/package-lock.json b/package-lock.json index 5aa383170a..f4690d43c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1073,6 +1073,7 @@ "@dicebear/collection": "^9.2.2", "@dicebear/core": "^9.2.2", "@headlessui/react": "^2.1.2", + "@marsidev/react-turnstile": "^1.1.0", "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-alert-dialog": "^1.0.2", "@radix-ui/react-checkbox": "^1.0.3", @@ -19729,6 +19730,16 @@ "resolved": "client", "link": true }, + "node_modules/@marsidev/react-turnstile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@marsidev/react-turnstile/-/react-turnstile-1.1.0.tgz", + "integrity": "sha512-X7bP9ZYutDd+E+klPYF+/BJHqEyyVkN4KKmZcNRr84zs3DcMoftlMAuoKqNSnqg0HE7NQ1844+TLFSJoztCdSA==", + "license": "MIT", + "peerDependencies": { + "react": "^17.0.2 || ^18.0.0 || ^19.0", + "react-dom": "^17.0.2 || ^18.0.0 || ^19.0" + } + }, "node_modules/@microsoft/eslint-formatter-sarif": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@microsoft/eslint-formatter-sarif/-/eslint-formatter-sarif-3.1.0.tgz", diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.ts index 978aea2520..bdac70a0c6 100644 --- a/packages/data-provider/src/config.ts +++ b/packages/data-provider/src/config.ts @@ -505,10 +505,28 @@ export const intefaceSchema = z export type TInterfaceConfig = z.infer; export type TBalanceConfig = z.infer; +export const turnstileOptionsSchema = z + .object({ + language: z.string().default('auto'), + size: z.enum(['normal', 'compact', 'flexible', 'invisible']).default('normal'), + }) + .default({ + language: 'auto', + size: 'normal', + }); + +export const turnstileSchema = z.object({ + siteKey: z.string(), + options: turnstileOptionsSchema.optional(), +}); + +export type TTurnstileConfig = z.infer; + export type TStartupConfig = { appTitle: string; socialLogins?: string[]; interface?: TInterfaceConfig; + turnstile?: TTurnstileConfig; balance?: TBalanceConfig; discordLoginEnabled: boolean; facebookLoginEnabled: boolean; @@ -578,6 +596,7 @@ export const configSchema = z.object({ filteredTools: z.array(z.string()).optional(), mcpServers: MCPServersSchema.optional(), interface: intefaceSchema, + turnstile: turnstileSchema.optional(), fileStrategy: fileSourceSchema.default(FileSources.local), actions: z .object({