feat: 搜索改进与代码修复
- 连字符扩展:multi-agent → multi agent 提升搜索召回率 - 中文同义词支持:添加中英文混合查询扩展 - Snippet 高亮预留:为 FTS5 snippet 功能预留接口 - YAML 解析增强:支持 HTML 实体解码 - 标签关联维护:自动维护 wiki_page_tags 关联表 - 缓存失效优化:支持智能前缀匹配 - 设计文档更新:汇总近期改动 (v1.3) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Executable
+65
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
# sanguo_llmwiki Deployment Script
|
||||
# Deploys from development directory to installation directory
|
||||
|
||||
set -e # Exit on error
|
||||
|
||||
# Paths
|
||||
SRC_DIR="$HOME/.openclaw/sanguo_projects/sanguo_llmwiki"
|
||||
DST_DIR="$HOME/.sanguo_projects/sanguo_llmwiki"
|
||||
|
||||
# Colors
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
echo "Deploying sanguo_llmwiki..."
|
||||
echo "Source: $SRC_DIR"
|
||||
echo "Target: $DST_DIR"
|
||||
|
||||
# Create target directory if it doesn't exist
|
||||
mkdir -p "$DST_DIR"
|
||||
|
||||
# Deploy using rsync with exclusions
|
||||
rsync -av --delete \
|
||||
--exclude='.git/' \
|
||||
--exclude='.gitignore' \
|
||||
--exclude='.claude/' \
|
||||
--exclude='__pycache__/' \
|
||||
--exclude='*.pyc' \
|
||||
--exclude='.pytest_cache/' \
|
||||
--exclude='.python-version' \
|
||||
--exclude='.coverage' \
|
||||
--exclude='.ruff_cache/' \
|
||||
--exclude='tests/' \
|
||||
--exclude='pytest.ini' \
|
||||
--exclude='.env' \
|
||||
--exclude='*.egg-info/' \
|
||||
--exclude='dist/' \
|
||||
--exclude='build/' \
|
||||
--exclude='docs/' \
|
||||
"$SRC_DIR/" "$DST_DIR/"
|
||||
|
||||
echo -e "${GREEN}✓ Code deployed successfully${NC}"
|
||||
|
||||
# Install dependencies using virtual environment
|
||||
echo "Setting up virtual environment..."
|
||||
cd "$DST_DIR"
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
echo -e "${GREEN}✓ Dependencies installed${NC}"
|
||||
|
||||
# Update PM2 config to use virtual environment python (macOS sed syntax)
|
||||
sed -i '' "s|script: 'python3'|script: '$DST_DIR/.venv/bin/python'|g" ecosystem.config.cjs
|
||||
|
||||
# Create necessary directories (use paths from ecosystem.config.cjs)
|
||||
mkdir -p "$HOME/.sanguo-llmwiki"
|
||||
mkdir -p "/Volumes/KnowledgeBase"
|
||||
|
||||
echo -e "${GREEN}✓ Deployment complete!${NC}"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo " 1. Test MCP Server: cd $DST_DIR && source .venv/bin/activate && python -m mcp_server.main"
|
||||
echo " 2. Start with PM2: pm2 start ecosystem.config.cjs"
|
||||
Reference in New Issue
Block a user