Commit Graph

175 Commits

Author SHA1 Message Date
imeepos 6d4bf9150c fix: 修复系统音色列表显示问题 - 修复枚举序列化格式不匹配和CSS类名问题 2025-07-31 11:14:24 +08:00
imeepos fcc0b64488 feat: 添加系统音色管理功能和修复穿搭生成问题
- 新增系统音色管理模块
  - 创建 SystemVoice 数据模型,支持多种音色类型和性别分类
  - 添加系统音色数据库表和迁移文件,内置46个预设音色
  - 实现 SystemVoiceRepository 仓库层,支持分页、搜索、分类查询
  - 添加系统音色 Tauri 命令,提供完整的 API 接口

- 修复穿搭图片生成问题
  - 修复 prompt 替换逻辑,避免错误覆盖模特描述节点
  - 实现商品编号调试文件命名,支持 debug_replaced_1.json 等格式
  - 添加 product_index 字段支持,便于多商品生成调试
  - 修复编译错误,确保所有结构体字段完整

- 完善穿搭生成功能
  - 添加分页加载功能,支持下拉加载更多记录
  - 实现失败重试机制,提供用户友好的错误处理
  - 支持多商品并发生成,每个商品独立任务处理
  - 添加详细的测试验证文档

内置音色包括:
- 基础系统音色:青涩青年、精英青年、霸道青年等
- 精品音色:所有基础音色的 beta 版本
- 童声音色:聪明男童、可爱男童、萌萌女童等
- 角色音色:病娇弟弟、俊朗男友、甜心小玲等
- 节日音色:Santa Claus、Grinch、Rudolph
- 英文音色:Arnold、Charming Lady、Sweet Girl等
2025-07-31 10:54:19 +08:00
imeepos 68c0ff9469 fix: 修复穿搭图片生成进度条显示问题
问题分析:
- 后台任务正常执行并发送进度事件,但前端进度条显示为'等待中'
- 前端只监听完成和失败事件,缺少进度事件监听
- 后台任务开始时没有更新记录状态为'生成中'
- 进度回调只发送前端事件,没有更新数据库记录

解决方案:
1. 前端添加outfit_generation_progress事件监听
2. 后台任务开始时立即更新记录状态为'生成中'
3. 进度回调同时更新数据库记录和发送前端事件
4. 修复WorkflowProgress事件数据结构

技术改进:
- 实时进度更新:数据库记录progress字段实时更新
- 完整事件监听:监听progress、completed、failed三种事件
- 状态同步:确保前端显示与后台任务状态一致
- 详细进度信息:包含当前步骤、总步数、状态消息等

现在前端能正确显示'生成中'状态和实时进度百分比。
2025-07-30 23:35:20 +08:00
imeepos a477999445 feat: 实现穿搭图片生成异步后台任务模式
- 新增 execute_outfit_image_task 命令用于后台异步执行生成任务
- 修改前端流程:点击生成按钮后立即关闭弹框,任务在后台执行
- 添加 Tauri 事件系统支持实时进度更新和完成通知
- 前端服务层新增 createOutfitImageTask 和 executeOutfitImageTask 方法
- 支持任务状态实时更新:等待中 -> 生成中 -> 已完成/失败
- 保持向后兼容:原有同步 generateOutfitImages 方法仍可用
- 优化用户体验:无需等待生成完成即可继续操作其他功能

技术改进:
- 使用 tokio::spawn 实现真正的后台任务执行
- 通过 Tauri 事件系统实现前后端实时通信
- 复用现有生成逻辑,确保功能一致性
- 修复编译错误:正确的数据库导入路径和方法调用
2025-07-30 23:20:16 +08:00
imeepos f31783f682 添加穿搭生成记录列表展示功能
功能改进:
- 在模特详情页的穿搭生成标签页中添加记录列表展示
- 使用 OutfitImageGallery 组件展示所有穿搭生成记录
- 添加统计信息展示(总记录数、成功数、处理中/失败数)
- 添加删除穿搭记录功能

 修改内容:
- ModelDetail.tsx: 重构穿搭生成标签页布局
- 添加 OutfitImageGallery 组件导入和使用
- 添加 handleDeleteOutfitRecord 删除处理函数
- 修复统计字段名称(使用 outfit_stats 嵌套结构)

 UI优化:
- 头部操作区域:显示生成按钮和统计信息
- 记录列表区域:完整展示所有穿搭生成记录
- 支持网格/列表视图切换、搜索过滤等功能

现在用户可以在穿搭生成标签页中查看所有5条记录了!
2025-07-30 18:42:06 +08:00
imeepos 1e03afdecb feat: 实现穿搭照片生成功能
- 添加基于 ComfyUI 工作流的 AI 穿搭照片生成功能
- 实现完整的前端界面和后端服务集成
- 支持模特形象选择、商品图片上传、智能提示词生成
- 提供实时进度监控和历史记录管理
- 集成 ComfyUI 设置面板和连接状态检测
- 添加响应式设计和现代化 UI/UX
- 完善的 TypeScript 类型系统和错误处理
- 包含完整的功能文档和实现说明

主要组件:
- OutfitPhotoGenerator: 主生成器组件
- OutfitPhotoGenerationHistory: 历史记录管理
- ComfyUISettingsPanel: ComfyUI 设置面板
- OutfitPhotoGenerationPage: 主页面集成

技术特性:
- React 18 + TypeScript + Tailwind CSS
- Tauri 事件系统集成
- 实时进度监控和状态管理
- 拖拽上传和图片预览
- 批量处理和错误重试机制
2025-07-30 17:28:31 +08:00
imeepos 44ef1959cc 修复数据库迁移版本冲突和outfit_image_records表缺失问题
- 修复migrations.rs中两个版本23迁移的冲突,将声音克隆表迁移改为版本25
- 添加force_run_database_migrations命令用于强制运行数据库迁移
- 创建DatabaseService前端服务类提供数据库操作接口
- 解决穿搭图片功能中'no such table: outfit_image_records'错误
- 移除ModelImageUploader组件中的照片类型选择和说明部分,简化上传流程
2025-07-30 15:39:19 +08:00
imeepos 44486e5df7 refactor: 简化穿搭图片生成弹框,移除风格偏好和生成记录功能
- 移除OutfitImageGenerator中的风格偏好标签功能
  - 删除stylePreferences状态和相关函数
  - 移除风格偏好UI界面和预设按钮
  - 更新使用说明,去掉风格偏好描述
- 简化OutfitImageGenerationModal组件
  - 移除穿搭图片生成记录显示功能
  - 删除OutfitImageGallery组件使用
  - 移除底部操作栏和记录相关参数
  - 改为单列居中布局,专注生成功能
- 清理ModelDetail页面中不再使用的代码
  - 移除outfitRecordsLoading状态
  - 删除handleDeleteOutfitRecord函数
  - 简化loadOutfitRecords函数
- 优化用户体验,界面更加简洁清爽
2025-07-30 15:22:13 +08:00
imeepos 26353f49a7 feat: 将穿搭图片生成功能改为Modal弹框形式
- 创建OutfitImageGenerationModal组件,使用Portal渲染到modal-root容器
- 修改ModelDetail页面,将穿搭生成选项卡改为按钮触发Modal
- 更新ModelDetailTabs组件,为穿搭生成选项卡添加特殊处理
- 修复OutfitImageGallery和OutfitImageGenerator的图片路径处理
- 优化UI设计,使用渐变背景和美观的按钮界面
- 支持键盘ESC关闭和背景点击关闭Modal功能
2025-07-30 15:16:10 +08:00
imeepos e4c49126f5 refactor: 移除个人形象图片收藏功能
- 移除ModelImageGallery组件中的收藏按钮和心形图标
- 移除ModelImagePreviewModal组件中的收藏功能
- 移除ModelDetail页面中的handleTogglePhotoFavorite函数
- 简化照片管理界面,专注于基本的上传、删除、预览功能
- 移除Heart图标导入和onToggleFavorite相关属性

优化目标:
- 界面更加简洁清爽
- 减少不必要的功能复杂度
- 提升用户体验的专注度
2025-07-30 14:59:31 +08:00
imeepos 616ff39812 feat: 集成模特动态页面到ModelDetail的tab页
- 重构ModelDetail组件,将1400+行代码拆分为6个专门的子组件
- 新增ModelDynamicsTab组件,集成完整的模特动态功能
- 更新tab导航,添加模特动态tab(Ctrl+3快捷键)
- 移除独立的ModelDynamics页面和路由
- 优化用户体验,统一模特相关功能到一个页面
- 保持所有原有功能完整性,包括动态统计、创建、列表展示

组件架构:
- ModelDetailHeader: 模特头部信息和操作按钮
- ModelDetailTabs: tab导航和快捷键支持
- ModelOverviewTab: 概览信息和快速操作
- ModelDynamicsTab: 模特动态管理(新增)
- ModelVideoTab: 视频生成管理
- ModelStatsTab: 数据统计展示

技术改进:
- 组件职责分离,提高代码可维护性
- 统一的props接口设计和类型安全
- 响应式布局和现代UI设计
- 完整的错误处理和加载状态管理
2025-07-30 14:39:43 +08:00
imeepos 7552761d9a feat: 模特详情页改版 - 实现个人看板、形象图片管理和穿搭图片生成功能
新功能:
- 个人看板统计信息展示 (照片数量、穿搭图片、生成记录等)
- 个人形象图片管理 (上传、删除、预览、收藏)
- 穿搭图片生成功能 (选择模特图片 + 上传商品图片 => AI生成穿搭效果)
- 穿搭图片管理界面 (生成记录展示、状态跟踪、结果预览)

 技术实现:
- 新增穿搭图片相关数据模型和数据库表
- 实现OutfitImageService服务层
- 创建多个UI组件 (ModelDashboardStats, ModelImageGallery, OutfitImageGenerator等)
- 优化模特详情页整体布局,采用响应式设计

 UI/UX优化:
- 遵循promptx/frontend-developer设计规范
- 统一的视觉风格和动画效果
- 支持拖拽上传、图片预览、状态指示等交互
- 响应式布局适配不同屏幕尺寸

 测试:
- Rust编译检查通过 (cargo check)
- 前端构建检查通过 (pnpm run -w tauri:web:build)
- 所有TypeScript类型检查通过
2025-07-30 12:51:34 +08:00
imeepos 17ff70d904 feat: 优化声音克隆与TTS工具功能
- 添加语音生成记录本地数据库保存功能,解决刷新页面后记录丢失问题
- 新增语音生成历史记录显示,支持播放、下载和删除功能
- 优化UI布局,将音频播放器放置在记录底部,提升视觉层次
- 融合音频上传和声音克隆流程,简化用户操作步骤
- 实现一键生成克隆功能,自动处理音频上传和接口调用
- 添加详细的进度提示和错误处理机制
- 优化卡片式设计,提供更好的用户体验

技术改进:
- 新增 SpeechGenerationRecord 数据模型和数据库表
- 添加语音生成记录的CRUD操作API
- 实现数据库迁移系统自动创建新表
- 优化前端状态管理和错误处理
- 改进UI组件布局和交互设计
2025-07-30 10:53:36 +08:00
imeepos 4640bfdade feat: add voice cloning functionality with database integration
- Introduced VoiceCloneRecord model for managing voice cloning records.
- Implemented database migrations for creating and dropping voice_clone_records table.
- Added API commands for uploading audio, cloning voice, and retrieving voice list from the database.
- Enhanced VoiceCloneTool UI to support custom voice IDs and display generated audio.
- Updated data structures to accommodate new fields and improve response handling.
2025-07-29 20:49:45 +08:00
imeepos 3c6d10cdc9 feat: add VoiceCloneTool component with audio upload and TTS functionality
- Implemented VoiceCloneTool for audio file upload, voice cloning, and speech generation.
- Added types for audio upload requests, responses, voice cloning, and speech generation.
- Integrated notifications for user feedback on actions.
- Included UI elements for selecting audio files, managing voices, and generating speech.
- Established state management for audio upload, voice cloning, and speech generation processes.
2025-07-29 19:52:03 +08:00
imeepos 1008eb6c72 feat: Add image gallery modal for enhanced image preview functionality 2025-07-29 17:29:57 +08:00
imeepos 2f6a4dc1be feat: Implement image generation record management
- Added ImageGenerationRecordStatus enum to represent various states of image generation records.
- Created ImageGenerationRecord interface to define the structure of image generation records.
- Developed ImageGenerationStatistics interface for returning statistics related to image generation.
- Implemented ImageGenerationService in Rust to handle creation, updating, and retrieval of image generation records.
- Added methods for starting, completing, failing, and cancelling image generation tasks.
- Introduced ImageGenerationRepository for database interactions related to image generation records.
- Created SQL migration scripts for setting up the image_generation_records table and its indices.
- Implemented cleanup and statistics retrieval functionalities for image generation records.
2025-07-29 17:11:18 +08:00
imeepos 9b2c5004f3 feat: 实现完整的AI图片生成工具
- 新增图片生成工具页面和路由配置
- 实现提示词预审功能,支持API响应格式解析
- 实现异步图片生成任务提交和状态轮询
- 支持参考图片上传功能
- 实现多张图片结果展示(4张图片网格布局)
- 添加Bearer token认证支持
- 优化API响应解析,支持不同阶段的响应格式
- 实现错误处理和重试机制
- 遵循Tauri开发规范和UI/UX设计标准
- 使用TailwindCSS进行响应式设计

技术特性:
- 后端Rust命令:check_image_prompt, submit_image_generation_task, query_image_generation_status, upload_file_to_cloud
- 前端React组件:完整的生成流程UI,实时状态监控,多图片展示
- 类型安全:完整的TypeScript类型定义
- 用户体验:实时进度反馈,批量操作,悬停交互效果
2025-07-29 15:56:31 +08:00
imeepos e744648183 feat: 优化视频生成工作台用户体验
修复功能问题:
- 修复素材tab无法左右滑动的问题
- 添加自定义滚动条样式,隐藏默认滚动条
- 优化tab布局,支持横向滚动浏览

 简化素材卡片设计:
- 创建SimpleMaterialCard组件,专用于素材选择
- 改为正方形缩略图,更适合侧边栏2列布局
- 精简信息显示:只保留名称、类型、时长/大小
- 移除繁琐的描述、标签等冗余信息
- 优化选择状态指示器位置和大小

 优化布局体验:
- 素材选择器改为2列网格布局
- 缩小搜索框和间距,节省空间
- 统一使用紧凑型设计风格
- 改善滚动条样式和交互体验

 用户体验提升:
- 更直观的素材浏览体验
- 减少视觉干扰,突出核心信息
- 提高操作效率和界面美观度
- 符合专业工具的简洁设计理念
2025-07-29 14:33:41 +08:00
imeepos f906b47e9f feat: 重新设计视频生成工作台布局
采用专业视频制作工具的布局方式,提升用户操作体验:

 新布局设计:
- 左侧:素材区(tab切换:模特/产品/场景/动作/音乐/提示词)
- 中央:视频预览区(实时预览、播放控制、素材概览)
- 底部:紧凑型参数设置区(一行显示所有关键参数)
- 右侧:可折叠任务状态区(实时显示生成任务进度)

 新增组件:
- CentralVideoPreview: 专业的中央预览组件
- CompactVideoConfigPanel: 紧凑型配置面板
- TaskStatusPanel: 任务状态管理面板

 功能增强:
- 实时任务进度显示
- 任务管理(取消、重试、删除)
- 更直观的素材选择流程
- 专业的视频预览体验
- 响应式布局优化

 用户体验提升:
- 一屏显示所有关键信息
- 减少页面切换和滚动
- 符合专业视频制作工具习惯
- 提高工作效率
2025-07-29 14:26:17 +08:00
imeepos a40bb24adc feat: 实现视频生成功能模块
- 新增素材中心页面,支持6种素材类型管理(模特、产品、场景、动作、音乐、提示词模板)
- 实现视频生成工作台,提供三步式工作流程(选择素材、配置参数、生成预览)
- 创建完整的组件体系:素材卡片、分类过滤器、素材选择器、配置面板、预览组件
- 优化UI/UX设计,遵循promptx/frontend-developer标准
- 添加导航路由配置,支持 /material-center 和 /video-generation 路径
- 实现响应式设计、动画效果、无障碍支持等现代化特性
- 提供完整的TypeScript类型定义和接口

功能特点:
 直观的素材管理界面
 专业的视频生成工作台
 优雅的UI/UX设计
 响应式布局支持
 高性能组件架构
 可扩展的模块设计
2025-07-29 14:16:08 +08:00
imeepos 8a5988b3de feat: add Outfit Comparison Tool and Outfit Favorites Tool
- Implemented OutfitComparisonTool for comparing two favorite outfits side by side.
- Added OutfitFavoritesTool for managing and searching favorite outfits.
- Created OutfitFavoriteService for handling API interactions related to outfit favorites.
- Defined types for material search and outfit favorites to ensure type safety.
- Enhanced UI components for better user experience in selecting and displaying outfits.
2025-07-28 15:53:20 +08:00
imeepos 5c019b48df fix: resolve TypeScript iterator error in OutfitRecommendationTool
- Fixed type error where response.recommendations could be undefined
- Added null coalescing operator to ensure safe array spreading
- Updated OutfitRecommendationCard and capabilities configuration
2025-07-28 11:56:11 +08:00
imeepos d33f7fbc7f feat: 实现AI穿搭方案智能分组功能
- 修改提示词让AI直接返回分组结构
- 添加GroupingStrategy和OutfitQualityScore数据结构
- 支持按风格、场合、季节等维度智能分组
- 为每个方案添加质量评分系统
- 前端支持分组展示和获取更多同类方案
- 保持向后兼容性

主要变更:
- 后端: 更新提示词和解析逻辑支持分组JSON结构
- 前端: OutfitRecommendationList支持分组显示
- 类型: 新增分组相关TypeScript接口
- 功能: 每个分组支持'获取更多'按钮扩展方案
2025-07-28 11:26:13 +08:00
imeepos fab29519a7 feat: 实现全局目录设置功能
- 添加目录设置模态框,支持管理所有导入导出的默认目录
- 实现自动记忆目录功能,可开启/关闭
- 优化目录设置开关的视觉反馈,增加明显的状态区别
- 使用统一的Modal组件替代自定义弹框,确保正确渲染到modal-root
- 在各个导入导出界面添加目录设置按钮:
  * 素材导入对话框
  * 模板匹配结果管理(剪影导出)
  * 导出记录管理
  * 批量模板导入
  * 项目详情页面
  * 模板管理页面
- 修改相关导出功能使用新的目录选择命令
- 创建QuickDirectoryButton组件用于快速目录选择
- 改进DirectorySettingsButton的视觉效果和交互体验
2025-07-25 19:03:00 +08:00
imeepos 8a74a14970 feat: 修复素材查看功能并添加详情模态框
修复问题:
- 修复点击查看/查看详情按钮没有反应的问题
- 完善素材选择回调处理逻辑

 新增功能:
- 创建MaterialDetailModal组件,提供完整的素材详情展示
- 支持素材图片查看、下载、分享、收藏功能
- 显示完整的素材信息:基本信息、环境标签、产品详情
- 美观的模态框设计,包含操作按钮和详细信息

 UI优化:
- 高质量的素材详情界面设计
- 支持图片加载状态和错误处理
- 评分标识和AI推荐标识
- 颜色信息可视化显示
- 响应式布局适配

 交互改进:
- 点击查看按钮现在会打开详情模态框
- 支持在新窗口打开原图
- 支持下载和分享功能
- 收藏状态管理

现在用户可以正常查看素材详情了!
2025-07-25 15:53:19 +08:00
imeepos 82d9ccfe21 feat: 实现AI穿搭方案推荐素材库检索功能
新增功能:
- 为每个穿搭方案添加素材库检索功能
- 智能生成检索条件基于穿搭方案内容
- 调用Google VET API进行素材检索
- 实现分页展示和导航功能

 架构改进:
- 新增MaterialSearchService前端服务
- 新增material_search_commands后端命令
- 新增material_search数据模型
- 遵循Tauri开发规范的组件设计

 UI/UX优化:
- 美观的素材卡片展示
- 流畅的分页导航体验
- 响应式设计和动画效果
- 遵循promptx/frontend-developer标准

 组件结构:
- MaterialSearchPanel: 素材检索面板
- MaterialSearchResults: 搜索结果列表
- MaterialCard: 素材卡片组件
- MaterialSearchPagination: 分页组件

 技术实现:
- TypeScript类型安全
- React Hooks状态管理
- TailwindCSS样式系统
- 错误处理和加载状态
- 无障碍访问支持
2025-07-25 15:05:22 +08:00
imeepos 8f88ace388 feat: 创建简洁美观的AI服装分析展示组件
主要功能:
1. 新增SimpleAnalysisDisplay组件:
   - 简洁美观的分析结果展示
   - HSV颜色转十六进制显示
   - 产品分类图标和风格标签
   - 匹配度进度条可视化

2. 修改EnrichedAnalysisDemo页面:
   - 移除复杂的丰富分析功能
   - 直接展示原始AI分析结果
   - 使用convertFileSrc修复图片预览
   - 简化操作流程和界面

3. 展示内容包括:
   - 整体风格描述
   - 拍摄环境标签
   - 主色调色块展示
   - 服装单品详细分析
   - 颜色匹配度可视化

4. 界面优化:
   - 响应式网格布局
   - 渐变背景和圆角设计
   - 图标和色彩搭配
   - 清晰的信息层级

现在可以美观地展示真实的AI分析结果!
2025-07-25 14:40:48 +08:00
imeepos 7fb17ea16b fix: 修复智能服装搜索分页功能
主要修复:
1. 修复分页按钮点击无效问题:
   - handleSearch函数支持指定页码参数
   - 分页按钮点击时传递正确的页码
   - 解决了setState异步导致的页码不同步问题

2. 修复函数签名问题:
   - 搜索按钮使用() => handleSearch()调用
   - 分页按钮使用handleSearch(newPage)传递页码

3. 分页逻辑优化:
   - 上一页:setCurrentPage(newPage) + handleSearch(newPage)
   - 下一页:setCurrentPage(newPage) + handleSearch(newPage)
   - 确保页码状态和搜索请求同步

测试结果:
 分页按钮现在可以正常点击
 搜索请求包含正确的page_offset参数
 分页状态与搜索请求保持同步

分页功能现在完全正常工作!
2025-07-25 13:59:09 +08:00
imeepos 798b5a2007 fix: 修复智能服装搜索功能的搜索结果为空问题
主要修复:
1. 添加相关性阈值到搜索请求(参考Python实现)
2. 简化过滤器构建逻辑,使其更接近Python实现
3. 修复SearchConfig导入问题
4. 修复RelevanceThreshold的字符串转换问题
5. 优化前端搜索配置,启用调试模式查看详细信息

对比Python实现发现的关键差异:
- Python使用relevanceThreshold字段,Rust之前注释说不支持
- Python使用简单的过滤器字符串,Rust使用了复杂的过滤器构建
- 需要正确的API参数格式匹配
2025-07-25 13:33:30 +08:00
imeepos 30236d5875 feat: 实现智能服装搜索工具
- 基于 promptx/outfit-match/src/outfit_match/frontend/search.py 设计
- 实现双列布局:左侧结果展示,右侧搜索控制面板
- 支持图像上传和AI解析功能
- 集成高级过滤器:环境标签、产品类别、相关性阈值
- 添加分页支持和搜索结果展示
- 集成LLM智能问答功能
- 遵循Tauri开发规范和UI/UX设计标准
- 添加到工具页面路由和导航
2025-07-25 13:19:21 +08:00
imeepos 0a89efd394 fix: resolve advanced filter data flow issue in similarity search
**Root Cause Fixed**: Advanced filter conditions were not being applied because:
- SimilaritySearchRequest lacked config field for SearchConfig
- Backend quick_similarity_search created empty default config
- Frontend searchConfig state was not passed to search requests

 **Changes Made**:

**Frontend Fixes:**
- Extended SimilaritySearchRequest interface with optional config field
- Modified SimilaritySearchService to pass config parameter
- Updated all search calls in SimilaritySearchTool to include searchConfig
- Enhanced handleSearch, threshold change listener, and scene search

**Backend Fixes:**
- Added config parameter to quick_similarity_search command
- Implemented config merging logic (use provided config or create default)
- Added comprehensive debug logging for filter configuration
- Fixed Rust compilation error with threshold.clone()

**Data Flow Now Working:**
Frontend SearchConfig  SimilaritySearchRequest.config  Backend SearchRequest  Filter Application

**Testing:**
-  Frontend builds successfully
-  Backend compiles without errors
-  Advanced filters now properly transmitted to search engine
-  Debug mode shows filter details in console

Advanced filter conditions now properly affect similarity search results!
2025-07-25 12:52:15 +08:00
imeepos a1c40a13ad fix: resolve compilation errors in advanced filter integration
- Fixed AdvancedFilterPanel import issues by removing unused DEFAULT_COLOR_FILTER
- Fixed EnvironmentTagSelector type errors with proper Record<string, string[]> typing
- Fixed SimilaritySearchTool executeSearch call by providing required SimilaritySearchRequest parameter
- Fixed intelligentSearchService mergeSearchConfigs by adding missing SearchConfig fields:
  * debug_mode, custom_filters, query_enhancement_enabled, color_thresholds
- Made availableEnvironments optional in EnvironmentTagSelector props
- Updated type definitions to support enhanced search configuration

All compilation errors resolved, build now passes successfully.
2025-07-25 12:44:12 +08:00
imeepos 2b209e5ad2 feat: integrate advanced filter components into tools
- Applied AdvancedFilterPanel to SimilaritySearchTool
  * Added advanced filter state management
  * Extended SimilaritySearchPanelProps with filter controls
  * Added toggle button for advanced filters in search panel
  * Integrated filter configuration with search functionality

- Created AdvancedFilterTool for convenient tools
  * New tool page wrapping AdvancedFilterDemo component
  * Added to tools data configuration with proper metadata
  * Integrated into routing system and navigation
  * Categorized as development tool with beta status

- Enhanced SimilaritySearchPanel UI
  * Added advanced filter toggle button with elegant design
  * Implemented proper state management for filter visibility
  * Added visual indicators and smooth animations
  * Follows promptx/frontend-developer UI/UX standards

Both integrations are complete and functional.
2025-07-25 12:40:11 +08:00
imeepos 3116a4e7f0 feat: implement advanced filter UI components
- Created comprehensive AdvancedFilterPanel with tabbed interface
- Added CategoryFilterSelector with search and custom category support
- Implemented EnvironmentTagSelector with grouped environment options
- Built DesignStyleSelector with category-specific style management
- Created ColorDetectionFilter with HSV color picker and threshold controls
- Added AdvancedFilterDemo for testing and demonstration
- Integrated new components into OutfitSearchPanel
- Added proper component exports and TypeScript support
- Follows promptx/frontend-developer UI/UX standards
- Includes elegant animations, hover effects, and responsive design

All advanced filter UI components are now complete and functional.
2025-07-25 11:44:39 +08:00
imeepos 722b141d22 refactor: 优化AI穿搭方案推荐功能代码结构
- 重构穿搭方案数据模型,简化结构
- 优化前端组件代码,提升可维护性
- 改进服务层实现,增强错误处理
- 统一代码风格和注释规范
- 修复潜在的类型安全问题

技术改进:
- 简化OutfitRecommendation数据结构
- 优化组件渲染性能
- 改进错误边界处理
- 统一导入导出规范
- 增强代码可读性
2025-07-25 11:04:51 +08:00
imeepos f1fd62b59b feat: 创建AI穿搭方案推荐小工具
- 新增独立的AI穿搭方案推荐工具页面
- 集成到便捷工具列表中,提供完整的工具体验
- 支持高级设置:风格选择、场合匹配、季节偏好等
- 实现结果导出和复制功能
- 优化用户界面和交互体验
- 添加使用提示和帮助信息

功能特点:
- 简洁易用的输入界面
- 可折叠的高级设置选项
- 实时生成个性化穿搭方案
- 支持JSON格式导出结果
- 一键复制穿搭建议文本
- 响应式设计,适配不同屏幕尺寸
2025-07-25 10:53:35 +08:00
imeepos c4bb073507 feat: 实现AI穿搭方案推荐功能
- 新增穿搭方案推荐数据模型和类型定义
- 实现基于TikTok视觉趋势的Gemini AI穿搭方案生成
- 创建穿搭方案卡片和列表展示组件
- 集成Sparkles图标点击触发穿搭方案生成
- 实现穿搭方案到场景检索的无缝集成
- 添加完整的前后端API和服务层
- 遵循promptx开发规范和设计系统标准

功能特点:
- 基于用户输入关键词生成个性化穿搭推荐
- 包含色彩搭配、风格标签、场景建议等详细信息
- 提供TikTok优化建议和拍摄技巧
- 支持一键场景检索功能
- 美观的卡片式展示界面
- 完整的加载状态和错误处理
2025-07-25 10:38:11 +08:00
imeepos 9d1f962853 fix: 修复 Tauri 构建时的 TypeScript 编译错误
- 移除 SimilaritySearchResults.tsx 中未使用的 Clock 导入
- 移除 SimilaritySearchTool.tsx 中未使用的导入:Sparkles, Download, CustomSelect
- 移除未使用的变量:setThreshold, quickSearch
- 移除未使用的函数:handleQuickTagClick
- 修复所有 TypeScript 编译错误,确保 pnpm run tauri:build 成功执行
2025-07-24 17:37:17 +08:00
imeepos 1c409c9ef2 fix: 修复批量缩略图生成器按钮图标变形问题
- 修正按钮类名,使用 'btn btn-primary' 而不是 'btn-primary'
- 确保按钮继承基础 .btn 类的布局样式(inline-flex, items-center, gap-2)
- 修复选择文件夹、开始生成、扫描并生成按钮的图标显示问题
- 移除重复的 flex items-center gap-2 类,使用 CSS 中定义的样式
2025-07-24 17:25:41 +08:00
imeepos 90aa401059 fix: 修复相似度检索工具事件冒泡问题和Rust编译错误
- 修复SimilaritySearchCard中外部链接按钮点击时触发卡片选择的事件冒泡问题
- 增强外部链接按钮事件处理,添加preventDefault和stopPropagation
- 改进卡片点击事件处理,检查点击目标避免按钮触发卡片选择
- 修复outfit_search_commands.rs中的lifetime错误,重构描述字段解析逻辑
- 移除相关性阈值过滤逻辑,返回所有搜索结果
- 优化相似度检索工具UI布局和详情模态框功能
- 添加详细的搜索结果展示和外部链接处理功能
2025-07-24 16:45:57 +08:00
imeepos dadd13721e fix: 修复检索逻辑 2025-07-24 16:01:36 +08:00
imeepos 00855e6861 feat: 相似度检索工具全面优化
 新功能:
- 相关性阈值选择器移至页面顶部,使用CustomSelect组件
- 智能分页系统支持大量页面(如1981页)
- 悬浮上一页/下一页按钮固定在屏幕两侧
- 每页显示数量选择器(6-96条可选)
- 参数持久化到本地存储(关键字/阈值/每页数量)

🔄 自动重新加载:
- 关键字变化:防抖搜索(800ms)
- 相关性阈值变化:立即重新搜索
- 每页数量变化:重置到第一页并重新搜索
- 页码变化:加载对应页面数据

💫 加载状态优化:
- 页面顶部全局搜索状态指示器
- 各控件旁的局部加载状态
- 搜索结果区域加载遮罩
- 分页按钮加载状态

🔧 技术改进:
- S3/GS URL自动转换为CDN URL
- Zustand persist中间件实现状态持久化
- 智能分页算法优化
- 防抖搜索机制
- 完善的错误处理和重试机制
2025-07-24 15:45:37 +08:00
imeepos 0436267266 feat: 实现相似度检索工具
- 基于现有search_similar_outfits功能开发独立的相似度检索小工具
- 遵循promptx/tauri-desktop-app-expert开发规范
- 实现完整的前后端架构:
  * Rust后端命令接口 (similarity_search_commands.rs)
  * TypeScript类型定义 (similaritySearch.ts)
  * Zustand状态管理 (similaritySearchStore.ts)
  * React组件 (SimilaritySearchTool, SimilaritySearchPanel, SimilaritySearchResults, SimilaritySearchCard)
  * 服务层 (similaritySearchService.ts)

功能特性:
- 智能搜索建议和自动完成
- 可调节的相关性阈值 (LOWEST/LOW/MEDIUM/HIGH)
- 快速搜索标签
- 响应式网格布局结果展示
- 优雅的加载状态和错误处理
- 遵循UI/UX设计标准的美观界面

技术实现:
- 复用现有outfit search API和数据模型
- 简化的搜索配置,专注核心功能
- 完整的TypeScript类型安全
- 现代化的React Hooks和状态管理
- TailwindCSS响应式设计
- 平滑的动画和交互效果

集成:
- 添加到快捷工具列表 (/tools/similarity-search)
- 配置React Router路由
- 注册Tauri命令处理器
2025-07-24 14:14:12 +08:00
imeepos 230436240d refactor: 调整UI布局和窗口配置
调整内容:
- 恢复窗口尺寸为1200x900,保持原有的显示效果
- 移除屏幕适配设置页面,简化应用结构
- 优化主容器滚动样式,添加smooth-scroll效果
- 移除AI分类设置页面的高度限制,改善内容显示

UI优化:
- 主容器添加overflow-y-auto和smooth-scroll
- AI分类设置页面移除max-h限制,提升用户体验
- 保持原有的响应式布局和间距设计

这些调整确保了应用在标准屏幕上的最佳显示效果
2025-07-23 20:58:39 +08:00
imeepos 78f27983a6 feat: 实现智能屏幕适配功能
新功能:
- 根据用户屏幕尺寸自动调整窗口大小
- 支持小屏幕、中等屏幕、大屏幕、超宽屏的智能适配
- 提供屏幕适配设置页面,用户可自定义配置
- 应用启动时自动应用屏幕适配

技术实现:
- 创建ScreenAdaptationService服务类
- 支持动态获取屏幕信息和显示器配置
- 提供智能适配和手动配置两种模式
- 集成到应用设置页面,提供友好的UI界面

配置选项:
- 默认宽度/高度比例可调节
- 最小窗口尺寸限制
- 最大窗口尺寸比例
- 支持不同屏幕类型的预设配置

用户体验:
- 应用启动时自动适配屏幕
- 设置页面提供实时预览
- 支持一键智能适配和手动微调
- 窗口居中显示,提升视觉体验

适配策略:
- 小屏幕(<1366x768): 95%宽度, 90%高度
- 中等屏幕(1366-1920): 85%宽度, 85%高度
- 大屏幕(>=1920x1080): 75%宽度, 80%高度
- 超宽屏(21:9+): 70%宽度, 85%高度

解决了固定窗口尺寸在不同屏幕上显示不佳的问题
2025-07-23 20:55:51 +08:00
imeepos 0cfacd0662 feat: 实现模板匹配按顺序匹配功能
新功能:
- 添加AI分类权重字段,支持按权重顺序匹配
- 新增PriorityOrder匹配规则类型
- 实现按权重顺序的素材匹配算法
- 添加权重编辑器UI组件

数据模型扩展:
- AiClassification模型添加weight字段
- SegmentMatchingRule枚举添加PriorityOrder类型
- 扩展相关的请求和响应类型定义

数据库迁移:
- 创建019迁移脚本为ai_classifications表添加weight字段
- 为现有数据设置默认权重值
- 添加权重索引提高查询性能

后端服务实现:
- MaterialMatchingService支持按顺序匹配逻辑
- AiClassificationService添加按权重获取分类方法
- 更新所有相关的构造函数和命令处理

前端UI优化:
- SegmentMatchingRuleEditor支持按顺序匹配配置
- 新增WeightEditor组件用于权重设置
- AI分类设置页面集成权重编辑功能
- 更新TypeScript类型定义

测试验证:
- 添加完整的单元测试套件
- 6个测试用例全部通过
- 验证权重排序和匹配规则逻辑

遵循promptx/tauri-desktop-app-expert开发规范
支持用户自定义分类权重,实现智能按顺序匹配
2025-07-23 20:28:36 +08:00
imeepos 4291230acb fix: 修复React渲染错误和数据库迁移问题
- 修复ModelDetail.tsx中直接渲染Gender枚举导致的React错误
- 修复TemplateDetailModal.tsx中直接渲染TemplateMaterialType和TrackType枚举的问题
- 添加枚举到中文文本的转换函数(getGenderText, getMaterialTypeText, getTrackTypeText)
- 实现完整的数据库迁移系统,支持版本化迁移
- 添加迁移v9修复template_materials表file_size字段允许NULL
- 改进数据库迁移执行逻辑,使用execute_batch方法
- 添加数据库集成测试和迁移测试
- 修复template_materials表约束问题,解决模板导入失败

主要变更:
- 新增数据库迁移系统(migrations.rs)
- 新增9个数据库迁移文件(v1-v9)
- 修复前端枚举渲染问题
- 完善数据库测试覆盖
2025-07-23 18:30:52 +08:00
imeepos 4269b72c04 feat: 实现批量缩略图生成器功能
- 添加批量缩略图生成的数据模型和类型定义
- 实现ThumbnailGeneratorService核心服务
- 实现BatchThumbnailProcessor批量处理器
- 添加Tauri命令接口支持前端调用
- 创建完整的前端UI组件和页面
- 支持多种时间戳配置和尺寸预设
- 支持时间轴缩略图生成
- 支持并发处理和进度监控
- 集成到便捷工具页面

遵循promptx/tauri-desktop-app-expert开发规范
2025-07-23 13:44:19 +08:00
imeepos 29a4c32096 feat: 完善水印处理工具功能
- 修复批量处理进度条不更新问题
  - 实现任务状态管理器(task_manager.rs)
  - 添加实时进度更新和任务状态跟踪
  - 完善前端进度轮询逻辑

- 丰富水印检测结果展示
  - 添加详细检测结果信息(位置、置信度、类型等)
  - 显示处理统计和性能信息
  - 优化结果展示UI和用户体验

- 修复水印模板上传和删除功能
  - 实现内存存储系统管理模板
  - 修复参数匹配问题
  - 添加模板缩略图展示功能

- 优化文件上传体验
  - 使用Tauri Dialog API替代HTML5文件输入
  - 实现原生文件选择器
  - 添加WatermarkTemplateThumbnail组件

- 完善水印工具集成
  - 创建WatermarkTool页面
  - 添加到便捷工具列表
  - 完善路由配置和UI展示
2025-07-23 12:51:49 +08:00
imeepos cb5a137ec9 fix: 添加文字图片关联关系 2025-07-22 12:21:39 +08:00
imeepos 0b42ea8dcc feat: 改造query_llm_with_grounding支持多轮对话
- 扩展RAG Grounding数据模型支持会话管理
- 添加多轮对话的RAG查询方法query_llm_with_grounding_multi_turn
- 集成现有会话管理服务,支持历史消息存储和检索
- 更新前端类型定义和服务层,支持多轮对话参数
- 创建多轮RAG对话测试组件和页面
- 支持系统提示词、历史消息数量控制等配置选项
- 保持向后兼容,单轮对话功能不受影响

核心功能:
 多轮RAG对话 - 基于检索增强生成的多轮对话
 会话历史管理 - 自动保存和加载对话历史
 智能检索增强 - 结合Vertex AI Search的知识检索
 上下文保持 - 在多轮对话中保持对话上下文
 灵活配置 - 支持历史消息数量、系统提示词等配置
 来源追踪 - 显示检索来源和相关性信息

遵循promptx/tauri-desktop-app-expert开发规范
2025-07-22 10:56:54 +08:00
imeepos 5296039785 feat: 实现多轮对话功能
- 添加会话管理数据模型和仓库层
- 扩展Gemini服务支持多轮对话的contents数组构建
- 实现会话历史存储和检索功能
- 添加多轮对话业务服务层
- 创建前端TypeScript类型定义和服务层
- 实现Tauri命令处理多轮对话请求
- 添加会话管理功能(创建、删除、更新标题等)
- 创建多轮对话测试组件和页面
- 遵循promptx/tauri-desktop-app-expert开发规范
- 支持session_id管理和历史消息传递
- 实现完整的四层架构设计
2025-07-22 10:39:26 +08:00
imeepos f467b215b5 fix: build error 2025-07-21 23:47:20 +08:00
imeepos 94e9f74b15 feat: 完善聊天界面功能和用户体验
界面优化:
- 修复页面头部信息重复问题,统一为时尚穿搭顾问
- 优化欢迎界面布局,移除重复标题
- 调整标签激活状态样式,使其更加subtle和优雅

 标签系统增强:
- 实现卡片标签与底部工具栏标签完美同步
- 修复标签选中状态的实时更新问题
- 添加气泡卡片展示所有标签详情
- 优化标签折叠功能,默认隐藏,一行布局

 功能完善:
- 修复输入框和发送按钮对齐问题
- 优化聊天输入框固定到底部
- 将弹框改为更优雅的气泡卡片消息
- 生成搜索和清空按钮移到外层,始终可见

 导航优化:
- 服装搭配导航直接链接到AI智能聊天
- 配置独立路由避免与便捷工具冲突
- 移除原有的服装搭配页面和路由

 用户体验:
- 标签选中状态双向同步更新
- 气泡卡片支持标签选择和实时反馈
- 优化加载状态显示和错误处理
- 完善的视觉反馈和交互动画
2025-07-21 23:35:04 +08:00
imeepos 07ecd9cee7 feat: 优化聊天界面为女装穿搭专业顾问
-  更新UI主题为粉色系,适配女装穿搭业务
-  默认展示12张图片卡片,支持展开查看全部
-  默认隐藏AI文字回答,点击查看详情时显示
-  新增智能标签汇总功能,支持多选标签生成搜索
-  优化提示词和建议问题,专注女装穿搭场景
-  修复加载状态显示问题,优化用户体验
-  支持gs://到Google Storage的URI转换
-  增强图片卡片交互,悬停显示查看原图按钮
2025-07-21 22:56:57 +08:00
imeepos c3c72ce8bd feat: 实现一键匹配实时进度通讯
修复问题:
- 一键匹配进度条没有逐步递增,只在开始和结束时更新

实现内容:
1. 后端进度事件发送:
   - 在事件总线中添加BatchMatchingProgress事件类型
   - 在批量匹配服务中集成Tauri事件发送
   - 在每个模板匹配开始时发送实时进度事件

2. 前端进度事件监听:
   - 修改BatchMatchingService支持事件监听
   - 添加batch_matching_progress事件监听器
   - 实时更新进度条状态

3. 事件通讯机制:
   - 使用Tauri的emit系统发送事件到前端
   - 前端通过listen监听实时进度更新
   - 确保进度条能够逐步递增显示

技术细节:
- 后端:使用app_handle.emit()发送进度事件
- 前端:使用listen()监听batch_matching_progress事件
- 进度计算:基于当前轮数、绑定索引和总绑定数

现在一键匹配过程中进度条会实时更新,用户可以看到匹配的实际进展。
2025-07-21 20:07:27 +08:00
imeepos 8dfdf36a47 feat: 添加YAML智能解析支持 2025-07-21 18:35:35 +08:00
imeepos 906bea49f0 feat: 重构工具页面为卡片列表展示
- 创建工具卡片数据结构和类型定义
- 实现ToolCard组件,支持差异化图标和现代化设计
- 重构Tools页面为卡片列表布局,使用CardGrid组件
- 创建独立的工具详情页面:
  - DataCleaningTool: AI检索图片/数据清洗工具
  - JsonParserTool: 容错JSON解析器工具
  - DebugPanelTool: JSON解析器调试面板工具
- 添加工具详情页面路由配置
- 优化UI/UX设计,遵循promptx/frontend-developer规范
- 支持搜索、分类筛选、新功能/热门工具筛选
- 实现响应式设计和现代化交互效果
2025-07-21 16:58:55 +08:00
imeepos 6bd12a4a63 feat: 实现项目素材批量删除功能
- 后端实现:
  * 在MaterialRepository中添加batch_delete方法,支持事务处理
  * 在MaterialService中添加batch_delete_materials业务逻辑
  * 添加BatchDeleteResult和BatchDeleteFailedItem数据结构
  * 新增batch_delete_materials Tauri命令接口
  * 实现参数验证和错误处理机制

- 前端实现:
  * 创建useBatchSelection Hook管理批量选择状态
  * 实现BatchDeleteConfirmDialog批量删除确认对话框
  * 在MaterialCard组件中添加批量选择支持
  * 在ProjectDetails页面集成批量选择和删除功能
  * 添加批量操作UI控件(全选/取消全选/批量删除按钮)

- 功能特性:
  * 支持最多50个素材的批量选择
  * 单次最多删除100个素材的限制
  * 详细的删除结果反馈(成功/失败统计)
  * 失败项目的具体错误信息显示
  * 批量选择模式的视觉反馈
  * 完善的用户确认和通知机制

- 测试:
  * 添加批量删除功能的单元测试
  * 测试数据结构创建和验证逻辑

遵循Tauri开发规范和前端UI/UX设计标准,提供安全可靠的批量删除体验。
2025-07-21 14:28:06 +08:00
imeepos dc61de7cad fix: 修复容错JSON解析器的解析逻辑和前端集成
主要修复:
- 修复extract_pair函数,正确处理object/array/number等直接节点类型
- 在预处理阶段修复无引号键和尾随逗号,避免Tree-sitter解析错误
- 添加详细的调试日志,便于问题诊断
- 优化JsonParserState,每次使用新配置创建解析器实例
- 创建TolerantJsonParser前端组件,支持配置和示例
- 创建TolerantJsonService服务类,封装API调用
- 添加JsonParserDebugPanel调试面板,便于测试后端命令
- 集成到便捷工具页面,提供完整的用户界面

技术改进:
- 支持预设配置模式(严格/宽松/AI模式/快速模式)
- 增强错误恢复策略的调试信息
- 优化前端组件的用户体验和交互设计
- 添加解析统计信息展示和结果导出功能
2025-07-21 13:46:49 +08:00
imeepos 4da48c3281 fix: 优化动态列表和弹框UI体验 2025-07-18 18:45:13 +08:00
imeepos da4aeaccb9 完成模特动态页面开发,移除标题和描述字段 2025-07-18 16:49:08 +08:00
imeepos 9c3f7341aa feat: 优化模板轨道片段匹配规则编辑体验
新功能:
- 实现匹配规则保存后自动刷新轨道片段数据
- 优化匹配规则编辑界面的视觉设计

 UI/UX 优化:
- 保存按钮从小图标改为明显的绿色按钮,包含文字标签
- 取消按钮也改为带文字的按钮,提升可发现性
- 编辑按钮从灰色图标改为蓝色带边框的按钮
- 编辑状态下添加蓝色背景和边框,突出编辑区域
- 优化标签颜色,在蓝色背景下更加清晰
- 表单控件添加白色背景和蓝色边框

 数据刷新机制:
- TemplateDetailModal 添加 currentTemplate 状态管理
- 实现 refreshTemplateData 函数自动获取最新模板数据
- 匹配规则保存后触发 handleRuleUpdated 回调
- 自动刷新模板列表和详情数据

 用户体验提升:
- 保存按钮更容易被发现和点击
- 编辑状态更加明显,用户不会迷失
- 保存后立即看到最新数据,无需手动刷新
- 加载状态和错误提示更加清晰

 技术改进:
- 按钮样式遵循 promptx/frontend-developer 设计规范
- 响应式设计,支持不同屏幕尺寸
- 完整的状态管理和错误处理
- 优雅的动画过渡效果
2025-07-18 10:55:41 +08:00
imeepos 9b43886a80 fix: build error 2025-07-18 00:54:41 +08:00
imeepos c3213bc3fc feat: 完成服装搭配筛选功能优化
-  修复Gemini API JSON截断问题,提高分析成功率90%+
-  实现基于AI识别商品的动态筛选选项
-  将图片分析功能集成到高级筛选面板
-  合并颜色匹配和设计风格筛选为统一商品筛选
-  统一UI颜色设计:未选中浅色,选中蓝色
-  支持AI识别商品的颜色纠正功能
-  优化响应式设计和用户体验

主要改进:
- 智能JSON修复机制处理API响应截断
- 动态生成筛选选项而非硬编码常量
- 一体化商品筛选界面设计
- 统一的颜色设计系统
- 增强的错误处理和用户反馈
2025-07-18 00:54:01 +08:00
imeepos fa194a5db2 feat: 服装搭配页面UI美化和UX改进
UI优化内容:
- 重新设计页面头部,使用优雅的渐变背景和现代化图标
- 优化标签导航,采用卡片式设计和平滑动画效果
- 美化搜索面板,改进输入框、筛选器和按钮的视觉设计
- 重构图片上传组件,添加拖拽区域样式和上传进度动画
- 优化搜索结果展示,使用网格布局和悬停效果
- 改进AI分析结果展示,采用卡片式布局和颜色编码
- 增强LLM聊天界面,现代化消息气泡和打字动画

 响应式设计:
- 实现移动优先的响应式布局
- 优化平板端和桌面端适配
- 修复1200px宽度下的左右布局显示问题
- 添加触摸友好的交互元素

 用户体验提升:
- 统一设计语言和视觉风格
- 添加流畅的页面切换和组件加载动画
- 优化加载状态、错误提示和空状态设计
- 改进信息层次和视觉可读性

 技术改进:
- 使用Tailwind CSS类替代内联样式
- 统一使用Lucide React图标库
- 完善CSS变量和设计令牌系统
- 添加兼容性变量支持旧的命名格式

符合promptx/frontend-developer规定的前端开发规范,确保界面美观、操作流畅、动画优美,符合用户操作习惯和大众审美习惯。
2025-07-17 23:27:52 +08:00
imeepos 121f2ebc5d fix: 移除错误代码 2025-07-17 20:59:45 +08:00
imeepos e34701bb54 fix: 删除无用代码 2025-07-17 20:18:01 +08:00
imeepos 7f3a59282d feat: 完成CustomMultiSelect多选组件开发并集成到顶部导航栏 2025-07-17 20:09:37 +08:00
imeepos 42836784b4 feat: 完善智能搭配推荐功能和调试工具
新功能:
- 完整实现智能搭配推荐系统
  - OutfitMatchingRecommendation: 完整的推荐界面组件
  - generate_outfit_recommendations: 后端推荐算法
  - 色彩和谐度和风格一致性评分算法
  - 智能场合和季节标签生成
- 添加调试工具 debug_outfit_items_stats
  - 检查项目中的服装单品统计
  - 详细的数据分析和建议

 算法实现:
- 搭配组合生成逻辑
  - 上装+下装+鞋子组合
  - 连衣裙+鞋子组合
  - 可选外套和配饰
- 智能评分系统
  - 色彩和谐度计算 (HSV色彩空间)
  - 风格一致性评估
  - 综合评分和筛选
- 标签生成算法
  - 场合推断 (工作/休闲/正式/运动等)
  - 季节适用性分析

 UI/UX优化:
- 现代化的推荐卡片设计
- 智能筛选面板 (场合/季节/风格/评分)
- 收藏和保存功能
- 详情模态框展示
- 调试按钮和数据检查工具

 问题诊断:
- 添加详细的调试日志
- 搭配组合生成过程跟踪
- 评分计算过程可视化
- 数据统计和分析工具

 当前状态:
- 项目中有2件服装单品 (连衣裙+高跟鞋)
- 数量足够生成搭配推荐
- 正在调试为什么生成0个推荐的问题
2025-07-17 19:47:51 +08:00
imeepos c31a8c5ba9 fix: 服装搭配 2025-07-17 19:06:15 +08:00
imeepos 7fb1dfa95a feat: 添加便捷小工具页面 - AI检索图片/数据清洗功能
- 新增便捷工具页面 (/tools),提供AI检索图片/数据清洗功能
- 支持JSONL格式数据的URI匹配去重处理
- 实现实时进度显示和批量数据处理
- 添加完整的错误处理和用户反馈机制
- 遵循Tauri开发规范和UI/UX设计标准
- 包含测试数据和功能文档

技术实现:
- 后端: Rust异步处理,流式文件读取,进度事件发送
- 前端: React + TypeScript,文件选择对话框,进度条显示
- 导航: 新增便捷工具菜单项,集成到主导航栏
2025-07-17 15:29:59 +08:00
imeepos 1da647fbab feat: 实现循环匹配功能优化
- 优化一键匹配算法,支持循环匹配模板直到素材耗尽
- 新增全局素材使用状态跟踪,避免重复使用素材
- 实现智能终止条件,当无法完整匹配任何模板时自动停止
- 扩展BatchMatchingResult数据结构,添加循环轮数和终止原因字段
- 更新前端界面显示循环匹配进度和详细统计信息
- 添加性能优化:日志优化、预检查机制、最大轮数限制
- 新增全面的单元测试覆盖各种边界情况
- 创建详细的功能文档说明使用方式和注意事项

核心改进:
1. 循环匹配算法 - 持续匹配直到素材不足
2. 全局素材跟踪 - 确保素材不重复使用
3. 智能终止机制 - 自动检测匹配完成条件
4. 性能优化 - 支持大量模板和素材的高效处理
5. 完整测试覆盖 - 确保功能稳定可靠
2025-07-17 14:53:14 +08:00
imeepos 9f84ffe7f4 refactor: integrate export records into project details page
- Add export records tab to ProjectDetails page
- Optimize ExportRecordManager for compact tab display
- Remove global export records navigation (now project-level)
- Add showHeader and compact props to ExportRecordManager
- Remove standalone ExportRecordsPage (no longer needed)
- Update navigation structure to reflect project-level functionality

Export records are now properly scoped to individual projects and accessible through the project details interface.
2025-07-17 13:14:40 +08:00
imeepos c190fdae1b feat: implement export record tracking system
- Add export_count field to template_matching_results table
- Create ExportRecord data model with comprehensive tracking
- Implement ExportRecordRepository for CRUD operations
- Create ExportRecordService for business logic
- Add export record tracking to jianying export functions
- Create ExportRecordManager component with filtering and pagination
- Add ExportRecordsPage with full management interface
- Integrate export records into navigation and routing
- Add Tauri commands for export record management
- Include statistics, validation, and cleanup functionality

Follows Tauri development specifications and frontend standards.
2025-07-17 13:03:51 +08:00
imeepos e3037916c0 feat: 实现一键匹配功能 (v0.1.26)
- 新增一键匹配后端服务,支持遍历项目模板绑定并逐一匹配
- 在项目详情页添加一键匹配按钮,支持批量匹配操作
- 实现批量匹配进度管理,包括实时进度跟踪和取消功能
- 添加一键匹配结果汇总,包含详细统计和报告导出功能
- 新增批量匹配相关组件:进度对话框、结果对话框、汇总卡片
- 遵循 promptx/tauri-desktop-app-expert 开发规范
- 支持错误处理、状态管理和用户体验优化
2025-07-16 21:52:48 +08:00
imeepos d5ef9851cd feat: 实现模特详情页视频生成功能
- 新增模特详情页组件,支持照片上传和视频生成
- 实现视频生成数据模型和仓库层
- 集成Dify API进行视频生成
- 添加云存储上传功能,自动转换S3 URL为CDN地址
- 实现统一的删除确认弹框,替换window.confirm
- 支持照片和视频生成任务的删除功能
- 优化UI/UX设计,符合前端开发规范
- 添加完整的错误处理和状态管理

核心功能:
 模特照片上传到云端
 多选照片进行视频生成
 实时任务状态跟踪
 视频生成历史记录
 统一删除确认对话框
 响应式设计和优雅动画
2025-07-16 19:39:44 +08:00
imeepos 52ce437e63 fix: 修复ProjectDetails.tsx中的无限请求问题和模特名称显示
- 修复loadProjectClassificationStats函数的无限循环问题
- 使用useRef跟踪分类统计加载状态,避免重复请求
- 添加模特信息加载功能,显示真实模特名称而非model_id
- 优化useEffect依赖,防止不必要的重新渲染和请求
- 在项目切换和导入完成时正确重置加载状态
2025-07-16 18:33:57 +08:00
imeepos 08fa4eda61 feat: 实现项目详情页面筛选功能优化 v0.1.25
- 为片段管理添加使用状态筛选条件(全部/已使用/未使用)
- 为素材管理添加AI分类筛选条件(基于实际分类记录)
- 为素材管理添加模特筛选条件(全部/未指定/具体模特)
- 为素材管理添加使用状态筛选条件(全部/已使用/未使用)
- 优化UI/UX设计,添加动画效果和视觉一致性
- 实现基于视频分类记录的真实数据筛选逻辑
- 添加筛选条件显示和清除功能
- 遵循promptx/frontend-developer设计标准
2025-07-16 18:25:37 +08:00
imeepos 31f94a51ff fix: 修复模板匹配结果应用时素材使用记录创建失败的问题
- 修复 create_usage_records_from_matching_result 命令参数命名问题
- 将前端调用参数从 snake_case 改为 camelCase 以匹配 Tauri 自动转换规则
- 确保模板匹配结果应用后能正确创建素材使用记录
- 遵循 Tauri 开发规范的参数命名约定
2025-07-16 16:40:25 +08:00
imeepos 5d39ddea80 fix: 修复保存 匹配记录的bug 2025-07-16 16:09:55 +08:00
imeepos a325b3ccc8 feat: 实现素材使用状态管理系统
1. 数据库层面改进:
   - 新增material_usage_records表记录素材使用历史
   - 为material_segments表添加usage_count、is_used、last_used_at字段
   - 实现数据库迁移逻辑

2. 数据模型和仓库:
   - 创建MaterialUsageRecord、MaterialUsageStats等数据模型
   - 实现MaterialUsageRepository处理使用记录的CRUD操作
   - 支持批量创建使用记录和统计查询

3. 业务逻辑改进:
   - 修改MaterialMatchingService,在获取素材片段时排除已使用的片段
   - 实现素材使用状态的自动更新机制
   - 支持重置素材使用状态功能

4. 前端集成:
   - 修改handleApplyMatchingResult函数,应用匹配结果时自动创建使用记录
   - 新增多个后端命令支持素材使用状态管理
   - 实现从匹配结果自动创建使用记录的便捷方法

5. 核心功能:
   - 一个素材片段只能使用一次的限制机制
   - 模板匹配时自动排除已使用的素材片段
   - 完整的使用历史记录和统计功能
   - 支持项目级别的使用状态重置

这个实现确保了素材的合理使用,避免重复使用同一素材片段,
同时提供了完整的使用追踪和管理功能。
2025-07-16 14:38:08 +08:00
imeepos 3e6c05c4ac fix: 修复模板匹配结果相关的数据类型错误
1. 修复list_matching_results接口'Invalid column type Integer at index: 18, name: is_active'错误
   - 修正template_matching_result_repository.rs中row_to_matching_result函数的is_active字段处理
   - 使用rusqlite::types::Value枚举正确处理多种数据类型

2. 修复数据插入和读取的类型不一致问题
   - 修正数据插入时将INTEGER字段转换为字符串的错误
   - 统一数据类型:数字字段直接使用原始类型而非字符串

3. 实现应用匹配结果功能
   - 修复ProjectDetails.tsx中handleApplyMatchingResult函数
   - 调用save_matching_result API保存匹配结果到数据库
   - 添加成功/失败通知提示

修复的具体问题:
- template_matching_results表的is_active字段类型处理
- 数字字段(total_segments, matched_segments等)的类型转换
- quality_score字段的NULL值处理
- 前端应用匹配结果后保存到数据库的逻辑
2025-07-16 14:05:01 +08:00
imeepos 94d58a5bc5 feat: UI优化 - 添加匹配记录tab并优化TemplateMatching相关组件样式
- 在项目详情页面添加匹配记录tab,集成TemplateMatchingResultManager组件
- 优化TemplateMatchingResultManager组件样式,使用统一的设计系统
- 优化TemplateMatchingResultCard组件,采用card样式和渐变背景
- 优化TemplateMatchingResultDetailModal组件,使用统一的模态框样式
- 优化TemplateMatchingResultStatsPanel组件,增强视觉效果和进度条样式
- 遵循promptx/frontend-developer开发规范,确保样式统一、简洁美观
2025-07-16 13:51:28 +08:00
imeepos ef4c047b30 fix(template-matching): 修复模板素材匹配逻辑
修复的问题:
- 固定素材被错误计入失败统计,导致成功率偏低
- 素材未切分时无可用片段,导致匹配完全失败
- 模板绑定验证逻辑未实现,返回空数据
- 时长单位不一致影响匹配准确性

 主要改进:
- 固定素材现在正确跳过匹配,不计入失败数
- 实现虚拟片段机制,为未切分素材创建虚拟片段
- 完善模板绑定验证逻辑,正确统计片段数量
- 修正时长单位转换,确保匹配准确性
- 增强错误信息,提供更详细的匹配失败原因

 修复效果:
- 修复前: 0个可用片段  匹配完全失败
- 修复后: 44个可用片段  匹配正常工作
- 三种匹配规则(固定素材/AI分类/随机匹配)现在都能正常工作

 技术细节:
- 在匹配前过滤固定素材,避免错误统计
- 为每个分类记录创建对应的虚拟片段
- 成功率基于可匹配片段计算,更准确反映匹配质量
- 实现完整的模板绑定验证,支持匹配预估
2025-07-16 00:56:51 +08:00
imeepos f67c6357e1 fix: 重构项目详情页面 2025-07-15 21:20:00 +08:00
imeepos 05c9694063 fix: Resolve all runtime errors and complete project details optimization
Fixed Critical Runtime Errors:
- Resolved React infinite loop caused by useCallback dependency issues
- Fixed MaterialSegmentStats null pointer exceptions with proper null checks
- Replaced non-existent get_material_segment_stats command with get_project_segment_view
- Added comprehensive error handling and loading states

 Enhanced Project Details Page:
- Successfully added 'Project Overview' tab as default selection
- Consolidated all statistics into overview tab (project stats, segment stats, AI progress)
- Moved project information display to overview with formatted timestamps
- Optimized scrolling behavior with fixed height containers (calc(100vh-16rem))

 Improved Data Integration:
- Integrated MaterialSegmentStats component with proper viewMode configuration
- Used existing get_project_segment_view command to fetch segment statistics
- Added proper TypeScript type handling for segment view data
- Implemented fallback data structure for error scenarios

 UI/UX Enhancements:
- Added consistent padding across all tab content areas
- Implemented loading skeleton states for segment statistics
- Enhanced visual hierarchy with proper section headings
- Optimized tab content scrolling to prevent external scrollbars

 Technical Improvements:
- Added useCallback for loadSegmentStats to prevent dependency loops
- Proper null checking in MaterialSegmentStats component
- Enhanced error handling with meaningful fallback states
- Maintained hot reload functionality throughout development

 Current Status:
- All runtime errors resolved
- Project overview tab displays comprehensive project information
- Smooth scrolling within tab content areas
- Hot reload working correctly
- No TypeScript compilation errors
- Backend data integration functioning properly

The project details page now provides a unified overview experience with all statistics and information consolidated in a single, easily accessible location.
2025-07-15 21:09:00 +08:00
imeepos d5335d7803 feat: Optimize project details page layout and information display
Enhanced Tab Structure:
- Added new 'Project Overview' tab as default selection
- Reorganized tab navigation with Brain icon for overview
- Improved tab content scrolling with fixed height containers

 Consolidated Statistics Display:
- Moved all project statistics to Overview tab (materials, videos, audio, images, AI queue)
- Integrated MaterialSegmentStats for comprehensive segment analytics
- Added AI classification progress tracking in overview
- Consolidated project information display with creation/update times

 Improved Layout & Scrolling:
- Fixed scrolling behavior - removed external scrollbars
- Set tab content height to calc(100vh-16rem) for optimal viewport usage
- Added consistent padding (p-4 md:p-6) across all tab content areas
- Optimized content organization for better information hierarchy

 Technical Improvements:
- Added loadSegmentStats function with proper error handling
- Integrated MaterialSegmentStats component with ByClassification view mode
- Updated dependency arrays for proper data loading
- Enhanced project information display with formatted timestamps

 User Experience Benefits:
- Single overview tab provides complete project status at a glance
- Improved navigation with logical information grouping
- Better scrolling performance with contained scroll areas
- Consistent visual hierarchy across all tabs
- Reduced information fragmentation across multiple views

The project details page now provides a more organized and efficient way to view all project-related information, with the overview tab serving as a comprehensive dashboard for project status, statistics, and progress tracking.
2025-07-15 21:02:41 +08:00
imeepos 1b7f7b44a8 feat: Complete comprehensive UI/UX enhancement phase
Enhanced Interactive Components:
- Created InteractiveButton with ripple effects, haptic feedback, and multiple variants
- Developed InteractiveInput and InteractiveTextarea with real-time validation and status indicators
- Added FloatingActionButton for quick actions with elegant tooltips
- Implemented comprehensive micro-interactions and animations

 Advanced Loading & Skeleton States:
- Enhanced SkeletonLoader with multiple variants (model, material, template, table-row)
- Added specialized skeleton components (ModelCardSkeleton, MaterialCardSkeleton, etc.)
- Created EnhancedLoadingState with progress indicators and operation tracking
- Implemented BatchOperationLoading for complex workflows

 Optimized Form Experience:
- Upgraded ProjectForm with new interactive components
- Added real-time validation feedback and error animations
- Implemented smart input states (success, error, loading)
- Enhanced user feedback with visual and haptic responses

 Perfected Empty States:
- Redesigned EmptyState with multiple variants and illustrations
- Created specialized empty state components (EmptyProjectList, EmptyModelList, etc.)
- Added contextual tips and guidance for better user onboarding
- Implemented error states and recovery actions

 Advanced Data Display:
- Built comprehensive DataTable with search, sort, filter, and pagination
- Created flexible CardGrid with view switching and bulk operations
- Added row selection, bulk actions, and advanced filtering
- Implemented responsive layouts and mobile optimization

 Rich Animation System:
- Added 20+ new micro-interaction animations
- Implemented button press, success pulse, error shake effects
- Created smooth slide-in animations for all directions
- Added loading dots, heartbeat, and bounce-in animations

 Key Features:
- Ripple effects on button clicks with haptic feedback
- Real-time form validation with animated error states
- Contextual empty states with actionable guidance
- Advanced data tables with full CRUD operations
- Responsive card grids with multiple view modes
- Comprehensive loading states for better perceived performance

All components now provide rich visual feedback, smooth animations, and professional user experience that matches modern design standards.
2025-07-15 20:38:34 +08:00
imeepos 134deb80fb feat: Optimize UI layout with fixed navigation and scrollable content
Layout Optimization:
- Fixed navigation bar at the top with sticky positioning
- Main content area now properly scrollable with flex layout
- Improved overall page structure for better UX

 Scrolling Enhancements:
- Added custom scrollbar styling for better visual appeal
- Implemented smooth scrolling behavior across the application
- Optimized scroll areas in ProjectDetails, TemplateManagement, AiClassificationSettings, and ModelList
- Added proper overflow handling for long content lists

 Visual Improvements:
- Beautiful custom scrollbars with hover effects
- Proper height constraints for content areas (calc(100vh-16rem))
- Enhanced scrolling experience with backdrop blur effects
- Added scroll indicators and shadow effects for better UX

 Responsive Design:
- Mobile-optimized scrolling behavior
- Proper touch scrolling on mobile devices
- Adaptive content heights for different screen sizes
- Maintained accessibility with reduced motion support

 Technical Improvements:
- Fixed JSX syntax errors in TemplateManagement and ModelList
- Improved component structure for better maintainability
- Added comprehensive CSS classes for scroll management
- Enhanced performance with optimized overflow handling

All pages now provide a smooth, professional scrolling experience while keeping the navigation always accessible.
2025-07-15 20:18:28 +08:00
imeepos 887f5de793 feat: Complete Modal and Tab UI/UX optimization
Enhanced Modal Components:
- Optimized DeleteConfirmDialog with beautiful gradients and improved layout
- Enhanced MaterialEditDialog with modern design and better information hierarchy
- Improved TemplateDetailModal with elegant header and refined tab navigation
- Enhanced AiClassificationFormDialog with modern styling

 Unified Tab System:
- Created reusable TabNavigation component with multiple variants (default, pills, underline)
- Implemented consistent tab design across ProjectDetails and other pages
- Added support for icons, counts, and disabled states in tabs
- Improved accessibility and keyboard navigation

 Advanced Animations:
- Added comprehensive modal animations (fade-in, scale-in, slide-in)
- Enhanced backdrop blur effects and smooth transitions
- Implemented proper enter/exit animations for better UX
- Added reduced motion support for accessibility

 Responsive Design:
- Optimized modal layouts for mobile, tablet, and desktop
- Improved touch-friendly interactions for mobile devices
- Enhanced modal sizing and positioning across screen sizes
- Added proper scrolling and overflow handling

 Interaction Improvements:
- Enhanced ESC key support for modal closing
- Improved backdrop click handling
- Better focus management and keyboard navigation
- Consistent button styling and hover effects

All modal and tab components now follow unified design language while maintaining full functionality.
2025-07-15 20:09:54 +08:00
imeepos 5d86a6411f feat: Complete UI/UX optimization v0.1.21 - Final enhancements
- Enhanced TemplateManagement page with beautiful header and improved layout
- Optimized TemplateCard with gradient backgrounds and refined visual effects
- Improved empty state design with elegant icons and better messaging
- Enhanced pagination component with modern styling
- Added comprehensive responsive design optimizations for mobile and tablet
- Implemented touch-friendly interactions for mobile devices
- Added support for different screen orientations and pointer types
- Enhanced animations with device-specific optimizations
- Improved accessibility with proper touch target sizes
- Added dark mode support and high-resolution display optimizations
- Completed comprehensive design system with reusable components
- All pages now follow consistent visual design language
2025-07-15 19:52:31 +08:00
imeepos 19903303ae feat: UI/UX optimization v0.1.21 - Enhanced visual design and user experience
- Unified color system with modern blue theme
- Enhanced ProjectCard with beautiful gradients and hover effects
- Improved Navigation with modern logo and enhanced link styles
- Optimized ProjectDetails page with elegant header and statistics cards
- Enhanced ModelCard and ModelList with refined visual effects
- Improved AiClassificationSettings with beautiful page header
- Optimized TemplateManagement with modern design elements
- Added comprehensive design system with reusable component styles
- Enhanced animations and transitions for smoother interactions
- Improved responsive design for better mobile and tablet experience
- Added support for dark mode and high-resolution displays
- Maintained existing functionality while improving visual appeal
2025-07-15 19:45:02 +08:00
imeepos fed5cdd73d fix: UI 样式优化 2025-07-15 19:42:39 +08:00
imeepos 590e254fe1 feat: 添加项目详情/素材管理的MaterialSegment聚合视图功能
- 新增MaterialSegment聚合视图,支持按AI分类和模特聚合展示
- 实现后端MaterialSegmentViewService和相关API命令
- 创建前端React组件:MaterialSegmentView、MaterialSegmentGroup、MaterialSegmentCard等
- 添加MaterialSegment详细信息模态框和批量操作对话框
- 实现搜索、筛选、排序、分页功能
- 集成虚拟滚动和性能优化
- 在ProjectDetails页面添加片段管理选项卡
- 遵循promptx开发规范和UI/UX设计标准
2025-07-15 16:49:08 +08:00
imeepos bab1dfc5fd feat: 实现素材匹配功能 v0.1.19
- 新增素材匹配服务 (MaterialMatchingService)
  - 支持AI分类匹配、随机匹配等规则
  - 实现模特限制逻辑(每个模特素材只能使用一次)
  - 时长匹配优化(相差越小越好)
  - 详细的匹配统计和失败原因分析

- 新增Tauri API命令
  - execute_material_matching: 执行素材匹配
  - get_project_material_stats_for_matching: 获取项目素材统计
  - validate_template_binding_for_matching: 验证模板绑定

- 新增前端组件和服务
  - MaterialMatchingResultDialog: 匹配结果对话框
  - MaterialMatchingService: 前端服务层
  - 完整的TypeScript类型定义

- UI集成
  - 在模板绑定列表添加匹配素材按钮
  - 集成到项目详情页面
  - 支持完整的匹配流程和结果展示

- 核心匹配规则
  - 只使用已AI分类的MaterialSegment
  - 每个素材只能使用一次
  - 模特限制:优先同一模特,失败后尝试其他模特
  - 视频时长必须大于模板需求,相差越小匹配度越高

- 测试覆盖
  - 后端服务单元测试
  - 覆盖正常匹配、失败场景、边界情况
2025-07-15 14:56:10 +08:00
imeepos 96b420e149 fix: 优化素材绑定页面UI布局和代码格式
- 清理多余的空行,优化代码格式
- 调整模特选择下拉框位置,移到批量操作区域
- 改善筛选区域的布局结构
- 保持UI组件的逻辑分组和视觉一致性
2025-07-15 14:24:28 +08:00
imeepos 37cf8bb75a feat: 为素材绑定页面添加项目筛选功能
- 添加项目筛选下拉框,支持按项目过滤素材
- 集成useProjectStore获取项目列表
- 修改loadMaterials函数支持项目ID筛选参数
- 在搜索条件变化时包含项目筛选条件
- 优化筛选UI布局,项目筛选位于绑定状态筛选之前
- 支持全部项目和特定项目的素材筛选功能
2025-07-15 14:23:26 +08:00
imeepos de446b6410 fix: 修复项目详情页面模板绑定和素材绑定页面的搜索功能
- 修复项目详情页面模板绑定搜索功能:使用过滤后的绑定详情而不是原始数据
- 修复素材绑定页面搜索功能:添加useEffect监听搜索条件变化并重新加载数据
- 修复素材绑定页面统计功能:实现全局模特绑定统计API和前端调用
- 优化MaterialModelBindingService的getMaterialsByFilter方法,正确处理多重过滤条件
- 添加后端get_global_model_binding_stats命令和相关仓库方法
- 确保搜索和统计功能在所有相关页面正常工作
2025-07-15 14:10:29 +08:00