Repository navigation
refactor(server): move agent launch into server/agent-launch.ts - #1297
Conversation
agentFault and agentLaunch check and start the agent that a workspace, tab or worktree create request names. They move out of server/index.ts unchanged, with the AgentPayload type, and index.ts imports them. Co-authored-by: Cursor <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CodeRabbit did not review this PR: its "Review limit reached" comment means no review ran. The PR touches no take-over, observe permission, queued input, authentication, HTTP/WS contract or workflow code, so it merged on its required checks. It moves agentFault, agentLaunch and AgentPayload unchanged, apart from three export keywords. |
Change
The workspace, tab and worktree create routes can start an agent in the pane that herdr just made. The check for that request's
agentfield and the start itself (with its retries for a busy shell and a taken name) are a separate concern from the routes. This PR moves them out ofserver/index.tswith no behavior change.agentFault,agentLaunchand theAgentPayloadtype move toserver/agent-launch.ts.index.tsimports them.Scope: the code is unchanged apart from three
exportkeywords.expandedDirectory,claudeTempFolderandAGENT_LABELSstay inindex.ts. They move later with the routes that use them. Open PR #1147 callsagentLaunchinsideindex.ts, and that call still compiles after a rebase, becauseindex.tsimports the function.Validation
origin/mainbyte for byte, apart from the addedexportkeywords. A script diffed them.bun run check integration: the agent start paths pass. These are "shares unique agent names across concurrent tabs and preserves a tab when an explicit name collides", "starts another agent of a kind whose name is already taken" and "creates a worktree of an owned repository as a grouped workspace, lists it, and opens it again". The only failures are the three tests that also fail on an untouchedmainon this Mac (api.contractpane files search,hermes.contract,output.contract). 547 pass, the same count as onmain.bun run check fast: typecheck and build are ok, and 4,288 unit tests pass. The only failures are the knowninstall-star,portalandplugintiming failures on this Mac. The convention tests pass.Made with Cursor