From dfae3f62848f0c8c175f0e992a479c3bf49e50ed Mon Sep 17 00:00:00 2001
From: Allen Hutchison <allen@hutchison.org>
Date: Fri, 18 Apr 2025 14:39:05 -0700
Subject: Iterm refactor (#33)

* Add a warning about the flickering in iTerm.

* Move the iterm warning out of App.tsx.
---
 packages/cli/src/ui/utils/itermDetection.tsx | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 packages/cli/src/ui/utils/itermDetection.tsx

(limited to 'packages/cli/src/ui/utils/itermDetection.tsx')

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;
-- 
cgit v1.2.3

