webview-trpc-messaging
Installation
SKILL.md
Webview tRPC Messaging
Type-safe RPC communication between the VS Code extension host (server) and React webviews (client) using tRPC.
Architecture Overview
React Webview (client) Extension Host (server)
───────────────────── ──────────────────────
useTrpcClient() hook WebviewController
└─ createTRPCClient └─ setupTrpc()
└─ vscodeLink ──── postMessage ────► ├─ callerFactory(appRouter)
(send/onReceive) ◄─────┤ └─ procedure(input)
└─ abort/subscription.stop
Key files (read as needed for implementation details):