react-grab already ships an agent round-trip — should Cmux wire it up? #6121
giuseppebisemi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I went digging through the internal-browser comment flow (react-grab, Cmd+Shift+G) and hit something worth checking with you before I write any code.
Right now Cmux uses react-grab one way.
Sources/Panels/ReactGrab.swiftregisters a plugin withonStateChangeandonCopySuccess, so a comment goes to the agent through the clipboard or a paste into the terminal, and the panel just says "Copied".The pinned
react-grab@0.1.29bundle already has more than that. It ships an agent-provider API with a round-trip built in. Register a plugin that carries anagent.providerand react-grab starts showing live agent status ("Completed" instead of "Copied"), follow-up replies, and presence. That UI already exists in the library. You can see the surface in the bundle:setHasAgentProvider,setAgentCapabilities({ supportsUndo, supportsFollowUp, dismissButtonText, isAgentConnected }),provider.send(prompt, signal)plusresume,undo,checkConnection, and sessions that carrylastStatus. The provider gets picked up byfor (s of store.actions) if (s.agent?.provider). Cmux just never registers one.One catch worth flagging: that agent-provider API looks gone in
react-grab@0.1.44. The project seems to have moved to a clipboard plus external CLIpull/watchmodel instead. So wiring 0.1.29's in-library provider means leaning on an API you might already be planning to drop.If it's worth doing, the payoff is turning the in-browser comments from one-way capture into an actual review loop, with status, replies, and presence landing back on the comment. The bridge would connect react-grab's provider to Cmux's
AgentSessionProvider(.claude/.codex/.opencode) over aWKScriptMessageHandlerWithReply.So the question is which direction you'd want:
pull/watchmodel and build the round-trip UI on the Cmux side.I'd lean toward option 1 since it's additive and easy to back out. I've already reverse-engineered the 0.1.29 provider interface and read through the current
ReactGrab.swiftintegration, so I can take whichever one you point me at.Beta Was this translation helpful? Give feedback.
All reactions