mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
30 lines
764 B
TypeScript
30 lines
764 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import type React from 'react';
|
|
import { Box, Text } from 'ink';
|
|
import { useUIState } from '../contexts/UIStateContext.js';
|
|
import { theme } from '../semantic-colors.js';
|
|
|
|
export const ExitWarning: React.FC = () => {
|
|
const uiState = useUIState();
|
|
return (
|
|
<>
|
|
{uiState.dialogsVisible && uiState.ctrlCPressedOnce && (
|
|
<Box marginTop={1}>
|
|
<Text color={theme.status.warning}>Press Ctrl+C again to exit.</Text>
|
|
</Box>
|
|
)}
|
|
|
|
{uiState.dialogsVisible && uiState.ctrlDPressedOnce && (
|
|
<Box marginTop={1}>
|
|
<Text color={theme.status.warning}>Press Ctrl+D again to exit.</Text>
|
|
</Box>
|
|
)}
|
|
</>
|
|
);
|
|
};
|