checkpoint: 重写 langchain agent 前的快照

包含未合入 main 的工作:
- CAS 单点登录接入 (CasSecurityConfig + 4 个 CAS 类)
- LoginController 改 POST + body, 修 URL 密码暴露
- chat_test.py 修 texts→text typo
- 前端外部系统侧边栏 + login API POST
- gateway-nginx.conf

下一步: 从这个分支拉 feat/langgraph-rewrite 做 langchain-chat agent 重写
回滚点: git checkout backup/pre-langgraph

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-07 14:58:53 +08:00
parent f8e8017434
commit 911f7adee6
17 changed files with 647 additions and 10 deletions

View File

@@ -55,11 +55,11 @@ async def get_image(file_name: str):
async def thinking_generator(content: str) -> AsyncIterable[str]:
"""思考过程的异步生成器"""
"""思考过程的异步生成器(打字机效果,整段约 0.3s 完成)"""
yield json.dumps({'think': '\n'}, ensure_ascii=False)
for i in content:
for i in content:
yield json.dumps({'think': i}, ensure_ascii=False)
await asyncio.sleep(0.1)
await asyncio.sleep(0.02)
yield json.dumps({'think': '\n'}, ensure_ascii=False)
@@ -296,7 +296,7 @@ async def chat_test(
elif "search_answer" in json.loads(response):
search_answer = json.loads(response)["search_answer"]
# history_summary+= search_answer
yield json.dumps({"texts": search_answer}, ensure_ascii=False)
yield json.dumps({"text": search_answer}, ensure_ascii=False)
elif "docs" in json.loads(response):
docs = json.loads(response)["docs"]
elif "detail" in json.loads(response):
@@ -308,7 +308,7 @@ async def chat_test(
# yield json.dumps({"text": image_name}, ensure_ascii=False)
else :
#history_summary += json.loads(response)["final_answer"]
yield json.dumps({"texts": json.loads(response)["final_answer"]}, ensure_ascii=False)
yield json.dumps({"text": json.loads(response)["final_answer"]}, ensure_ascii=False)
if stop == "":
continue
else: