refactor(diary): share the console types through internal/consolekit so diary no longer links bonfire (IN-07, quick-261028-rqd)

This commit is contained in:
Jakub Zych
2026-10-28 20:46:32 +01:00
parent 3520d5d480
commit f3f87f3cc4
14 changed files with 364 additions and 169 deletions

View File

@@ -23,6 +23,7 @@ import (
"charm.land/bubbles/v2/spinner"
tea "charm.land/bubbletea/v2"
"charm.land/lipgloss/v2"
"git.golem15.com/golem15/summercms/internal/consolekit"
)
// Progress bar colors: the cyan to green gradient of the earlier bonfire
@@ -558,6 +559,12 @@ func raise(sig os.Signal) {
}
}
// bonfire's live view printer serves consolekit.PrintAbove, which diary's
// console channel calls without linking bonfire.
func init() {
consolekit.SetPrintAbove(printAboveLines)
}
// printAboveLines prints s, one or more lines, above the running live view,
// whichever console started it (bonfire.PrintAbove). It reports false when
// no view runs.