mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-11-23 17:31:50 +08:00
feat: make task global asset sharing opt-in
This commit is contained in:
1 parent
d36e1c3295
commit
080a46eb2d
25 files changed
+838
-328
No files matched your search
+3
-1
@@ -346,6 +346,7 @@ export const api = {
|
||||
timeoutSeconds?: number;
|
||||
seedFirstIntent?: boolean;
|
||||
planHeartbeatSeconds?: number;
|
||||
shareGlobalAssets?: boolean;
|
||||
coverageEnabled?: boolean;
|
||||
workerCount?: number;
|
||||
interceptRules?: AssetInterceptRuleInput[];
|
||||
@@ -363,6 +364,7 @@ export const api = {
|
||||
timeout_seconds: input.timeoutSeconds ?? 0,
|
||||
seed_first_intent: input.seedFirstIntent ?? false,
|
||||
plan_heartbeat_seconds: input.planHeartbeatSeconds ?? 0, // 0 = 后端归一到默认 600(10min)
|
||||
share_global_assets: input.shareGlobalAssets ?? false,
|
||||
coverage_enabled: input.coverageEnabled ?? true, // 默认开;false=关闭资产覆盖度功能
|
||||
worker_count: input.workerCount ?? 0, // 0 = 用全局默认 workers
|
||||
intercept_rules: input.interceptRules ?? [], // 任务级资产拦截规则
|
||||
@@ -380,7 +382,7 @@ export const api = {
|
||||
runScheduleNow: (id: number) =>
|
||||
post<{ ok: boolean; started: number; errors?: string[] }>(`/schedules/${id}/run-now`, {}),
|
||||
taskCategories: () => get<{ categories: TaskCategory[] }>("/task-categories").then((r) => arr(r.categories)),
|
||||
updateTask: (id: string, input: { name?: string; pinned?: boolean; remark?: string }) =>
|
||||
updateTask: (id: string, input: { name?: string; pinned?: boolean; remark?: string; share_global_assets?: boolean }) =>
|
||||
patch<Task>(`/tasks/${id}`, input),
|
||||
renameTask: (id: string, name: string) => patch<Task>(`/tasks/${id}`, { name }),
|
||||
pinTask: (id: string, pinned: boolean) => patch<Task>(`/tasks/${id}`, { pinned }),
|
||||
|
||||
Reference in new issue
Block a user