From f7a1e30c1dfbe5fddcbfe38e89a0c5efef9fbeab Mon Sep 17 00:00:00 2001 From: t Date: Tue, 1 Dec 2026 11:01:22 -0700 Subject: Restrict the Antigravity usage footer to TUI sessions --- _usage_footer.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to '_usage_footer.lua') diff --git a/_usage_footer.lua b/_usage_footer.lua index 2c27e8b..421afd5 100644 --- a/_usage_footer.lua +++ b/_usage_footer.lua @@ -130,6 +130,7 @@ function M.install(ext) state = { sections = {} } package.loaded[slot] = state ext.on("render_footer", function(event) + if event.has_tui == false then return end local inner = event:get_component() state.handle = event:set_component({ render = function(_, width) @@ -147,6 +148,7 @@ function M.install(ext) return lines end, }) + if state.handle and next(state.sections) then start_clock(state) end end) ext.on("session_end", function() state.closed = true @@ -169,8 +171,10 @@ function M.publish(ext, key, section, windows, status, opts) end if type(section) ~= "function" and type(section) ~= "string" then return false end state.sections[key] = section - start_clock(state) - if state.handle then state.handle:invalidate() end + if state.handle then + start_clock(state) + state.handle:invalidate() + end return true end -- cgit v1.3