Refactor brand service and related components
- Removed ListQuestionVersions method and associated types from BrandService and Queries. - Updated PromptRuleGenerationService to change task naming and handling. - Enhanced ScheduleTaskService to support filtering by created date range and keyword. - Introduced InstantTaskService for managing instant tasks with appropriate filtering and response structures. - Added InstantTaskHandler for handling API requests related to instant tasks. - Created InstantTaskTab component for the admin web interface to display and manage instant tasks. - Updated database migrations to rename source types for articles and generation tasks. - Adjusted models and repository queries to reflect the removal of question version handling.
This commit is contained in:
@@ -126,6 +126,7 @@ const instantGenerateMutation = useMutation({
|
||||
target_platform: serializeTargetPlatforms(form.platformIds),
|
||||
extra_params: {
|
||||
task_name: form.name.trim(),
|
||||
generation_mode: "instant",
|
||||
enable_web_search: form.enableWebSearch,
|
||||
generate_count: form.generateCount,
|
||||
target_platforms: form.platformIds,
|
||||
@@ -135,7 +136,10 @@ const instantGenerateMutation = useMutation({
|
||||
onSuccess: async () => {
|
||||
message.success(t("custom.messages.generateSubmitted"));
|
||||
emit("update:open", false);
|
||||
await queryClient.invalidateQueries({ queryKey: ["articles"] });
|
||||
await Promise.all([
|
||||
queryClient.invalidateQueries({ queryKey: ["articles"] }),
|
||||
queryClient.invalidateQueries({ queryKey: ["instantTasks"] }),
|
||||
]);
|
||||
},
|
||||
onError: (error) => message.error(formatError(error)),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user