fix: metrics on posthog (#6024)

Co-authored-by: Zane Staggs <zane@squareup.com>
Co-authored-by: Zane <75694352+zanesq@users.noreply.github.com>
This commit is contained in:
Michael Neale
2025-12-10 11:28:18 +11:00
committed by GitHub
parent 02189f5555
commit 9b6a1c1297
20 changed files with 689 additions and 34 deletions
+4
View File
@@ -105,6 +105,8 @@ async fn start_agent(
State(state): State<Arc<AppState>>,
Json(payload): Json<StartAgentRequest>,
) -> Result<Json<Session>, ErrorResponse> {
goose::posthog::set_session_context("desktop", false);
let StartAgentRequest {
working_dir,
recipe,
@@ -197,6 +199,8 @@ async fn resume_agent(
State(state): State<Arc<AppState>>,
Json(payload): Json<ResumeAgentRequest>,
) -> Result<Json<Session>, ErrorResponse> {
goose::posthog::set_session_context("desktop", true);
let session = SessionManager::get_session(&payload.session_id, true)
.await
.map_err(|err| {