feat: show update notification in TUI and footer (#1204)

This commit is contained in:
cthomas
2026-02-27 15:03:47 -08:00
committed by GitHub
parent bb5d7d0a39
commit 841e2332f3
5 changed files with 100 additions and 8 deletions

View File

@@ -365,7 +365,7 @@ async function main(): Promise<void> {
// Check for updates on startup (non-blocking)
const { checkAndAutoUpdate } = await import("./updater/auto-update");
startStartupAutoUpdateCheck(checkAndAutoUpdate);
const autoUpdatePromise = startStartupAutoUpdateCheck(checkAndAutoUpdate);
// Clean up old overflow files (non-blocking, 24h retention)
const { cleanupOldOverflowFiles } = await import("./tools/impl/overflow");
@@ -1032,6 +1032,20 @@ async function main(): Promise<void> {
// Release notes to display (checked once on mount)
const [releaseNotes, setReleaseNotes] = useState<string | null>(null);
// Update notification: set when auto-update applied a significant new version
const [updateNotification, setUpdateNotification] = useState<string | null>(
null,
);
useEffect(() => {
autoUpdatePromise
.then((result) => {
if (result?.latestVersion) {
setUpdateNotification(result.latestVersion);
}
})
.catch(() => {});
}, []);
// Auto-install Shift+Enter keybinding for VS Code/Cursor/Windsurf (silent, no prompt)
useEffect(() => {
async function autoInstallKeybinding() {
@@ -2067,6 +2081,7 @@ async function main(): Promise<void> {
showCompactions: settings.showCompactions,
agentProvenance,
releaseNotes,
updateNotification,
sessionContextReminderEnabled: !noSystemInfoReminderFlag,
});
}