mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-26 23:51:14 +02:00
fix(chat): update default chat title to "New Chat" in LayoutDataProvider and useResolvedTabs
This commit is contained in:
parent
9f1f727d89
commit
7b4e4792bf
2 changed files with 2 additions and 2 deletions
|
|
@ -285,7 +285,7 @@ export function LayoutDataProvider({
|
||||||
|
|
||||||
return threadsData.threads.map<ChatItem>((thread) => ({
|
return threadsData.threads.map<ChatItem>((thread) => ({
|
||||||
id: thread.id,
|
id: thread.id,
|
||||||
name: thread.title || `Chat ${thread.id}`,
|
name: thread.title || "New Chat",
|
||||||
url: `/dashboard/${workspaceId}/new-chat/${thread.id}`,
|
url: `/dashboard/${workspaceId}/new-chat/${thread.id}`,
|
||||||
visibility: thread.visibility,
|
visibility: thread.visibility,
|
||||||
isOwnThread: thread.is_own_thread,
|
isOwnThread: thread.is_own_thread,
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ export function resolveTabPointers({
|
||||||
const row = tab.entityId === null ? undefined : threads.get(tab.entityId);
|
const row = tab.entityId === null ? undefined : threads.get(tab.entityId);
|
||||||
return {
|
return {
|
||||||
...tab,
|
...tab,
|
||||||
title: row?.title || (tab.entityId === null ? "New Chat" : `Chat ${tab.entityId}`),
|
title: row?.title || "New Chat",
|
||||||
chatUrl: getChatUrl(tab.workspaceId, tab.entityId),
|
chatUrl: getChatUrl(tab.workspaceId, tab.entityId),
|
||||||
...(row?.visibility !== undefined ? { visibility: row.visibility as ChatVisibility } : {}),
|
...(row?.visibility !== undefined ? { visibility: row.visibility as ChatVisibility } : {}),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue