import React from 'react'; import { useSessionAssistState } from '@/hooks/useSessionAssist'; import { useI18n } from '@/lib/i18n'; interface SessionRecapNoteProps { sessionId: string; directory?: string; isMobile: boolean; } // Quiet one-paragraph recap of the agent's last reply, rendered right under // the last message (above the reserved bottom gap). Appears only after the // 1-minute quiet window, so the layout shift happens off-screen in practice. export const SessionRecapNote: React.FC = React.memo(({ sessionId, directory, isMobile }) => { const { visibleRecap } = useSessionAssistState(sessionId, directory); const { t } = useI18n(); if (!visibleRecap) { return null; } return (
{/* The last assistant turn carries pb-8 — pull the recap up into that gap. */}
{t('chat.recap.label')} {visibleRecap}
); }); SessionRecapNote.displayName = 'SessionRecapNote';