* Get all available capture targets (monitors and windows). * Desktop only.
(includeThumbnails: boolean = true)
| 1453 | * Desktop only. |
| 1454 | */ |
| 1455 | async getTargets(includeThumbnails: boolean = true): Promise<CaptureTarget[]> { |
| 1456 | if (!isTauri() || !isDesktop()) { |
| 1457 | throw new Error('Target selection only available on desktop'); |
| 1458 | } |
| 1459 | |
| 1460 | // Non-ACL-gated app-command wrapper (see sc_get_capture_targets). Called from |
| 1461 | // MCP tools in the main window, where the gated plugin command would be denied |
| 1462 | // on a bad Linux launch. |
| 1463 | return invoke<CaptureTarget[]>('sc_get_capture_targets', { |
| 1464 | includeThumbnails |
| 1465 | }); |
| 1466 | } |
| 1467 | |
| 1468 | /** |
| 1469 | * Open the screen selector window. |
no test coverage detected