zot/internal/agent
patriceckhart b9e7517149 feat(tui): show github release notes once after upgrading
The first time a user launches a newer zot binary, the tui pops
a dismissible overlay with the release notes for that version.
Press any key to close; the version goes into config.json's
last_changelog_shown so the same notes never reappear.

Lifecycle:
  - dev builds (version "" / "dev" / "0.0.0"): no fetch ever
  - first-ever launch (no LastChangelogShown stored): seed it
    silently with the current version so fresh installs don't
    get release notes dumped at them
  - subsequent launches with the same version: skipped (config
    already records that version was shown)
  - launch with a different version: fetch the release page from
    https://api.github.com/repos/patriceckhart/zot/releases/tags/v<ver>
    and open the dialog if the body is non-empty
  - dismiss writes LastChangelogShown so it never repeats

Components:
  - internal/agent/changelog.go: FetchChangelog/Async, and the
    Should/Mark/Seed helpers around config.LastChangelogShown.
    Honours $GITHUB_TOKEN exactly like the install scripts and
    the existing update check, so private-repo fetches work
    with auth.
  - internal/agent/modes/changelog_dialog.go: the overlay.
    Markdown body via the existing RenderMarkdown pipeline,
    scrollable with up/down/pgup/pgdn, any other key dismisses.
  - internal/agent/modes/interactive.go: new ChangelogChan and
    OnChangelogDismiss config fields, single-shot select case
    in Run() that opens the dialog when a payload arrives.
  - internal/agent/cli.go: spawns the fetch goroutine, gates it
    on ShouldShowChangelog, wires OnChangelogDismiss to
    MarkChangelogShown so the version is persisted.

Best-effort: timeouts at 4s, missing tag => silent skip, network
failure => silent skip + retry on next launch (no
LastChangelogShown update if we never showed anything).

Documented in the README under the SYSTEM.md note.
2026-04-19 16:12:13 +02:00
..
extensions fix(extensions): close ext.commands / ext.tools / lastFrameTime races 2026-04-19 15:27:09 +02:00
modes feat(tui): show github release notes once after upgrading 2026-04-19 16:12:13 +02:00
tools initial commit 2026-04-17 20:36:38 +02:00
args.go feat(skills): user skills now opt-in via --with-skills 2026-04-19 16:03:26 +02:00
botcmd.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
botcmd_unix.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
botcmd_windows.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
build.go feat(skills): user skills now opt-in via --with-skills 2026-04-19 16:03:26 +02:00
changelog.go feat(tui): show github release notes once after upgrading 2026-04-19 16:12:13 +02:00
cli.go feat(tui): show github release notes once after upgrading 2026-04-19 16:12:13 +02:00
config.go feat(tui): show github release notes once after upgrading 2026-04-19 16:12:13 +02:00
extcmd.go feat: extension system (subprocess + json-rpc, any language) 2026-04-19 14:09:43 +02:00
modelsync.go initial commit 2026-04-17 20:36:38 +02:00
rpc.go feat(extensions): --no-ext to skip discovery for one run 2026-04-19 15:42:34 +02:00
systemprompt.go initial commit 2026-04-17 20:36:38 +02:00
update.go tui: show 'update available' banner at top of chat 2026-04-18 11:49:22 +02:00