mvp-ai's picture
download
raw
1.05 kB
import AppKit
enum PanelLayout {
static func totalHeight(state: MenubarState, config: Config) -> CGFloat {
typealias L = Tokens.Layout
var h: CGFloat = 0
h += 44
if state.healthSummary != nil { h += 18 }
let running = state.workModel?.runningRows ?? []
for r in running { h += (r.showsBar ? L.runningRowH : L.agentRowH) }
let agents = state.normalizedAgentMilestones
h += CGFloat(agents.count) * L.agentRowH
let next = state.workModel?.nextRows ?? []
let nextTotal = max(next.count, state.workModel?.summary?.next ?? 0)
h += 26
let shown = min(next.count, config.nextVisible)
h += CGFloat(shown) * L.nextRowH
if nextTotal > shown { h += L.nextRowH }
let attn = state.workModel?.attentionRows ?? []
if !attn.isEmpty {
h += 24
if !config.attentionCollapsed { h += CGFloat(attn.count) * L.attnRowH }
}
h += 32
return min(h, L.maxPopoverHeight)
}
}

Xet Storage Details

Size:
1.05 kB
·
Xet hash:
7bd061691d8b248a8d44ece8aa7f8eff8fe4b69a59fd0ff338fc5dac481f85eb

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.