{props.icon}
{displayBadgeText && displayBadgeText.length > 0 && (
@@ -436,6 +438,7 @@ function AgentCard(props: AgentCardProps) {
modelOptions={props.modelOptions}
slug={props.data.slug}
inputToolOptions={props.inputToolOptions}
+ isSubscribed={props.isSubscribed}
outputModeOptions={props.outputModeOptions}
/>
@@ -578,6 +581,7 @@ function AgentCard(props: AgentCardProps) {
slug={props.data.slug}
inputToolOptions={props.inputToolOptions}
outputModeOptions={props.outputModeOptions}
+ isSubscribed={props.isSubscribed}
/>
) : (
@@ -637,6 +641,7 @@ const EditAgentSchema = z.object({
interface AgentModificationFormProps {
form: UseFormReturn
>;
onSubmit: (values: z.infer) => void;
+ userConfig?: UserConfig;
create?: boolean;
errors?: string | null;
modelOptions: ModelOptions[];
@@ -644,6 +649,7 @@ interface AgentModificationFormProps {
inputToolOptions: { [key: string]: string };
outputModeOptions: { [key: string]: string };
slug?: string;
+ isSubscribed: boolean;
}
function AgentModificationForm(props: AgentModificationFormProps) {
@@ -659,7 +665,9 @@ function AgentModificationForm(props: AgentModificationFormProps) {
const [uploading, setUploading] = useState(false);
const [progressValue, setProgressValue] = useState(0);
const [uploadedFiles, setUploadedFiles] = useState([]);
- const [allFileOptions, setAllFileOptions] = useState(props.filesOptions);
+ const [allFileOptions, setAllFileOptions] = useState([]);
+
+ const [showSubscribeDialog, setShowSubscribeDialog] = useState(true);
const fileInputRef = useRef(null);
@@ -680,6 +688,13 @@ function AgentModificationForm(props: AgentModificationFormProps) {
}
}, [uploading]);
+ useEffect(() => {
+ const currentFiles = props.form.getValues("files") || [];
+ const fileOptions = props.filesOptions || [];
+ const concatenatedFiles = [...currentFiles, ...fileOptions];
+ setAllFileOptions((prev) => [...prev, ...concatenatedFiles]);
+ }, []);
+
useEffect(() => {
if (uploadedFiles.length > 0) {
handleAgentFileChange(uploadedFiles);
@@ -740,6 +755,38 @@ function AgentModificationForm(props: AgentModificationFormProps) {
const privacyOptions = ["public", "private", "protected"];
+ if (!props.isSubscribed && showSubscribeDialog) {
+ return (
+
+
+
+ Upgrade to Futurist
+
+
+ You need to be a Futurist subscriber to create more agents.{" "}
+ Upgrade now.
+
+
+ {
+ setShowSubscribeDialog(false);
+ }}
+ >
+ Cancel
+
+ {
+ window.location.href = "/settings";
+ }}
+ >
+ Continue
+
+
+
+
+ );
+ }
+
return (