icoa-cli 2.19.40 → 2.19.41
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/lib/gemini.js +3 -0
- package/package.json +1 -1
package/dist/lib/gemini.js
CHANGED
|
@@ -184,6 +184,9 @@ export async function createChatSession(context, customSystemPrompt) {
|
|
|
184
184
|
});
|
|
185
185
|
if (!res.ok) {
|
|
186
186
|
const err = await res.json().catch(() => ({ message: 'AI proxy error' }));
|
|
187
|
+
if (res.status === 429) {
|
|
188
|
+
throw new Error(chalk.yellow('⏳ ') + (err.message || 'Too many requests. Please wait a moment and try again.'));
|
|
189
|
+
}
|
|
187
190
|
throw new Error(err.message || `AI proxy returned ${res.status}`);
|
|
188
191
|
}
|
|
189
192
|
const json = await res.json();
|