@wrongstack/cli 0.306.0 → 0.306.2

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.
@@ -13,11 +13,11 @@ import {
13
13
  runOAuthLoginKind,
14
14
  runOAuthLoginMenu,
15
15
  validateFamily
16
- } from "./chunk-WC3DK6BI.js";
16
+ } from "./chunk-HITHEXE3.js";
17
17
  import {
18
18
  parseAuthFlags
19
- } from "./chunk-5JW3XCRA.js";
20
- import "./chunk-3IC4IEZC.js";
19
+ } from "./chunk-KXN5HZDL.js";
20
+ import "./chunk-VUVOMXWP.js";
21
21
  import "./chunk-SSSJQVUY.js";
22
22
  import {
23
23
  loadConfigProviders,
@@ -657,4 +657,4 @@ async function runAuthRemove(deps, providerId) {
657
657
  export {
658
658
  authCmd
659
659
  };
660
- //# sourceMappingURL=auth-GVPYLJPS.js.map
660
+ //# sourceMappingURL=auth-L3WGSGDX.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  LOCAL_LLM_PRESETS,
3
3
  runLiveProviderPicker
4
- } from "./chunk-5JW3XCRA.js";
4
+ } from "./chunk-KXN5HZDL.js";
5
5
  import {
6
6
  openBrowser,
7
7
  runCodexOAuthLogin,
@@ -1374,4 +1374,4 @@ export {
1374
1374
  addCustomProvider,
1375
1375
  addKeyForProvider
1376
1376
  };
1377
- //# sourceMappingURL=chunk-WC3DK6BI.js.map
1377
+ //# sourceMappingURL=chunk-HITHEXE3.js.map
@@ -2,7 +2,7 @@ import {
2
2
  hasApiKey,
3
3
  isKeylessLocalProvider,
4
4
  visibleModelIds
5
- } from "./chunk-3IC4IEZC.js";
5
+ } from "./chunk-VUVOMXWP.js";
6
6
  import {
7
7
  appendHistory,
8
8
  backupCurrent
@@ -1056,4 +1056,4 @@ export {
1056
1056
  runLiveProviderPicker,
1057
1057
  runPicker
1058
1058
  };
1059
- //# sourceMappingURL=chunk-5JW3XCRA.js.map
1059
+ //# sourceMappingURL=chunk-KXN5HZDL.js.map
@@ -298,6 +298,36 @@ function normalizeTuiThinkingWord(value) {
298
298
  return word;
299
299
  }
300
300
 
301
+ // src/services/run-git.ts
302
+ import { spawn } from "node:child_process";
303
+ import { toErrorMessage } from "@wrongstack/core/utils";
304
+ async function runGit(args, cwd) {
305
+ try {
306
+ return await new Promise((resolve, reject) => {
307
+ const child = spawn("git", args, {
308
+ cwd,
309
+ stdio: ["ignore", "pipe", "pipe"],
310
+ signal: AbortSignal.timeout(3e4),
311
+ windowsHide: true
312
+ });
313
+ let stdout = "";
314
+ let stderr = "";
315
+ child.stdout?.on("data", (d) => {
316
+ stdout += d;
317
+ });
318
+ child.stderr?.on("data", (d) => {
319
+ stderr += d;
320
+ });
321
+ child.on("error", (err) => {
322
+ reject(new Error(`Failed to run git: ${err.message}`));
323
+ });
324
+ child.on("close", (code) => resolve({ stdout, stderr, code: code ?? 0 }));
325
+ });
326
+ } catch (err) {
327
+ throw new Error(toErrorMessage(err));
328
+ }
329
+ }
330
+
301
331
  export {
302
332
  resolvePersistPath,
303
333
  resolveActualTarget,
@@ -312,6 +342,7 @@ export {
312
342
  removeSuggestions,
313
343
  clearSuggestions,
314
344
  MAX_TUI_THINKING_WORD_LENGTH,
315
- normalizeTuiThinkingWord
345
+ normalizeTuiThinkingWord,
346
+ runGit
316
347
  };
317
- //# sourceMappingURL=chunk-V3XH6XBJ.js.map
348
+ //# sourceMappingURL=chunk-T6YAVFXA.js.map
@@ -72,16 +72,47 @@ async function buildPickableProviders(modelsRegistry, config) {
72
72
  (inherited?.models ?? []).map((m) => m.id),
73
73
  cfg
74
74
  );
75
- out.push({ id, family, models });
75
+ out.push({
76
+ id,
77
+ family,
78
+ models,
79
+ ...inherited ? { modelDetails: modelDetails(inherited.models) } : {}
80
+ });
76
81
  }
77
82
  for (const p of catalog) {
78
83
  if (seen.has(p.id)) continue;
79
84
  if (p.family === "unsupported") continue;
80
85
  if (!isSelectable(p.id)) continue;
81
- out.push({ id: p.id, family: p.family, models: p.models.map((m) => m.id) });
86
+ out.push({
87
+ id: p.id,
88
+ family: p.family,
89
+ models: p.models.map((m) => m.id),
90
+ modelDetails: modelDetails(p.models)
91
+ });
82
92
  }
83
93
  return out;
84
94
  }
95
+ function modelDetails(models) {
96
+ return Object.fromEntries(
97
+ models.map((model) => [
98
+ model.id,
99
+ {
100
+ name: model.name,
101
+ description: model.description,
102
+ tools: model.tool_call,
103
+ vision: model.modalities?.input?.includes("image"),
104
+ reasoning: model.reasoning ?? model.reasoningConfig !== void 0,
105
+ maxContext: model.limit?.context,
106
+ maxOutput: model.limit?.output,
107
+ inputCost: model.cost?.input,
108
+ outputCost: model.cost?.output,
109
+ cacheReadCost: model.cost?.cache_read,
110
+ knowledge: model.knowledge,
111
+ releaseDate: model.release_date
112
+ }
113
+ ])
114
+ );
115
+ }
85
116
 
86
117
  export {
87
118
  visibleModelIds,
@@ -89,4 +120,4 @@ export {
89
120
  hasApiKey,
90
121
  buildPickableProviders
91
122
  };
92
- //# sourceMappingURL=chunk-3IC4IEZC.js.map
123
+ //# sourceMappingURL=chunk-VUVOMXWP.js.map