Open
Conversation
e189eda to
d4c61c6
Compare
ed0fc4f to
9fb6874
Compare
554bc3a to
688ccae
Compare
ThomasK33
approved these changes
Feb 22, 2026
688ccae to
c6c0a72
Compare
ConnectionStatus and ConnectionHealth were identically defined in both sshConnectionPool.ts and SSH2ConnectionPool.ts. Since SSH2ConnectionPool already imports SSHConnectionConfig from sshConnectionPool, extend the import to include ConnectionHealth (ConnectionStatus is used transitively through ConnectionHealth, so no direct import needed).
…teRanking After PR #2492 introduced commandPaletteRanking.ts, the higher-level wrappers fuzzySubsequenceMatch, matchesAllTerms, scoreAllTerms (and the private fuzzySubsequenceMatchNormalized) lost all production callers. Remove the dead functions and their corresponding tests. The low-level primitives (normalizeFuzzyText, splitQueryIntoTerms, scoreSingleTermNormalized) remain — they are actively used by commandPaletteRanking.ts.
… interface execFileAsync and its ExecFileAsyncOptions interface were exported from disposableExec.ts but never imported anywhere in the codebase. This also removes the now-unused 'spawn' import from child_process.
The recent truncation refactoring (#2498) removed the truncation reminder JSX but left two near-identical <MessageWindow> return blocks (one for terminal output, one for user content) sharing the same 5 props. Merge into a single return with conditional children.
The string "onboarding-wizard-v1" was duplicated in both index.ts (registry) and SplashScreenProvider.tsx (pause logic). Export a single ONBOARDING_WIZARD_SPLASH_ID constant from index.ts and import it in SplashScreenProvider.tsx.
- Remove `collectToolConfigsFromDefinitionGraph`: exported function never imported anywhere (dead code). - Remove `AgentToolsLike` interface: only used by the removed dead function. - Make `isToolEnabledByConfigs` and `isToolEnabledInResolvedChain` module- private: both are only called within agentTools.ts itself. Net: -51 lines, cleaner public API surface for the module.
The function was exported from tokenMeterUtils.ts but never imported anywhere in the codebase. Removing dead code.
The escapeRegexForHighlight function in HunkViewer.tsx was an exact duplicate of escapeRegex in highlightSearchTerms.ts (both introduced across separate PRs). Export the existing escapeRegex and import it in HunkViewer, removing the duplicate.
Remove StreamTimingStats, ModelTimingStats, and SessionTimingStats interfaces that are defined but never used. The authoritative versions of ModelTimingStats and SessionTimingStats live in src/common/orpc/schemas/workspaceStats.ts (inferred from Zod schemas). StreamTimingStats has no equivalent anywhere — purely dead code.
Replace inline "stable" | "nightly" type annotations with the shared UpdateChannel type from src/common/types/project.ts. Reduces type duplication and ensures the dialog stays in sync with the canonical type definition.
This function was only used by the frontend RetryBarrier component's manual retry flow. PR #2469 moved retry management to the backend RetryManager, which uses createFreshRetryState and createFailedRetryState instead. The function definition and its tests were left behind as dead code.
…leanExtractedValue The new functions added in c240bae were missing the blank line separator that every other function boundary in the file uses.
The readExtensionMetadata() function was superseded by ExtensionMetadataService's own async file reading. Zero imports outside its definition file. Also removes now-unused fs sync imports, isThinkingLevel, and log imports. Net -40 lines.
…entSwitch Replace manual trim()+empty-check pattern with the existing coerceNonEmptyString utility in the switch_agent model resolution cascade. Reduces 14 lines to 4 with identical behavior.
The function was exported but never imported or referenced anywhere in production code or tests. Net -34 lines of dead code.
The previous cleanup incorrectly removed this function, but it is still imported by vscode/src/muxConfig.ts. Added a comment noting the VS Code dependency to prevent future accidental removal.
The function was introduced in PR #1177 (timing stats feature) but its functionality migrated to the file-based SessionTimingService. The localStorage key function remained unused — no code in the codebase imports or calls it.
…al checks The runtime enablement feature (PR #2387) introduced the same 3-line boolean expression in three files to check whether a ProjectConfig has runtime overrides. Extract it into a shared hasRuntimeOverrides() helper in src/common/types/project.ts. Net -6 lines, identical behavior.
… utility ExtensionMetadataService had private coerceAgentStatus and coerceStatusUrl methods that were near-identical to the module-level coerceAgentStatus in extensionMetadata.ts. Export both functions from the shared utility and import them in the service, removing the duplicate private methods. Net -21 lines, identical behavior.
…lSchema Replace hardcoded z.enum(["off", "low", ...]) with the canonical THINKING_LEVELS constant from src/common/types/thinking.ts, matching the pattern already used in src/common/orpc/schemas/stream.ts.
…omContent These helpers were added in PR #2142 as symmetrical counterparts to the 'fromDisplayed' variants, but the 'fromContent' variant was never used. Zero imports or call sites outside the definition. Net -14 lines.
c6c0a72 to
fe3dab8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Periodic auto-cleanup: remove dead code, fix stale config, deduplicate helpers, and tighten module exports.
Latest Change
buildPendingFromContentandbuildEditingStateFromContent: These helpers inchatEditing.tswere added in PR 🤖 feat: add /<model> one-shot model override syntax #2142 as symmetrical counterparts to thefromDisplayedvariants, but thefromContentvariant was never imported or called anywhere. Net -14 lines.Previous changes
Deduplicate
coerceAgentStatusinto shared extensionMetadata utility:ExtensionMetadataServicehad privatecoerceAgentStatusandcoerceStatusUrlmethods near-identical to the module-level functions inextensionMetadata.ts(added in PR 🤖 fix: propagate status_set via workspace activity snapshots #2532). Export both from the shared utility and import in the service. Net -21 lines, identical behavior.Extract
hasRuntimeOverrideshelper to deduplicate 3 identical checks: The runtime enablement feature (PR 🤖 feat: add runtime enablement settings #2387) introduced the same 3-line boolean expression inChatInput/index.tsx,RuntimesSection.tsx, anduseDraftWorkspaceSettings.ts. Extracted into a sharedhasRuntimeOverrides()function insrc/common/types/project.ts. Net -6 lines, identical behavior.Remove dead
getSessionTimingKeystorage constant: The function was introduced in PR 🤖 feat: add timing stats indicator in workspace sidebar #1177 (timing stats feature) but its functionality migrated to the file-basedSessionTimingService. No code in the codebase imports or calls it. Net -9 lines.Remove dead
extractCommonPrefixfromnumstatParser.ts: The function was exported but never imported or referenced anywhere in production code or tests. Its JSDoc noted it was "used for display purposes only" but no display code used it. Net -34 lines.Use
coerceNonEmptyStringfor model resolution indispatchAgentSwitch: The new switch_agent model-resolution cascade (from PR 🤖 fix: honor target agent settings in switch_agent follow-ups #2524) manually repeated thetrim() + empty-check → undefinedpattern three times. Replaced with the existingcoerceNonEmptyStringutility fromtaskUtils.ts. Net -8 lines, identical behavior.Remove dead
readExtensionMetadatafunction: This sync file-reading function was superseded byExtensionMetadataService's async implementation. Zero imports outside the definition file. Also removes now-unusedfssync imports,isThinkingLevel, andlogimports. Net -43 lines.Fix missing blank line between functions in
workspaceTitleGenerator.ts: The newcleanExtractedValuefunction added in c240bae was missing the blank line separator that every other function boundary in the file uses. Pure formatting fix.Remove dead
createManualRetryStatefunction: This function was only used by the frontendRetryBarriercomponent's manual retry flow. PR 🤖 refactor: move auto-compaction & auto-retry from frontend to backend #2469 moved retry management to the backendRetryManager, which usescreateFreshRetryStateandcreateFailedRetryStateinstead. The function definition and its 7 tests were left behind as dead code. Net -96 lines.Use shared
UpdateChanneltype in AboutDialog: Replace inline"stable" | "nightly"type annotations with the sharedUpdateChanneltype fromsrc/common/types/project.ts, eliminating type duplication.Remove dead timing stats types from WorkspaceStore: Remove
StreamTimingStats,ModelTimingStats, andSessionTimingStatsinterfaces that were defined but never referenced. The authoritative versions live insrc/common/orpc/schemas/workspaceStats.ts. Net -74 lines.Remove dead code and narrow exports in agentTools: Remove
collectToolConfigsFromDefinitionGraph(exported but never imported anywhere) and its supportingAgentToolsLikeinterface. Also makeisToolEnabledByConfigsandisToolEnabledInResolvedChainmodule-private since they are only called within the same file. Net -51 lines.Deduplicate onboarding wizard splash ID constant.
Deduplicate MessageWindow blocks in UserMessage.
Inline single-use
resolveForkRuntimeConfigsinto its only caller.Remove dead fuzzy-search helpers from
fuzzySearch.ts.Deduplicate
ConnectionHealthinterface fromSSH2ConnectionPool.ts.Delete
src/common/utils/tools/taskToolTypeGuards.ts: Dead module with zero imports.Delete
src/common/utils/ai/providerFactory.ts: Dead since folder restructure.Fix stale ESLint dynamic-import override paths.
Remove dead
isStreamingParttype guard frommessageUtils.ts.Deduplicate
formatDurationinto shared utility.Remove dead
formatNewCommand,ThemeToggleButton,canonicalModelId,hasSubtitleprop.Deduplicate compaction type guards into shared module.
Remove dead re-exports from
RightSidebar.tsx.Rename
partialService.test.ts→historyService.partial.test.ts.Fix orphaned JSDoc comment on
UpdaterService.getStatus().Deduplicate
normalizeAgentId,getProviderDisplayName,getCustomModels/getAllCustomModels.Remove dead backward-compat aliases in
codexOauthAuth.tsand re-exports.Unexport file-private helpers in
modelEntries.ts.Remove dead
pendingReplayResetfield fromWorkspaceStore.ts.Remove dead
onLogEntry,formatPendingCommand,parseGitShowBranchForStatus, path helpers.Remove dead
ChatInputPropsbarrel re-export.Unexport file-private
isBashOutputTool.Remove dead code in
chatEditing.ts.Validation
make typecheckpassesmake lintpassesmake fmt-checkpasses (excludingshfmtnot available in CI env)useDraftWorkspaceSettings.test.tsxanduseCreationWorkspace.test.tsx)Auto-cleanup checkpoint: 60c63c8
Generated with
mux· Model:anthropic:claude-opus-4-6· Thinking:xhigh