Open source AI coding agent. Designed for large projects and real world tasks.
Go aiai-agentsai-developer-toolsai-toolsclicommand-linedeveloper-toolsgitgolanggpt-4llmopenaipolyglot-programmingterminalterminal-basedterminal-ui
Add hash parameter to auth hooks for tracking client config state
Dane Schneider57170a2c02f3
diff --git a/app/server/handlers/auth_helpers.go b/app/server/handlers/auth_helpers.goindex 7f14c8ea..9d8a938e 100644--- a/app/server/handlers/auth_helpers.go+++ b/app/server/handlers/auth_helpers.go@@ -567,10 +567,17 @@ func execAuthenticate(w http.ResponseWriter, r *http.Request, requireOrg bool, rPermissions: permissionsMap,}+ // don't send hash for org-session requests+ var hash string+ if r.URL.Path != "/orgs/session" {+ hash = parsed.Hash+ }+_, apiErr := hooks.ExecHook(hooks.Authenticate, hooks.HookParams{Auth: auth,AuthenticateHookRequestParams: &hooks.AuthenticateHookRequestParams{Path: r.URL.Path,+ Hash: hash,},})diff --git a/app/server/hooks/hooks.go b/app/server/hooks/hooks.goindex 96248960..08380e1a 100644--- a/app/server/hooks/hooks.go+++ b/app/server/hooks/hooks.go@@ -33,6 +33,7 @@ type WillSendModelRequestParams struct {InputTokens intOutputTokens intModelName shared.ModelName+ IsUserPrompt bool}type DidSendModelRequestParams struct {@@ -119,6 +120,7 @@ type CreateOrgHookRequestParams struct {type AuthenticateHookRequestParams struct {Path string+ Hash string}type FastApplyParams struct {