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
| 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 | } |