feat(macos): load sessions via gateway

This commit is contained in:
Peter Steinberger
2025-12-13 16:33:14 +00:00
parent 7d89fa2591
commit 840e266b5d
5 changed files with 96 additions and 269 deletions

View File

@@ -135,13 +135,8 @@ final class MenuContextCardInjector: NSObject, NSMenuDelegate {
}
private func loadCurrentRows() async throws -> [SessionRow] {
let hints = SessionLoader.configHints()
let store = SessionLoader.resolveStorePath(override: hints.storePath)
let defaults = SessionDefaults(
model: hints.model ?? SessionLoader.fallbackModel,
contextTokens: hints.contextTokens ?? SessionLoader.fallbackContextTokens)
let loaded = try await SessionLoader.loadRows(at: store, defaults: defaults)
let snapshot = try await SessionLoader.loadSnapshot()
let loaded = snapshot.rows
let now = Date()
let current = loaded.filter { row in
if row.key == "main" { return true }