feat: add TUI session orchestrator
Add a first-class active-session orchestrator for the Ink TUI: - list, activate, close, and launch live process-local TUI sessions - hydrate committed and in-flight output when switching sessions - dispatch a new prompt session from the +new row with session-scoped model picks - expose a clickable live-session count in the status chrome - preserve stable row order while initially focusing the current session - support mouse hit-testing for floating orchestrator overlays - add backend and frontend regression coverage for the lifecycle and UI helpers
This commit is contained in:
@@ -122,6 +122,43 @@ export interface SessionResumeResponse {
|
||||
session_id: string
|
||||
}
|
||||
|
||||
export type LiveSessionStatus = 'idle' | 'starting' | 'waiting' | 'working'
|
||||
|
||||
export interface SessionActiveItem {
|
||||
current?: boolean
|
||||
id: string
|
||||
last_active?: number
|
||||
message_count?: number
|
||||
model?: string
|
||||
preview?: string
|
||||
session_key?: string
|
||||
started_at?: number
|
||||
status: LiveSessionStatus
|
||||
title?: string
|
||||
}
|
||||
|
||||
export interface SessionActiveListResponse {
|
||||
sessions?: SessionActiveItem[]
|
||||
}
|
||||
|
||||
export interface SessionInflightTurn {
|
||||
assistant?: string
|
||||
streaming?: boolean
|
||||
user?: string
|
||||
}
|
||||
|
||||
export interface SessionActivateResponse {
|
||||
inflight?: null | SessionInflightTurn
|
||||
info?: SessionInfo
|
||||
message_count?: number
|
||||
messages: GatewayTranscriptMessage[]
|
||||
running?: boolean
|
||||
session_id: string
|
||||
session_key?: string
|
||||
started_at?: number
|
||||
status?: LiveSessionStatus
|
||||
}
|
||||
|
||||
export interface SessionListItem {
|
||||
id: string
|
||||
message_count: number
|
||||
@@ -203,6 +240,7 @@ export interface SessionBranchResponse {
|
||||
}
|
||||
|
||||
export interface SessionCloseResponse {
|
||||
closed?: boolean
|
||||
ok?: boolean
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user