mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-11-24 17:51:51 +08:00
feat: 任务/模板备注展示与 Worker 运行数量配置
- 新建任务可填写备注;详情页头部展示备注(列表原有 RemarkEditor 保留) - 任务模板支持备注与 Worker 数量,应用/另存为模板时同步带入 - 新建任务高级设置与模板均可单独设置 Worker 运行数量(0=回落全局默认) - schema/API/引擎贯通:tasks.worker_count、task_templates.remark/worker_count
This commit is contained in:
1 parent
620ca5d96c
commit
45d4e4e67b
15 files changed
+250
-26
No files matched your search
+6
-2
@@ -300,6 +300,7 @@ export const api = {
|
||||
task: (id: string) => get<Task>(`/tasks/${encodeURIComponent(id)}`),
|
||||
createTask: (input: {
|
||||
name?: string;
|
||||
remark?: string;
|
||||
categoryId?: number;
|
||||
description: string;
|
||||
goal: string;
|
||||
@@ -310,11 +311,13 @@ export const api = {
|
||||
seedFirstIntent?: boolean;
|
||||
planHeartbeatSeconds?: number;
|
||||
coverageEnabled?: boolean;
|
||||
workerCount?: number;
|
||||
interceptRules?: AssetInterceptRuleInput[];
|
||||
schedule?: ScheduleInput;
|
||||
}) =>
|
||||
post<Task>("/tasks", {
|
||||
name: input.name ?? "",
|
||||
remark: input.remark ?? "",
|
||||
category_id: input.categoryId ?? null,
|
||||
description: input.description,
|
||||
goal: input.goal,
|
||||
@@ -325,6 +328,7 @@ export const api = {
|
||||
seed_first_intent: input.seedFirstIntent ?? false,
|
||||
plan_heartbeat_seconds: input.planHeartbeatSeconds ?? 0, // 0 = 后端归一到默认 600(10min)
|
||||
coverage_enabled: input.coverageEnabled ?? true, // 默认开;false=关闭资产覆盖度功能
|
||||
worker_count: input.workerCount ?? 0, // 0 = 用全局默认 workers
|
||||
intercept_rules: input.interceptRules ?? [], // 任务级资产拦截规则
|
||||
schedule: input.schedule ? schedulePayload(input.schedule) : undefined,
|
||||
}),
|
||||
@@ -357,11 +361,11 @@ export const api = {
|
||||
}),
|
||||
taskTemplates: () => get<{ templates: TaskTemplate[] }>("/task-templates").then((r) => arr(r.templates)),
|
||||
createTaskTemplate: (
|
||||
input: Pick<TaskTemplate, "name" | "description" | "goal" | "category_id" | "intercept_rules">,
|
||||
input: Pick<TaskTemplate, "name" | "description" | "goal" | "remark" | "category_id" | "intercept_rules" | "worker_count">,
|
||||
) => post<TaskTemplate>("/task-templates", input),
|
||||
updateTaskTemplate: (
|
||||
id: number,
|
||||
input: Partial<Pick<TaskTemplate, "name" | "description" | "goal" | "category_id" | "intercept_rules">>,
|
||||
input: Partial<Pick<TaskTemplate, "name" | "description" | "goal" | "remark" | "category_id" | "intercept_rules" | "worker_count">>,
|
||||
) => patch<TaskTemplate>(`/task-templates/${id}`, input),
|
||||
deleteTaskTemplate: (id: number) => del<{ deleted: number }>(`/task-templates/${id}`),
|
||||
updateTaskLLMProfiles: (id: string, llmProfileIds: number[], activeLLMProfileId?: number) =>
|
||||
|
||||
Reference in new issue
Block a user