fix: address round-4 review findings

- apply(): if a newer invocation changed the catalog while this one
  awaited the model refresh, exit silently. The superseded invocation
  otherwise reported the second's catalog in its notice and could fire
  one extra setModel. Pinned with a deferred-refresh test.
- CITATION.cff: drop date-released while the CHANGELOG is [Unreleased]
  and no release tag exists; version stays 0.1.0.
- Tests: 18 (was 17).
This commit is contained in:
AlexKucera committed 2026-11-25 10:43:26 +01:00
1 parent 8d91094022
commit 78e89241a6
3 files changed
+17 -3

No files matched your search

+2
View File
@@ -277,6 +277,8 @@ export default function nousPortal(pi: ExtensionAPI) {
else writeFileSync(flagPath, next);
catalog = next;
await ctx.modelRegistry.refresh({ providers: [PROVIDER_ID] });
// A newer invocation may have changed the catalog while we awaited; it reports the final state, so stay silent.
if (catalog !== next) return;
const shown = ctx.modelRegistry.getAvailable().filter((m) => m.provider === PROVIDER_ID && inCatalog(m));
// Keep the session usable only when a Nous model just got filtered out; a session on another provider
// is left alone, and the notice names the model actually in use, not the first hit.