mirror of
https://github.com/anomalyco/opencode.git
synced 2026-09-08 16:14:59 +00:00
fix(tui): place provider before cost in footer (#46808)
This commit is contained in:
parent
44a3bf2520
commit
d57e210f84
3 changed files with 9 additions and 3 deletions
|
|
@ -73,8 +73,8 @@ export function footerStatuslinePolicy(input: {
|
|||
"agent",
|
||||
"model",
|
||||
"context",
|
||||
"cost",
|
||||
"provider",
|
||||
"cost",
|
||||
"menu",
|
||||
]
|
||||
const groups = order.flatMap((id) => selected.get(id) ?? [])
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue