MCPcopy Index your code
hub / github.com/AndrewWalsh/openapi-devtools / getCurrentTab

Function getCurrentTab

src/ui/Main.tsx:29–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 const requestFinishedHandler = useCallback(
28 (harRequest: chrome.devtools.network.Request) => {
29 async function getCurrentTab() {
30 try {
31 harRequest.getContent((content) => {
32 try {
33 const contentStr = content || '';
34 const wasInserted = requestStore.insert(harRequest, contentStr);
35 if (!wasInserted) return;
36 setSpecEndpoints();
37 const host = safelyGetURLHost(harRequest.request.url);
38 if (host && !allHosts.has(host)) {
39 setAllHosts((prev) => new Set(prev).add(host));
40 }
41 } catch {
42 return;
43 }
44 });
45 } catch {
46 return;
47 }
48 }
49
50 getCurrentTab();
51 },

Callers 1

MainFunction · 0.85

Calls 2

safelyGetURLHostFunction · 0.90
insertMethod · 0.80

Tested by

no test coverage detected