Skip to content

πŸ™Œ OpenHands: AI-Driven Development

chore(posthog): capture "push to" buttons (#5270)

Xingyao Wang0b05c296d8f1
diff --git a/frontend/src/components/chat-interface.tsx b/frontend/src/components/chat-interface.tsx
index 5e2a7d161e..6d12b9cc6b 100644
--- a/frontend/src/components/chat-interface.tsx
+++ b/frontend/src/components/chat-interface.tsx
@@ -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, []);
}}
/>
@@ -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);
}}
@@ -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, []);
}}
/>
@@ -222,7 +225,10 @@ export function ChatInterface() {
: "Downloading, please wait...",
value: "Download .zip",
}}
- onClick={handleDownloadWorkspace}
+ onClick={() => {
+ posthog.capture("download_workspace_button_clicked");
+ handleDownloadWorkspace();
+ }}
/>
)}
</div>