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
Merge fixes
David Weirich317d89798c16
diff --cc app/server/handlers/orgs.goindex 3e111f7f,d7b4cd02..5ffaf5b1--- a/app/server/handlers/orgs.go+++ b/app/server/handlers/orgs.go@@@ -6,8 -6,6 +6,7 @@@ import"log""net/http""plandex-server/db"+ "plandex-server/hooks"- "plandex-server/types""github.com/plandex/plandex/shared")@@@ -128,15 -129,6 +130,19 @@@ func CreateOrgHandler(w http.ResponseWr}}- err = hooks.ExecHook(tx, hooks.CreateOrg, hooks.HookParams{- W: w,++ _, apiErr := hooks.ExecHook(hooks.CreateOrg, hooks.HookParams{+ User: auth.User,- Org: org,++ Tx: tx,++++ CreateOrgHookRequestParams: &hooks.CreateOrgHookRequestParams{++ Org: org,++ },+ })- if err != nil {++ if apiErr != nil {++ writeApiError(w, *apiErr)+ return+ }+err = tx.Commit()if err != nil {diff --cc app/server/hooks/hooks.goindex ed6f621c,94cbbef1..f121645d--- a/app/server/hooks/hooks.go+++ b/app/server/hooks/hooks.go@@@ -14,8 -14,8 +14,10 @@@ constWillExecPlan = "will_exec_plan"WillSendModelRequest = "will_send_model_request"DidSendModelRequest = "did_send_model_request"- GetIntegratedModels = "get_integrated_models"- GetApiOrgs = "get_api_orgs"+- CreateOrg = "create_org"++ CreateOrg = "create_org"++ GetIntegratedModels = "get_integrated_models"++ GetApiOrgs = "get_api_orgs")type WillSendModelRequestParams struct {@@@ -34,10 -34,6 +36,10 @@@ type DidSendModelRequestParams structPurpose string}- type CreateHookRequestParams struct {++type CreateOrgHookRequestParams struct {+ Org *db.Org+}+type HookParams struct {User *db.UserOrgId string@@@ -45,9 -42,20 +48,21 @@@WillSendModelRequestParams *WillSendModelRequestParamsDidSendModelRequestParams *DidSendModelRequestParams++ CreateOrgHookRequestParams *CreateOrgHookRequestParams+ GetApiOrgIds []string}- type Hook func(tx *sqlx.Tx, params HookParams) *shared.ApiError+ type GetIntegratedModelsResult struct {+ IntegratedModelsMode bool+ ApiKeys map[string]string+ }++ type HookResult struct {+ GetIntegratedModelsResult *GetIntegratedModelsResult+ ApiOrgsById map[string]*shared.Org+ }++ type Hook func(params HookParams) (HookResult, *shared.ApiError)var hooks = make(map[string]Hook)