base_parts_ai 1.0.48 → 1.0.49
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/ai_utils.js +4 -4
- package/package.json +1 -1
package/lib/ai_utils.js
CHANGED
|
@@ -76,7 +76,7 @@ function rerunCurrentCli() {
|
|
|
76
76
|
*/
|
|
77
77
|
function fetchConfig(buildCfg) {
|
|
78
78
|
return new Promise(function (resolve) {
|
|
79
|
-
var url = '
|
|
79
|
+
var url = 'https://jai.jaskle.cn/hm/hm_pub/ai_cc_cfg?r=' + Math.random();
|
|
80
80
|
http.get(url, { timeout: 8000 }, function (res) {
|
|
81
81
|
var chunks = '';
|
|
82
82
|
res.on('data', function (chunk) { chunks += chunk; });
|
|
@@ -122,7 +122,7 @@ function fetchConfig(buildCfg) {
|
|
|
122
122
|
return false;
|
|
123
123
|
}
|
|
124
124
|
if (newVer && process.env.BASE_PARTS_AI_SKIP_SELF_UPDATE !== '1' && semverGt(newVer, currentVer)) {
|
|
125
|
-
console.log('[fetchConfig]
|
|
125
|
+
console.log('[fetchConfig] 检测到新版本: ' + newVer + '(当前 ' + currentVer + ')');
|
|
126
126
|
var confirmed = "yes"
|
|
127
127
|
// confirmed = await select({
|
|
128
128
|
// message: '是否立即升级?',
|
|
@@ -234,7 +234,7 @@ function getAiTipOsParam() {
|
|
|
234
234
|
* @returns {string}
|
|
235
235
|
*/
|
|
236
236
|
function buildAiTipCommand() {
|
|
237
|
-
return 'curl -s -m
|
|
237
|
+
return 'curl -s -m 5 ' + buildAiTipUrl('cc');
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
/**
|
|
@@ -243,7 +243,7 @@ function buildAiTipCommand() {
|
|
|
243
243
|
* @returns {string}
|
|
244
244
|
*/
|
|
245
245
|
function buildAiTipUrl(cli) {
|
|
246
|
-
return '
|
|
246
|
+
return 'https://jai.jaskle.cn/hm/pub/ai_tip?cli=' + cli + '-' + getAiTipOsParam();
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
/**
|