Commit 7b1f94c
authored
🤖 refactor: auto-cleanup (#3165)
## Summary
Long-lived auto-cleanup PR that accumulates low-risk,
behavior-preserving refactors picked from recent `main` commits.
## Current cleanup
**Deduplicate identical `normalizeAdvisor*` helpers**
(`src/browser/features/Settings/Sections/AdvisorToolExperimentConfig.tsx`)
`normalizeAdvisorMaxUsesPerTurn` and `normalizeAdvisorMaxOutputTokens`
had byte-for-byte identical function bodies (coerce a nullable number to
a positive integer or return null). Replaced both with a single
`normalizePositiveIntOrNull` helper.
<details><summary>Previous cleanups</summary>
**Remove dead `toLiveBashOutputView` function**
(`src/browser/utils/messages/liveBashOutputBuffer.ts`)
`toLiveBashOutputView` was exported but never imported or called
anywhere in the codebase. Since `LiveBashOutputInternal extends
LiveBashOutputView`, the `WorkspaceStore.getBashToolLiveOutput` returns
the internal object directly for reference stability with
`useSyncExternalStore`, making this converter function unnecessary dead
code.
</details>
## Validation
- TypeScript compilation passes (both renderer and main configs)
- ESLint passes
- Advisor experiment settings tests pass (4/4)
- Formatting check passes
Auto-cleanup checkpoint: 7a2d18f
---
_Generated with `mux` • Model: `anthropic:claude-opus-4-6` • Thinking:
`xhigh` • Cost: `$-`_
<!-- mux-attribution: model=anthropic:claude-opus-4-6 thinking=xhigh
costs=- -->
---------
Co-authored-by: mux-bot[bot] <264182336+mux-bot[bot]@users.noreply.github.com>1 parent 7a2d18f commit 7b1f94c
2 files changed
Lines changed: 4 additions & 23 deletions
File tree
- src/browser
- features/Settings/Sections
- utils/messages
Lines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 61 | + | |
| 62 | + | |
70 | 63 | | |
71 | 64 | | |
72 | 65 | | |
| |||
198 | 191 | | |
199 | 192 | | |
200 | 193 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 194 | + | |
| 195 | + | |
205 | 196 | | |
206 | 197 | | |
207 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
0 commit comments