vanguard-cli 3.1.12 ā 3.1.14
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/lib/services/scanner.js +11 -1
- package/lib/utils/ui.js +4 -12
- package/package.json +1 -1
package/lib/services/scanner.js
CHANGED
|
@@ -85,7 +85,7 @@ RESPONSE FORMAT (JSON ONLY):
|
|
|
85
85
|
const isServerErr = error.message.includes('500') || error.message.includes('503');
|
|
86
86
|
|
|
87
87
|
if (isRateLimit && attempt <= maxAttempts) {
|
|
88
|
-
const waitTime = attempt === 1 ? 30 : 60;
|
|
88
|
+
const waitTime = attempt === 1 ? 30 : 60;
|
|
89
89
|
if (spinner) {
|
|
90
90
|
const originalText = spinner.text;
|
|
91
91
|
for (let i = waitTime; i > 0; i--) {
|
|
@@ -98,6 +98,16 @@ RESPONSE FORMAT (JSON ONLY):
|
|
|
98
98
|
await sleep(waitTime * 1000);
|
|
99
99
|
}
|
|
100
100
|
return this.scanWithRetry(filePath, content, spinner, attempt + 1);
|
|
101
|
+
} else if (isRateLimit) {
|
|
102
|
+
// Final failure after retries
|
|
103
|
+
console.log(chalk.blue('\nš” Tip: Gemini Quota exceeded? Switch to local offline mode:'));
|
|
104
|
+
console.log(chalk.cyan(' vanguard config -> Select "Local Ollama"'));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const isOllamaError = error.message.includes('Ollama error') || error.message.includes('fetch failed');
|
|
108
|
+
if (isOllamaError) {
|
|
109
|
+
console.log(chalk.blue('\nš” Tip: Local AI failing? Switch to Cloud fallback:'));
|
|
110
|
+
console.log(chalk.cyan(' vanguard config -> Select "Google Gemini"'));
|
|
101
111
|
}
|
|
102
112
|
|
|
103
113
|
if (isServerErr && attempt === 1) {
|
package/lib/utils/ui.js
CHANGED
|
@@ -49,20 +49,12 @@ export function showAlert(analysis) {
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
export function showFooter() {
|
|
52
|
+
console.log(chalk.dim('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
52
53
|
console.log(
|
|
53
|
-
chalk.
|
|
54
|
+
chalk.green('š¤ Contribute: ') + chalk.underline('https://github.com/bazobehram/vanguard')
|
|
54
55
|
);
|
|
55
56
|
console.log(
|
|
56
|
-
chalk.
|
|
57
|
-
);
|
|
58
|
-
console.log(
|
|
59
|
-
chalk.green('š¤ Contribute: ') + chalk.underline('https://github.com/bazobehram/vanguard/pulls')
|
|
60
|
-
);
|
|
61
|
-
console.log(
|
|
62
|
-
chalk.cyan('ā Support the project: ') +
|
|
63
|
-
chalk.underline('https://www.buymeacoffee.com/bazobehram')
|
|
64
|
-
);
|
|
65
|
-
console.log(
|
|
66
|
-
chalk.dim('----------------------------------------------------------------------\n')
|
|
57
|
+
chalk.cyan('ā Support: ') + chalk.underline('https://www.buymeacoffee.com/bazobehram')
|
|
67
58
|
);
|
|
59
|
+
console.log(chalk.dim('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
68
60
|
}
|