Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

placeholderThreadTitle.ts

6 lines397 Bytes

1// An agent may create a thread with neither a title nor a prompt; its name is then a placeholder
2// that the first message should replace, unlike a title the caller chose.
3export const placeholderThreadTitle = (parentTitle: string, index: number): string =>
4 `${parentTitle} thread ${index + 1}`;
5​
6export const isPlaceholderThreadTitle = (title: string): boolean => / thread \d+$/u.test(title);