Architecture

Modes

Behavior modes, effort settings, and execution shaping.

63
Matched files
9
Top dirs
9,326
Lines in slice
240
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

FileLinesImportanceExports
components/permissions/ExitPlanModePermissionRequest/ExitPlanModePermissionRequest.tsx768highbuildPermissionUpdates, autoNameSessionFromPlan, ExitPlanModePermissionRequest, buildPlanApprovalOptions
utils/model/model.ts619highModelShortName, ModelName, ModelSetting, getSmallFastModel
utils/model/modelOptions.ts541highModelOption, getDefaultOptionForUser, getSonnet46_1MOption, getOpus46_1MOption
utils/fastMode.ts533highisFastModeEnabled, isFastModeAvailable, getFastModeUnavailableReason, FAST_MODE_MODEL_DISPLAY
tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts494highAllowedPrompt, _sdkInputSchema, outputSchema, Output
components/ModelPicker.tsx448highProps, ModelPicker
tools/PowerShellTool/modeValidation.ts405highisSymlinkCreatingCommand, checkPermissionMode
coordinator/coordinatorMode.ts370highisCoordinatorMode, matchSessionMode, getCoordinatorUserContext, getCoordinatorSystemPrompt
commands/model/model.tsx297highcall
utils/model/bedrock.ts266highgetBedrockInferenceProfiles, findFirstMatch, createBedrockRuntimeClient, getInferenceProfileBackingModel
utils/modelCost.ts232highModelCosts, COST_TIER_3_15, COST_TIER_15_75, COST_TIER_5_25
components/hooks/ViewHookMode.tsx199highViewHookMode
tools/EnterPlanModeTool/prompt.ts171highgetEnterPlanModeToolPrompt
utils/model/agent.ts158highAGENT_MODEL_OPTIONS, AgentModelAlias, AgentModelOption, getDefaultSubagentModel
components/hooks/SelectMatcherMode.tsx144highSelectMatcherMode
components/AutoModeOptInDialog.tsx142highAUTO_MODE_DESCRIPTION, AutoModeOptInDialog
utils/permissions/PermissionMode.ts142highpermissionModeSchema, externalPermissionModeSchema, isExternalPermissionMode, toExternalPermissionMode
components/hooks/SelectEventMode.tsx127highSelectEventMode
tools/EnterPlanModeTool/EnterPlanModeTool.ts127highOutput, EnterPlanModeTool
components/permissions/EnterPlanModePermissionRequest/EnterPlanModePermissionRequest.tsx122highEnterPlanModePermissionRequest
utils/model/configs.ts119highModelConfig, CLAUDE_3_7_SONNET_CONFIG, CLAUDE_3_5_V2_SONNET_CONFIG, CLAUDE_3_5_HAIKU_CONFIG
tools/BashTool/modeValidation.ts116highcheckPermissionMode, getAutoAllowedCommands
components/hooks/SelectHookMode.tsx112highSelectHookMode
utils/permissions/getNextPermissionMode.ts102highgetNextPermissionMode, cyclePermissionMode
utils/planModeV2.ts96highgetPlanModeV2AgentCount, getPlanModeV2ExploreAgentCount, isPlanModeInterviewPhaseEnabled, PewterLedgerVariant
components/PromptInput/PromptInputModeIndicator.tsx93highPromptInputModeIndicator
utils/swarm/backends/teammateModeSnapshot.ts88highTeammateMode, setCliTeammateModeOverride, getCliTeammateModeOverride, clearCliTeammateModeOverride
components/BypassPermissionsModeDialog.tsx87highBypassPermissionsModeDialog
tools/ExitPlanModeTool/UI.tsx82highrenderToolUseMessage, renderToolResultMessage, renderToolUseRejectedMessage
components/LogoV2/VoiceModeNotice.tsx68highVoiceModeNotice
components/agents/ModelSelector.tsx68highModelSelector
utils/model/antModels.ts65highAntModel, AntModelSwitchCalloutConfig, AntModelOverrideConfig, getAntModelOverrideConfig
components/BashModeProgress.tsx56highBashModeProgress
components/agents/new-agent-creation/wizard-steps/ModelStep.tsx52highModelStep
utils/model/contextWindowUpgradeCheck.ts48highgetUpgradeMessage
components/MessageModel.tsx43highMessageModel
utils/permissions/autoModeState.ts40highsetAutoModeActive, isAutoModeActive, setAutoModeFlagCli, getAutoModeFlagCli
components/PromptInput/inputModes.ts34highprependModeCharacterToInput, getModeFromInput, getValueFromInput, isInputModeCharacter
tools/EnterPlanModeTool/UI.tsx33highrenderToolUseMessage, renderToolResultMessage, renderToolUseRejectedMessage
tools/ExitPlanModeTool/prompt.ts30highEXIT_PLAN_MODE_V2_TOOL_PROMPT
utils/model/aliases.ts26highMODEL_ALIASES, ModelAlias, isModelAlias, MODEL_FAMILY_ALIASES
commands/model/index.ts17high
tools/ExitPlanModeTool/constants.ts3highEXIT_PLAN_MODE_TOOL_NAME, EXIT_PLAN_MODE_V2_TOOL_NAME
tools/EnterPlanModeTool/constants.ts2highENTER_PLAN_MODE_TOOL_NAME
cli/handlers/autoMode.ts171mediumautoModeDefaultsHandler, autoModeConfigHandler, autoModeCritiqueHandler
utils/model/modelAllowlist.ts171mediumisModelAllowed
utils/model/modelStrings.ts167mediumModelStrings, resolveOverriddenModel, getModelStrings, ensureModelStringsInitialized
hooks/notifs/useFastModeNotification.tsx162mediumuseFastModeNotification
utils/model/validateModel.ts160mediumvalidateModel
utils/model/modelCapabilities.ts119mediumModelCapability, getModelCapability, refreshModelCapabilities
utils/model/deprecation.ts102mediumgetModelDeprecationWarning
utils/model/check1mAccess.ts73mediumcheckOpus1mAccess, checkSonnet1mAccess
hooks/notifs/useAutoModeUnavailableNotification.ts57mediumuseAutoModeUnavailableNotification
voice/voiceModeEnabled.ts55mediumisVoiceGrowthBookEnabled, hasVoiceAuth, isVoiceModeEnabled
hooks/notifs/useModelMigrationNotifications.tsx52mediumuseModelMigrationNotifications
migrations/resetAutoModeOptInForDefaultOffer.ts52mediumresetAutoModeOptInForDefaultOffer
utils/model/modelSupportOverrides.ts51mediumModelCapabilityOverride, get3PModelCapabilityOverride
utils/model/providers.ts41mediumAPIProvider, getAPIProvider, getAPIProviderForStatsig, isFirstPartyAnthropicBaseUrl
hooks/useMainLoopModel.ts35mediumuseMainLoopModel
utils/autoModeDenials.ts27mediumAutoModeDenial, recordAutoModeDenial, getAutoModeDenials
utils/bundledMode.ts23mediumisRunningWithBun, isInBundledMode
utils/worktreeModeEnabled.ts12mediumisWorktreeModeEnabled
utils/swarm/teammateModel.ts11mediumgetHardcodedTeammateModelFallback