Files
ars-backend/script/reset-app.sh
ROOG e956df9daa main: 增强工具功能与消息处理
- 添加 `FileReadTool`,支持文件内容读取与安全验证
- 引入 `hasToolMessages` 逻辑,优化工具历史上下文处理
- 修改工具选项逻辑,支持禁用工具时的动态调整
- 增加消息序列化逻辑,优化 Redis 序列管理与数据同步
- 扩展测试覆盖,验证序列化与工具调用场景
- 增强 Docker Compose 脚本,支持应用重置与日志清理
- 调整工具调用超时设置,提升运行时用户体验
2025-12-24 00:55:54 +08:00

78 lines
1.5 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 获取脚本所在目录的绝对路径
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# 定义颜色
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# 打印带颜色的信息
print_info() {
echo -e "${BLUE} $1${NC}"
}
print_success() {
echo -e "${GREEN}$1${NC}"
}
print_warning() {
echo -e "${YELLOW}⚠️ $1${NC}"
}
print_error() {
echo -e "${RED}$1${NC}"
}
# 打印分割线
print_separator() {
echo -e "${BLUE}════════════════════════════════════${NC}"
}
# 主流程
print_separator
print_info "开始重置应用"
print_separator
echo ""
# Step 1: 重启 Docker Compose
print_info "Step 1/3: 重启 Docker Compose"
echo ""
if bash "${SCRIPT_DIR}/restart-docker-compose.sh"; then
print_success "Docker Compose 重启成功"
else
print_error "Docker Compose 重启失败"
exit 1
fi
echo ""
# Step 2: 运行测试和数据填充
print_info "Step 2/3: 运行测试和数据填充"
echo ""
if bash "${SCRIPT_DIR}/run-tests-seed.sh"; then
print_success "测试和数据填充成功"
else
print_error "测试和数据填充失败"
exit 1
fi
echo ""
# Step 3: 清理日志
print_info "Step 3/3: 清理日志"
echo ""
if bash "${SCRIPT_DIR}/clear-log.sh"; then
print_success "日志清理成功"
else
print_error "日志清理失败"
exit 1
fi
echo ""
# 完成
print_separator
print_success "🎉 应用重置完成!"
print_separator