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

main
ts 12 lines 461 Bytes
Raw
1 import type { ScopedThreadRef } from "@t3tools/contracts";
2 import { threadContextRecord } from "@t3tools/shared/composerContextReferences";
3
4 export type ThreadContextDropRef = ScopedThreadRef & { readonly title?: string };
5
6 export function droppedThreadContextRecord(
7 ref: ThreadContextDropRef,
8 shell: { readonly title: string } | null,
9 ) {
10 const title = ref.title ?? shell?.title;
11 return title === undefined ? null : threadContextRecord(ref, title);
12 }