From 03585a161dcc09ba3d5db06c2de11678f9fda501 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Wed, 4 Feb 2026 21:31:16 +0800 Subject: [PATCH] feat: update sandbox service configuration in Docker Compose files - Added container name for the sandbox service in both docker-compose.dev.yml and docker-compose.yml. - Changed the profile from 'sandbox' to 'full' for the sandbox service, enhancing its integration within the application. - Added logging for skill availability and sandbox mode in the skill handler, improving debugging capabilities. --- docker-compose.dev.yml | 3 ++- docker-compose.yml | 3 ++- internal/handler/skill_handler.go | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 94ae914db..a7672a533 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -97,11 +97,12 @@ services: # Sandbox 镜像:仅用于 build/pull,非常驻服务;本地 app 执行 Skills 时按需 docker run 该镜像,用毕即释 sandbox: image: wechatopenai/weknora-sandbox:${WEKNORA_VERSION:-latest} + container_name: WeKnora-sandbox-dev build: context: . dockerfile: docker/Dockerfile.sandbox profiles: - - sandbox + - full command: ["true"] restart: "no" diff --git a/docker-compose.yml b/docker-compose.yml index 0f618f075..4e97a5e69 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -119,11 +119,12 @@ services: # Sandbox 镜像:仅用于 build/pull,非常驻服务;app 执行 Skills 时按需 docker run 该镜像,用毕即释 sandbox: image: wechatopenai/weknora-sandbox:${WEKNORA_VERSION:-latest} + container_name: WeKnora-sandbox build: context: . dockerfile: docker/Dockerfile.sandbox profiles: - - sandbox + - full command: ["true"] restart: "no" diff --git a/internal/handler/skill_handler.go b/internal/handler/skill_handler.go index d854e0f99..56395e7a6 100644 --- a/internal/handler/skill_handler.go +++ b/internal/handler/skill_handler.go @@ -62,6 +62,8 @@ func (h *SkillHandler) ListSkills(c *gin.Context) { sandboxMode := os.Getenv("WEKNORA_SANDBOX_MODE") skillsAvailable := sandboxMode != "" && sandboxMode != "disabled" + logger.Infof(ctx, "skills_available: %v, sandboxMode: %s", skillsAvailable, sandboxMode) + c.JSON(http.StatusOK, gin.H{ "success": true, "data": response,