mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-26 23:51:14 +02:00
refactor(tabs): drop snapshot args from tab sync
This commit is contained in:
parent
1465b907db
commit
9f1f727d89
2 changed files with 1 additions and 9 deletions
|
|
@ -299,11 +299,7 @@ export default function NewChatPage() {
|
|||
setCurrentThread(thread);
|
||||
syncChatTab({
|
||||
chatId: thread.id,
|
||||
title: thread.title,
|
||||
chatUrl: `/dashboard/${thread.workspace_id ?? workspaceId}/new-chat/${thread.id}`,
|
||||
workspaceId: thread.workspace_id ?? workspaceId,
|
||||
visibility: thread.visibility,
|
||||
hasComments: thread.has_comments ?? false,
|
||||
});
|
||||
}
|
||||
}, [activeThreadId, workspaceId, syncChatTab, threadDetailQuery.data]);
|
||||
|
|
|
|||
|
|
@ -45,17 +45,13 @@ export function useActivateChatThread() {
|
|||
);
|
||||
|
||||
const activateChatThread = useCallback(
|
||||
({ id, title, url, workspaceId, visibility, hasComments }: ActivateChatThreadInput) => {
|
||||
({ id, url, workspaceId, visibility, hasComments }: ActivateChatThreadInput) => {
|
||||
const numericWorkspaceId = getWorkspaceId(workspaceId);
|
||||
const chatUrl = url ?? getChatUrl(workspaceId, id);
|
||||
|
||||
syncChatTab({
|
||||
chatId: id,
|
||||
title: id ? title : (title ?? "New Chat"),
|
||||
chatUrl,
|
||||
workspaceId: numericWorkspaceId,
|
||||
...(visibility !== undefined ? { visibility } : {}),
|
||||
...(hasComments !== undefined ? { hasComments } : {}),
|
||||
});
|
||||
|
||||
setCurrentThreadMetadata({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue