@ia-ccun/code-agent-cli 0.0.27 → 0.0.29
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.
|
@@ -35,10 +35,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
35
35
|
const cache = JSON.parse(readFileSync(cachePath, 'utf-8'));
|
|
36
36
|
// 缓存有效期 1 小时
|
|
37
37
|
if (cache.needsUpdate && Date.now() - cache.timestamp < 3600000) {
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
);
|
|
38
|
+
// 在输入框上方显示版本更新提示
|
|
39
|
+
const msg = `\x1b[38;2;243;139;168m⚠️ 发现新版本 v${cache.localVersion} → v${cache.latestVersion}\x1b[0m \x1b[36mnpm install -g @ia-ccun/code-agent-cli\x1b[0m`;
|
|
40
|
+
ctx.ui.setWidget("version-update", [msg], { placement: "aboveEditor" });
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
} catch (e) {
|