File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]
w/[workflowId]/components/panel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,6 +209,14 @@ export function Home({ chatId }: HomeProps = {}) {
209209 void stopGeneration ( ) . catch ( ( ) => { } )
210210 } , [ stopGeneration , workspaceId ] )
211211
212+ const handleStopGeneration = useCallback ( ( ) => {
213+ captureEvent ( posthogRef . current , 'task_generation_aborted' , {
214+ workspace_id : workspaceId ,
215+ view : 'mothership' ,
216+ } )
217+ stopGeneration ( )
218+ } , [ stopGeneration , workspaceId ] )
219+
212220 const handleSubmit = useCallback (
213221 ( text : string , fileAttachments ?: FileAttachmentForApi [ ] , contexts ?: ChatContext [ ] ) => {
214222 const trimmed = text . trim ( )
Original file line number Diff line number Diff line change @@ -400,6 +400,14 @@ export const Panel = memo(function Panel({ workspaceId: propWorkspaceId }: Panel
400400 copilotStopGeneration ( )
401401 } , [ copilotStopGeneration , workspaceId ] )
402402
403+ const handleCopilotStopGeneration = useCallback ( ( ) => {
404+ captureEvent ( posthogRef . current , 'task_generation_aborted' , {
405+ workspace_id : workspaceId ,
406+ view : 'copilot' ,
407+ } )
408+ copilotStopGeneration ( )
409+ } , [ copilotStopGeneration , workspaceId ] )
410+
403411 const handleCopilotSubmit = useCallback (
404412 ( text : string , fileAttachments ?: FileAttachmentForApi [ ] , contexts ?: ChatContext [ ] ) => {
405413 const trimmed = text . trim ( )
You can’t perform that action at this time.
0 commit comments