(action: string, payload: Record<string, any>)
| 503 | } |
| 504 | |
| 505 | async function agentCommand(action: string, payload: Record<string, any>): Promise<any> { |
| 506 | return await agentRequest(action, payload); |
| 507 | } |
| 508 | |
| 509 | async function withTab<T>(tabId: number | undefined, action: () => Promise<T>): Promise<T> { |
| 510 | if (!Number.isFinite(tabId)) return await action(); |
no test coverage detected