root
bda9eb1a6b
feat: 更通用的 带进度条的 python通信方式
2025-07-10 22:01:59 +08:00
root
f9e67bfc3d
fix: template
2025-07-10 21:36:40 +08:00
root
9f6b6630ce
fix: 模板重复导入问题
2025-07-10 21:30:10 +08:00
root
6b18e51f26
fix: template manager
2025-07-10 21:21:41 +08:00
root
aae64d4d04
template upgrade
2025-07-10 21:21:16 +08:00
root
7edf8b7335
refactor: 移动JSON-RPC模块到公共位置并修复模板导入显示问题
...
- 将JSON-RPC模块从ai_video移动到utils作为公共模块
- 更新所有相关文件的导入路径
- 重构template_manager.py使用标准JSON-RPC协议
- 修复模板导入成功但前端显示失败的问题
- 添加模板相关的错误码定义
- 改进进度报告使用JSON-RPC通知
- 移除旧的直接JSON输出代码
修复内容:
- python_core/utils/jsonrpc.py: 新增公共JSON-RPC模块
- python_core/services/template_manager.py: 使用JSON-RPC协议
- python_core/ai_video/video_generator.py: 更新导入路径
- python_core/ai_video/api_client.py: 更新导入路径
2025-07-10 21:07:14 +08:00
root
855a3bc757
foix
2025-07-10 20:54:35 +08:00
root
a5381e5305
feat: implement Cloudflare KV utility class and React hooks
...
- Add CloudflareKVClient class with full CRUD operations
- Support for batch operations, metadata, and key listing
- Implement useCloudflareKV hook for React components
- Add useKVValue hook for auto-loading specific keys
- Include comprehensive error handling and loading states
- Create demo component showing all functionality
- Add detailed documentation and usage examples
- Support for JSON parsing and custom configurations
- Based on jm_video_ui.md specifications
2025-07-10 20:51:09 +08:00
root
04e5990376
refactor: extract common Python execution patterns into reusable shared code
...
- Create python_executor.rs module with unified Python command execution
- Remove duplicate execute_python_command functions from ai_video.rs and template.rs
- Eliminate 553 lines of duplicate code across both files
- Improve error handling and JSON-RPC message parsing consistency
- Fix template import 'Unknown error' issue by using unified JSON parsing
- Add configurable timeout and encoding settings
- Ensure consistent UTF-8 encoding across all Python executions
2025-07-10 20:45:54 +08:00
root
1435c72ba6
fix
2025-07-10 20:32:31 +08:00
root
2c609c04f1
fix: invoke
2025-07-10 20:22:37 +08:00
root
13d1127b7a
fix: invoke
2025-07-10 20:21:51 +08:00
root
12ac233a5b
fix: import error
2025-07-10 20:18:10 +08:00
root
c73aeb58e9
feat: 添加完整的模板管理系统
...
🎉 新功能:
- 批量导入模板功能,支持文件夹结构解析
- 自动解析 draft_content.json 并提取轨道/素材信息
- 智能素材管理,自动复制到统一资源目录
- 路径转换为相对路径,确保模板可移植性
- 现代化的模板管理界面,支持网格/列表视图
- 搜索和筛选功能
- 模板详情预览和删除功能
🏗️ 技术实现:
- Python: TemplateManager 核心服务类
- Rust/Tauri: 跨平台命令处理和进程管理
- React/TypeScript: 响应式前端界面
- JSON-RPC: 前后端通信协议
📁 文件结构:
- 模板存储在 attachments/templates/{uuid}/ 目录
- 素材统一管理在 resources/ 子目录
- 元数据存储在 templates.json 文件
✅ 已测试功能:
- 批量导入多个模板
- 模板列表显示和搜索
- 模板详情查看
- 模板删除操作
- CLI 命令行接口
这个系统为视频编辑提供了强大的模板管理能力,
支持从外部导入模板并自动处理素材依赖关系。
2025-07-10 20:14:49 +08:00
root
168ad4dafa
fix: 修复批量处理中图片文件重复计数问题
...
- 替换glob模式匹配为直接文件系统遍历
- 避免在大小写不敏感文件系统上的重复匹配
- 添加更好的错误处理和调试日志
- 确保图片计数准确性
修复了Windows系统上同一图片文件被计数两次的问题
2025-07-10 19:47:17 +08:00
root
8f0cbe7995
fix: message
2025-07-10 19:42:00 +08:00
root
ad3a608acd
fix
2025-07-10 19:40:25 +08:00
root
3728bb007b
fix
2025-07-10 19:32:44 +08:00
root
946673c699
fix
2025-07-10 19:27:14 +08:00
root
8ae1718172
fix
2025-07-10 19:18:38 +08:00
root
8a1641e7ff
fix
2025-07-10 17:41:25 +08:00
root
f0cd8f3e9a
fix
2025-07-10 17:40:55 +08:00
root
76fe0d4550
fix
2025-07-10 17:39:29 +08:00
root
6fc4c8ba97
fix
2025-07-10 17:35:59 +08:00
root
12efdc60ab
fkix
2025-07-10 17:35:06 +08:00
root
6fdd1b280d
fix
2025-07-10 17:34:01 +08:00
root
e865e3c68a
fix
2025-07-10 17:28:13 +08:00
root
988c9e4333
fix
2025-07-10 17:25:08 +08:00
root
08b2c7080f
fix
2025-07-10 17:23:30 +08:00
root
3de6b09fe5
fix
2025-07-10 17:21:53 +08:00
root
ed27ecb4a0
fix
2025-07-10 17:20:19 +08:00
root
195f2207d5
fix
2025-07-10 17:19:19 +08:00
root
59ec478665
fix
2025-07-10 17:15:49 +08:00
root
22097ca2b3
fix
2025-07-10 17:10:52 +08:00
root
398c853b80
fix
2025-07-10 16:43:29 +08:00
root
988b4d10c8
fix: 添加拷贝按钮
2025-07-10 16:06:55 +08:00
root
604cb31114
fix
2025-07-10 15:34:18 +08:00
root
841fcee7b3
fix
2025-07-10 15:29:23 +08:00
root
995526ec57
fix
2025-07-10 15:27:21 +08:00
root
761f924b55
fix
2025-07-10 15:22:53 +08:00
imeepos
d2bcaae157
fix: requirement
2025-07-10 15:20:02 +08:00
root
9ddd0fc0c2
fix: requirement
2025-07-10 15:08:08 +08:00
root
17a8311768
fix: requirement
2025-07-10 15:07:28 +08:00
root
3d49505e65
fix: requirement
2025-07-10 15:05:19 +08:00
root
ece222ba4b
fix
2025-07-10 15:02:28 +08:00
root
95f7921199
fix: add pydantic_settings to requirements
2025-07-10 14:54:38 +08:00
root
a6052a731d
fix: pydantic
2025-07-10 14:53:27 +08:00
root
6bab8d8499
fix: python -m 运行方式
2025-07-10 14:49:51 +08:00
root
1ff49a3c26
refactor: 统一使用相对导入,规范 Python 包结构
...
🏗️ **Python 包结构规范化**:
1. **导入方式统一**:
- 移除所有 sys.path.append() hack 方式
- 统一使用相对导入 (from ..config import settings)
- 符合 Python 包管理最佳实践
2. **包结构简化**:
- 简化 python_core/__init__.py,移除复杂依赖
- 避免包初始化时的循环导入问题
- 清理不必要的 try-except 导入逻辑
3. **模块运行方式**:
- 支持标准的模块运行: python -m python_core.ai_video.video_generator
- Rust 代码使用 -m 参数调用 Python 模块
- 相对导入在模块运行时正常工作
4. **涉及文件修改**:
- python_core/__init__.py: 简化包初始化
- python_core/ai_video/video_generator.py: 相对导入
- python_core/ai_video/cloud_storage.py: 移除 fallback 逻辑
- python_core/ai_video/api_client.py: 统一相对导入
- python_core/video_processing/core.py: 相对导入
- python_core/audio_processing/core.py: 相对导入
- python_core/utils/logger.py: 相对导入
- python_core/services/*.py: 统一相对导入
- src-tauri/src/commands/ai_video.rs: 使用模块运行方式
5. **代码质量提升**:
- 移除重复的 sys.path 操作
- 清理冗余的 try-except 导入
- 统一的错误处理方式
- 更清晰的模块依赖关系
✅ **改进效果**:
- 符合 Python 最佳实践 ✓
- 代码结构更清晰 ✓
- 易于维护和测试 ✓
- 消除 hack 式路径操作 ✓
- 支持标准模块运行 ✓
现在整个 Python 包结构规范且易于维护!
2025-07-10 14:47:32 +08:00
root
3cd3ac9b71
fix: import error
2025-07-10 14:38:13 +08:00