refactor: remove all Debate Arena feature code

Remove the entire AI Debate Arena module (~5,300 lines) to simplify
the codebase. This removes the multi-AI debate trading decision system
including backend engine, API handlers, database store, frontend page,
navigation, translations, and documentation references.
This commit is contained in:
tinkle-community
2026-03-11 17:32:41 +08:00
parent 5b82b51b17
commit 94ef009bb5
23 changed files with 22 additions and 5439 deletions

View File

@@ -616,123 +616,6 @@ export interface RiskControlConfig {
min_confidence: number; // Min AI confidence to open position (AI guided)
}
// Debate Arena Types
export type DebateStatus = 'pending' | 'running' | 'voting' | 'completed' | 'cancelled';
export type DebatePersonality = 'bull' | 'bear' | 'analyst' | 'contrarian' | 'risk_manager';
export interface DebateDecision {
action: string;
symbol: string;
confidence: number;
leverage?: number;
position_pct?: number;
position_size_usd?: number;
stop_loss?: number;
take_profit?: number;
reasoning: string;
// Execution tracking
executed?: boolean;
executed_at?: string;
order_id?: string;
error?: string;
}
export interface DebateSession {
id: string;
user_id: string;
name: string;
strategy_id: string;
status: DebateStatus;
symbol: string;
interval_minutes: number;
prompt_variant: string;
trader_id?: string;
max_rounds: number;
current_round: number;
final_decision?: DebateDecision;
final_decisions?: DebateDecision[]; // Multi-coin decisions
auto_execute: boolean;
created_at: string;
updated_at: string;
}
export interface DebateParticipant {
id: string;
session_id: string;
ai_model_id: string;
ai_model_name: string;
provider: string;
personality: DebatePersonality;
color: string;
speak_order: number;
created_at: string;
}
export interface DebateMessage {
id: string;
session_id: string;
round: number;
ai_model_id: string;
ai_model_name: string;
provider: string;
personality: DebatePersonality;
message_type: string;
content: string;
decision?: DebateDecision;
decisions?: DebateDecision[]; // Multi-coin decisions
confidence: number;
created_at: string;
}
export interface DebateVote {
id: string;
session_id: string;
ai_model_id: string;
ai_model_name: string;
action: string;
symbol: string;
confidence: number;
leverage?: number;
position_pct?: number;
stop_loss_pct?: number;
take_profit_pct?: number;
reasoning: string;
created_at: string;
}
export interface DebateSessionWithDetails extends DebateSession {
participants: DebateParticipant[];
messages: DebateMessage[];
votes: DebateVote[];
}
export interface CreateDebateRequest {
name: string;
strategy_id: string;
symbol: string;
max_rounds?: number;
interval_minutes?: number; // 5, 15, 30, 60 minutes
prompt_variant?: string; // balanced, aggressive, conservative, scalping
auto_execute?: boolean;
trader_id?: string; // Trader to use for auto-execute
// OI Ranking data options
enable_oi_ranking?: boolean; // Whether to include OI ranking data
oi_ranking_limit?: number; // Number of OI ranking entries (default 10)
oi_duration?: string; // Duration for OI data (1h, 4h, 24h, etc.)
participants: {
ai_model_id: string;
personality: DebatePersonality;
}[];
}
export interface DebatePersonalityInfo {
id: DebatePersonality;
name: string;
emoji: string;
color: string;
description: string;
}
// Position History Types
export interface HistoricalPosition {
id: number;