diff --git a/client/src/components/Chat/Subagents/SubagentThreadPanel.test.tsx b/client/src/components/Chat/Subagents/SubagentThreadPanel.test.tsx index be2909f44b..c835da419a 100644 --- a/client/src/components/Chat/Subagents/SubagentThreadPanel.test.tsx +++ b/client/src/components/Chat/Subagents/SubagentThreadPanel.test.tsx @@ -70,6 +70,9 @@ jest.mock('librechat-data-provider', () => { jest.mock('~/data-provider', () => ({ ACTIVE_THREAD_REFRESH_MS: 2000, + /** The panel's bottom clearance follows the conversation's configured footer + * (`useConfiguredFooter`), so the panel now reads the startup config. */ + useGetStartupConfig: () => ({ data: undefined }), useSubagentThreadQuery: (...args: unknown[]) => mockUseSubagentThreadQuery(...args), subagentThreadHasTaskEvidence: (view: SubagentThreadView | undefined, taskId: string): boolean => view?.messages.some( diff --git a/client/src/components/Chat/Subagents/SubagentThreadPanel.tsx b/client/src/components/Chat/Subagents/SubagentThreadPanel.tsx index b5006084d0..5d4fcab540 100644 --- a/client/src/components/Chat/Subagents/SubagentThreadPanel.tsx +++ b/client/src/components/Chat/Subagents/SubagentThreadPanel.tsx @@ -48,13 +48,14 @@ import SubagentActivity, { SubagentActivityScrollSurface } from './SubagentActiv import ApprovalProvider from '~/components/Chat/Messages/Content/ApprovalContext'; import { isMacPlatform, resolveComposerKeyDown } from '~/utils/shortcuts'; import { useFocusTrap, useLocalize, useNavigateToConvo } from '~/hooks'; +import { useConfiguredFooter } from '~/components/Chat/Footer'; import { useParentSubagents } from './ParentSubagentsProvider'; import SubagentConversation from './SubagentConversation'; import { eventSubagentSelection } from './eventSelection'; import { resolveSubagentAgentId } from './identity'; import { useAgentsMapContext } from '~/Providers'; import { isLiveSubagentStatus } from './status'; -import { renderAgentAvatar } from '~/utils'; +import { cn, renderAgentAvatar } from '~/utils'; import { useChatSurface } from './surface'; const EVENT_TASK_PAGE_SIZE = 3; @@ -109,6 +110,7 @@ const failedControlLocaleKey = (reason?: string) => { }; export default function SubagentThreadPanel({ selection }: { selection: ActiveSubagentPanel }) { + const hasConfiguredFooter = useConfiguredFooter(); const localize = useLocalize(); const panelStore = useStore(); const { showToast } = useToastContext(); @@ -1460,11 +1462,12 @@ export default function SubagentThreadPanel({ selection }: { selection: ActiveSu {activityPanel} {(showControlFooter || composerMode != null) && ( - /* The main chat form's own bottom rhythm: a started conversation carries - no disclaimer, so its composer keeps only enough clearance to show its - shadow, and this one keeps the same, so the two surfaces end on one - line when the panel is open beside the thread. */ -