MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / getCaps

Function getCaps

packages/node/src/backend/nodeBackend.ts:913–932  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

911 },
912
913 async getCaps(): Promise<TerminalCaps> {
914 if (disposed) throw new Error("NodeBackend: disposed");
915 if (fatal !== null) throw fatal;
916
917 // Return cached caps if available
918 if (cachedCaps !== null) {
919 return cachedCaps;
920 }
921
922 // If not started, return default caps
923 if (!started || worker === null) {
924 return DEFAULT_TERMINAL_CAPS;
925 }
926
927 // Request caps from worker
928 const d = deferred<TerminalCaps>();
929 capsWaiters.push(d);
930 send({ type: "getCaps" });
931 return d.promise;
932 },
933
934 async getTerminalProfile(): Promise<TerminalProfile> {
935 const caps = await backend.getCaps();

Callers

nothing calls this directly

Calls 3

sendFunction · 0.85
deferredFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected