Open History to see the last commit
1import type { ScopedThreadRef } from "@t3tools/contracts";
2import { threadContextRecord } from "@t3tools/shared/composerContextReferences";
3
4export type ThreadContextDropRef = ScopedThreadRef & { readonly title?: string };
5
6export 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}