Skip to content

Commit 9ce4dba

Browse files
ndemiancclaude
andcommitted
LevelCode editor: footer model chip shows the short label, not the raw id
The footer chip rendered before the roster (which carries each model's label) finished loading, and was never refreshed after — so it showed "anthropic/claude-opus-4-8" instead of "Opus 4.8". Re-send the webview config once fetchCloudRoster populates cloudRoster so the chip picks up the short label (gatewayModelLabel already prefers roster labels). Editor tests 6/6. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9bf2efc commit 9ce4dba

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

extensions/atom-ai/extension.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,12 @@ async function fetchCloudRoster() {
228228
const res = await fetch(api + '/api/levelcode/v1/account/models', { headers: { authorization: 'Bearer ' + token } });
229229
if (!res.ok) { dbg('cloud.roster', { ok: false, status: res.status }); return null; }
230230
const data = await res.json().catch(() => null);
231-
if (data && Array.isArray(data.models)) { cloudRoster = data.models; }
231+
if (data && Array.isArray(data.models)) {
232+
cloudRoster = data.models;
233+
// The roster carries each model's short label — refresh the footer chip so it shows
234+
// "Opus 4.8" instead of the raw id it fell back to before the roster finished loading.
235+
sendConfigToWebview();
236+
}
232237
return data;
233238
} catch (e) { dbg('cloud.roster', { error: String((e && e.message) || e) }); return null; }
234239
}

0 commit comments

Comments
 (0)