feat(protocol): carry tab, tabRank, createdAt and lastActiveAt on SessionState

List metadata the web console needs to order the chat session list like
pi2.nvim's :PiSessions: the tab handle, its 1-based visual tabline position,
and the creation/last-activity timestamps. Never emitted by the reducer; the
web normalizer and the sessions store preserve them across snapshot and live
event updates.
This commit is contained in:
yuez committed 2026-10-27 19:08:47 +08:00
1 parent c4d0057b0b
commit 92f844d694
3 files changed
+82 -1

No files matched your search

+18
View File
@@ -206,6 +206,24 @@ export interface SessionState {
* `first_message` fallback). Never emitted by the reducer.
*/
firstMessage?: string | null;
/**
* List metadata only: the live projection of `Session.attached_tab`; positive
* finite number marks an nvim tab handle. Never emitted by the reducer.
*/
tab?: number | null;
/**
* List metadata only: the 1-based visual tabline position of `tab` in
* `nvim_list_tabpages()`. Absent on older plugins. Never emitted by the reducer.
*/
tabRank?: number | null;
/**
* List metadata only: creation timestamp in epoch ms. Never emitted by the reducer.
*/
createdAt?: number | null;
/**
* List metadata only: last active timestamp in epoch ms. Never emitted by the reducer.
*/
lastActiveAt?: number | null;
}
/* ------------------------------------------------------------------ */