diff options
| author | Allen Hutchison <[email protected]> | 2025-04-18 14:39:05 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-18 14:39:05 -0700 |
| commit | dfae3f62848f0c8c175f0e992a479c3bf49e50ed (patch) | |
| tree | 917ee82ed364c1b03d72b62c73fdc71ed9bc3aba /packages/cli/src/ui/utils/itermDetection.tsx | |
| parent | 52683dafc360c431874d85ee9e516c13c96f055f (diff) | |
Iterm refactor (#33)
* Add a warning about the flickering in iTerm.
* Move the iterm warning out of App.tsx.
Diffstat (limited to 'packages/cli/src/ui/utils/itermDetection.tsx')
| -rw-r--r-- | packages/cli/src/ui/utils/itermDetection.tsx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/cli/src/ui/utils/itermDetection.tsx b/packages/cli/src/ui/utils/itermDetection.tsx new file mode 100644 index 00000000..9a847724 --- /dev/null +++ b/packages/cli/src/ui/utils/itermDetection.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { Box, Text } from 'ink'; + +const ITermDetectionWarning: React.FC = () => { + if (process.env.TERM_PROGRAM !== 'iTerm.app') { + return null; // Don't render anything if not in iTerm + } + + return ( + <Box marginTop={1}> + <Text dimColor>Note: Flickering may occur in iTerm.</Text> + </Box> + ); +}; + +export default ITermDetectionWarning; |
