From 7b5f34317991e2b435fb6a82b564b6ba95532360 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 19 Apr 2025 02:16:33 +1000 Subject: [PATCH] fix: update context left display logic in TerminalChatInput component (#307) Added persistent context length with colour coding. --- codex-cli/src/components/chat/terminal-chat-input.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/codex-cli/src/components/chat/terminal-chat-input.tsx b/codex-cli/src/components/chat/terminal-chat-input.tsx index 3db4d7f1..ad7ad39a 100644 --- a/codex-cli/src/components/chat/terminal-chat-input.tsx +++ b/codex-cli/src/components/chat/terminal-chat-input.tsx @@ -397,7 +397,15 @@ export default function TerminalChatInput({ <> send q or ctrl+c to exit | send "/clear" to reset | send "/help" for commands | press enter to send - {contextLeftPercent < 25 && ( + {contextLeftPercent > 25 && ( + <> + {" — "} + 40 ? "green" : "yellow"}> + {Math.round(contextLeftPercent)}% context left + + + )} + {contextLeftPercent <= 25 && ( <> {" — "}