Conversation
These were backup copies created when Vite was introduced and are no longer referenced anywhere. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
之前 Claude CLI 超時(480 秒)且無圖片生成時,直接 return None 導致使用者等了 8 分鐘卻完全沒收到任何回覆。 現在改為: - 如有部分文字回應(text_buffer),發送已收集到的內容 - 如完全無回應,發送「處理時間過長,請稍後再試」提示 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @yazelin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取請求主要解決了 LineBot 在 AI 服務處理超時時的無回應問題,顯著提升了使用者體驗。透過引入更完善的錯誤處理機制,LineBot 現在能夠在 AI 回應延遲時提供部分內容或友善的錯誤提示,避免使用者長時間等待卻一無所獲。此外,此 PR 還包含了一項重要的前端架構調整,即移除了 Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| elif response.message and response.message.strip(): | ||
| # 超時但有部分文字回應,發送已收集到的內容 | ||
| logger.info(f"失敗但有部分文字回應({len(response.message)} 字元),嘗試發送") | ||
| ai_response = response.message.strip() | ||
| else: | ||
| return None | ||
| # 完全沒有回應,發送錯誤提示 | ||
| ai_response = "⚠️ 抱歉,處理時間過長,請稍後再試一次。" |
之前 raw_response 只在 success=True 時記錄,失敗時一律存 None。 但超時時 Claude 可能已產生部分文字,應該記錄以便除錯。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude CLI(ACP)內部多輪工具呼叫時,前幾輪的 WebSearch/WebFetch 可能已成功完成,但最後一輪工具卡住導致整體超時。 新增 _fallback_summarize_from_tools() 函數: - 優先從已完成的搜尋/抓取結果中提取有用內容回覆使用者 - 其次使用 text_buffer 中的部分文字 - 最後才顯示通用錯誤訊息 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
每次伺服器重啟會在 /tmp 建立新的 ching-tech-os-cli-* base 目錄, 舊的不會自動清除,長期累積數百個空目錄。 新增 cleanup_cli_temp_dirs 排程: - 每天凌晨 4:00 執行 - 刪除超過 1 天的舊 CLI base 目錄 - 排除當前正在使用的目錄 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- test_process_message_with_ai_failed_response_without_tool_calls: 失敗時不再 return None,改為回覆錯誤提示 - test_start_and_stop_scheduler: 排程數量 6→7(新增 cleanup_cli_temp_dirs) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/gemini review |
| # ============================================================ | ||
|
|
||
|
|
||
| async def _fallback_summarize_from_tools(response, user_message: str) -> str: |
| elif response.message and response.message.strip(): | ||
| # 沒有 tool_calls 但有部分文字回應 | ||
| logger.info(f"失敗但有部分文字回應({len(response.message)} 字元),嘗試發送") | ||
| ai_response = response.message.strip() | ||
| else: | ||
| return None | ||
| # 完全沒有回應,發送錯誤提示 | ||
| ai_response = "⚠️ 抱歉,處理時間過長,請稍後再試一次。" |
依 code review 建議: - 移除 _fallback_summarize_from_tools 未使用的 user_message 參數 - 合併重複的 elif/else 分支,統一由 _fallback_summarize_from_tools 處理 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
問題背景
最近 linebot-group 連續兩次因
WebFetch/search_knowledge工具超時,使用者等了 8 分鐘完全沒收到任何回覆。原因是超時後直接return None,未發送任何訊息。Test plan
🤖 Generated with Claude Code