Session engine
Session state, conversation history, turns, persistence, and runtime coordination.
56
Matched files
11
Top dirs
21,283
Lines in slice
317
Exports found
Heuristic
Classification style
Beginner explanation
This architecture page groups files that seem to solve the same type of problem. It is a good way to understand the repo as a system rather than as a list of folders.
Beginner mental model
Read the first few high-importance files here, then follow their related-file links.
Expert explanation
This slice is assembled with path heuristics, which makes it strong for navigation and code reading but not a replacement for runtime tracing. Use it to discover likely boundaries, then validate by reading imports, exports, and orchestrator files.
Related files
| File | Lines | Importance | Exports |
|---|---|---|---|
| utils/sessionStorage.ts | 5106 | high | isTranscriptMessage, isChainParticipant, isEphemeralToolProgress, getProjectsDir |
| utils/fileHistory.ts | 1116 | high | FileHistoryBackup, FileHistorySnapshot, FileHistoryState, DiffStats |
| utils/telemetry/sessionTracing.ts | 928 | high | isEnhancedTelemetryEnabled, startInteractionSpan, endInteractionSpan, startLLMRequestSpan |
| components/tasks/RemoteSessionDetailDialog.tsx | 904 | high | formatToolUseSummary, RemoteSessionDetailDialog |
| utils/sessionStoragePortable.ts | 794 | high | LITE_READ_BUF_SIZE, validateUuid, unescapeJsonString, extractJsonStringField |
| services/compact/sessionMemoryCompact.ts | 631 | high | SessionMemoryCompactConfig, DEFAULT_SM_COMPACT_CONFIG, setSessionMemoryCompactConfig, getSessionMemoryCompactConfig |
| hooks/useRemoteSession.ts | 606 | high | useRemoteSession |
| utils/sessionRestore.ts | 552 | high | restoreSessionStateFromLog, computeRestoredAttributionState, computeStandaloneAgentContext, restoreAgentFromSession |
| bridge/sessionRunner.ts | 551 | high | safeFilenameId, PermissionRequest, createSessionSpawner, extractActivities |
| services/api/sessionIngress.ts | 515 | high | appendSessionLog, getSessionLogs, getSessionLogsViaOAuth, getTeleportEvents |
| services/SessionMemory/sessionMemory.ts | 496 | high | resetLastMemoryMessageUuid, shouldExtractMemory, initSessionMemory, ManualExtractionResult |
| utils/telemetry/betaSessionTracing.ts | 492 | high | clearBetaTracingState, isBetaTracingEnabled, truncateContent, LLMRequestNewContext |
| tasks/LocalMainSessionTask.ts | 480 | high | LocalMainSessionTaskState, registerMainSessionTask, completeMainSessionTask, foregroundMainSessionTask |
| history.ts | 465 | high | getPastedTextRefNumLines, formatPastedTextRef, formatImageRef, parseReferences |
| utils/listSessionsImpl.ts | 455 | high | SessionInfo, ListSessionsOptions, parseSessionInfoFromLite, listCandidates |
| utils/hooks/sessionHooks.ts | 448 | high | FunctionHookCallback, FunctionHook, SessionStore, SessionHooksState |
| remote/SessionsWebSocket.ts | 405 | high | SessionsWebSocketCallbacks, SessionsWebSocket |
| bridge/createSession.ts | 385 | high | createBridgeSession, getBridgeSession, archiveBridgeSession, updateBridgeSessionTitle |
| utils/ultraplan/ccrSession.ts | 350 | high | PollFailReason, UltraplanPollError, ULTRAPLAN_TELEPORT_SENTINEL, ScanResult |
| remote/RemoteSessionManager.ts | 344 | high | RemotePermissionResponse, RemoteSessionConfig, RemoteSessionCallbacks, RemoteSessionManager |
| services/SessionMemory/prompts.ts | 325 | high | DEFAULT_SESSION_MEMORY_TEMPLATE, loadSessionMemoryTemplate, loadSessionMemoryPrompt, isSessionMemoryEmpty |
| utils/agenticSessionSearch.ts | 308 | high | agenticSessionSearch |
| hooks/useHistorySearch.ts | 304 | high | useHistorySearch |
| utils/sessionFileAccessHooks.ts | 251 | high | isMemoryFileAccess, registerSessionFileAccessHooks |
| components/tasks/RemoteSessionProgress.tsx | 243 | high | formatReviewStageCounts, RemoteSessionProgress |
| services/SessionMemory/sessionMemoryUtils.ts | 208 | high | SessionMemoryConfig, DEFAULT_SESSION_MEMORY_CONFIG, getLastSummarizedMessageId, setLastSummarizedMessageId |
| utils/concurrentSessions.ts | 205 | high | SessionKind, SessionStatus, isBgSession, registerSession |
| components/SessionPreview.tsx | 194 | high | SessionPreview |
| bridge/codeSessionApi.ts | 169 | high | createCodeSession, RemoteCredentials, fetchRemoteCredentials |
| utils/sessionEnvironment.ts | 167 | high | getSessionEnvDirPath, getHookEnvFilePath, clearCwdEnvFiles, invalidateSessionEnvCache |
| utils/sessionState.ts | 151 | high | SessionState, RequiresActionDetails, SessionExternalMetadata, setSessionStateChangedListener |
| commands/session/session.tsx | 140 | high | call |
| utils/sessionActivity.ts | 134 | high | SessionActivityReason, registerSessionActivityCallback, unregisterSessionActivityCallback, sendSessionActivitySignal |
| Task.ts | 126 | high | TaskType, TaskStatus, isTerminalTaskStatus, TaskHandle |
| utils/suggestions/shellHistoryCompletion.ts | 120 | high | ShellHistoryMatch, clearShellHistoryCache, prependToShellHistoryCache, getShellHistoryCompletion |
| components/HistorySearchDialog.tsx | 118 | high | HistorySearchDialog |
| components/SessionBackgroundHint.tsx | 108 | high | SessionBackgroundHint |
| utils/background/remote/remoteSession.ts | 99 | high | BackgroundRemoteSession, BackgroundRemoteSessionPrecondition, checkBackgroundRemoteSessionEligibility |
| assistant/sessionHistory.ts | 88 | high | HISTORY_PAGE_SIZE, HistoryPage, HistoryAuthCtx, createHistoryAuthCtx |
| commands/rename/generateSessionName.ts | 68 | high | generateSessionName |
| bridge/sessionIdCompat.ts | 58 | high | setCseShimGate, toCompatSessionId, toInfraSessionId |
| components/PromptInput/HistorySearchInput.tsx | 51 | high | — |
| hooks/useFileHistorySnapshotInit.ts | 26 | high | useFileHistorySnapshotInit |
| services/tips/tipHistory.ts | 18 | high | recordTipShown, getSessionsSinceLastShown |
| commands/session/index.ts | 17 | high | — |
| commands/backfill-sessions/index.js | 2 | high | — |
| hooks/useAssistantHistory.ts | 251 | medium | useAssistantHistory |
| hooks/useSSHSession.ts | 242 | medium | useSSHSession |
| utils/sessionStart.ts | 233 | medium | takeInitialUserMessage, processSessionStartHooks, processSetupHooks |
| hooks/useArrowKeyHistory.tsx | 229 | medium | HistoryMode, useArrowKeyHistory |
| hooks/useSessionBackgrounding.ts | 159 | medium | useSessionBackgrounding |
| utils/sessionIngressAuth.ts | 141 | medium | getSessionIngressAuthToken, getSessionIngressAuthHeaders, updateSessionIngressAuthToken |
| utils/sessionTitle.ts | 130 | medium | extractConversationText, generateSessionTitle |
| server/createDirectConnectSession.ts | 89 | medium | DirectConnectError, createDirectConnectSession |
| utils/sessionUrl.ts | 65 | medium | ParsedSessionUrl, parseSessionIdentifier |
| utils/sessionEnvVars.ts | 23 | medium | getSessionEnvVars, setSessionEnvVar, deleteSessionEnvVar, clearSessionEnvVars |