MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / sendTermInputEvent

Function sendTermInputEvent

tsunami/frontend/src/vdom.tsx:283–294  ·  view source on GitHub ↗
(event: VDomEvent)

Source from the content-addressed store, hash-verified

281}
282
283async function sendTermInputEvent(event: VDomEvent) {
284 const response = await fetch("/api/terminput", {
285 method: "POST",
286 headers: {
287 "Content-Type": "application/json",
288 },
289 body: JSON.stringify(event),
290 });
291 if (!response.ok) {
292 throw new Error(`terminal input request failed: ${response.status} ${response.statusText}`);
293 }
294}
295
296function WaveTerm({ elem, model }: { elem: VDomElem; model: TsunamiModel }) {
297 const props = useVDom(model, elem);

Callers 1

WaveTermFunction · 0.85

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected