Compare commits

..

6 Commits

Author SHA1 Message Date
b0876e6542 fix(sxwz): 修复制品面板打开时输入框布局偏移
仅在制品面板关闭时应用 SXWZ 品牌的 -translate-x-[172px] 偏移,
避免面板打开时输入框被推出可视区域。
2026-06-11 17:51:15 +08:00
6c4f88d4c8 test(e2e): 添加 E2E 测试基础设施和线程记忆测试
- 配置 Playwright:baseURL 改为 localhost:2026,视频仅在 CI 保留
- 更新 .gitignore 排除 Playwright 报告/缓存
- 新增线程记忆 E2E 测试:验证发送消息后可加载 summary 且无日志报错
- thread-memory-panel 添加 data-testid 属性便于定位
2026-06-11 17:51:15 +08:00
9f42024682 test(memory): 添加线程记忆更新器 JSON 修复测试
验证 update_memory 在模型返回包含未转义内部引号的 JSON
时能正确解析并保存用户偏好和事实数据。
2026-06-11 17:51:15 +08:00
ade336f30a refactor(memory): 提取 JSON 工具函数到共享模块
将 thread_summary.py 中的 _strip_code_fence、_extract_json_object、
_escape_inner_quotes_in_json_strings 三个函数提取到新建的
json_utils.py 共享模块,thread_updater.py 同步使用统一接口。
2026-06-11 17:51:15 +08:00
e55be0da3a fix(deploy): comment out local image tagging in push command 2026-06-11 11:42:59 +08:00
c003af4f73 feat: update Docker commands and deploy script for improved image handling 2026-06-11 10:20:25 +08:00
3 changed files with 65 additions and 7 deletions

View File

@ -27,7 +27,8 @@ help:
@echo " make clean - Clean up processes and temporary files" @echo " make clean - Clean up processes and temporary files"
@echo "" @echo ""
@echo "Docker Production Commands:" @echo "Docker Production Commands:"
@echo " make up - Build and start production Docker services (localhost:2026)" @echo " make up - Start production Docker services from existing images (localhost:2026)"
@echo " BUILD=1 make up - Build images then start production Docker services"
@echo " make down - Stop and remove production Docker containers" @echo " make down - Stop and remove production Docker containers"
@echo "" @echo ""
@echo "Docker Development Commands:" @echo "Docker Development Commands:"
@ -183,7 +184,7 @@ docker-logs-gateway:
# Production Docker Commands # Production Docker Commands
# ========================================== # ==========================================
# Build and start production services # Start production services (set BUILD=1 to force rebuild)
up: up:
@./scripts/deploy.sh @./scripts/deploy.sh

View File

@ -40,6 +40,7 @@ services:
# ── Frontend: Next.js Production ─────────────────────────────────────────── # ── Frontend: Next.js Production ───────────────────────────────────────────
frontend: frontend:
image: registry.xueai.art/deerflow/deer-flow-frontend:latest
build: build:
context: ../ context: ../
dockerfile: frontend/Dockerfile dockerfile: frontend/Dockerfile
@ -60,6 +61,7 @@ services:
# ── Gateway API ──────────────────────────────────────────────────────────── # ── Gateway API ────────────────────────────────────────────────────────────
gateway: gateway:
image: registry.xueai.art/deerflow/deer-flow-gateway:latest
build: build:
context: ../ context: ../
dockerfile: backend/Dockerfile dockerfile: backend/Dockerfile
@ -120,6 +122,7 @@ services:
# TODO: switch to langchain/langgraph-api (licensed) once a license key is available. # TODO: switch to langchain/langgraph-api (licensed) once a license key is available.
# For now, use `langgraph dev` (no license required) with the standard backend image. # For now, use `langgraph dev` (no license required) with the standard backend image.
langgraph: langgraph:
image: registry.xueai.art/deerflow/deer-flow-langgraph:latest
build: build:
context: ../ context: ../
dockerfile: backend/Dockerfile dockerfile: backend/Dockerfile

View File

@ -1,9 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# deploy.sh - Build and start (or stop) DeerFlow production services # deploy.sh - Start (or stop) DeerFlow production services
# #
# Usage: # Usage:
# deploy.sh [up] — build images and start containers (default) # deploy.sh [up] — start containers using existing images (default)
# BUILD=1 deploy.sh [up] — build images then start containers
# deploy.sh push — build and push images to registry.xueai.art/deerflow
# deploy.sh down — stop and remove containers # deploy.sh down — stop and remove containers
# #
# Must be run from the repo root directory. # Must be run from the repo root directory.
@ -172,6 +174,52 @@ if [ "$CMD" = "down" ]; then
exit 0 exit 0
fi fi
# ── push ──────────────────────────────────────────────────────────────────────
if [ "$CMD" = "push" ]; then
sandbox_mode="$(detect_sandbox_mode)"
echo -e "${BLUE}Sandbox mode: $sandbox_mode${NC}"
if [ -z "$DEER_FLOW_DOCKER_SOCKET" ]; then
export DEER_FLOW_DOCKER_SOCKET="/var/run/docker.sock"
fi
if [ "$sandbox_mode" != "local" ]; then
if [ ! -S "$DEER_FLOW_DOCKER_SOCKET" ]; then
echo -e "${RED}⚠ Docker socket not found at $DEER_FLOW_DOCKER_SOCKET${NC}"
echo " AioSandboxProvider (DooD) build context may not work."
exit 1
else
echo -e "${GREEN}✓ Docker socket: $DEER_FLOW_DOCKER_SOCKET${NC}"
fi
fi
REGISTRY_BASE="${REGISTRY_BASE:-registry.xueai.art/deerflow}"
REGISTRY_TAG="${REGISTRY_TAG:-latest}"
PUSH_SERVICES="frontend gateway langgraph"
echo ""
echo "Building images for push..."
# shellcheck disable=SC2086
"${COMPOSE_CMD[@]}" build $PUSH_SERVICES
for service in frontend gateway langgraph; do
# local_image="deer-flow-${service}:latest"
remote_image="${REGISTRY_BASE}/deer-flow-${service}:${REGISTRY_TAG}"
# echo "Tagging ${local_image} -> ${remote_image}"
# docker tag "$local_image" "$remote_image"
echo "Pushing ${remote_image}"
docker push "$remote_image"
done
echo ""
echo -e "${GREEN}✓ Push complete${NC}"
echo " Registry: ${REGISTRY_BASE}"
echo " Tag: ${REGISTRY_TAG}"
echo ""
exit 0
fi
# ── Banner ──────────────────────────────────────────────────────────────────── # ── Banner ────────────────────────────────────────────────────────────────────
echo "==========================================" echo "=========================================="
@ -211,13 +259,19 @@ fi
echo "" echo ""
# ── Step 2: Build and start ─────────────────────────────────────────────────── # ── Step 2: Start (optionally build) ─────────────────────────────────────────
echo "Building images and starting containers..." if [ "${BUILD:-0}" = "1" ]; then
echo "BUILD=1 detected: building images and starting containers..."
up_build_flag="--build"
else
echo "Starting containers from existing local images (no build)..."
up_build_flag=""
fi
echo "" echo ""
# shellcheck disable=SC2086 # shellcheck disable=SC2086
"${COMPOSE_CMD[@]}" $extra_args up --build -d --remove-orphans $services "${COMPOSE_CMD[@]}" $extra_args up $up_build_flag -d --remove-orphans $services
echo "" echo ""
echo "==========================================" echo "=========================================="