mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-25 00:11:52 +08:00
feat: support custom shell generator (#49)
This commit is contained in:
@@ -5,7 +5,13 @@ import { Button } from "@/components/ui/button";
|
||||
import { Form } from "@/components/ui/form.tsx";
|
||||
import { env } from "@/config.ts";
|
||||
import { FormSchema, formSchema } from "@/types/schema.ts";
|
||||
import { APIErrorResponse, ConfigResponseType, GenerateResponse, GenerateResult } from "@/types/shell.ts";
|
||||
import {
|
||||
APIErrorResponse,
|
||||
ConfigResponseType,
|
||||
GenerateResponse,
|
||||
GenerateResult,
|
||||
ShellToolType,
|
||||
} from "@/types/shell.ts";
|
||||
import { transformToPostData } from "@/utils/transformer.ts";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
@@ -76,6 +82,11 @@ function IndexComponent() {
|
||||
toast.warning(t("tips.handlerUrlPattern"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (values.shellTool === ShellToolType.Custom && !values.shellClassBase64) {
|
||||
toast.warning(t("tips.customShellClass"));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user