feature: 新增伏笔管理系统,支持可视化追踪、AI智能关联回收及章节生成时的伏笔提醒
This commit is contained in:
@@ -740,4 +740,144 @@ export interface MCPToolCallResponse {
|
||||
success: boolean;
|
||||
result?: unknown;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
// 伏笔管理类型定义
|
||||
export type ForeshadowStatus = 'pending' | 'planted' | 'resolved' | 'partially_resolved' | 'abandoned';
|
||||
export type ForeshadowSourceType = 'analysis' | 'manual';
|
||||
export type ForeshadowCategory = 'identity' | 'mystery' | 'item' | 'relationship' | 'event' | 'ability' | 'prophecy';
|
||||
|
||||
export interface Foreshadow {
|
||||
id: string;
|
||||
project_id: string;
|
||||
title: string;
|
||||
content: string;
|
||||
hint_text?: string;
|
||||
resolution_text?: string;
|
||||
source_type?: ForeshadowSourceType;
|
||||
source_memory_id?: string;
|
||||
source_analysis_id?: string;
|
||||
plant_chapter_id?: string;
|
||||
plant_chapter_number?: number;
|
||||
target_resolve_chapter_id?: string;
|
||||
target_resolve_chapter_number?: number;
|
||||
actual_resolve_chapter_id?: string;
|
||||
actual_resolve_chapter_number?: number;
|
||||
status: ForeshadowStatus;
|
||||
is_long_term: boolean;
|
||||
importance: number;
|
||||
strength: number;
|
||||
subtlety: number;
|
||||
urgency: number;
|
||||
related_characters?: string[];
|
||||
related_foreshadow_ids?: string[];
|
||||
tags?: string[];
|
||||
category?: ForeshadowCategory;
|
||||
notes?: string;
|
||||
resolution_notes?: string;
|
||||
auto_remind: boolean;
|
||||
remind_before_chapters: number;
|
||||
include_in_context: boolean;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
planted_at?: string;
|
||||
resolved_at?: string;
|
||||
}
|
||||
|
||||
export interface ForeshadowCreate {
|
||||
project_id: string;
|
||||
title: string;
|
||||
content: string;
|
||||
hint_text?: string;
|
||||
resolution_text?: string;
|
||||
plant_chapter_number?: number;
|
||||
target_resolve_chapter_number?: number;
|
||||
is_long_term?: boolean;
|
||||
importance?: number;
|
||||
strength?: number;
|
||||
subtlety?: number;
|
||||
related_characters?: string[];
|
||||
tags?: string[];
|
||||
category?: ForeshadowCategory;
|
||||
notes?: string;
|
||||
resolution_notes?: string;
|
||||
auto_remind?: boolean;
|
||||
remind_before_chapters?: number;
|
||||
include_in_context?: boolean;
|
||||
}
|
||||
|
||||
export interface ForeshadowUpdate {
|
||||
title?: string;
|
||||
content?: string;
|
||||
hint_text?: string;
|
||||
resolution_text?: string;
|
||||
plant_chapter_number?: number;
|
||||
target_resolve_chapter_number?: number;
|
||||
status?: ForeshadowStatus;
|
||||
is_long_term?: boolean;
|
||||
importance?: number;
|
||||
strength?: number;
|
||||
subtlety?: number;
|
||||
urgency?: number;
|
||||
related_characters?: string[];
|
||||
related_foreshadow_ids?: string[];
|
||||
tags?: string[];
|
||||
category?: ForeshadowCategory;
|
||||
notes?: string;
|
||||
resolution_notes?: string;
|
||||
auto_remind?: boolean;
|
||||
remind_before_chapters?: number;
|
||||
include_in_context?: boolean;
|
||||
}
|
||||
|
||||
export interface ForeshadowStats {
|
||||
total: number;
|
||||
pending: number;
|
||||
planted: number;
|
||||
resolved: number;
|
||||
partially_resolved: number;
|
||||
abandoned: number;
|
||||
long_term_count: number;
|
||||
overdue_count: number;
|
||||
}
|
||||
|
||||
export interface ForeshadowListResponse {
|
||||
total: number;
|
||||
items: Foreshadow[];
|
||||
stats?: ForeshadowStats;
|
||||
}
|
||||
|
||||
export interface PlantForeshadowRequest {
|
||||
chapter_id: string;
|
||||
chapter_number: number;
|
||||
hint_text?: string;
|
||||
}
|
||||
|
||||
export interface ResolveForeshadowRequest {
|
||||
chapter_id: string;
|
||||
chapter_number: number;
|
||||
resolution_text?: string;
|
||||
is_partial?: boolean;
|
||||
}
|
||||
|
||||
export interface SyncFromAnalysisRequest {
|
||||
chapter_ids?: string[];
|
||||
overwrite_existing?: boolean;
|
||||
auto_set_planted?: boolean;
|
||||
}
|
||||
|
||||
export interface SyncFromAnalysisResponse {
|
||||
synced_count: number;
|
||||
skipped_count: number;
|
||||
new_foreshadows: Foreshadow[];
|
||||
skipped_reasons: Array<{ source_memory_id: string; reason: string }>;
|
||||
}
|
||||
|
||||
export interface ForeshadowContextResponse {
|
||||
chapter_number: number;
|
||||
context_text: string;
|
||||
pending_plant: Foreshadow[];
|
||||
pending_resolve: Foreshadow[];
|
||||
overdue: Foreshadow[];
|
||||
recently_planted: Foreshadow[];
|
||||
}
|
||||
Reference in New Issue
Block a user