From 3565f77171af7ca34038073d872326732c07d3ed Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Fri, 28 Aug 2026 22:45:34 +0200 Subject: [PATCH] fix(client): compose shared buttons for two disclosures and seed re-enabled ask drafts Compose the shared Button for the memory-artifacts and web-search disclosure rows, keeping only their geometry local. The web-search row keeps its instant hover by suppressing the recipe's color transition, since the chevron beside it reveals without a fade and the existing test pins that. Seed the ask-specific draft when Save drafts is re-enabled. An answer captured while saving was off has no persisted ask draft for autosave to restore, so expanding opened an empty composer and the next collapse read that empty value back over the in-memory answer. --- .../Chat/Messages/Content/MemoryArtifacts.tsx | 10 +++++----- .../Chat/Messages/Content/WebSearch.tsx | 16 +++++++++------- client/src/hooks/Input/useAskAnswerMode.ts | 8 ++++++++ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/client/src/components/Chat/Messages/Content/MemoryArtifacts.tsx b/client/src/components/Chat/Messages/Content/MemoryArtifacts.tsx index 387b7de6c3..d1538d313d 100644 --- a/client/src/components/Chat/Messages/Content/MemoryArtifacts.tsx +++ b/client/src/components/Chat/Messages/Content/MemoryArtifacts.tsx @@ -1,7 +1,7 @@ import { useId, useMemo, useState } from 'react'; import { ChevronDown } from 'lucide-react'; import { Tools } from 'librechat-data-provider'; -import { disclosureChevronVariants } from '@librechat/client'; +import { Button, disclosureChevronVariants } from '@librechat/client'; import type { MemoryArtifact, TAttachment } from 'librechat-data-provider'; import { toolPanelSpacingClassName } from './disclosure'; import { useExpandCollapse, useLocalize } from '~/hooks'; @@ -61,12 +61,12 @@ export default function MemoryArtifacts({ attachments }: { attachments?: TAttach return ( <>