The best way to control Claude Code, Codex and more from any computer or phone

main
ts 19 lines 576 Bytes
Raw
1 export function resolveReviewAvailability(input: {
2 readonly hasEnvironmentPresentation: boolean;
3 readonly isEnvironmentConnected: boolean;
4 readonly hasCachedSelectedDiff: boolean;
5 readonly hasAnyCachedDiff: boolean;
6 }): {
7 readonly showConnectionNotice: boolean;
8 readonly showSectionToolbar: boolean;
9 } {
10 const showConnectionNotice =
11 input.hasEnvironmentPresentation &&
12 !input.isEnvironmentConnected &&
13 !input.hasCachedSelectedDiff;
14
15 return {
16 showConnectionNotice,
17 showSectionToolbar: !showConnectionNotice || input.hasAnyCachedDiff,
18 };
19 }