diff --git a/main/manager-api/src/main/java/xiaozhi/common/constant/Constant.java b/main/manager-api/src/main/java/xiaozhi/common/constant/Constant.java index bf7476004..9ae43c601 100644 --- a/main/manager-api/src/main/java/xiaozhi/common/constant/Constant.java +++ b/main/manager-api/src/main/java/xiaozhi/common/constant/Constant.java @@ -242,7 +242,7 @@ public interface Constant { /** * 无效固件URL */ - String INVALID_FIRMWARE_URL = "http://xiaozhi.server.com:8002/xiaozhi/otaMag/download/NOT_ACTIVATED_FIRMWARE_THIS_IS_A_INVALID_URL"; + String INVALID_FIRMWARE_URL = "http://xiaozhi.server.com:8002/toy/otaMag/download/NOT_ACTIVATED_FIRMWARE_THIS_IS_A_INVALID_URL"; /** * 字典类型 diff --git a/main/manager-api/src/main/resources/application.yml b/main/manager-api/src/main/resources/application.yml index 2e4fb4e27..a56d8c71f 100644 --- a/main/manager-api/src/main/resources/application.yml +++ b/main/manager-api/src/main/resources/application.yml @@ -7,7 +7,7 @@ server: min-spare: 30 port: 8002 servlet: - context-path: /xiaozhi + context-path: /toy session: cookie: http-only: true diff --git a/main/manager-web/.env.development b/main/manager-web/.env.development index 10380a933..857f188e9 100644 --- a/main/manager-web/.env.development +++ b/main/manager-web/.env.development @@ -1,2 +1,2 @@ -VUE_APP_API_BASE_URL=/xiaozhi +VUE_APP_API_BASE_URL=/toy VUE_APP_TITLE=cheeko \ No newline at end of file diff --git a/main/manager-web/.env.production b/main/manager-web/.env.production index b6fbd2e1d..6d16eb1a3 100644 --- a/main/manager-web/.env.production +++ b/main/manager-web/.env.production @@ -1,4 +1,4 @@ -VUE_APP_API_BASE_URL=/xiaozhi +VUE_APP_API_BASE_URL=/toy VUE_APP_PUBLIC_PATH=/ # 是否开启CDN VUE_APP_USE_CDN=false diff --git a/main/manager-web/src/components/FirmwareDialog.vue b/main/manager-web/src/components/FirmwareDialog.vue index d26c4b334..a32ab2456 100644 --- a/main/manager-web/src/components/FirmwareDialog.vue +++ b/main/manager-web/src/components/FirmwareDialog.vue @@ -22,7 +22,7 @@
- Note: Please upload the original xiaozhi.bin file, not the merged-binary.bin file + Note: Please upload the original toy.bin file, not the merged-binary.bin file
diff --git a/main/manager-web/vue.config.js b/main/manager-web/vue.config.js index 6b6ba4f2e..4a9140ba4 100644 --- a/main/manager-web/vue.config.js +++ b/main/manager-web/vue.config.js @@ -43,7 +43,7 @@ module.exports = defineConfig({ devServer: { port: 8001, // 指定端口为 8001 proxy: { - '/xiaozhi': { + '/toy': { target: 'http://127.0.0.1:8002', changeOrigin: true } diff --git a/main/mqtt-gateway/config/mqtt.json.test b/main/mqtt-gateway/config/mqtt.json.test index d4680a20a..97c0e7a4a 100644 --- a/main/mqtt-gateway/config/mqtt.json.test +++ b/main/mqtt-gateway/config/mqtt.json.test @@ -1,11 +1,11 @@ { "production": { "chat_servers": [ - "ws://192.168.68.66:8000/xiaozhi/v1/" + "ws://192.168.68.66:8000/toy/v1/" ] }, "development": { - "chat_servers": ["ws://192.168.68.66:8000/xiaozhi/v1/"], + "chat_servers": ["ws://192.168.68.66:8000/toy/v1/"], "mac_addresss": ["d8:43:ae:3e:4b:5a"] }, "debug": false diff --git a/main/xiaozhi-server/app.py b/main/xiaozhi-server/app.py index f2e42996d..89337c6ae 100644 --- a/main/xiaozhi-server/app.py +++ b/main/xiaozhi-server/app.py @@ -68,7 +68,7 @@ async def main(): if not read_config_from_api: logger.bind(tag=TAG).info( - "OTA interface is\t\thttp://{}:{}/xiaozhi/ota/", + "OTA interface is\t\thttp://{}:{}/toy/ota/", get_local_ip(), port, ) @@ -98,7 +98,7 @@ async def main(): websocket_port = int(server_config.get("port", 8000)) logger.bind(tag=TAG).info( - "Websocket address is\tws://{}:{}/xiaozhi/v1/", + "Websocket address is\tws://{}:{}/toy/v1/", get_local_ip(), websocket_port, ) diff --git a/main/xiaozhi-server/client.py b/main/xiaozhi-server/client.py index d3a2173e6..643ecc7e8 100644 --- a/main/xiaozhi-server/client.py +++ b/main/xiaozhi-server/client.py @@ -322,7 +322,7 @@ class TestClient: def get_ota_config(self) -> bool: """Requests OTA configuration from the server.""" - logger.info(f"▶️ STEP 1: Requesting OTA config from http://{SERVER_IP}:{OTA_PORT}/xiaozhi/ota/") + logger.info(f"▶️ STEP 1: Requesting OTA config from http://{SERVER_IP}:{OTA_PORT}/toy/ota/") try: # Generate a client ID for this session import uuid @@ -335,7 +335,7 @@ class TestClient: }, "client_id": session_client_id } - response = requests.post(f"http://{SERVER_IP}:{OTA_PORT}/xiaozhi/ota/", headers=headers, json=data, timeout=5) + response = requests.post(f"http://{SERVER_IP}:{OTA_PORT}/toy/ota/", headers=headers, json=data, timeout=5) response.raise_for_status() self.ota_config = response.json() print(f"OTA Config received: {json.dumps(self.ota_config, indent=2)}") @@ -347,7 +347,7 @@ class TestClient: logger.info(f"✅ Got websocket URL from OTA: {self.websocket_url}") else: logger.warning("⚠️ No websocket URL in OTA response, using fallback") - self.websocket_url = f"ws://{SERVER_IP}:8000/xiaozhi/v1/" + self.websocket_url = f"ws://{SERVER_IP}:8000/toy/v1/" # Extract MQTT credentials from OTA response mqtt_info = self.ota_config.get("mqtt", {}) diff --git a/main/xiaozhi-server/config.yaml b/main/xiaozhi-server/config.yaml index 3965e7c62..18e410d3b 100644 --- a/main/xiaozhi-server/config.yaml +++ b/main/xiaozhi-server/config.yaml @@ -17,7 +17,7 @@ server: # When deploying with docker or using public network deployment (using SSL, domain names), it may not be accurate # So if you deploy with docker, set websocket to the LAN address # If you deploy on public network, set websocket to the public network address - websocket: ws://your-ip-or-domain:port/xiaozhi/v1/ + websocket: ws://your-ip-or-domain:port/toy/v1/ # Visual analysis interface address # Visual analysis interface address sent to devices # If using the default configuration below, the system will automatically generate the visual recognition address and output it in the startup log. You can directly access this address with a browser to confirm diff --git a/main/xiaozhi-server/core/api/ota_handler.py b/main/xiaozhi-server/core/api/ota_handler.py index 79449658a..e10fd211b 100644 --- a/main/xiaozhi-server/core/api/ota_handler.py +++ b/main/xiaozhi-server/core/api/ota_handler.py @@ -46,7 +46,7 @@ class OTAHandler(BaseHandler): if not websocket_config or "你的" in websocket_config: print(f"[OTA DEBUG] Using default websocket URL") - return f"ws://{local_ip}:{port}/xiaozhi/v1/" + return f"ws://{local_ip}:{port}/toy/v1/" else: print(f"[OTA DEBUG] Using configured websocket URL: {websocket_config}") return websocket_config diff --git a/main/xiaozhi-server/core/http_server.py b/main/xiaozhi-server/core/http_server.py index b296268b7..95aac6de2 100644 --- a/main/xiaozhi-server/core/http_server.py +++ b/main/xiaozhi-server/core/http_server.py @@ -29,7 +29,7 @@ class SimpleHttpServer: if websocket_config and "you" not in websocket_config: return websocket_config else: - return f"ws://{local_ip}:{port}/xiaozhi/v1/" + return f"ws://{local_ip}:{port}/toy/v1/" async def start(self): server_config = self.config["server"] @@ -51,10 +51,10 @@ class SimpleHttpServer: # If smart control panel is not enabled, just running single module, need to add simple OTA interface for delivering websocket interface self.logger.bind(tag=TAG).info("Adding OTA routes") app.add_routes([ - web.get("/xiaozhi/ota/", self.ota_handler.handle_get), - web.post("/xiaozhi/ota/", + web.get("/toy/ota/", self.ota_handler.handle_get), + web.post("/toy/ota/", self.ota_handler.handle_post), - web.options("/xiaozhi/ota/", + web.options("/toy/ota/", self.ota_handler.handle_post), ])