Skip to content

Commit

Permalink
chore(posthog): capture "push to" buttons (#5270)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyaoww authored Nov 25, 2024
1 parent 3b18d77 commit 0b05c29
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/components/chat-interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export function ChatInterface() {
"Please push the changes to a remote branch on GitHub, but do NOT create a pull request.",
}}
onClick={(value) => {
posthog.capture("push_to_branch_button_clicked");
handleSendMessage(value, []);
}}
/>
Expand All @@ -196,6 +197,7 @@ export function ChatInterface() {
"Please push the changes to GitHub and open a pull request.",
}}
onClick={(value) => {
posthog.capture("create_pr_button_clicked");
handleSendMessage(value, []);
setHasPullRequest(true);
}}
Expand All @@ -209,6 +211,7 @@ export function ChatInterface() {
"Please push the latest changes to the existing pull request.",
}}
onClick={(value) => {
posthog.capture("push_to_pr_button_clicked");
handleSendMessage(value, []);
}}
/>
Expand All @@ -222,7 +225,10 @@ export function ChatInterface() {
: "Downloading, please wait...",
value: "Download .zip",
}}
onClick={handleDownloadWorkspace}
onClick={() => {
posthog.capture("download_workspace_button_clicked");
handleDownloadWorkspace();
}}
/>
)}
</div>
Expand Down

0 comments on commit 0b05c29

Please sign in to comment.