feat(imitation): add article imitation create flow
Introduce 仿写创作: new list and create views, backend imitation service and prompt templates, worker task routing for imitation jobs, and one-click rewrite triggers from question citation sources. Surface source article URL/title on article list/detail, and restrict failed articles to delete-only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -502,6 +502,8 @@ export interface ArticleListItem {
|
||||
generation_error_message: string | null;
|
||||
word_count: number;
|
||||
source_label: string | null;
|
||||
source_url?: string | null;
|
||||
source_title?: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -528,6 +530,8 @@ export interface ArticleDetail {
|
||||
markdown_content: string | null;
|
||||
word_count: number;
|
||||
source_label: string | null;
|
||||
source_url?: string | null;
|
||||
source_title?: string | null;
|
||||
version_no: number | null;
|
||||
generation_error_message: string | null;
|
||||
wizard_state?: Record<string, JsonValue> | null;
|
||||
@@ -538,6 +542,31 @@ export interface CreateArticleRequest {
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface GenerateImitationRequest {
|
||||
source_url: string;
|
||||
source_title?: string;
|
||||
locale?: string;
|
||||
industry?: string;
|
||||
brand_name?: string;
|
||||
region?: string;
|
||||
target_audience?: string;
|
||||
content_goal?: string;
|
||||
tone?: string;
|
||||
length_goal?: string;
|
||||
keywords?: string[];
|
||||
preserve_points?: string;
|
||||
avoid_points?: string;
|
||||
extra_requirements?: string;
|
||||
enable_web_search?: boolean;
|
||||
web_search_limit?: number;
|
||||
knowledge_group_ids?: number[];
|
||||
}
|
||||
|
||||
export interface GenerateImitationResponse {
|
||||
article_id: number;
|
||||
task_id: number;
|
||||
}
|
||||
|
||||
export interface UpdateArticleRequest {
|
||||
title: string;
|
||||
markdown_content: string;
|
||||
|
||||
Reference in New Issue
Block a user