fix(tui): place provider before cost in footer (#46808)

This commit is contained in:
Simon Klee 2026-09-02 15:05:00 +02:00 committed by GitHub
parent 44a3bf2520
commit d57e210f84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View file

@ -73,8 +73,8 @@ export function footerStatuslinePolicy(input: {
"agent",
"model",
"context",
"cost",
"provider",
"cost",
"menu",
]
const groups = order.flatMap((id) => selected.get(id) ?? [])

View file

@ -124,7 +124,7 @@ test.each([false, true])(
const model = width === 112 ? "GPT-5.6 Sol (50% Off) [max]" : mono ? "GPT-5.6... [max]" : "GPT-5.6\u2026 [max]"
expect(row).toBe(
(width === 112
? ["Build", model, "14.1K (1%)", "$0.04", "Anomaly / OpenCode", "ctrl+p menu"]
? ["Build", model, "14.1K (1%)", "Anomaly / OpenCode", "$0.04", "ctrl+p menu"]
: width === 40
? ["Build", model, "1% ctx"]
: ["Build", model]

View file

@ -72,9 +72,15 @@ describe("run footer width", () => {
test("allocation priority is separate from placement", () => {
expect(footerStatuslinePolicy({ ...screenshot, width: 15 }).groups.map((group) => group.id)).toEqual(["model"])
expect(footerStatuslinePolicy({ ...screenshot, width: 60 }).groups.map((group) => group.id)).toEqual([
"agent",
"model",
"context",
"cost",
])
const full = footerStatuslinePolicy({ ...screenshot, width: 112 })
expect(full.text).toBe(
"Build \u00b7 GPT-5.6 Sol (50% Off) [max] \u00b7 14.1K (1%) \u00b7 $0.04 \u00b7 Anomaly / OpenCode \u00b7 ctrl+p menu",
"Build \u00b7 GPT-5.6 Sol (50% Off) [max] \u00b7 14.1K (1%) \u00b7 Anomaly / OpenCode \u00b7 $0.04 \u00b7 ctrl+p menu",
)
})