codex-copilot-dx 0.4.38 → 0.4.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.mjs CHANGED
@@ -132,7 +132,10 @@ async function refreshClaudeDesktopModelDefs() {
132
132
  return modelDefs;
133
133
  } catch (e) {
134
134
  const fallback = MODEL_REGISTRY.modelDefs?.length ? `${MODEL_REGISTRY.source} model list` : "built-in model list";
135
- console.log(status("warn", `Could not refresh Claude models; using ${fallback} (${e.message})`));
135
+ const message = ctrl.signal.aborted
136
+ ? `Model refresh timed out after ${MODEL_REFRESH_TIMEOUT_MS}ms; using ${fallback}`
137
+ : `Could not refresh model list; using ${fallback} (${e.message})`;
138
+ console.log(status("warn", message));
136
139
  return MODEL_REGISTRY.modelDefs;
137
140
  } finally {
138
141
  clearTimeout(timer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-copilot-dx",
3
- "version": "0.4.38",
3
+ "version": "0.4.39",
4
4
  "description": "Use Codex Desktop, Claude Code, and Claude App with GitHub Copilot",
5
5
  "author": "Dale Xiao",
6
6
  "type": "module",
package/src/startup.mjs CHANGED
@@ -2,16 +2,12 @@ export async function initializeModelRegistry({
2
2
  loadCached,
3
3
  currentModelDefs,
4
4
  refresh,
5
- onBackgroundError = () => {},
6
5
  }) {
7
- if (!loadCached()) {
8
- return { modelDefs: await refresh(), source: "live", backgroundRefresh: null };
6
+ if (loadCached()) {
7
+ return { modelDefs: currentModelDefs(), source: "cache", backgroundRefresh: null };
9
8
  }
10
9
 
11
- const backgroundRefresh = Promise.resolve()
12
- .then(refresh)
13
- .catch(onBackgroundError);
14
- return { modelDefs: currentModelDefs(), source: "cache", backgroundRefresh };
10
+ return { modelDefs: await refresh(), source: "live", backgroundRefresh: null };
15
11
  }
16
12
 
17
13
  export function runInBackground(task, onError = () => {}) {