File tree Expand file tree Collapse file tree
api/mothership/chats/[chatId]/fork
workspace/[workspaceId]/components/message-actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ export const POST = withRouteHandler(
8888 model : parent . model ,
8989 messages : forkedMessages ,
9090 resources : parentResources ,
91+ previewYaml : parent . previewYaml ,
92+ planArtifact : parent . planArtifact ,
93+ config : parent . config ,
9194 conversationId : null ,
9295 updatedAt : now ,
9396 lastSeenAt : now ,
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ import {
1616 ThumbsDown ,
1717 ThumbsUp ,
1818 Tooltip ,
19+ toast ,
1920} from '@/components/emcn'
21+ import { cn } from '@/lib/core/utils/cn'
2022import { useSubmitCopilotFeedback } from '@/hooks/queries/copilot-feedback'
2123import { useForkTask } from '@/hooks/queries/tasks'
2224
@@ -154,7 +156,7 @@ export const MessageActions = memo(function MessageActions({
154156 const result = await forkTask . mutateAsync ( { chatId, upToMessageId : messageId } )
155157 router . push ( `/workspace/${ params . workspaceId } /task/${ result . id } ` )
156158 } catch {
157- /* fork failed — button resets, user can retry */
159+ toast . error ( 'Failed to fork chat' )
158160 }
159161 }
160162
@@ -221,7 +223,7 @@ export const MessageActions = memo(function MessageActions({
221223 aria-label = 'Fork from here'
222224 onClick = { handleFork }
223225 disabled = { forkTask . isPending }
224- className = { BUTTON_CLASS }
226+ className = { cn ( BUTTON_CLASS , forkTask . isPending && 'cursor-not-allowed opacity-50' ) }
225227 >
226228 < GitBranch className = { ICON_CLASS } />
227229 </ button >
You can’t perform that action at this time.
0 commit comments