fix(cli): restore approval-mode reference dropped in #4600 (InputPrompt build break) - #4724
Closed
LaZzyMan wants to merge 1 commit into
Closed
fix(cli): restore approval-mode reference dropped in #4600 (InputPrompt build break)#4724LaZzyMan wants to merge 1 commit into
LaZzyMan wants to merge 1 commit into
Conversation
#4600 unified the approval-mode prompt styling into approvalModePromptStyle and removed the showAutoAcceptStyling / showYoloStyling constants, but left a dangling showYoloStyling reference in the prefixWidth calculation. This broke the tsc build (TS2304: Cannot find name showYoloStyling). npm run bundle (esbuild) skips type-checking, so the break only surfaced under npm run build / tsc --build. Replace it with approvalMode === ApprovalMode.YOLO, matching how the rest of the file branches on approval mode after #4600. Both ternary arms stay 2 because every approval-mode prefix is a single char (getApprovalModePromptStyle returns prefix > or *), so the rendered prefix width and cursor positioning are unchanged.
Contributor
📋 Review SummaryThis PR fixes a TypeScript compilation error introduced in #4600 where a dangling reference to 🔍 General Feedback
🎯 Specific FeedbackNo specific issues identified in this review. ✅ Highlights
|
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
origin/maincurrently failsnpm run build(tsc) on a dangling identifier:#4600 unified the approval-mode prompt styling into a single
approvalModePromptStyleconstant and removed the oldshowAutoAcceptStyling/showYoloStylingconstants, but left one dangling reference toshowYoloStylingin theprefixWidthcalculation.npm run bundle(esbuild) doesn't type-check, so the break only surfaces undernpm run build/tsc --build— which is how it reached main.Fix
Replace the dangling reference with
approvalMode === ApprovalMode.YOLO, matching how the rest of the file branches on approval mode after #4600 (e.g. thestatusTextblock just above).Both ternary arms intentionally stay
2:getApprovalModePromptStyleis typed to returnprefix: '>' | '*', so every approval-mode prefix is a single character and the rendered prefix width — hence cursor positioning — is unchanged. Pure build fix, no behavioral change.Verification
npm run buildgreen (fulltsc --buildclean)eslint --fix --max-warnings 0passes on the changed file (0 warnings)