Skip to content

Commit cb8ea3a

Browse files
authored
fix(fork): clear task selection before navigating to fork (#4356)
1 parent cb43b59 commit cb8ea3a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

apps/sim/app/workspace/[workspaceId]/components/message-actions/message-actions.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
import { cn } from '@/lib/core/utils/cn'
2222
import { useSubmitCopilotFeedback } from '@/hooks/queries/copilot-feedback'
2323
import { useForkTask } from '@/hooks/queries/tasks'
24+
import { useFolderStore } from '@/stores/folders/store'
2425

2526
const SPECIAL_TAGS = 'thinking|options|usage_upgrade|credential|mothership-error|file'
2627

@@ -154,6 +155,7 @@ export const MessageActions = memo(function MessageActions({
154155
if (!chatId || !messageId || forkTask.isPending) return
155156
try {
156157
const result = await forkTask.mutateAsync({ chatId, upToMessageId: messageId })
158+
useFolderStore.getState().clearTaskSelection()
157159
router.push(`/workspace/${params.workspaceId}/task/${result.id}`)
158160
} catch {
159161
toast.error('Failed to fork chat')

0 commit comments

Comments
 (0)