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

Added persistent context length with colour coding.
This commit is contained in:
Thomas
2025-04-19 02:16:33 +10:00
committed by GitHub
parent 0d6a98f9af
commit 7b5f343179

View File

@@ -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">