From 27fa39353e9c210a2fe9367e52bb7b3ce9c781d6 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Mon, 11 Nov 2024 11:54:59 -0800 Subject: [PATCH] Make custom agent creation flow available to everyone - For private agents, add guardrails to prevent against any misuse or violation of terms of service. --- .../app/components/agentCard/agentCard.tsx | 6 ++-- src/interface/web/app/layout.tsx | 2 +- src/khoj/processor/conversation/prompts.py | 33 +++++++++++++++++++ src/khoj/routers/api_agents.py | 18 +++++----- src/khoj/routers/helpers.py | 8 +++-- 5 files changed, 51 insertions(+), 16 deletions(-) diff --git a/src/interface/web/app/components/agentCard/agentCard.tsx b/src/interface/web/app/components/agentCard/agentCard.tsx index 1d6020e7..3dba4d3a 100644 --- a/src/interface/web/app/components/agentCard/agentCard.tsx +++ b/src/interface/web/app/components/agentCard/agentCard.tsx @@ -526,7 +526,7 @@ export function AgentModificationForm(props: AgentModificationFormProps) { const [allFileOptions, setAllFileOptions] = useState([]); const [currentStep, setCurrentStep] = useState(0); - const [showSubscribeDialog, setShowSubscribeDialog] = useState(true); + const [showSubscribeDialog, setShowSubscribeDialog] = useState(false); const privacyOptions = ["public", "private", "protected"]; @@ -684,7 +684,7 @@ export function AgentModificationForm(props: AgentModificationFormProps) { } }; - if (!props.isSubscribed && showSubscribeDialog) { + if (showSubscribeDialog) { return ( @@ -1271,7 +1271,7 @@ export function AgentModificationForm(props: AgentModificationFormProps) {