7 次代码提交 e734fcc79c ... efa96fc9f6

作者 SHA1 备注 提交日期
  userName efa96fc9f6 添加超时错误信息的时间显示 1 周之前
  userName e734fcc79c 初始提交 1 周之前
  userName 5745d9a126 完善项目结构,更新README和.gitignore 1 周之前
  userName 07618a6770 移除 .env 文件,保护敏感信息 2 月之前
  userName 85eb4dab99 项目重构:添加 Next.js 前端和更新项目结构 2 月之前
  userName 2918870e49 更新 .gitignore 文件,排除不需要的目录 2 月之前
  userName 086468758d Initial commit: LightStar project with Next.js frontend and FastAPI backend 2 月之前
共有 1 个文件被更改,包括 5 次插入1 次删除
  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 {