@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 17 lines 627 Bytes
Raw
1 import type { ScopedThreadRef } from "@t3tools/contracts";
2 import { Atom } from "effect/reactivity";
3
4 import { appAtomRegistry } from "~/rpc/atomRegistry";
5
6 /**
7 * Which thread has the guest share dialog open. The thread menu and the command palette both
8 * close as their command runs, so the chat view renders the dialog once.
9 */
10 export const guestShareDialogThreadAtom = Atom.make<ScopedThreadRef | null>(null).pipe(
11 Atom.keepAlive,
12 Atom.withLabel("guest-share:dialog-thread"),
13 );
14
15 export function openGuestShareDialog(threadRef: ScopedThreadRef): void {
16 appAtomRegistry.set(guestShareDialogThreadAtom, threadRef);
17 }