( nodes: SnapshotNode[], options: Pick<SnapshotTextOptions, 'scoped' | 'depthLimited'>, )
| 654 | } |
| 655 | |
| 656 | function formatSparseSnapshotHint( |
| 657 | nodes: SnapshotNode[], |
| 658 | options: Pick<SnapshotTextOptions, 'scoped' | 'depthLimited'>, |
| 659 | ): string | null { |
| 660 | if (options.scoped === true || options.depthLimited === true || nodes.length > 3) return null; |
| 661 | const noun = nodes.length === 1 ? 'node' : 'nodes'; |
| 662 | return `Hint: sparse accessibility snapshot returned ${nodes.length} ${noun}; snapshot state is invalid or unavailable for this screen. Use plain screenshot, not screenshot --overlay-refs, as visual truth. If screenshot shows the Home Screen or another app, run open for this app again first. Then navigate away with coordinates if needed and retry snapshot -i on the next screen.`; |
| 663 | } |
| 664 | |
| 665 | function readSnapshotWarnings(data: Record<string, unknown>): string[] { |
| 666 | const rawWarnings = data.warnings; |
no outgoing calls
no test coverage detected
searching dependent graphs…