Add more posthog analytics (privacy aware) (#6122)

This commit is contained in:
Zane
2025-12-16 08:59:14 -08:00
committed by GitHub
parent 036f4f74d9
commit 8a91f15731
34 changed files with 1339 additions and 48 deletions
+19 -1
View File
@@ -781,7 +781,25 @@ impl Agent {
let slash_command_recipe = if message_text.trim().starts_with('/') {
let command = message_text.split_whitespace().next();
command.and_then(crate::slash_commands::resolve_slash_command)
// Check if it's a builtin command first
let is_builtin = command
.map(|cmd| MANUAL_COMPACT_TRIGGERS.contains(&cmd))
.unwrap_or(false);
if is_builtin {
None
} else {
// Try to resolve as recipe command
let recipe = command.and_then(crate::slash_commands::resolve_slash_command);
// Track non-builtin slash command usage (don't track command name for privacy)
if recipe.is_some() {
crate::posthog::emit_custom_slash_command_used();
}
recipe
}
} else {
None
};