Open History to see the last commit
1import type { EnvironmentId } from "@t3tools/contracts";
2
3import type { RemoteOpenMode } from "../../remoteOpen";
4
5export function shouldShowOpenInPicker(input: {
6 readonly activeProjectName: string | undefined;
7 readonly activeThreadEnvironmentId: EnvironmentId;
8 readonly primaryEnvironmentId: EnvironmentId | null;
9 readonly hostEnvironmentId: string | null;
10 readonly remoteOpenMode: RemoteOpenMode;
11}): boolean {
12 if (!input.activeProjectName) return false;
13 if (
14 input.activeThreadEnvironmentId === input.primaryEnvironmentId ||
15 input.activeThreadEnvironmentId === input.hostEnvironmentId
16 ) {
17 return true;
18 }
19 return input.remoteOpenMode !== "local-exec";
20}