mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-20 21:18:13 +02:00
refactor: update title generation logic to improve user experience by generating titles in parallel with assistant responses
This commit is contained in:
parent
bd91b0bef2
commit
e8cf677b25
5 changed files with 120 additions and 61 deletions
|
|
@ -465,10 +465,7 @@ export default function NewChatPage() {
|
|||
let isNewThread = false;
|
||||
if (!currentThreadId) {
|
||||
try {
|
||||
// Create thread with truncated prompt as initial title
|
||||
const initialTitle =
|
||||
userQuery.trim().slice(0, 100) + (userQuery.trim().length > 100 ? "..." : "");
|
||||
const newThread = await createThread(searchSpaceId, initialTitle);
|
||||
const newThread = await createThread(searchSpaceId, "New Chat");
|
||||
currentThreadId = newThread.id;
|
||||
setThreadId(currentThreadId);
|
||||
// Set currentThread so share button in header appears immediately
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue