anygate 0.5.6 → 0.5.7
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/dist/{chunk-ZEO4BR64.js → chunk-BCPX3QLK.js} +3 -2
- package/dist/{chunk-ZEO4BR64.js.map → chunk-BCPX3QLK.js.map} +1 -1
- package/dist/cli.js +22 -9
- package/dist/cli.js.map +1 -1
- package/dist/{command-PW7KW3PP.js → command-E7O6ZQWJ.js} +13 -6
- package/dist/command-E7O6ZQWJ.js.map +1 -0
- package/dist/ui/dist/assets/index-3sdSv_1I.js +5 -0
- package/dist/ui/dist/assets/index-C4xd3r4v.css +1 -0
- package/dist/ui/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/command-PW7KW3PP.js.map +0 -1
- package/dist/ui/dist/assets/index-CfL9bOYD.css +0 -1
- package/dist/ui/dist/assets/index-Ck-e8hv_.js +0 -5
package/dist/cli.js
CHANGED
|
@@ -91,8 +91,8 @@ import {
|
|
|
91
91
|
listCredentialSkippedProviders,
|
|
92
92
|
loadPreferences,
|
|
93
93
|
loadRegistry,
|
|
94
|
-
loadServerModels,
|
|
95
94
|
localProviderToRegistry,
|
|
95
|
+
localProvidersToServerModels,
|
|
96
96
|
logActiveModel,
|
|
97
97
|
logConnected,
|
|
98
98
|
logProxy,
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
validateCustomEndpointUrl,
|
|
171
171
|
writeSecureLogLine,
|
|
172
172
|
zenRegistryStub
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-BCPX3QLK.js";
|
|
174
174
|
import {
|
|
175
175
|
filterTemplates,
|
|
176
176
|
getTemplateById,
|
|
@@ -3771,7 +3771,7 @@ function launchCodex(modelId, env, extraArgs) {
|
|
|
3771
3771
|
// src/agents/codex/prompts.ts
|
|
3772
3772
|
import pc5 from "picocolors";
|
|
3773
3773
|
import * as p6 from "@clack/prompts";
|
|
3774
|
-
async function pickCodexProvider(providers, prefs, hasFavorites = false, initialProviderId) {
|
|
3774
|
+
async function pickCodexProvider(providers, prefs, hasFavorites = false, initialProviderId, agentLabel = "Codex") {
|
|
3775
3775
|
if (providers.length === 0 && !hasFavorites) return null;
|
|
3776
3776
|
const options = providers.map((lp) => providerSelectOption(lp));
|
|
3777
3777
|
if (hasFavorites) {
|
|
@@ -3781,9 +3781,9 @@ async function pickCodexProvider(providers, prefs, hasFavorites = false, initial
|
|
|
3781
3781
|
hint: `${prefs.favoriteModels?.length ?? 0} saved favorites`
|
|
3782
3782
|
});
|
|
3783
3783
|
}
|
|
3784
|
-
const initial = initialProviderId && options.some((o) => o.value === initialProviderId) ? initialProviderId : prefs.lastCodexProvider && options.some((o) => o.value === prefs.lastCodexProvider) ? prefs.lastCodexProvider : options[0].value;
|
|
3784
|
+
const initial = initialProviderId && options.some((o) => o.value === initialProviderId) ? initialProviderId : hasFavorites ? "__favorites__" : prefs.lastCodexProvider && options.some((o) => o.value === prefs.lastCodexProvider) ? prefs.lastCodexProvider : options[0].value;
|
|
3785
3785
|
const chosen = await p6.select({
|
|
3786
|
-
message:
|
|
3786
|
+
message: `Which provider for ${agentLabel}?`,
|
|
3787
3787
|
options,
|
|
3788
3788
|
initialValue: initial
|
|
3789
3789
|
});
|
|
@@ -10523,6 +10523,7 @@ async function runClaudeAppCommand(args, boot) {
|
|
|
10523
10523
|
return 0;
|
|
10524
10524
|
}
|
|
10525
10525
|
const trace = args.includes("--trace");
|
|
10526
|
+
const useFavoritesCatalog = args.includes("--favorites");
|
|
10526
10527
|
const debugLogPath = trace ? getProxyDebugLogPath() : void 0;
|
|
10527
10528
|
if (trace) console.log(`Debug log: ${debugLogPath}`);
|
|
10528
10529
|
try {
|
|
@@ -10580,8 +10581,10 @@ async function runClaudeAppCommand(args, boot) {
|
|
|
10580
10581
|
}
|
|
10581
10582
|
activeProvider = bootSelection.provider;
|
|
10582
10583
|
selectedModel = bootSelection.model;
|
|
10584
|
+
} else if (useFavoritesCatalog && hasFavorites) {
|
|
10585
|
+
useFavorites = true;
|
|
10583
10586
|
} else {
|
|
10584
|
-
const pickedProvider = await pickCodexProvider(compatible, prefs, hasFavorites);
|
|
10587
|
+
const pickedProvider = await pickCodexProvider(compatible, prefs, hasFavorites, void 0, "Claude");
|
|
10585
10588
|
if (!pickedProvider) return 0;
|
|
10586
10589
|
if (pickedProvider === "__favorites__") {
|
|
10587
10590
|
useFavorites = true;
|
|
@@ -10641,9 +10644,19 @@ async function runClaudeAppCommand(args, boot) {
|
|
|
10641
10644
|
headers: void 0
|
|
10642
10645
|
}));
|
|
10643
10646
|
}
|
|
10644
|
-
const
|
|
10645
|
-
const
|
|
10647
|
+
const regularLocalProviders = providersForTarget(catalog, "claude-app");
|
|
10648
|
+
const regularAllModels = regularLocalProviders.flatMap(
|
|
10649
|
+
(provider) => localProvidersToServerModels([provider])
|
|
10650
|
+
);
|
|
10651
|
+
const regularServerModels = filterServerModelsByFavorites(regularAllModels, regularFavorites);
|
|
10646
10652
|
serverModels = [...cloudCodeServerModels, ...regularServerModels];
|
|
10653
|
+
const seen = /* @__PURE__ */ new Set();
|
|
10654
|
+
serverModels = serverModels.filter((m) => {
|
|
10655
|
+
const key = `${m.providerId}:${m.id}`;
|
|
10656
|
+
if (seen.has(key)) return false;
|
|
10657
|
+
seen.add(key);
|
|
10658
|
+
return true;
|
|
10659
|
+
});
|
|
10647
10660
|
} else if (selectedModel.modelFormat === "cloud-code") {
|
|
10648
10661
|
const providerData = activeProvider.providerData ?? {};
|
|
10649
10662
|
const cloudRoute = buildCloudCodeProxyRoute(selectedModel, activeProvider.apiKey, providerData);
|
|
@@ -12874,7 +12887,7 @@ Error: ${parsed.error}
|
|
|
12874
12887
|
console.log("Usage: anygate ui [--trace]\n\nOpen the settings UI in your browser.");
|
|
12875
12888
|
return 0;
|
|
12876
12889
|
}
|
|
12877
|
-
const { runUiCommand } = await import("./command-
|
|
12890
|
+
const { runUiCommand } = await import("./command-E7O6ZQWJ.js");
|
|
12878
12891
|
return runUiCommand({ trace: parsed.trace });
|
|
12879
12892
|
}
|
|
12880
12893
|
if (parsed.command === "models") {
|