22 lines · 810 B · TypeScript
RawDownload
import type { EnvironmentId } from "@t3tools/contracts"; import type { RemoteOpenMode } from "../../remoteOpen"; export function shouldShowOpenInPicker(input: {  readonly activeProjectName: string | undefined;  readonly activeThreadEnvironmentId: EnvironmentId;  readonly primaryEnvironmentId: EnvironmentId | null;  readonly remoteOpenMode: RemoteOpenMode;}): boolean {  if (!input.activeProjectName) return false;  if (    input.primaryEnvironmentId !== null &&    input.activeThreadEnvironmentId === input.primaryEnvironmentId  ) {    return true;  }  // Remote environments get the picker in deep-link mode (or its explicit  // "no SSH route" state). Non-primary local backends (e.g. WSL) keep it  // hidden, matching pre-remote behavior.  return input.remoteOpenMode !== "local-exec";}