Repo context
Project-aware search, context gathering, and repository introspection.
50
Matched files
9
Top dirs
9,487
Lines in slice
167
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/analyzeContext.ts | 1383 | high | TOOL_TOKEN_COUNT_OVERHEAD, DeferredBuiltinTool, SystemToolDetail, SystemPromptSectionDetail |
| utils/ripgrep.ts | 680 | high | ripgrepCommand, RipgrepTimeoutError, ripGrepStream, ripGrep |
| tools/GrepTool/GrepTool.ts | 578 | high | GrepTool |
| components/ContextVisualization.tsx | 489 | high | ContextVisualization |
| hooks/toolPermission/PermissionContext.ts | 389 | high | createPermissionContext, createPermissionQueueOps, createResolveOnce |
| components/GlobalSearchDialog.tsx | 343 | high | GlobalSearchDialog, parseRipgrepLine |
| commands/context/context-noninteractive.ts | 326 | high | collectContextData, call |
| utils/readEditContext.ts | 228 | high | CHUNK_SIZE, MAX_SCAN_BYTES, EditContext, readEditContext |
| utils/context.ts | 222 | high | MODEL_CONTEXT_WINDOW_DEFAULT, COMPACT_MAX_OUTPUT_TOKENS, CAPPED_DEFAULT_MAX_TOKENS, ESCALATED_MAX_TOKENS |
| context/stats.tsx | 220 | high | StatsStore, createStatsStore, StatsContext, StatsProvider |
| commands/install-github-app/ChooseRepoStep.tsx | 211 | high | ChooseRepoStep |
| tools/GrepTool/UI.tsx | 201 | high | renderToolUseMessage, renderToolUseErrorMessage, renderToolResultMessage, getToolUseSummary |
| tools/GlobTool/GlobTool.ts | 199 | high | Output, GlobTool |
| context.ts | 190 | high | getSystemPromptInjection, setSystemPromptInjection, getGitStatus, getSystemContext |
| utils/agentContext.ts | 179 | high | SubagentContext, TeammateAgentContext, AgentContext, getAgentContext |
| utils/detectRepository.ts | 179 | high | ParsedRepository, clearRepositoryCaches, detectCurrentRepository, detectCurrentRepositoryWithHost |
| utils/githubRepoPathMapping.ts | 163 | high | updateGithubRepoPathMapping, getKnownPathsForRepo, filterExistingPaths, validateRepoAtPath |
| context/promptOverlayContext.tsx | 125 | high | PromptOverlayData, PromptOverlayProvider, usePromptOverlay, usePromptOverlayDialog |
| ink/components/ClockContext.tsx | 112 | high | Clock, createClock, ClockContext, ClockProvider |
| components/TeleportRepoMismatchDialog.tsx | 104 | high | TeleportRepoMismatchDialog |
| utils/teammateContext.ts | 97 | high | TeammateContext, getTeammateContext, runWithTeammateContext, isInProcessTeammate |
| tools/LSPTool/symbolContext.ts | 91 | high | getSymbolAtPosition |
| context/voice.tsx | 88 | high | VoiceState, VoiceProvider, useVoiceState, useSetVoiceState |
| commands/context/context.tsx | 64 | high | call |
| tools/GlobTool/UI.tsx | 63 | high | userFacingName, renderToolUseMessage, renderToolUseErrorMessage, renderToolResultMessage |
| ink/components/TerminalFocusContext.tsx | 52 | high | TerminalFocusContextProps, TerminalFocusProvider |
| ink/components/StdinContext.ts | 50 | high | Props |
| utils/model/contextWindowUpgradeCheck.ts | 48 | high | getUpgradeMessage |
| components/ContextSuggestions.tsx | 47 | high | ContextSuggestions |
| components/shell/ExpandShellOutputContext.tsx | 36 | high | ExpandShellOutputProvider, useExpandShellOutput |
| ink/components/CursorDeclarationContext.ts | 33 | high | CursorDeclaration, CursorDeclarationSetter |
| commands/context/index.ts | 25 | high | context, contextNonInteractive |
| ink/components/AppContext.ts | 22 | high | Props |
| tools/GrepTool/prompt.ts | 19 | high | GREP_TOOL_NAME, getDescription |
| tools/GlobTool/prompt.ts | 8 | high | GLOB_TOOL_NAME, DESCRIPTION |
| ink/components/TerminalSizeContext.tsx | 7 | high | TerminalSize, TerminalSizeContext |
| utils/contextAnalysis.ts | 273 | medium | analyzeContext, tokenStatsToStatsigMetrics |
| utils/doctorContextWarnings.ts | 266 | medium | ContextWarning, ContextWarnings, checkContextWarnings |
| hooks/useGlobalKeybindings.tsx | 249 | medium | GlobalKeybindingHandlers |
| keybindings/KeybindingContext.tsx | 243 | medium | KeybindingProvider, useKeybindingContext, useOptionalKeybindingContext, useRegisterKeybindingContext |
| context/notifications.tsx | 240 | medium | Notification, useNotifications, getNext |
| utils/contextSuggestions.ts | 236 | medium | SuggestionSeverity, ContextSuggestion, generateContextSuggestions |
| utils/queryContext.ts | 180 | medium | fetchSystemPromptParts, buildSideQuestionFallbackParams |
| context/overlayContext.tsx | 151 | medium | useRegisterOverlay, useIsOverlayActive, useIsModalOverlayActive |
| utils/glob.ts | 131 | medium | extractGlobBaseDirectory, glob |
| context/QueuedMessageContext.tsx | 63 | medium | useQueuedMessage, QueuedMessageProvider |
| context/modalContext.tsx | 58 | medium | ModalContext, useIsInsideModal, useModalOrTerminalSize, useModalScrollRef |
| utils/workloadContext.ts | 58 | medium | Workload, WORKLOAD_CRON, getWorkload, runWithWorkload |
| context/mailbox.tsx | 38 | medium | MailboxProvider, useMailbox |
| context/fpsMetrics.tsx | 30 | medium | FpsMetricsProvider, useFpsMetrics |