10 Mar, 2026

1 commit

  • 1. 新增 `scripts/init_env.sh`
    - 若 `.env` 不存在,从 `.env.example` 复制生成
    - 支持 `--force`:覆盖 `.env` 并备份为 `.env.bak`
    - 首次搭建时统一执行:`./scripts/init_env.sh`
    
     2. 统一加载逻辑 `scripts/lib/load_env.sh`
    - 移除 `activate.sh` 和 `service_ctl.sh` 中的重复解析逻辑
    - 使用共享的 `load_env_file`,并改为 `eval "$(printf 'export %s=%q\n'
      "$key" "$value")"` 安全导出
    - 支持含 ``、`$`、空格等特殊字符的值(需在 `.env` 中用引号包裹)
    
     3. 使用方式
    - **activate.sh**:`source scripts/lib/load_env.sh` 后调用
      `load_env_file`
    - **service_ctl.sh**:同上,去掉内联的 `load_env_file` 实现
    - **create_tenant_index.sh**:改为使用共享 loader,不再用 `set -a;
      source .env`
    
     4. 文档更新
    - **README.md**:在快速开始中加入 `./scripts/init_env.sh`
    - **docs/QUICKSTART.md**:说明 `init_env.sh`
      用法,并强调含特殊字符的密码需加引号
    - **.env.example**:补充注释说明引号规则
    
     5. setup.sh
    - 用 `./scripts/init_env.sh` 替代原先的 `cp .env.example .env`
    
    ---
    
    **推荐流程**:
    ```bash
    ./scripts/create_venv.sh
    ./scripts/init_env.sh     从 .env.example 生成本地 .env
    source activate.sh
    ./run.sh
    ```
    
    **密码写法**:若密码包含 ``、`$`、`&`、空格等,需加引号,例如:
    ```env
    DB_PASSWORD="qY8tgodLoA&KTyQ"
    ES_PASSWORD="4hOaLaf41y2VuI8y"
    ```
    tangwang
     

09 Mar, 2026

4 commits


08 Mar, 2026

5 commits


07 Mar, 2026

1 commit


11 Nov, 2025

1 commit

  • ## 🎯 Major Features
    - Request context management system for complete request visibility
    - Structured JSON logging with automatic daily rotation
    - Performance monitoring with detailed stage timing breakdowns
    - Query analysis result storage and intermediate result tracking
    - Error and warning collection with context correlation
    
    ## 🔧 Technical Improvements
    - **Context Management**: Request-level context with reqid/uid correlation
    - **Performance Monitoring**: Automatic timing for all search pipeline stages
    - **Structured Logging**: JSON format logs with request context injection
    - **Query Enhancement**: Complete query analysis tracking and storage
    - **Error Handling**: Enhanced error tracking with context information
    
    ## 🐛 Bug Fixes
    - Fixed DeepL API endpoint (paid vs free API confusion)
    - Fixed vector generation (GPU memory cleanup)
    - Fixed logger parameter passing format (reqid/uid handling)
    - Fixed translation and embedding functionality
    
    ## 🌟 API Improvements
    - Simplified API interface (8→5 parameters, 37.5% reduction)
    - Made internal functionality transparent to users
    - Added performance info to API responses
    - Enhanced request correlation and tracking
    
    ## 📁 New Infrastructure
    - Comprehensive test suite (unit, integration, API tests)
    - CI/CD pipeline with automated quality checks
    - Performance monitoring and testing tools
    - Documentation and example usage guides
    
    ## 🔒 Security & Reliability
    - Thread-safe context management for concurrent requests
    - Automatic log rotation and structured output
    - Error isolation with detailed context information
    - Complete request lifecycle tracking
    
    🤖 Generated with Claude Code
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    tangwang
     

08 Nov, 2025

2 commits