mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 10:27:33 +00:00
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
export const DESKTOP_READ_WINDOW = 300
|
|
export const UNFLUSHED_SETTLE_MS = 1_500
|
|
|
|
import type { AgentType } from '../../shared/agent-status/contracts/agent-status-types'
|
|
import type {
|
|
NativeChatMessage,
|
|
NativeChatTurnLifecycle
|
|
} from '../../shared/native-chat/native-chat-types'
|
|
import type { ResolveSessionFileOptions } from './session-file-resolver'
|
|
|
|
export type SubscribeNativeChatTranscriptArgs = ResolveSessionFileOptions & {
|
|
agent: AgentType
|
|
sessionId: string
|
|
onAppend: (messages: NativeChatMessage[], lifecycle?: NativeChatTurnLifecycle) => void
|
|
onInitialSnapshot?: (
|
|
messages: NativeChatMessage[],
|
|
hasMore: boolean,
|
|
beforeOffset: number,
|
|
error?: string,
|
|
lifecycle?: NativeChatTurnLifecycle
|
|
) => void
|
|
/** Report unflushed history once before snapshots so views can leave loading without claiming a settled read. */
|
|
onTranscriptPending?: () => void
|
|
onReplace?: (
|
|
messages: NativeChatMessage[],
|
|
hasMore: boolean,
|
|
beforeOffset: number,
|
|
lifecycle?: NativeChatTurnLifecycle
|
|
) => void
|
|
initialLimit?: number
|
|
sourceOrder?: boolean
|
|
filePath?: string
|
|
debounceMs?: number
|
|
resolvePollIntervalMs?: number
|
|
reconciliationIntervalMs?: number
|
|
}
|
|
|
|
export type NativeChatTranscriptSubscription = {
|
|
unsubscribe: () => void
|
|
watching: boolean
|
|
}
|