()
| 695 | } |
| 696 | |
| 697 | export function checkHasTrustDialogAccepted(): boolean { |
| 698 | // Trust only transitions false→true during a session (never the reverse), |
| 699 | // so once true we can latch it. false is not cached — it gets re-checked |
| 700 | // on every call so that trust dialog acceptance is picked up mid-session. |
| 701 | // (lodash memoize doesn't fit here because it would also cache false.) |
| 702 | return (_trustAccepted ||= computeTrustDialogAccepted()) |
| 703 | } |
| 704 | |
| 705 | function computeTrustDialogAccepted(): boolean { |
| 706 | // Check session-level trust (for home directory case where trust is not persisted) |
no test coverage detected