Skip to content

Commit 761d126

Browse files
committed
Head a fallback turn with the engine's name, not its provider id
1 parent 71e973b commit 761d126

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
yet, that one engine is read once. Nothing is read at startup, and no
88
other engine is read. A new session that has not used or selected a
99
model yet is not primed, as before.
10+
- A turn shown with OpenCode's own figures is headed by the engine's name,
11+
as its engine figures are (`vllm-mlx`, not `vllmmlx`).
1012

1113
## [0.3.0] – 2026-09-23
1214
### Added

‎tui.tsx‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,26 @@ export default Plugin.define({
663663
}
664664
}
665665

666+
/**
667+
* An engine's name as its own view heads it, so a turn that falls back to
668+
* OpenCode's figures keeps the same heading (`vllm-mlx`, not `vllmmlx`).
669+
* Providers with no adapter keep their id.
670+
*/
671+
function engineLabel(provider: string): string {
672+
const known: Record<string, string> = {
673+
mtplx: "MTPLX",
674+
omlx: "oMLX",
675+
llamacpp: "llama.cpp",
676+
llamafile: "llamafile",
677+
splash: "Splash",
678+
koboldcpp: "KoboldCpp",
679+
kobold: "KoboldCpp",
680+
mlxserve: "mlx-serve",
681+
"mlx-serve": "mlx-serve",
682+
}
683+
return promTarget(provider)?.label ?? known[provider] ?? provider
684+
}
685+
666686
// ---- baseline priming ---------------------------------------------------
667687
// A counter-difference engine is read at each turn's end, and that reading
668688
// is the next turn's baseline -- so the first turn after launch had none
@@ -796,7 +816,7 @@ export default Plugin.define({
796816
// A model or provider switch replaces this session's line rather than
797817
// blending two engines' figures into one reading. Per session, so a
798818
// different model in another tab is not a switch here.
799-
show(encodeView({ engine: provider, rows: [], notes: ["…"] }), sessionID, key)
819+
show(encodeView({ engine: engineLabel(provider), rows: [], notes: ["…"] }), sessionID, key)
800820
}
801821

802822
// One signal for every fetch this turn. Each request still gets its own
@@ -854,7 +874,7 @@ export default Plugin.define({
854874
const enriched = line !== null
855875
if (!line) {
856876
line = universalView(
857-
provider,
877+
engineLabel(provider),
858878
info,
859879
turn,
860880
cfg.display,

0 commit comments

Comments
 (0)