* Get all available capture targets (monitors and windows). * Desktop only.
(includeThumbnails: boolean = true)
| 1431 | * Desktop only. |
| 1432 | */ |
| 1433 | async getTargets(includeThumbnails: boolean = true): Promise<CaptureTarget[]> { |
| 1434 | if (!isTauri() || !isDesktop()) { |
| 1435 | throw new Error('Target selection only available on desktop'); |
| 1436 | } |
| 1437 | |
| 1438 | // Non-ACL-gated app-command wrapper (see sc_get_capture_targets). Called from |
| 1439 | // MCP tools in the main window, where the gated plugin command would be denied |
| 1440 | // on a bad Linux launch. |
| 1441 | return invoke<CaptureTarget[]>('sc_get_capture_targets', { |
| 1442 | includeThumbnails |
| 1443 | }); |
| 1444 | } |
| 1445 | |
| 1446 | /** |
| 1447 | * Open the screen selector window. |
no test coverage detected