From c43ce7e8a8bbac203a53d5d18d2598d0f2d0b4a6 Mon Sep 17 00:00:00 2001 From: ymq Date: Mon, 10 Aug 2026 18:17:10 +0800 Subject: [PATCH] test: allow anonymous for cockpit_chat_v2 --- wwwroot/api/cockpit_chat_v2.dspy | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wwwroot/api/cockpit_chat_v2.dspy b/wwwroot/api/cockpit_chat_v2.dspy index 72c8cf7..fa1c18f 100644 --- a/wwwroot/api/cockpit_chat_v2.dspy +++ b/wwwroot/api/cockpit_chat_v2.dspy @@ -36,9 +36,7 @@ if action == 'send_message': prompt = msg uid = await get_user() if not uid: - async def _err_stream(): - yield json.dumps(_w_text("请先登录"), ensure_ascii=False) + '\n' - return await stream_response(request, _err_stream, 'text/plain; charset=utf-8') + uid = 'user-01' # 测试兼容 # ── 加载上下文 ── ctx = {'pid': '', 'name': ''}