mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-29 16:18:40 +08:00
fix: remove upload usage parameters
This commit is contained in:
1 parent
7c6b9d4564
commit
fecebf4cae
7 files changed
+15
-24
No files matched your search
+13
-12
@@ -167,12 +167,6 @@ export enum ConstsTransactionKind {
|
||||
TransactionKindCheckin = "checkin",
|
||||
}
|
||||
|
||||
export enum ConstsUploadUsage {
|
||||
UploadUsageAvatar = "avatar",
|
||||
UploadUsageSpec = "spec",
|
||||
UploadUsageRepo = "repo",
|
||||
}
|
||||
|
||||
export enum ConstsUserPlatform {
|
||||
UserPlatformBaizhi = "baizhi",
|
||||
UserPlatformGithub = "github",
|
||||
@@ -418,11 +412,16 @@ export interface DomainCreateIssueReq {
|
||||
export interface DomainCreateModelReq {
|
||||
api_key: string;
|
||||
base_url: string;
|
||||
/** @min 1 */
|
||||
context_limit?: number;
|
||||
interface_type: "openai_chat" | "openai_responses" | "anthropic";
|
||||
is_default?: boolean;
|
||||
model: string;
|
||||
/** @min 1 */
|
||||
output_limit?: number;
|
||||
provider: string;
|
||||
temperature?: number;
|
||||
thinking_enabled?: boolean;
|
||||
}
|
||||
|
||||
export interface DomainCreateNotifyChannelReq {
|
||||
@@ -814,6 +813,7 @@ export interface DomainModel {
|
||||
access_level?: string;
|
||||
api_key?: string;
|
||||
base_url?: string;
|
||||
context_limit?: number;
|
||||
created_at?: number;
|
||||
id?: string;
|
||||
interface_type?: ConstsInterfaceType;
|
||||
@@ -823,9 +823,11 @@ export interface DomainModel {
|
||||
last_check_error?: string;
|
||||
last_check_success?: boolean;
|
||||
model?: string;
|
||||
output_limit?: number;
|
||||
owner?: DomainOwner;
|
||||
provider?: string;
|
||||
temperature?: number;
|
||||
thinking_enabled?: boolean;
|
||||
updated_at?: number;
|
||||
weight?: number;
|
||||
}
|
||||
@@ -936,12 +938,8 @@ export interface DomainPlaygroundTaskPost {
|
||||
}
|
||||
|
||||
export interface DomainPresignReq {
|
||||
/** 预签名URL过期时间(秒),默认600秒(10分钟),最大604800秒(7天) */
|
||||
expires?: number;
|
||||
/** 文件名 */
|
||||
filename: string;
|
||||
/** 上传用途枚举: avatar(头像), spec(规格), repo(仓库) */
|
||||
usage: "avatar" | "spec" | "repo";
|
||||
}
|
||||
|
||||
export interface DomainPresignResp {
|
||||
@@ -1535,11 +1533,16 @@ export interface DomainUpdateIssueReq {
|
||||
export interface DomainUpdateModelReq {
|
||||
api_key?: string;
|
||||
base_url?: string;
|
||||
/** @min 1 */
|
||||
context_limit?: number;
|
||||
interface_type?: "openai_chat" | "openai_responses" | "anthropic";
|
||||
is_default?: boolean;
|
||||
model?: string;
|
||||
/** @min 1 */
|
||||
output_limit?: number;
|
||||
provider?: string;
|
||||
temperature?: number;
|
||||
thinking_enabled?: boolean;
|
||||
}
|
||||
|
||||
export interface DomainUpdateNotifyChannelReq {
|
||||
@@ -3430,8 +3433,6 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
||||
*/
|
||||
v1UploaderCreate: (
|
||||
data: {
|
||||
/** 上传用途,可选值: avatar(头像), spec(规格), repo(仓库) */
|
||||
usage: string;
|
||||
/**
|
||||
* 要上传的文件
|
||||
* @format binary
|
||||
|
||||
@@ -46,7 +46,6 @@ export default function MarkdownEditor({
|
||||
try {
|
||||
const api = new Api()
|
||||
const response = await api.api.v1UploaderCreate({
|
||||
usage: 'spec',
|
||||
file: file,
|
||||
})
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Spinner } from "@/components/ui/spinner";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Api, ConstsTransactionKind, ConstsUploadUsage, type DomainInvitationItem, type DomainTransactionLog } from "@/api/Api";
|
||||
import { Api, ConstsTransactionKind, type DomainInvitationItem, type DomainTransactionLog } from "@/api/Api";
|
||||
import { Item, ItemContent, ItemGroup, ItemSeparator, ItemTitle } from "@/components/ui/item";
|
||||
import Icon from "@/components/common/Icon";
|
||||
import dayjs from "dayjs";
|
||||
@@ -398,7 +398,6 @@ export default function NavBalance({
|
||||
try {
|
||||
const api = new Api()
|
||||
const uploadResp = await api.api.v1UploaderCreate({
|
||||
usage: ConstsUploadUsage.UploadUsageAvatar,
|
||||
file,
|
||||
})
|
||||
|
||||
|
||||
@@ -449,8 +449,6 @@ export default function CreateDefaultTaskDialog({
|
||||
const api = new Api()
|
||||
const presignResponse = await api.api.v1UploaderPresignCreate({
|
||||
filename: selectedZipFile.name,
|
||||
usage: "repo",
|
||||
expires: 600,
|
||||
})
|
||||
|
||||
if (presignResponse.data?.code !== 0 || !presignResponse.data?.data) {
|
||||
|
||||
@@ -383,8 +383,6 @@ export function TaskInput({ repos, onTaskCreated }: TaskInputProps) {
|
||||
const api = new Api();
|
||||
const presignResponse = await api.api.v1UploaderPresignCreate({
|
||||
filename: selectedZipFile.name,
|
||||
usage: "repo",
|
||||
expires: 600,
|
||||
});
|
||||
|
||||
if (presignResponse.data?.code !== 0 || !presignResponse.data?.data) {
|
||||
|
||||
@@ -89,7 +89,6 @@ const PostCreate = () => {
|
||||
try {
|
||||
const api = new Api();
|
||||
const response = await api.api.v1UploaderCreate({
|
||||
usage: "spec",
|
||||
file: file,
|
||||
});
|
||||
|
||||
@@ -155,7 +154,6 @@ const PostCreate = () => {
|
||||
|
||||
const api = new Api();
|
||||
const response = await api.api.v1UploaderCreate({
|
||||
usage: "spec",
|
||||
file: zipFileObj,
|
||||
});
|
||||
|
||||
@@ -434,4 +432,4 @@ const PostCreate = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default PostCreate;
|
||||
export default PostCreate;
|
||||
@@ -563,8 +563,6 @@ export async function packAndUploadFilesAsZip(
|
||||
const presignResult = await new Promise<{ upload_url: string; access_url: string }>((resolve, reject) => {
|
||||
apiRequest('v1UploaderPresignCreate', {
|
||||
filename: zipFile.name,
|
||||
usage: 'repo',
|
||||
expires: 600,
|
||||
}, [], (resp) => {
|
||||
if (resp.code === 0 && resp.data?.upload_url && resp.data?.access_url) {
|
||||
resolve({ upload_url: resp.data.upload_url, access_url: resp.data.access_url })
|
||||
|
||||
Reference in new issue
Block a user