@kibibot/cli 1.0.5 → 1.0.7
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/config.js +2 -0
- package/dist/lib/api.js +7 -1
- package/package.json +1 -1
package/dist/commands/config.js
CHANGED
|
@@ -35,6 +35,8 @@ export function registerConfig(program) {
|
|
|
35
35
|
console.log(chalk.dim('─'.repeat(40)));
|
|
36
36
|
console.log(` ${chalk.dim('File:')} ${CONFIG_PATH}`);
|
|
37
37
|
console.log(` ${chalk.dim('apiKey:')} ${config.apiKey ? maskKey(config.apiKey) : chalk.dim('(not set)')}`);
|
|
38
|
+
console.log(` ${chalk.dim('apiUrl:')} ${'https://api.kibi.bot'}`);
|
|
39
|
+
console.log(` ${chalk.dim('llmUrl:')} ${'https://llm.kibi.bot/v1'}`);
|
|
38
40
|
console.log();
|
|
39
41
|
});
|
|
40
42
|
configCmd
|
package/dist/lib/api.js
CHANGED
|
@@ -32,8 +32,14 @@ function friendlyError(err) {
|
|
|
32
32
|
return err.body?.detail || 'Access denied. Your API key may not have the required permissions.';
|
|
33
33
|
case 404:
|
|
34
34
|
return err.body?.detail || 'Not found.';
|
|
35
|
-
case 429:
|
|
35
|
+
case 429: {
|
|
36
|
+
const detail = err.body?.detail;
|
|
37
|
+
if (typeof detail === 'object' && detail !== null && 'message' in detail)
|
|
38
|
+
return detail.message;
|
|
39
|
+
if (typeof detail === 'string')
|
|
40
|
+
return detail;
|
|
36
41
|
return 'Rate limited. Try again later.';
|
|
42
|
+
}
|
|
37
43
|
default:
|
|
38
44
|
if (err.statusCode >= 500) {
|
|
39
45
|
return 'Server error. Try again later.';
|