feat: enhance directory processing with task queuing and input handling

This commit is contained in:
shiyu
2026-01-20 11:34:09 +08:00
parent a394ffa46b
commit f22ca62902
7 changed files with 63 additions and 12 deletions

View File

@@ -43,7 +43,7 @@ export const processorsApi = {
max_depth?: number | null;
suffix?: string | null;
}) =>
request<{ task_ids: string[]; scheduled: number }>('/processors/process-directory', {
request<{ task_id: string }>('/processors/process-directory', {
method: 'POST',
json: params,
}),

View File

@@ -617,6 +617,7 @@
"Source Editor": "Source Editor",
"Module Path": "Module Path",
"Directory processing always overwrites original files": "Directory processing always overwrites original files",
"Directory execution will enqueue one task per file": "Directory execution will enqueue a scan task, then one task per file",
"No data": "No data",
"Select File": "Select File",
"Select Path": "Select Path",

View File

@@ -608,7 +608,7 @@
"Source Editor": "源码编辑",
"Module Path": "模块路径",
"Directory processing always overwrites original files": "选择目录时会强制覆盖原文件",
"Directory execution will enqueue one task per file": "目录模式会为每个文件单独创建任务",
"Directory execution will enqueue one task per file": "目录模式会先创建扫描任务,后台再为每个文件创建任务",
"Directory scope": "目录范围",
"Current level only": "仅当前层级",
"Include subdirectories": "包含子目录",

View File

@@ -276,7 +276,7 @@ const ProcessorsPage = memo(function ProcessorsPage() {
max_depth: maxDepth,
suffix: suffixValue,
});
messageApi.success(`${t('Task submitted')}: ${resp.scheduled}`);
messageApi.success(`${t('Task submitted')}: ${resp.task_id}`);
}
} else {
const payload: any = {