mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
refactor: extract session summary utilities to shared module
This commit is contained in:
+11
-23
@@ -1,12 +1,21 @@
|
||||
import type {
|
||||
DecryptedMessage as ProtocolDecryptedMessage,
|
||||
ModelMode,
|
||||
Session,
|
||||
SessionSummary,
|
||||
SyncEvent as ProtocolSyncEvent,
|
||||
WorktreeMetadata
|
||||
} from '@hapi/protocol/types'
|
||||
|
||||
export type { AgentState, ModelMode, PermissionMode, Session, TodoItem, WorktreeMetadata } from '@hapi/protocol/types'
|
||||
export type {
|
||||
AgentState,
|
||||
ModelMode,
|
||||
PermissionMode,
|
||||
Session,
|
||||
SessionSummary,
|
||||
SessionSummaryMetadata,
|
||||
TodoItem,
|
||||
WorktreeMetadata
|
||||
} from '@hapi/protocol/types'
|
||||
|
||||
export type SessionMetadataSummary = {
|
||||
path: string
|
||||
@@ -21,27 +30,6 @@ export type SessionMetadataSummary = {
|
||||
worktree?: WorktreeMetadata
|
||||
}
|
||||
|
||||
export type SessionSummaryMetadata = {
|
||||
name?: string
|
||||
path: string
|
||||
machineId?: string
|
||||
summary?: { text: string }
|
||||
flavor?: string | null
|
||||
worktree?: WorktreeMetadata
|
||||
}
|
||||
|
||||
export type SessionSummary = {
|
||||
id: string
|
||||
active: boolean
|
||||
thinking: boolean
|
||||
activeAt: number
|
||||
updatedAt: number
|
||||
metadata: SessionSummaryMetadata | null
|
||||
todoProgress: { completed: number; total: number } | null
|
||||
pendingRequestsCount: number
|
||||
modelMode?: ModelMode
|
||||
}
|
||||
|
||||
export type MessageStatus = 'sending' | 'sent' | 'failed'
|
||||
|
||||
export type DecryptedMessage = ProtocolDecryptedMessage & {
|
||||
|
||||
Reference in New Issue
Block a user