@ia-ccun/code-agent-cli 0.0.27 → 0.0.30
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) {
|
|
@@ -186,12 +185,6 @@ export default function (pi: ExtensionAPI) {
|
|
|
186
185
|
segments.push(modelColored);
|
|
187
186
|
segments.push(theme.fg("muted", quote));
|
|
188
187
|
|
|
189
|
-
// ── Version segment (rightmost) ─────────────────────────
|
|
190
|
-
const version = getVersion();
|
|
191
|
-
if (version) {
|
|
192
|
-
segments.push(theme.fg("muted", `v${version}`));
|
|
193
|
-
}
|
|
194
|
-
|
|
195
188
|
const joined = segments.join(sep);
|
|
196
189
|
return [truncateToWidth(joined, width)];
|
|
197
190
|
},
|