Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🚪 fix: Gate Artifacts Toggle on Agent Capability Flag (#13665)
Serhii Zghama8824e8f918b4
diff --git a/client/src/components/Chat/Input/Artifacts.tsx b/client/src/components/Chat/Input/Artifacts.tsxindex bd40639986..ddc36eb7ee 100644--- a/client/src/components/Chat/Input/Artifacts.tsx+++ b/client/src/components/Chat/Input/Artifacts.tsx@@ -1,10 +1,10 @@import React, { memo, useState, useCallback, useMemo, useEffect } from 'react';import * as Ariakit from '@ariakit/react';import { CheckboxButton } from '@librechat/client';-import { ArtifactModes } from 'librechat-data-provider';import { WandSparkles, ChevronDown } from 'lucide-react';+import { ArtifactModes, defaultAgentCapabilities } from 'librechat-data-provider';+import { useLocalize, useAgentCapabilities } from '~/hooks';import { useBadgeRowContext } from '~/Providers';-import { useLocalize } from '~/hooks';import { cn } from '~/utils';interface ArtifactsToggleState {@@ -17,6 +17,10 @@ function Artifacts() {const context = useBadgeRowContext();const { toggleState, debouncedChange, isPinned } = context?.artifacts ?? {};+ const { artifactsEnabled } = useAgentCapabilities(+ context?.agentsConfig?.capabilities ?? defaultAgentCapabilities,+ );+const [isPopoverOpen, setIsPopoverOpen] = useState(false);const [isButtonExpanded, setIsButtonExpanded] = useState(false);@@ -73,6 +77,10 @@ function Artifacts() {}}, [isCustomEnabled, debouncedChange]);+ if (!artifactsEnabled) {+ return null;+ }+if (!isEnabled && !isPinned) {return null;}