MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / createApi

Function createApi

apps/extension/src/shared/tab-debugger.test.ts:420–437  ·  view source on GitHub ↗
(label: string, onCapture?: () => Promise<void>)

Source from the content-addressed store, hash-verified

418 });
419
420 it('captures a viewport screenshot for the selected tab and restores the active tab', async () => {
421 const calls: unknown[] = [];
422 const pngDataUrl =
423 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+/p9sAAAAASUVORK5CYII=';
424 let activeTabId = 1;
425 const tabsApi: BrowserTabsApi = {
426 captureVisibleTab: (windowId, options) => {
427 calls.push({ name: 'captureVisibleTab', options, windowId });
428 return pngDataUrl;
429 },
430 get: tabId => {
431 calls.push({ name: 'get', tabId });
432 return { id: tabId, title: 'Target', url: 'https://example.com/', windowId: 3 };
433 },
434 query: queryInfo => {
435 calls.push({ name: 'query', queryInfo });
436 return [{ id: activeTabId, title: 'Active', url: 'https://kilo.ai/', windowId: 3 }];
437 },
438 update: (tabId, updateProperties) => {
439 calls.push({ name: 'update', tabId, updateProperties });
440 activeTabId = tabId;

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected