Track session usage totals (#26644)

This commit is contained in:
Dax
2026-05-12 01:18:57 -04:00
committed by GitHub
parent e36bc20f84
commit 36d40fee4d
20 changed files with 1882 additions and 26 deletions

View File

@@ -147,6 +147,9 @@ function stateApi(sync: ReturnType<typeof useSync>): TuiPluginApi["state"] {
count() {
return sync.data.session.length
},
get(sessionID) {
return sync.session.get(sessionID)
},
diff(sessionID) {
return (sync.data.session_diff[sessionID] ?? []).flatMap((item) =>
item.file === undefined ? [] : [{ ...item, file: item.file }],