Hide resume message when session has no messages

This commit is contained in:
Alexander Farber
2025-12-11 13:10:01 +01:00
parent b67ee32481
commit ba3b576906
2 changed files with 46 additions and 8 deletions

View File

@@ -20,18 +20,25 @@ export const SessionSummaryDisplay: React.FC<SessionSummaryDisplayProps> = ({
}) => {
const { stats } = useSessionStats();
// Only show the resume message if there were messages in the session
const hasMessages = stats.promptCount > 0;
return (
<>
<StatsDisplay
title={t('Agent powering down. Goodbye!')}
duration={duration}
/>
<Box marginTop={1}>
<Text color={theme.text.secondary}>
{t('To continue this session, run')}{' '}
<Text color={theme.text.accent}>qwen --resume {stats.sessionId}</Text>
</Text>
</Box>
{hasMessages && (
<Box marginTop={1}>
<Text color={theme.text.secondary}>
{t('To continue this session, run')}{' '}
<Text color={theme.text.accent}>
qwen --resume {stats.sessionId}
</Text>
</Text>
</Box>
)}
</>
);
};