feat(markdown-ai): 添加可视化图表生成功能
- 新增 charts 分析类型,支持从文档中提取数据并生成可视化图表 - 集成 visualization_service 服务进行数据分析和图表生成 - 扩展 MarkdownAIService 支持 JSON 解析和图表数据处理 - 添加 _parse_chart_json 方法处理 LLM 返回的 JSON 数据 - 更新 API 接口定义支持 chart_data 返回字段 - 在前端界面添加图表分析选项和对应图标显示 - 修复 ExcelStorageService 中 id 列名为 MySQL 保留字的问题
This commit is contained in:
@@ -182,6 +182,29 @@ export interface AIMarkdownAnalyzeResult {
|
||||
};
|
||||
sections?: MarkdownSection[];
|
||||
analysis?: string;
|
||||
chart_data?: {
|
||||
tables?: Array<{
|
||||
description?: string;
|
||||
columns?: string[];
|
||||
rows?: string[][];
|
||||
visualization?: {
|
||||
statistics?: any;
|
||||
charts?: any;
|
||||
distributions?: any;
|
||||
};
|
||||
}>;
|
||||
key_statistics?: Array<{
|
||||
name?: string;
|
||||
value?: string;
|
||||
trend?: string;
|
||||
description?: string;
|
||||
}>;
|
||||
chart_suggestions?: Array<{
|
||||
chart_type?: string;
|
||||
title?: string;
|
||||
data_source?: string;
|
||||
}>;
|
||||
};
|
||||
error?: string;
|
||||
}
|
||||
|
||||
@@ -201,7 +224,7 @@ export interface MarkdownOutlineResult {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export type MarkdownAnalysisType = 'summary' | 'outline' | 'key_points' | 'questions' | 'tags' | 'qa' | 'statistics' | 'section';
|
||||
export type MarkdownAnalysisType = 'summary' | 'outline' | 'key_points' | 'questions' | 'tags' | 'qa' | 'statistics' | 'section' | 'charts';
|
||||
|
||||
export interface AIExcelAnalyzeResult {
|
||||
success: boolean;
|
||||
|
||||
Reference in New Issue
Block a user