bug fixes, and performance improvements, and drawer
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
export const provisionalTopicTitle = (message?: {
|
||||
content: string;
|
||||
files?: { name: string }[];
|
||||
fileIds?: string[];
|
||||
}): string => {
|
||||
const line = message?.content.split(/\r?\n/).map(line => line.trim()).find(Boolean);
|
||||
const title = line || message?.files?.[0]?.name || (message?.fileIds?.length ? "Attached files" : "New Topic");
|
||||
return title.replace(/\s+/g, " ").slice(0, 100);
|
||||
};
|
||||
Reference in New Issue
Block a user