You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PR refactors agent setup from a monolithic module into a modular structure, decomposing the previously consolidated agent-setup.ts into six specialized modules: path constants, shell wrapper generation, agent wrapper creation, notification script generation, binary utilities, and a central orchestrator—maintaining the same public API surface.
Changes
Cohort / File(s)
Summary
Module removal and core refactoring apps/desktop/src/main/lib/agent-setup.ts
Deleted monolithic agent-setup module containing all agent wrapper, notification, and shell initialization logic. Functionality redistributed across new modular structure.
New entry point exporting setupAgentHooks() to orchestrate directory creation and wrapper script generation on startup; exports getSupersetBinDir() and re-exports getShellEnv/getShellArgs.
New module exporting createClaudeWrapper() and createCodexWrapper() functions to generate wrapper scripts at BIN_DIR; includes internal createClaudeSettings() to generate Claude configuration.
New module exporting createZshWrapper(), createBashWrapper() to generate shell initialization files; exports getShellEnv() and getShellArgs() for shell-specific environment and argument configuration.
New module exporting findRealBinary(name: string) utility to locate real executable paths while filtering out wrapper directories.
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20–25 minutes
Shell script content generation: Verify correct Bash script syntax in notify-hook.ts and shell-wrappers.ts, including JSON parsing, environment variable handling, and PATH manipulation.
Binary resolution logic: Confirm findRealBinary() correctly filters out Superset wrapper paths and handles edge cases.
Orchestration and setup flow: Ensure setupAgentHooks() properly sequences directory creation, path verification, and all script generation calls.
Public API preservation: Verify that all exports from the original agent-setup.ts are correctly re-exported and available through the new modular structure.
Path constant consistency: Check that all modules correctly import and use the centralized path constants.
keep terminal tabs rendered #147: Modifies shell launch initialization using getShellArgs and related shell environment configuration.
Poem
🐰 Hops of delight as code finds its place, One file split into modules with grace, Paths, wrappers, hooks all neatly arranged, Agent setup refactored—beautifully changed! ✨
✨ Finishing touches
📝 Generate docstrings
🧪 Generate unit tests (beta)
Create PR with unit tests
Post copyable unit tests in a comment
Commit unit tests in branch mute-flea-20420f
📜 Recent review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 5bf1189 and 3871162.
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
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.
Description
Related Issues
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.