@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 20 lines 687 Bytes
Raw
1 import type { EnvironmentId } from "@t3tools/contracts";
2
3 import type { RemoteOpenMode } from "../../remoteOpen";
4
5 export 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 }