Show session resume command on exit

This commit is contained in:
Alexander Farber
2025-12-11 12:22:48 +01:00
parent 58d3a9c253
commit 5b8ce440ea
5 changed files with 35 additions and 10 deletions

View File

@@ -5,7 +5,10 @@
*/
import type React from 'react';
import { Box, Text } from 'ink';
import { StatsDisplay } from './StatsDisplay.js';
import { useSessionStats } from '../contexts/SessionContext.js';
import { theme } from '../semantic-colors.js';
import { t } from '../../i18n/index.js';
interface SessionSummaryDisplayProps {
@@ -14,9 +17,21 @@ interface SessionSummaryDisplayProps {
export const SessionSummaryDisplay: React.FC<SessionSummaryDisplayProps> = ({
duration,
}) => (
<StatsDisplay
title={t('Agent powering down. Goodbye!')}
duration={duration}
/>
);
}) => {
const { stats } = useSessionStats();
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>
</>
);
};