Commit Graph
33 Commits
Author SHA1 Message Date
opbr 897dfb4c97 chore: remove unused @ctrl/tinycolor dependency (#114) 2025-06-18 22:20:56 +08:00
linshen a2ff97d89d 1.0.7 2025-06-08 22:58:16 +08:00
linshen 7cfbea000c feat(project): 添加版本同步机制并更新相关文件
- 新增版本同步脚本 sync-versions.js,实现自动同步 package.json 版本号到指定文件
- 更新 package.json,添加 version:sync 和 version 脚本
- 修改 App.vue 文件,添加 GitHub按钮
- 更新国际化文件,明确模板占位符格式
- 新增 version-sync.md 文档,说明版本同步机制的使用和管理
2025-06-08 22:57:08 +08:00
linshen d849024cb1 feat(docker): 添加基本认证功能和环境变量配置
- 在 Dockerfile 中添加 htpasswd 工具和 dos2unix
- 更新 docker-compose.yml 文件以支持 ACCESS_USERNAME 和 ACCESS_PASSWORD 环境变量
- 修改 dev.md 和 README 文件,增加访问密码配置说明
- 更新 Nginx 配置以引入基本认证
- 将版本号更新至 1.0.6
2025-05-28 23:18:23 +08:00
linshen 80a5b7e789 fix(core): 更新版本号并增强UI配置导入安全性
- 将版本号更新至1.0.5
- 添加UI配置键和值的安全性验证,防止恶意键和无效值的导入
- 改进错误处理逻辑,增强导入过程的健壮性
- 添加相关单元测试以确保新功能的正确性
2025-05-26 22:48:06 +08:00
且炼时光 47226036b3 集成Vercel Analytics (#101)
* build(web): 集成Vercel Analytics

- 在 main.js 中添加 Vercel Analytics 动态导入和初始化代码
- 修改 vercel.json,在安装依赖时添加 @vercel/analytics 包

* build:优化 Vercel部署时的安装命令- 将 pnpm add 替换为 pnpm i -w,使用工作区模式安装 @vercel/analytics 依赖
- 优化安装命令的可读性和效率

* perf(analytics): 优化 Vercel Analytics 加载策略

-根据环境变量 VERCEL_DEPLOYMENT 决定是否加载 Analytics- 改为通过 script 标签直接加载 Analytics 脚本
- 延迟加载以确保 DOM 完全加载
- 更新版本号至 1.0.4

* build(env): 更新环境变量前缀以隔离 Vite 配置- 将环境变量 VERCEL_DEPLOYMENT 重命名为 VITE_VERCEL_DEPLOYMENT
- 在Vite 项目中,建议使用VITE_ 前缀来定义环境变量
- 更新相关代码以使用新的环境变量名称
2025-05-11 23:28:45 +08:00
linshen bd1dab6761 build(dependencies): 更新依赖项并调整项目结构
- 更新项目版本至 1.0.3- 移动 dotenv 和 js-yaml 依赖至 devDependencies
- 更新 @intlify/message-compiler 和 @intlify/shared 版本- 调整 pnpm-lock.yaml 中的依赖项版本
2025-03-22 14:39:22 +08:00
Joseph Hau 5e8f658c6a Update development dependencies to the latest versions:
Update TypeScript to ^5.8.2 in root directory
Update UI directory dependencies:
jsdom to ^26.0.0
TypeScript to ^5.8.2
vite-plugin-dts to ^4.5.3
2025-03-17 17:57:19 +08:00
linshen f13f638b2a build: 更新版本号至 1.0.2
- 在 manifest.json 中将扩展版本号从1.0.1 修改为1.0.2
- 在 package.json 中将项目版本号从 1.0.1 修改为 1.0.2
2025-03-13 21:11:42 +08:00
linshen aa0a395832 build(deps): 更新国际化相关依赖:避免浏览器插件default-src 'self' 问题
- 添加 @intlify/unplugin-vue-i18n 插件
- 升级 vue-i18n 从 9.14.3 到 10.0.6
2025-03-13 21:09:30 +08:00
Joseph Hau f6f85ed777 - Add some translation
- Fix button layout for long english string
- Update i18n version
2025-03-13 09:48:38 +08:00
linshen cd043666b4 feat(i18n): 实现国际化支持并优化 UI 组件- 在 App.vue 中添加语言切换组件和多语言支持
- 更新多个组件的文本内容,使用国际化翻译
- 在 main.ts 中集成 i18n 插件- 移除 ApiKeyConfig.vue 组件
2025-03-12 22:51:22 +08:00
linshen b8f8b16e29 chore: 重构测试面板并更新版本号
- 将测试区域重构为独立的 TestPanelUI 组件
- 移除原测试面板的直接实现,改用新的组件
- 移除 usePromptTester 相关的代码
- 更新 package.json 版本号至 1.0.1
2025-03-10 22:48:48 +08:00
Joseph Hau 2ccfe0bbd1 factor: Remove unused css class and update pnpm version 2025-03-07 11:42:06 +08:00
linshen 41e6fcd172 chore: 优化测试配置和工作流
- 更新 package.json 测试脚本,添加 `--run` 和 `--passWithNoTests` 参数
- 更新 Docker 工作流,增加依赖安装、构建和测试步骤
- 添加 test 工作流
2025-03-05 22:31:54 +08:00
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