Commit Graph
18 Commits
Author SHA1 Message Date
linshen 544a225163 🔧 优化项目配置和部署文档
- 更新 `.dockerignore` 文件,完善忽略规则和文件分类
- 在 `.env.example` 中新增 SiliconFlow API 配置
- 重构 Dockerfile,优化构建和部署步骤
- 更新 `package.json` 版本号至 1.0.0
- 重写 README.md,简化安装和部署说明
- 新增 Docker 部署和 API 密钥配置指南
2025-03-01 11:25:43 +08:00
linshen 8afce63de3 chore: 更新 npm 和包管理器配置
- 在 .npmrc 中启用预/后置脚本和公共依赖提升
- 扩展 package.json 的包管理器支持,增加 pnpm 版本约束
- 调整 core 和 ui 包的导出配置,优化模块引入方式
- 更新 Node.js 版本支持范围,兼容 18、20 和 22 版本
2025-02-28 00:14:29 +08:00
linshen c1acf7d7b6 chore: Update project dependencies and development scripts
- Upgrade Vite, Vitest, and Vue-related dependencies to latest versions
- Modify package scripts for improved development workflow
- Update environment variable loading configuration
- Enhance test configuration and mocking strategies
- Simplify root and package-level scripts
- Improve cross-platform development support
2025-02-23 21:44:38 +08:00
linshen 8cf9c7407f chore: Update project configuration and dependencies
- Add Node.js and package manager engine restrictions in package.json
- Update OpenAI SDK to latest version (4.83.0)
- Remove package-lock.json and unnecessary environment files
- Modify UI package imports and styles
- Update README with pnpm usage guidance
- Remove unused logo and style files
- Simplify main application entry points
2025-02-23 09:58:39 +08:00
linshen 22638cbde0 refactor: Migrate from LangChain to native SDKs for LLM services
- Replace LangChain dependencies with native OpenAI and Google Generative AI SDKs
- Rewrite LLMService to use direct API calls for OpenAI and Gemini
- Update core package dependencies to remove LangChain-related packages
- Modify message handling and streaming logic to work with new SDK implementations
- Simplify model configuration and instance management
- Update integration and unit tests to support new SDK approach
- Remove LangChain-specific message conversion and streaming methods
2025-02-23 09:12:00 +08:00
linshen 4e2410a7ff chore: Update LangChain dependencies and package scripts
- Upgrade @langchain/core to version 0.3.40
- Update @langchain/google-genai and @langchain/openai to latest versions
- Remove npm-run-all and replace with direct pnpm commands
- Simplify clean and dev scripts in root package.json
- Add pnpm override for @langchain/core version
- Remove redundant dependencies in web and core packages
- Update Vite config and import paths in web package
2025-02-22 21:51:09 +08:00
linshen 653772ca78 refactor: Synchronize core and UI package interfaces with async/sync method transformations
- Modify TemplateManager to use synchronous methods instead of async
- Update core service interfaces to remove async/await requirements
- Simplify initialization and method calls across core and UI packages
- Remove unnecessary async/await wrappers in composables and components
- Enhance error handling and logging during service initialization
- Standardize method signatures in template, history, and model managers
2025-02-17 21:19:51 +08:00
linshen 04dccf3e38 refactor: Migrate extension package components to UI package
- Move all Vue components from extension package to @prompt-optimizer/ui
- Remove local component implementations in extension package
- Update import statements to use UI package components
- Add necessary dependencies for component migration
- Simplify extension package structure and improve code modularity
- Prepare for unified component management across packages
2025-02-15 19:28:14 +08:00
linshen f1a8f44034 refactor: Modularize App.vue with UI package components and composables
- Integrate MainLayout, ContentCard, and ActionButton components
- Implement usePromptOptimizer and usePromptTester composables
- Simplify App.vue structure and improve component composition
- Extract complex logic into reusable composable functions
- Enhance code readability and maintainability
2025-02-15 16:33:08 +08:00
linshen 5e42a81aa4 refactor: Extract UI components to separate package
- Move common Vue components from web package to new @prompt-optimizer/ui package
- Update import statements in web package to use @prompt-optimizer/ui
- Add necessary dependencies for UI package
- Simplify component imports and improve code modularity
- Update package.json files to include new UI package dependency
2025-02-15 15:18:59 +08:00
linshen cb720ea073 refactor: Migrate services to core package and update project dependencies
- Move services from web package to core package
- Update import statements across web package to use @prompt-optimizer/core
- Add LangChain and related dependencies to package.json
- Refactor and standardize service interfaces and implementations
- Update test suites to work with new package structure
- Improve module exports and type consistency
2025-02-14 22:24:51 +08:00
linshen 9be9f6b3ae refactor: Migrate project to monorepo structure with pnpm workspaces
- Convert project to monorepo with separate web and extension packages
- Update package.json scripts to support pnpm workspace commands
- Remove individual configuration files from root directory
- Adjust Vercel configuration for monorepo deployment
- Prepare for Chrome extension development
- Remove existing web application source files in preparation for restructuring
2025-02-13 22:51:28 +08:00
linshen 2e72d2613e feat: Enhance history management with versioning and chain tracking
- Implement comprehensive history management with record chains
- Add support for tracking prompt optimization and iteration versions
- Introduce new history types and interfaces for better record management
- Update HistoryDrawer to display versioned records with detailed information
- Integrate UUID for generating unique record and chain identifiers
- Improve history persistence and retrieval mechanisms
- Refactor history-related services and components to support new versioning system
2025-02-11 23:25:17 +08:00
linshen 0599354288 feat: 增加自定义API集成和流式输出支持
本次提交主要实现了以下功能:

- 添加自定义API集成支持,通过环境变量配置
- 实现流式输出功能,支持优化、迭代和测试场景
- 重构 OutputPanel 组件,支持流式渲染
- 更新 LLM 服务,增加流式消息发送方法
- 优化错误处理和状态管理
- 调整 Vite 配置,支持路径别名和公共目录
- 添加 Element Plus 和 Pinia 测试依赖

主要技术改进:
- 使用 LangChain 流式 API
- 实现跨组件的流式数据传输
- 增强用户交互体验
2025-02-04 02:19:17 +08:00
linshen eb2172eb50 feat: 重构LLM服务,引入LangChain并优化错误处理
本次提交对LLM服务进行了全面重构,主要变更包括:

- 引入LangChain库,支持多模型提供商(OpenAI、Gemini)
- 重构错误处理机制,增加更精细的错误类型
- 优化模型实例缓存和配置验证
- 更新服务层接口,提高代码可读性和可维护性
- 调整模型配置类型,增加provider字段
- 更新单元测试和集成测试,适配新的服务架构
- 添加LangChain相关依赖

重构目标:
- 提高代码的可扩展性
- 统一模型调用接口
- 改进错误处理和类型安全
- 支持更多模型提供商
2025-01-30 23:14:24 +08:00
linshen a9d9756910 feat(experience): 调整布局并增加历史记录功能 (master)
此次提交主要调整了应用的布局结构,并增加了历史记录功能,具体改动如下:

- 调整了主页面的布局,优化了三栏布局的比例和间距,使界面更加清晰。
- 优化了组件的层级,使用了卡片式设计,增强了视觉层级感。
- 增加了历史记录功能,用户可以查看和复用之前的 prompt 和优化结果。
- 优化了深色主题下的颜色搭配,提高了可读性。
- 统一了组件的样式,保持了视觉一致性。
- 调整了部分组件的结构和样式,使其更易于维护和扩展。
- 修改了 PromptManager,增加了获取历史记录,添加到历史记录,清除历史记录的方法
- 修改了 HistoryDrawer 组件,增加了历史记录展示
- 修改了 App 组件,调整了布局,增加了对历史记录的调用
- 修改了 ModelManager 组件,调整了弹窗的样式
- 修改了 InputPanel 组件,增加label,placeholder 属性,修改了组件的样式
- 修改了 OutputPanel 组件,增加了 loading 状态
- 修改了 PromptPanel 组件,修改了组件的样式
- 修改了 package.json,增加了 @vue/test-utils 依赖
- 修改了 vite.config.js,增加了测试覆盖率配置
2025-01-20 20:44:09 +08:00
linshen 6e341a4438 feat(单元测试): 增加单元测试,增加gemini代理地址以跑通本地单元测试 (master)
本次提交主要做了以下更改:
- **新增单元测试:** 为 LLM 服务添加了单元测试,确保核心功能正常运行。
- **增加 gemini 代理地址:**  在 `src/config/models.js` 中,将 Gemini 的 API 地址替换为代理地址,以便在本地环境进行单元测试。
- **更新经验文档:**  更新 `experience.md` 文件,记录了本次更改的细节和经验。
- **更新 package.json:** 添加了 `dotenv` 依赖,用于单元测试时加载环境变量。
2025-01-20 19:42:34 +08:00
linshen 0d3c2ba501 init 2025-01-17 21:37:11 +08:00