Track session usage totals (#26644)

This commit is contained in:
Dax 2026-05-12 01:18:57 -04:00 committed by GitHub
commit 36d40fee4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 }],