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 +4 -1
- package/package.json +1 -1
- package/src/startup.mjs +3 -7
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
|
-
|
|
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
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 (
|
|
8
|
-
return { modelDefs:
|
|
6
|
+
if (loadCached()) {
|
|
7
|
+
return { modelDefs: currentModelDefs(), source: "cache", backgroundRefresh: null };
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
|
|
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 = () => {}) {
|