fix(computer-use): add /System/Applications to installed app scan dirs#185
fix(computer-use): add /System/Applications to installed app scan dirs#185Icarus603 wants to merge 23 commits intoclaude-code-best:mainfrom
Conversation
This PR introduces comprehensive TUI customizations with a cohesive brand color palette, an enhanced /buddy companion system, and proper keyboard shortcut hints in the ThemePicker. ### Theme Colors - Replace Claude orange brand color with blue (rgb(88,190,255)) - Add BRAND_COLOR, BRAND_COLOR_LIGHT, BRAND_RED, BRAND_GREEN constants - Update all 6 theme variants (light, dark, ansi, daltonized) with consistent palette - Change permission/suggestion/remember to cyan-blue (rgb(131,210,238)) - Set dark theme userMessageBackground to darker rgb(15,15,15) - Update diff colors to burgundy red and forest green ### Syntax Highlighting - Add new Royal Gold Dark theme (gold/blue palette, lower saturation) - Replace Monokai Extended as default dark syntax theme - Support syntaxHighlightingDisabled setting in HighlightedCode - Keep Ctrl+T toggle in ThemePicker with visible shortcut hint - Fix hex colors to rgb format for themeColorToAnsi compatibility - Use src/* aliases and semicolons in SpinnerGlyph imports ### UI Behavior - Remove spinner stalled-to-red warning animation - Remove top padding from FullscreenLayout (cleaner layout) - Remove unused padCollapsed variable - Set inline code color to amber gold (#FEC84A) in dark themes ### Buddy System - Add /buddy pet, rehatch, mute, unmute commands - Add 20-character stat bars (████████░░) for companion stats - Display sprite, rarity, eye, hat, personality in text format - Auto-hatch on first /buddy call (no explicit hatch needed) - Enable BUDDY feature in production builds by default ### Files Changed - build.ts - packages/color-diff-napi/src/index.ts - src/utils/theme.ts, src/utils/markdown.ts - src/components/Spinner/*.tsx - src/components/FullscreenLayout.tsx, HighlightedCode.tsx, ThemePicker.tsx - src/commands/buddy/buddy.ts, index.ts - src/keybindings/defaultBindings.ts, schema.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add NATIVE_CLIPBOARD_IMAGE to default features in both dev and build configurations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upstream changes: - Add Gemini API provider support - Add /provider command for model provider switching - Add interview and teach-me skills - Fix OpenAI adapter tool calling compatibility - Enable Computer Use on Windows and Linux - Add contributors auto-update workflow Local changes preserved: - BUDDY and NATIVE_CLIPBOARD_IMAGE feature flags - Blue brand color theme (rgb(88,190,255)) - Enhanced buddy system with pet/rehatch/mute/unmute - Ctrl+T shortcut hint in ThemePicker - Spinner animation simplifications Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add new features to DEFAULT_BUILD_FEATURES and DEFAULT_FEATURES: - BRIDGE_MODE, MCP_SKILLS, TEMPLATES, COORDINATOR_MODE - TRANSCRIPT_CLASSIFIER, MCP_RICH_OUTPUT, MESSAGE_ACTIONS - HISTORY_PICKER, QUICK_SEARCH, CACHED_MICROCOMPACT - REACTIVE_COMPACT, FILE_PERSISTENCE, DUMP_SYSTEM_PROMPT - BREAK_CACHE_COMMAND Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- hostAdapter: replace cu.tcc subprocess calls with Bun FFI in-process AXIsProcessTrusted() + CGPreflightScreenCaptureAccess() so macOS checks the terminal's own TCC permissions, not osascript's - darwin backend: fix listInstalled() to use NSBundle JXA ObjC bridge instead of AppleScript "every file" (which misses .app bundles since they are directories, not files) - darwin backend: replace captureScreenToBase64 with captureAndResizeToBase64 using sips to resize+JPEG-convert screenshots, fixing "image/jpeg" media type mismatch and oversized image 400 errors from the API - escHotkey: use optional chaining on hotkey.registerEscape/unregister/ notifyExpectedEscape to prevent crashes when the hotkey namespace is absent (e.g. when Accessibility permission is not yet granted) - image-processor-napi: convert readClipboardImage from Bun.spawnSync to async Bun.spawn + await proc.exited, preventing the event loop from blocking and freezing the "Pasting text…" Ink UI indicator - usePasteHandler: add per-path .catch(() => null) in Promise.all so ImageResizeError from one path doesn't reject the whole chain and leave isPasting stuck at true; add .catch safety net on the outer chain - FileReadTool: instead of re-throwing ImageResizeError when sharp fails on oversized images, fall back to sips (macOS built-in) at 1920px JPEG quality 75; add a second sips fallback at 800px as last resort when compressImageBufferWithTokenLimit also fails Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Upstream changes: - feat: enable GrowthBook local gate defaults (AGENT_TRIGGERS, ULTRATHINK, BUILTIN_EXPLORE_PLAN_AGENTS, LODESTONE, EXTRACT_MEMORIES, VERIFICATION_AGENT, KAIROS_BRIEF, AWAY_SUMMARY, ULTRAPLAN) - feat: /ultraplan and UltraPlan dialogs (REPL.tsx refactor) - feat: @ant/ink package — ink components extracted to workspace package (import path: @anthropic/ink) - fix: revert fullscreen mode - docs: README emoji, contributors Conflict resolutions: - build.ts / scripts/dev.ts: merged both sides' feature flag lists - HighlightedCode.tsx / SpinnerGlyph.tsx: adopted @anthropic/ink import path - contributors.svg: took upstream version Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
… box
Three-part fix for garbage text (">|iTerm2 3.6.9?64;...c") appearing
pre-filled in the REPL input on every startup:
1. Export `setAppCallbacks` from @anthropic/ink so the business layer
can wire in callbacks (was defined but never reachable externally).
2. Call `setAppCallbacks({ stopCapturingEarlyInput, ... })` in main.tsx
before `createRoot()`. App.tsx calls this when Ink first enables raw
mode — without the wiring it was a no-op, leaving both the earlyInput
and Ink readable handlers active on stdin simultaneously.
3. Fix `processChunk()` escape-sequence skipping in earlyInput.ts. The
old code treated the byte after ESC as the terminator if it was in
0x40–0x7E, so `\x1bP` consumed only the `P` (DCS introducer) and let
`>|iTerm2 3.6.9` fall through as printable text; `\x1b[` similarly
left `?64;1;2;4;6;17;18;21;22;52c` as text. New code handles DCS/OSC
string sequences (skip until BEL or ESC+\) and CSI sequences (skip
params+final-byte) separately from simple two-char escapes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ixes - Add originX/originY to display geometry for multi-monitor coordinate mapping - Implement prepareDisplay() to hide non-allowlisted apps and activate target - Implement previewHideSet() to preview which apps will be hidden - Fix displayWidth/displayHeight propagation - prevents clicks landing at (0,0) - Use clipboard paste for all text on macOS to avoid IME composition issues Previously clicks could land at the Apple menu because scaleCoord() received NaN when display dimensions weren't propagated. Now coordinate scaling works correctly across all displays. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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#158 → claude-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>
…ude-code-best#168) (claude-code-best#177) Fixes claude-code-best#168 OpenAI requires that an assistant message with tool_calls be immediately followed by tool messages. Previously, convertInternalUserMessage output user content before tool results, causing 400 errors. Now tool messages are pushed first.
Include Apple's system apps (Safari, Notes, Maps, etc.) in listInstalled() by scanning /System/Applications in addition to /Applications and ~/Applications. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (26)
📝 WalkthroughWalkthroughThis PR adds numerous feature flags to build configuration, significantly refactors macOS computer-use backends with improved display geometry and app enumeration, introduces brand color constants across theming, converts clipboard image reading to async, redesigns the buddy companion command (removing JSX, adding mute/unmute/rehatch), and removes stalled-intensity visual feedback from spinner components. Changes
Sequence Diagram(s)sequenceDiagram
participant caller as Command Handler
participant darwin as darwin.ts<br/>(prepareDisplay)
participant jxa as JXA Script
participant sysev as System Events
participant fs as Filesystem
caller->>darwin: prepareDisplay(allowlistBundleIds)
darwin->>jxa: enumerate visible foreground apps
jxa-->>darwin: app list with bundle IDs
loop For each visible app
alt app in allowlist or is Finder
darwin->>darwin: skip (keep visible)
else
darwin->>sysev: hide application
sysev-->>darwin: hidden
end
end
darwin->>jxa: activate first allowlisted running app
jxa-->>darwin: activated
darwin->>darwin: Bun.sleep(150)
darwin-->>caller: { activated, hidden }
sequenceDiagram
participant user as User
participant buddy as buddy command
participant config as Global Config
participant display as Display
user->>buddy: /buddy rehatch
buddy->>buddy: generate new seed
buddy->>buddy: re-roll companion
buddy->>config: persist as StoredCompanion
config-->>buddy: confirmed
buddy->>buddy: renderStats(stats)
buddy->>display: output sprite + name + traits + rendered stats
display-->>user: "Companion replaced!"
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
Summary
/System/Applicationsto thelistInstalled()search directories indarwin.ts/Applicationsto/System/ApplicationsTest plan
list_granted_applicationsor triggerlistInstalled()and verify system apps like Safari appear/Applicationsand~/Applications🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
/buddy rehatch(re-roll companion),/buddy mute, and/buddy unmuteImprovements