Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: update context left display logic in TerminalChatInput component (#307)

Thomas7b5f34317991
diff --git a/codex-cli/src/components/chat/terminal-chat-input.tsx b/codex-cli/src/components/chat/terminal-chat-input.tsx
index 3db4d7f189..ad7ad39a26 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 && (
+ <>
+ {" — "}
+ <Text color={contextLeftPercent > 40 ? "green" : "yellow"}>
+ {Math.round(contextLeftPercent)}% context left
+ </Text>
+ </>
+ )}
+ {contextLeftPercent <= 25 && (
<>
{" — "}
<Text color="red">