From 7d4e2cb39a9522b634aaea4b22707e834e74b0c8 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Sun, 22 Mar 2026 19:07:19 +0800 Subject: [PATCH] docs: update comments --- app.py | 8 +++++++- common/cloud_client.py | 12 ++++++++++++ docker/docker-compose.yml | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 8f09387c..d401a00b 100644 --- a/app.py +++ b/app.py @@ -78,7 +78,13 @@ class ChannelManager: if first_start: PluginManager().load_plugins() - if conf().get("use_linkai"): + # Cloud client is optional. It is only started when + # use_linkai=True AND cloud_deployment_id is set. + # By default neither is configured, so the app runs + # entirely locally without any remote connection. + if conf().get("use_linkai") and ( + os.environ.get("CLOUD_DEPLOYMENT_ID") or conf().get("cloud_deployment_id") + ): try: from common import cloud_client threading.Thread( diff --git a/common/cloud_client.py b/common/cloud_client.py index b31ed3fb..25af8ad1 100644 --- a/common/cloud_client.py +++ b/common/cloud_client.py @@ -3,6 +3,18 @@ Cloud management client for connecting to the LinkAI control console. Handles remote configuration sync, message push, and skill management via the LinkAI socket protocol. + +NOTE: By default, no cloud-related config is enabled. The application runs +entirely locally without connecting to any remote service. The cloud client +is only activated when BOTH of the following conditions are met: + + 1. ``use_linkai`` is set to True in config (checked in app.py before + importing this module). + 2. ``cloud_deployment_id`` (or env CLOUD_DEPLOYMENT_ID) is non-empty + (checked in app.py and again in the ``start()`` function below). + +If either condition is missing, this module is never loaded and the +program continues as a purely local application. """ from bridge.context import Context, ContextType diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index b35bd779..2c611ac1 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -9,7 +9,7 @@ services: - "9899:9899" environment: CHANNEL_TYPE: 'weixin' - MODEL: 'MiniMax-M2.5' + MODEL: 'MiniMax-M2.7' MINIMAX_API_KEY: '' ZHIPU_AI_API_KEY: '' ARK_API_KEY: ''