Skip to content

分离重构 ink 组件, 使其高度可复用#158

Merged
claude-code-best merged 2 commits intomainfrom
refactor/ink
Apr 6, 2026
Merged

分离重构 ink 组件, 使其高度可复用#158
claude-code-best merged 2 commits intomainfrom
refactor/ink

Conversation

@claude-code-best
Copy link
Copy Markdown
Owner

No description provided.

@mintlify
Copy link
Copy Markdown

mintlify bot commented Apr 6, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ccb-863780bf 🟢 Ready View Preview Apr 6, 2026, 3:58 PM

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

Important

Review skipped

Too many files!

This PR contains 299 files, which is 149 over the limit of 150.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a9546fa7-c435-4148-ac2a-9bc0e48d16fb

📥 Commits

Reviewing files that changed from the base of the PR and between 3ea64ee and cc1f2fc.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (299)
  • package.json
  • packages/@ant/ink/package.json
  • packages/@ant/ink/src/components/AlternateScreen.tsx
  • packages/@ant/ink/src/components/App.tsx
  • packages/@ant/ink/src/components/AppContext.ts
  • packages/@ant/ink/src/components/Box.tsx
  • packages/@ant/ink/src/components/Button.tsx
  • packages/@ant/ink/src/components/ClockContext.tsx
  • packages/@ant/ink/src/components/CursorDeclarationContext.ts
  • packages/@ant/ink/src/components/ErrorOverview.tsx
  • packages/@ant/ink/src/components/Link.tsx
  • packages/@ant/ink/src/components/Newline.tsx
  • packages/@ant/ink/src/components/NoSelect.tsx
  • packages/@ant/ink/src/components/RawAnsi.tsx
  • packages/@ant/ink/src/components/ScrollBox.tsx
  • packages/@ant/ink/src/components/Spacer.tsx
  • packages/@ant/ink/src/components/StdinContext.ts
  • packages/@ant/ink/src/components/TerminalFocusContext.tsx
  • packages/@ant/ink/src/components/TerminalSizeContext.tsx
  • packages/@ant/ink/src/components/Text.tsx
  • packages/@ant/ink/src/core/Ansi.tsx
  • packages/@ant/ink/src/core/bidi.ts
  • packages/@ant/ink/src/core/clearTerminal.ts
  • packages/@ant/ink/src/core/colorize.ts
  • packages/@ant/ink/src/core/constants.ts
  • packages/@ant/ink/src/core/cursor.ts
  • packages/@ant/ink/src/core/devtools.ts
  • packages/@ant/ink/src/core/dom.ts
  • packages/@ant/ink/src/core/events/click-event.ts
  • packages/@ant/ink/src/core/events/dispatcher.ts
  • packages/@ant/ink/src/core/events/emitter.ts
  • packages/@ant/ink/src/core/events/event-handlers.ts
  • packages/@ant/ink/src/core/events/event.ts
  • packages/@ant/ink/src/core/events/focus-event.ts
  • packages/@ant/ink/src/core/events/input-event.ts
  • packages/@ant/ink/src/core/events/keyboard-event.ts
  • packages/@ant/ink/src/core/events/paste-event.ts
  • packages/@ant/ink/src/core/events/resize-event.ts
  • packages/@ant/ink/src/core/events/terminal-event.ts
  • packages/@ant/ink/src/core/events/terminal-focus-event.ts
  • packages/@ant/ink/src/core/focus.ts
  • packages/@ant/ink/src/core/frame.ts
  • packages/@ant/ink/src/core/get-max-width.ts
  • packages/@ant/ink/src/core/hit-test.ts
  • packages/@ant/ink/src/core/ink.tsx
  • packages/@ant/ink/src/core/instances.ts
  • packages/@ant/ink/src/core/layout/engine.ts
  • packages/@ant/ink/src/core/layout/geometry.ts
  • packages/@ant/ink/src/core/layout/node.ts
  • packages/@ant/ink/src/core/layout/yoga.ts
  • packages/@ant/ink/src/core/line-width-cache.ts
  • packages/@ant/ink/src/core/log-update.ts
  • packages/@ant/ink/src/core/measure-element.ts
  • packages/@ant/ink/src/core/measure-text.ts
  • packages/@ant/ink/src/core/node-cache.ts
  • packages/@ant/ink/src/core/optimizer.ts
  • packages/@ant/ink/src/core/output.ts
  • packages/@ant/ink/src/core/parse-keypress.ts
  • packages/@ant/ink/src/core/reconciler.ts
  • packages/@ant/ink/src/core/render-border.ts
  • packages/@ant/ink/src/core/render-node-to-output.ts
  • packages/@ant/ink/src/core/render-to-screen.ts
  • packages/@ant/ink/src/core/renderer.ts
  • packages/@ant/ink/src/core/root.ts
  • packages/@ant/ink/src/core/screen.ts
  • packages/@ant/ink/src/core/searchHighlight.ts
  • packages/@ant/ink/src/core/selection.ts
  • packages/@ant/ink/src/core/squash-text-nodes.ts
  • packages/@ant/ink/src/core/stringWidth.ts
  • packages/@ant/ink/src/core/styles.ts
  • packages/@ant/ink/src/core/supports-hyperlinks.ts
  • packages/@ant/ink/src/core/tabstops.ts
  • packages/@ant/ink/src/core/terminal-focus-state.ts
  • packages/@ant/ink/src/core/terminal-querier.ts
  • packages/@ant/ink/src/core/terminal.ts
  • packages/@ant/ink/src/core/termio.ts
  • packages/@ant/ink/src/core/termio/ansi.ts
  • packages/@ant/ink/src/core/termio/csi.ts
  • packages/@ant/ink/src/core/termio/dec.ts
  • packages/@ant/ink/src/core/termio/esc.ts
  • packages/@ant/ink/src/core/termio/osc.ts
  • packages/@ant/ink/src/core/termio/parser.ts
  • packages/@ant/ink/src/core/termio/sgr.ts
  • packages/@ant/ink/src/core/termio/tokenize.ts
  • packages/@ant/ink/src/core/termio/types.ts
  • packages/@ant/ink/src/core/utils/grapheme.ts
  • packages/@ant/ink/src/core/utils/sliceAnsi.ts
  • packages/@ant/ink/src/core/warn.ts
  • packages/@ant/ink/src/core/widest-line.ts
  • packages/@ant/ink/src/core/wrap-text.ts
  • packages/@ant/ink/src/core/wrapAnsi.ts
  • packages/@ant/ink/src/core/yoga-layout/enums.ts
  • packages/@ant/ink/src/core/yoga-layout/index.ts
  • packages/@ant/ink/src/hooks/use-animation-frame.ts
  • packages/@ant/ink/src/hooks/use-app.ts
  • packages/@ant/ink/src/hooks/use-declared-cursor.ts
  • packages/@ant/ink/src/hooks/use-input.ts
  • packages/@ant/ink/src/hooks/use-interval.ts
  • packages/@ant/ink/src/hooks/use-search-highlight.ts
  • packages/@ant/ink/src/hooks/use-selection.ts
  • packages/@ant/ink/src/hooks/use-stdin.ts
  • packages/@ant/ink/src/hooks/use-tab-status.ts
  • packages/@ant/ink/src/hooks/use-terminal-focus.ts
  • packages/@ant/ink/src/hooks/use-terminal-title.ts
  • packages/@ant/ink/src/hooks/use-terminal-viewport.ts
  • packages/@ant/ink/src/hooks/useExitOnCtrlCD.ts
  • packages/@ant/ink/src/hooks/useSearchInput.ts
  • packages/@ant/ink/src/hooks/useTerminalNotification.ts
  • packages/@ant/ink/src/hooks/useTerminalSize.ts
  • packages/@ant/ink/src/index.ts
  • packages/@ant/ink/src/theme/Byline.tsx
  • packages/@ant/ink/src/theme/ConfigurableShortcutHint.tsx
  • packages/@ant/ink/src/theme/Dialog.tsx
  • packages/@ant/ink/src/theme/Divider.tsx
  • packages/@ant/ink/src/theme/FuzzyPicker.tsx
  • packages/@ant/ink/src/theme/KeyboardShortcutHint.tsx
  • packages/@ant/ink/src/theme/ListItem.tsx
  • packages/@ant/ink/src/theme/LoadingState.tsx
  • packages/@ant/ink/src/theme/Pane.tsx
  • packages/@ant/ink/src/theme/ProgressBar.tsx
  • packages/@ant/ink/src/theme/Ratchet.tsx
  • packages/@ant/ink/src/theme/SearchBox.tsx
  • packages/@ant/ink/src/theme/Spinner.tsx
  • packages/@ant/ink/src/theme/StatusIcon.tsx
  • packages/@ant/ink/src/theme/Tabs.tsx
  • packages/@ant/ink/src/theme/ThemeProvider.tsx
  • packages/@ant/ink/src/theme/ThemedBox.tsx
  • packages/@ant/ink/src/theme/ThemedText.tsx
  • packages/@ant/ink/src/theme/color.ts
  • packages/@ant/ink/src/theme/keybindings.ts
  • packages/@ant/ink/src/theme/modalContext.ts
  • packages/@ant/ink/src/theme/systemTheme.ts
  • packages/@ant/ink/src/theme/theme-types.ts
  • packages/@ant/ink/src/theme/types.ts
  • packages/@ant/ink/src/types/ink-elements.d.ts
  • packages/@ant/ink/src/types/ink-jsx.d.ts
  • packages/@ant/ink/src/utils/debug.ts
  • src/bridge/bridgeStatusUtil.ts
  • src/bridge/bridgeUI.ts
  • src/buddy/CompanionCard.tsx
  • src/buddy/CompanionSprite.tsx
  • src/buddy/useBuddyNotification.tsx
  • src/cli/handlers/mcp.tsx
  • src/cli/handlers/util.tsx
  • src/commands/add-dir/add-dir.tsx
  • src/commands/bridge/bridge.tsx
  • src/commands/btw/btw.tsx
  • src/commands/chrome/chrome.tsx
  • src/commands/copy/copy.tsx
  • src/commands/fast/fast.tsx
  • src/commands/ide/ide.tsx
  • src/commands/install-github-app/ApiKeyStep.tsx
  • src/commands/install-github-app/CheckExistingSecretStep.tsx
  • src/commands/install-github-app/CheckGitHubStep.tsx
  • src/commands/install-github-app/ChooseRepoStep.tsx
  • src/commands/install-github-app/CreatingStep.tsx
  • src/commands/install-github-app/ErrorStep.tsx
  • src/commands/install-github-app/ExistingWorkflowStep.tsx
  • src/commands/install-github-app/InstallAppStep.tsx
  • src/commands/install-github-app/OAuthFlowStep.tsx
  • src/commands/install-github-app/SuccessStep.tsx
  • src/commands/install-github-app/WarningsStep.tsx
  • src/commands/install-github-app/install-github-app.tsx
  • src/commands/install.tsx
  • src/commands/login/login.tsx
  • src/commands/logout/logout.tsx
  • src/commands/memory/memory.tsx
  • src/commands/mobile/mobile.tsx
  • src/commands/plan/plan.tsx
  • src/commands/plugin/AddMarketplace.tsx
  • src/commands/plugin/BrowseMarketplace.tsx
  • src/commands/plugin/DiscoverPlugins.tsx
  • src/commands/plugin/ManageMarketplaces.tsx
  • src/commands/plugin/ManagePlugins.tsx
  • src/commands/plugin/PluginOptionsDialog.tsx
  • src/commands/plugin/PluginSettings.tsx
  • src/commands/plugin/PluginTrustWarning.tsx
  • src/commands/plugin/UnifiedInstalledCell.tsx
  • src/commands/plugin/ValidatePlugin.tsx
  • src/commands/plugin/pluginDetailsHelpers.tsx
  • src/commands/rate-limit-options/rate-limit-options.tsx
  • src/commands/remote-setup/remote-setup.tsx
  • src/commands/resume/resume.tsx
  • src/commands/review/UltrareviewOverageDialog.tsx
  • src/commands/sandbox-toggle/sandbox-toggle.tsx
  • src/commands/session/session.tsx
  • src/commands/tag/tag.tsx
  • src/commands/terminalSetup/terminalSetup.tsx
  • src/commands/theme/theme.tsx
  • src/commands/thinkback/thinkback.tsx
  • src/components/AgentProgressLine.tsx
  • src/components/ApproveApiKey.tsx
  • src/components/AutoModeOptInDialog.tsx
  • src/components/AutoUpdater.tsx
  • src/components/AwsAuthStatusBox.tsx
  • src/components/BaseTextInput.tsx
  • src/components/BashModeProgress.tsx
  • src/components/BridgeDialog.tsx
  • src/components/BuiltinStatusLine.tsx
  • src/components/BypassPermissionsModeDialog.tsx
  • src/components/ChannelDowngradeDialog.tsx
  • src/components/ClaudeCodeHint/PluginHintMenu.tsx
  • src/components/ClaudeInChromeOnboarding.tsx
  • src/components/ClaudeMdExternalIncludesDialog.tsx
  • src/components/ClickableImageRef.tsx
  • src/components/CompactSummary.tsx
  • src/components/ConfigurableShortcutHint.tsx
  • src/components/ConsoleOAuthFlow.tsx
  • src/components/ContextSuggestions.tsx
  • src/components/ContextVisualization.tsx
  • src/components/CoordinatorAgentStatus.tsx
  • src/components/CostThresholdDialog.tsx
  • src/components/CtrlOToExpand.tsx
  • src/components/CustomSelect/SelectMulti.tsx
  • src/components/CustomSelect/select-input-option.tsx
  • src/components/CustomSelect/select-option.tsx
  • src/components/CustomSelect/select.tsx
  • src/components/CustomSelect/use-multi-select-state.ts
  • src/components/CustomSelect/use-select-input.ts
  • src/components/DesktopHandoff.tsx
  • src/components/DesktopUpsell/DesktopUpsellStartup.tsx
  • src/components/DevBar.tsx
  • src/components/DevChannelsDialog.tsx
  • src/components/DiagnosticsDisplay.tsx
  • src/components/EffortCallout.tsx
  • src/components/ExportDialog.tsx
  • src/components/FallbackToolUseErrorMessage.tsx
  • src/components/FastIcon.tsx
  • src/components/Feedback.tsx
  • src/components/FeedbackSurvey/FeedbackSurvey.tsx
  • src/components/FeedbackSurvey/FeedbackSurveyView.tsx
  • src/components/FeedbackSurvey/TranscriptSharePrompt.tsx
  • src/components/FileEditToolDiff.tsx
  • src/components/FileEditToolUpdatedMessage.tsx
  • src/components/FileEditToolUseRejectedMessage.tsx
  • src/components/FilePathLink.tsx
  • src/components/FullscreenLayout.tsx
  • src/components/GlobalSearchDialog.tsx
  • src/components/HelpV2/Commands.tsx
  • src/components/HelpV2/General.tsx
  • src/components/HelpV2/HelpV2.tsx
  • src/components/HighlightedCode.tsx
  • src/components/HighlightedCode/Fallback.tsx
  • src/components/HistorySearchDialog.tsx
  • src/components/IdeAutoConnectDialog.tsx
  • src/components/IdeOnboardingDialog.tsx
  • src/components/IdeStatusIndicator.tsx
  • src/components/IdleReturnDialog.tsx
  • src/components/InterruptedByUser.tsx
  • src/components/InvalidConfigDialog.tsx
  • src/components/InvalidSettingsDialog.tsx
  • src/components/KeybindingWarnings.tsx
  • src/components/LanguagePicker.tsx
  • src/components/LogSelector.tsx
  • src/components/LogoV2/AnimatedAsterisk.tsx
  • src/components/LogoV2/AnimatedClawd.tsx
  • src/components/LogoV2/ChannelsNotice.tsx
  • src/components/LogoV2/Clawd.tsx
  • src/components/LogoV2/CondensedLogo.tsx
  • src/components/LogoV2/EmergencyTip.tsx
  • src/components/LogoV2/Feed.tsx
  • src/components/LogoV2/FeedColumn.tsx
  • src/components/LogoV2/GuestPassesUpsell.tsx
  • src/components/LogoV2/LogoV2.tsx
  • src/components/LogoV2/Opus1mMergeNotice.tsx
  • src/components/LogoV2/OverageCreditUpsell.tsx
  • src/components/LogoV2/VoiceModeNotice.tsx
  • src/components/LogoV2/WelcomeV2.tsx
  • src/components/LogoV2/feedConfigs.tsx
  • src/components/LspRecommendation/LspRecommendationMenu.tsx
  • src/components/MCPServerApprovalDialog.tsx
  • src/components/MCPServerDesktopImportDialog.tsx
  • src/components/MCPServerDialogCopy.tsx
  • src/components/MCPServerMultiselectDialog.tsx
  • src/components/ManagedSettingsSecurityDialog/ManagedSettingsSecurityDialog.tsx
  • src/components/Markdown.tsx
  • src/components/MarkdownTable.tsx
  • src/components/MemoryUsageIndicator.tsx
  • src/components/Message.tsx
  • src/components/MessageModel.tsx
  • src/components/MessageResponse.tsx
  • src/components/MessageRow.tsx
  • src/components/MessageSelector.tsx
  • src/components/MessageTimestamp.tsx
  • src/components/Messages.tsx
  • src/components/ModelPicker.tsx
  • src/components/NativeAutoUpdater.tsx
  • src/components/NotebookEditToolUseRejectedMessage.tsx
  • src/components/OffscreenFreeze.tsx
  • src/components/Onboarding.tsx
  • src/components/OutputStylePicker.tsx
  • src/components/PackageManagerAutoUpdater.tsx
  • src/components/Passes/Passes.tsx
  • src/components/PrBadge.tsx
  • src/components/PressEnterToContinue.tsx
  • src/components/PromptInput/HistorySearchInput.tsx
  • src/components/PromptInput/IssueFlagBanner.tsx
  • src/components/PromptInput/Notifications.tsx
  • src/components/PromptInput/PromptInput.tsx

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/ink

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude-code-best claude-code-best merged commit c445f43 into main Apr 6, 2026
7 checks passed
Icarus603 added a commit to Icarus603/claude-code that referenced this pull request Apr 7, 2026
After upstream PR claude-code-best#158 moved ink components to packages/@ant/ink,
components that imported Box/Text/useTheme from @anthropic/ink started
reading @ant/ink's built-in theme (Claude orange) instead of our
customized theme (blue palette) in src/utils/theme.ts.

Add BRAND_COLOR/BRAND_COLOR_LIGHT/BRAND_RED/BRAND_GREEN constants to
packages/@ant/ink/src/theme/theme-types.ts and apply them across all
6 theme variants (light, dark, light/dark daltonized, light/dark ansi
unchanged since they use ansi: tokens).

Synced changes:
- claude / claudeShimmer: orange → BRAND_COLOR blue
- clawd_body / briefLabelClaude: orange → BRAND_COLOR blue
- permission / permissionShimmer (dark): purple → cyan-blue
- suggestion / remember (dark): purple → cyan-blue
- success / error: upstream green/red → BRAND_GREEN/BRAND_RED
- diffAdded/diffRemoved (light): green → blue palette
- diffAdded/diffRemoved (dark): green → burgundy-green palette
- userMessageBackground (dark): rgb(55,55,55) → rgb(15,15,15)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude-code-best added a commit that referenced this pull request Apr 7, 2026
claude-code-best added a commit that referenced this pull request Apr 7, 2026
Icarus603 added a commit to Icarus603/claude-code that referenced this pull request Apr 7, 2026
Upstream changes:
- feat: add Grok (xAI) API adapter with custom model mapping (claude-code-best#152)
- feat: restore daemon supervisor and remoteControlServer command (claude-code-best#170)
- fix: prevent iTerm2 terminal response sequences from leaking into REPL input (claude-code-best#172)
- Revert ink component abstraction (claude-code-best#158claude-code-best#175)
- Various fixes and cleanups

Conflict resolutions:
- contributors.svg: kept ours
- packages/@ant/ink/*: deleted (upstream reverted ink refactor)
- src/utils/earlyInput.ts: kept ours (superior APC sequence handling)
- src/main.tsx: accepted upstream (setAppCallbacks now built into App.tsx)
- Theme: preserved our brand color customizations (BRAND_COLOR rgb(88,190,255))

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant