Skip to content

Commit 5c5616c

Browse files
TheodoreSpeakswaleedlatif1
authored andcommitted
v0.6.29: login improvements, posthog telemetry (#4026)
* feat(posthog): Add tracking on mothership abort (#4023) Co-authored-by: Theodore Li <theo@sim.ai> * fix(login): fix captcha headers for manual login (#4025) * fix(signup): fix turnstile key loading * fix(login): fix captcha header passing * Catch user already exists, remove login form captcha
1 parent 47519e3 commit 5c5616c

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]

apps/sim/app/workspace/[workspaceId]/home/home.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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()

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,14 @@ export const Panel = memo(function Panel({ workspaceId: propWorkspaceId }: Panel
401401
copilotStopGeneration()
402402
}, [copilotStopGeneration, workspaceId])
403403

404+
const handleCopilotStopGeneration = useCallback(() => {
405+
captureEvent(posthogRef.current, 'task_generation_aborted', {
406+
workspace_id: workspaceId,
407+
view: 'copilot',
408+
})
409+
copilotStopGeneration()
410+
}, [copilotStopGeneration, workspaceId])
411+
404412
const handleCopilotSubmit = useCallback(
405413
(text: string, fileAttachments?: FileAttachmentForApi[], contexts?: ChatContext[]) => {
406414
const trimmed = text.trim()

0 commit comments

Comments
 (0)