refactor(tui): simplify mini footer status line (#38112)
This commit is contained in:
parent
592ef7433a
commit
dd50d457b0
15 changed files with 111 additions and 102 deletions
|
|
@ -52,7 +52,7 @@ import { readLocalAttachment } from "./local-attachment"
|
|||
import { useData } from "../../context/data"
|
||||
import { useLocation } from "../../context/location"
|
||||
import { Keymap, type KeymapCommand } from "../../context/keymap"
|
||||
import { contextUsage } from "../../util/session"
|
||||
import { contextUsage, formatContextUsage } from "../../util/session"
|
||||
import { abbreviateHome } from "../../runtime"
|
||||
|
||||
registerOpencodeSpinner()
|
||||
|
|
@ -312,11 +312,7 @@ export function Prompt(props: PromptProps) {
|
|||
session.revert?.messageID,
|
||||
)
|
||||
return {
|
||||
context: context
|
||||
? context.percent === undefined
|
||||
? Locale.number(context.tokens)
|
||||
: `${Locale.number(context.tokens)} (${context.percent}%)`
|
||||
: undefined,
|
||||
context: context ? formatContextUsage(context.tokens, context.percent) : undefined,
|
||||
cost: formattedCost,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue