refactor(tabs): drop snapshot args from tab sync

This commit is contained in:
Anish Sarkar 2026-07-16 18:11:29 +05:30
parent 1465b907db
commit 9f1f727d89
2 changed files with 1 additions and 9 deletions

View file

@ -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]);

View file

@ -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({