clawmoney 0.15.22 → 0.15.23
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/commands/relay-setup.js +6 -38
- package/package.json +1 -1
|
@@ -120,9 +120,6 @@ function detectInstalledClis() {
|
|
|
120
120
|
return results;
|
|
121
121
|
}
|
|
122
122
|
// ── Helpers ──
|
|
123
|
-
function formatPrice(input, output) {
|
|
124
|
-
return `$${input}/$${output} per 1M`;
|
|
125
|
-
}
|
|
126
123
|
function formatBuyerPrice(input, output) {
|
|
127
124
|
const buyerInput = (input * RELAY_DISCOUNT).toFixed(3);
|
|
128
125
|
const buyerOutput = (output * RELAY_DISCOUNT).toFixed(3);
|
|
@@ -195,44 +192,15 @@ export async function relaySetupCommand() {
|
|
|
195
192
|
for (const cli of selectedClis) {
|
|
196
193
|
const allModels = modelsForCli(cli);
|
|
197
194
|
const recommended = (RECOMMENDED_MODELS[cli] ?? []).filter((m) => allModels.includes(m));
|
|
198
|
-
if (allModels.length === 0) {
|
|
199
|
-
log.warn(`${cli}: no models found
|
|
195
|
+
if (allModels.length === 0 || recommended.length === 0) {
|
|
196
|
+
log.warn(`${cli}: no recommended models found — skipping`);
|
|
200
197
|
continue;
|
|
201
198
|
}
|
|
202
|
-
log.step(`${chalk.bold(cli)}:
|
|
203
|
-
const
|
|
204
|
-
message
|
|
205
|
-
initialValue: true,
|
|
206
|
-
});
|
|
207
|
-
if (isCancel(useRecommended)) {
|
|
208
|
-
cancel("Setup cancelled");
|
|
209
|
-
process.exit(0);
|
|
210
|
-
}
|
|
211
|
-
let chosen;
|
|
212
|
-
if (useRecommended) {
|
|
213
|
-
chosen = recommended;
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
const picked = await multiselect({
|
|
217
|
-
message: `Pick ${cli} models to register:`,
|
|
218
|
-
options: allModels.map((m) => {
|
|
219
|
-
const p = API_PRICES[m];
|
|
220
|
-
return {
|
|
221
|
-
value: m,
|
|
222
|
-
label: m,
|
|
223
|
-
hint: formatPrice(p.input, p.output),
|
|
224
|
-
};
|
|
225
|
-
}),
|
|
226
|
-
initialValues: recommended,
|
|
227
|
-
required: true,
|
|
228
|
-
});
|
|
229
|
-
if (isCancel(picked)) {
|
|
230
|
-
cancel("Setup cancelled");
|
|
231
|
-
process.exit(0);
|
|
232
|
-
}
|
|
233
|
-
chosen = picked;
|
|
199
|
+
log.step(`${chalk.bold(cli)}: auto-registering ${recommended.length} recommended models`);
|
|
200
|
+
for (const m of recommended) {
|
|
201
|
+
log.message(chalk.dim(` · ${m}`));
|
|
234
202
|
}
|
|
235
|
-
for (const model of
|
|
203
|
+
for (const model of recommended) {
|
|
236
204
|
const p = API_PRICES[model];
|
|
237
205
|
registrations.push({
|
|
238
206
|
cli,
|