1
0

7 Commits e734fcc79c ... efa96fc9f6

Autor SHA1 Mensagem Data
  userName efa96fc9f6 添加超时错误信息的时间显示 há 1 semana atrás
  userName e734fcc79c 初始提交 há 1 semana atrás
  userName 5745d9a126 完善项目结构,更新README和.gitignore há 1 semana atrás
  userName 07618a6770 移除 .env 文件,保护敏感信息 há 2 meses atrás
  userName 85eb4dab99 项目重构:添加 Next.js 前端和更新项目结构 há 2 meses atrás
  userName 2918870e49 更新 .gitignore 文件,排除不需要的目录 há 2 meses atrás
  userName 086468758d Initial commit: LightStar project with Next.js frontend and FastAPI backend há 2 meses atrás
1 ficheiros alterados com 5 adições e 1 exclusões
  1. 5 1
      lightstar-web/src/app/ai-chat/page.tsx

+ 5 - 1
lightstar-web/src/app/ai-chat/page.tsx

@@ -110,7 +110,11 @@ export default function AIChatPage() {
     
     // 添加超时控制
     const timeoutPromise = new Promise((_, reject) => {
-      setTimeout(() => reject(new Error("请求超时,请检查网络连接")), 30000); // 增加到30秒
+      const now = new Date();
+      const timeString = now.toLocaleTimeString(); // 获取当前时间
+      setTimeout(() => 
+        reject(new Error(`请求超时,请检查网络连接 [${timeString}]`)), 
+        30000); // 30秒超时
     });
     
     try {