2025-06-11 16:40:31 -04:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2025-08-26 00:04:53 +02:00
|
|
|
import type React from 'react';
|
2026-02-12 23:29:34 -05:00
|
|
|
import { Box, Text } from 'ink';
|
2025-06-30 20:28:49 -04:00
|
|
|
import { StatsDisplay } from './StatsDisplay.js';
|
2026-02-12 23:29:34 -05:00
|
|
|
import { Colors } from '../colors.js';
|
2025-06-11 16:40:31 -04:00
|
|
|
|
|
|
|
|
interface SessionSummaryDisplayProps {
|
|
|
|
|
duration: string;
|
2026-02-12 23:29:34 -05:00
|
|
|
sessionName?: string;
|
|
|
|
|
resumeCommandHint?: string;
|
2025-06-11 16:40:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const SessionSummaryDisplay: React.FC<SessionSummaryDisplayProps> = ({
|
|
|
|
|
duration,
|
2026-02-12 23:29:34 -05:00
|
|
|
sessionName,
|
|
|
|
|
resumeCommandHint,
|
2025-06-30 20:28:49 -04:00
|
|
|
}) => (
|
2026-02-12 23:29:34 -05:00
|
|
|
<Box flexDirection="column">
|
|
|
|
|
<StatsDisplay title="Agent powering down. Goodbye!" duration={duration} />
|
|
|
|
|
{sessionName && resumeCommandHint && (
|
|
|
|
|
<Box flexDirection="column" marginTop={1}>
|
|
|
|
|
<Text color={Colors.Gray}>
|
|
|
|
|
Session: <Text color={Colors.Foreground}>{sessionName}</Text>
|
|
|
|
|
</Text>
|
|
|
|
|
<Text color={Colors.Gray}>
|
|
|
|
|
You can resume your session by typing:{' '}
|
|
|
|
|
<Text color={Colors.AccentPurple}>{resumeCommandHint}</Text>
|
|
|
|
|
</Text>
|
|
|
|
|
</Box>
|
|
|
|
|
)}
|
|
|
|
|
</Box>
|
2025-06-30 20:28:49 -04:00
|
|
|
);
|