MCPcopy
hub / github.com/wavetermdev/waveterm / sendRpcCommand

Function sendRpcCommand

frontend/app/store/wshrpcutil-base.ts:83–94  ·  view source on GitHub ↗
(
    openRpcs: Map<string, ClientRpcEntry>,
    msg: RpcMessage
)

Source from the content-addressed store, hash-verified

81}
82
83function sendRpcCommand(
84 openRpcs: Map<string, ClientRpcEntry>,
85 msg: RpcMessage
86): AsyncGenerator<RpcMessage, void, boolean> {
87 DefaultRouter.recvRpcMessage(msg);
88 if (msg.reqid == null) {
89 return null;
90 }
91 const rtnGen = rpcResponseGenerator(openRpcs, msg.command, msg.reqid, msg.timeout);
92 rtnGen.next();
93 return rtnGen;
94}
95
96async function consumeGenerator(gen: AsyncGenerator<any, any, any>) {
97 let idx = 0;

Callers 2

wshRpcCallMethod · 0.90
wshRpcStreamMethod · 0.90

Calls 2

rpcResponseGeneratorFunction · 0.85
recvRpcMessageMethod · 0.65

Tested by

no test coverage detected