mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
hide context usage if no request sent
This commit is contained in:
parent
f4d4844364
commit
5c6c3b2cf6
2 changed files with 43 additions and 28 deletions
|
|
@ -17,6 +17,10 @@ export const ContextUsageDisplay = ({
|
|||
model: string;
|
||||
terminalWidth: number;
|
||||
}) => {
|
||||
if (promptTokenCount === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const percentage = promptTokenCount / tokenLimit(model);
|
||||
const percentageUsed = (percentage * 100).toFixed(1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue