mixvideo-v2/apps/desktop/src/data/tools.ts

226 lines
7.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {
FileText,
Code,
Bug,
Wrench,
Database,
FileSearch,
MessageCircle,
Droplets,
ImageIcon,
Search,
Sparkles
} from 'lucide-react';
import { Tool, ToolCategory, ToolStatus } from '../types/tool';
/**
* 工具数据配置
* 定义所有可用的工具及其属性
*/
export const TOOLS_DATA: Tool[] = [
{
id: 'data-cleaning',
name: 'AI检索图片/数据清洗',
description: 'JSONL格式数据去重处理工具支持基于URI字段的精确匹配去重',
longDescription: '专业的数据清洗工具支持JSONL格式文件的批量处理。通过URI字段进行精确匹配快速去除重复数据提供实时进度显示和详细的处理统计信息。',
icon: FileText,
route: '/tools/data-cleaning',
category: ToolCategory.DATA_PROCESSING,
status: ToolStatus.STABLE,
tags: ['JSONL', '数据去重', '批量处理', 'URI匹配'],
isPopular: true,
version: '1.0.0',
lastUpdated: '2024-01-15'
},
{
id: 'json-parser',
name: '容错JSON解析器',
description: '基于Tree-sitter的大模型JSON容错解析器支持处理不规范的JSON数据',
longDescription: '高性能的JSON解析工具专门处理大模型返回的不规范JSON数据。支持注释、无引号键名、尾随逗号等非标准格式提供多种错误恢复策略。',
icon: Code,
route: '/tools/json-parser',
category: ToolCategory.DEVELOPMENT,
status: ToolStatus.STABLE,
tags: ['JSON解析', 'Tree-sitter', '容错处理', '大模型'],
isNew: true,
version: '2.1.0',
lastUpdated: '2024-01-20'
},
{
id: 'debug-panel',
name: 'JSON解析器调试面板',
description: '用于测试后端命令是否正常工作的调试工具面板',
longDescription: '开发者调试工具提供完整的后端命令测试功能。支持实时测试各种JSON解析场景查看详细的错误信息和性能统计数据。',
icon: Bug,
route: '/tools/debug-panel',
category: ToolCategory.DEVELOPMENT,
status: ToolStatus.BETA,
tags: ['调试工具', '后端测试', '命令测试', '开发辅助'],
version: '1.2.0',
lastUpdated: '2024-01-18'
},
{
id: 'ai-chat',
name: 'AI 智能聊天',
description: '基于 RAG 检索增强生成的智能对话助手,支持上下文保持和知识问答',
longDescription: '先进的AI聊天工具基于RAG检索增强生成技术能够根据知识库提供准确的答案。支持上下文保持最多保留3条对话记录实时显示响应时间和参考来源。',
icon: MessageCircle,
route: '/tools/ai-chat',
category: ToolCategory.AI_TOOLS,
status: ToolStatus.STABLE,
tags: ['AI聊天', 'RAG', '知识问答', '智能助手', '上下文保持'],
isNew: true,
isPopular: true,
version: '1.0.0',
lastUpdated: '2024-01-21'
},
{
id: 'watermark-tool',
name: '水印处理工具',
description: '专业的视频水印检测、移除和添加工具,支持批量处理和多种水印类型',
longDescription: '强大的水印处理工具集提供智能水印检测、精确移除和自定义添加功能。支持视频和图片格式提供多种移除算法AI修复、模糊处理、裁剪等和丰富的水印样式选择。',
icon: Droplets,
route: '/tools/watermark',
category: ToolCategory.FILE_PROCESSING,
status: ToolStatus.STABLE,
tags: ['水印检测', '水印移除', '水印添加', '批量处理', '视频处理'],
isNew: true,
isPopular: true,
version: '1.0.0',
lastUpdated: '2024-01-23'
},
{
id: 'batch-thumbnail-generator',
name: '批量缩略图生成器',
description: '为视频文件批量生成预览缩略图和时间轴,支持自定义时间戳、尺寸和格式',
longDescription: '专业的批量缩略图生成工具,支持多种视频格式的批量处理。提供灵活的时间戳配置、多种尺寸预设、智能场景检测和时间轴缩略图生成功能。支持并发处理、进度监控和错误恢复机制。',
icon: ImageIcon,
route: '/tools/batch-thumbnail-generator',
category: ToolCategory.FILE_PROCESSING,
status: ToolStatus.STABLE,
tags: ['缩略图生成', '批量处理', '视频处理', '时间轴', '场景检测'],
isNew: true,
isPopular: true,
version: '1.0.0',
lastUpdated: '2024-01-24'
},
{
id: 'similarity-search',
name: '相似度检索工具',
description: '基于AI的智能相似度搜索工具支持多种相关性阈值和快速搜索功能',
longDescription: '强大的AI驱动相似度检索工具基于先进的机器学习算法提供精准的内容匹配。支持可调节的相关性阈值、智能搜索建议、实时结果展示和批量处理功能。适用于图像、文本和多媒体内容的相似性分析。',
icon: Search,
route: '/tools/similarity-search',
category: ToolCategory.AI_TOOLS,
status: ToolStatus.STABLE,
tags: ['AI搜索', '相似度检索', '智能匹配', '机器学习', '内容分析'],
isNew: true,
isPopular: true,
version: '1.0.0',
lastUpdated: '2024-01-25'
},
{
id: 'outfit-recommendation',
name: 'AI穿搭方案推荐',
description: '基于TikTok视觉趋势的智能穿搭建议工具提供个性化的时尚搭配方案',
longDescription: '专业的AI穿搭顾问工具基于TikTok视觉趋势和时尚潮流为用户生成个性化的穿搭方案。支持多种风格选择、场合匹配、色彩搭配建议并提供TikTok优化建议和拍摄技巧助力内容创作和时尚搭配。',
icon: Sparkles,
route: '/tools/outfit-recommendation',
category: ToolCategory.AI_TOOLS,
status: ToolStatus.STABLE,
tags: ['AI穿搭', '时尚搭配', 'TikTok', '个性化推荐', '视觉趋势'],
isNew: true,
isPopular: true,
version: '1.0.0',
lastUpdated: '2024-01-25'
}
];
/**
* 根据ID获取工具信息
*/
export const getToolById = (id: string): Tool | undefined => {
return TOOLS_DATA.find(tool => tool.id === id);
};
/**
* 根据分类获取工具列表
*/
export const getToolsByCategory = (category: ToolCategory): Tool[] => {
return TOOLS_DATA.filter(tool => tool.category === category);
};
/**
* 获取热门工具列表
*/
export const getPopularTools = (): Tool[] => {
return TOOLS_DATA.filter(tool => tool.isPopular);
};
/**
* 获取新功能工具列表
*/
export const getNewTools = (): Tool[] => {
return TOOLS_DATA.filter(tool => tool.isNew);
};
/**
* 搜索工具
*/
export const searchTools = (query: string): Tool[] => {
const lowercaseQuery = query.toLowerCase();
return TOOLS_DATA.filter(tool =>
tool.name.toLowerCase().includes(lowercaseQuery) ||
tool.description.toLowerCase().includes(lowercaseQuery) ||
tool.tags?.some(tag => tag.toLowerCase().includes(lowercaseQuery))
);
};
/**
* 工具分类配置
*/
export const TOOL_CATEGORIES = [
{
id: ToolCategory.DATA_PROCESSING,
name: '数据处理',
description: '数据清洗、转换和处理工具',
icon: Database,
color: 'purple'
},
{
id: ToolCategory.DEVELOPMENT,
name: '开发调试',
description: '开发和调试相关工具',
icon: Code,
color: 'indigo'
},
{
id: ToolCategory.FILE_PROCESSING,
name: '文件处理',
description: '文件操作和处理工具',
icon: FileSearch,
color: 'orange'
},
{
id: ToolCategory.AI_TOOLS,
name: 'AI工具',
description: '人工智能相关工具',
icon: Wrench,
color: 'pink'
},
{
id: ToolCategory.UTILITIES,
name: '实用工具',
description: '通用实用工具集合',
icon: Wrench,
color: 'teal'
}
];
/**
* 获取分类配置
*/
export const getCategoryConfig = (category: ToolCategory) => {
return TOOL_CATEGORIES.find(cat => cat.id === category);
};