gitarsenal-cli 1.9.33 → 1.9.34
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/.venv_status.json +1 -1
- package/bin/gitarsenal.js +23 -5
- package/package.json +1 -1
package/.venv_status.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"created":"2025-08-10T17:
|
|
1
|
+
{"created":"2025-08-10T17:58:47.793Z","packages":["modal","gitingest","requests","anthropic"],"uv_version":"uv 0.8.4 (Homebrew 2025-07-30)"}
|
package/bin/gitarsenal.js
CHANGED
|
@@ -133,16 +133,34 @@ async function previewRecommendations(repoUrl) {
|
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
// Use global fetch (Node 18+) and follow redirects
|
|
137
|
+
const res = await fetch(apiUrl, {
|
|
138
|
+
method: 'POST',
|
|
139
|
+
headers: {
|
|
140
|
+
'Content-Type': 'application/json',
|
|
141
|
+
'User-Agent': 'GitArsenal-CLI/1.0'
|
|
142
|
+
},
|
|
143
|
+
body: JSON.stringify(payload),
|
|
144
|
+
redirect: 'follow'
|
|
145
|
+
});
|
|
146
|
+
|
|
137
147
|
spinner.stop();
|
|
138
148
|
|
|
139
|
-
if (!res) {
|
|
140
|
-
|
|
149
|
+
if (!res.ok) {
|
|
150
|
+
const text = await res.text().catch(() => '');
|
|
151
|
+
console.log(chalk.yellow(`⚠️ Preview request failed (${res.status}).`));
|
|
152
|
+
if (text) console.log(chalk.gray(`Response: ${text.slice(0, 500)}`));
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const data = await res.json().catch(() => null);
|
|
157
|
+
if (!data) {
|
|
158
|
+
console.log(chalk.yellow('⚠️ Could not parse recommendations preview response.'));
|
|
141
159
|
return null;
|
|
142
160
|
}
|
|
143
161
|
|
|
144
|
-
printGpuTorchCudaSummary(
|
|
145
|
-
return
|
|
162
|
+
printGpuTorchCudaSummary(data);
|
|
163
|
+
return data;
|
|
146
164
|
} catch (e) {
|
|
147
165
|
spinner.stop();
|
|
148
166
|
console.log(chalk.yellow(`⚠️ Preview failed: ${e.message}`));
|