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';
|
2025-06-30 20:28:49 -04:00
|
|
|
import { StatsDisplay } from './StatsDisplay.js';
|
2026-03-04 04:08:26 +05:30
|
|
|
import { useSessionStats } from '../contexts/SessionContext.js';
|
|
|
|
|
import { escapeShellArg, getShellConfiguration } from '@google/gemini-cli-core';
|
2025-06-11 16:40:31 -04:00
|
|
|
|
|
|
|
|
interface SessionSummaryDisplayProps {
|
|
|
|
|
duration: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const SessionSummaryDisplay: React.FC<SessionSummaryDisplayProps> = ({
|
|
|
|
|
duration,
|
2026-03-04 04:08:26 +05:30
|
|
|
}) => {
|
|
|
|
|
const { stats } = useSessionStats();
|
|
|
|
|
const { shell } = getShellConfiguration();
|
|
|
|
|
const footer = `To resume this session: gemini --resume ${escapeShellArg(stats.sessionId, shell)}`;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<StatsDisplay
|
|
|
|
|
title="Agent powering down. Goodbye!"
|
|
|
|
|
duration={duration}
|
|
|
|
|
footer={footer}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
};
|