-
Notifications
You must be signed in to change notification settings - Fork 1
修复: 优化 AI 分析指令加载, 防止重复加载导致性能浪费 (fixes #261) #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 更新聊天输入框和发送按钮的样式,提升用户体验 - 将发送按钮的图标从Send更改为ArrowUpRight - 优化输入框的布局和交互效果,增加阴影和圆角设计 - 确保输入框在加载状态下禁用,提升功能一致性
…nt switch (fixes #261)
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
PR Review 🔍
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to bd42426
Previous suggestionsSuggestions
|
…flicts - Update navigation icons: - Content Library → Library: change icon from IconArchive to Inbox - Home: change icon from IconInnerShadowTop to GalleryHorizontalEnd - Prompts: change icon from MessageSquare to BotMessageSquare - Rename 'Content Library' to 'Library' in navigation - Reorder navigation: Library first, then Home, Favorites, Prompts - Add right margin (pr-3) to navigation buttons to prevent edge alignment - Fix ContentItemPublic type conflicts by extending openapi-client types - Update related test cases to match new navigation structure
- 引入复选框组件,简化全选和单选链接的操作 - 更新链接选择区域的样式,提升用户体验 - 调整复选框的事件处理方式,确保状态管理一致性
- 调整AI聊天组件底部输入区域内边距从 p-4 改为 p-2 - 减少enhanced-llm-analysis-sidebar底部Footer区域间距 - 统一所有聊天组件的底部间距,提升界面紧凑性 - 涉及文件: ai-chat, streaming-chat, enhanced-llm-analysis-sidebar, chat-with-question-display
- 将多个组件的底部间距从 mb-4 调整为 mb-1,提升界面紧凑性 - 更新 ModernAnalysisInterface 和 ChatWithQuestionDisplay 组件的样式,确保一致性 - 调整 AIChat 组件的内边距,进一步优化用户体验
- 替换ModernAnalysisInterface中发送按钮的Brain图标为标准Loader2图标 - 替换加载状态页面的Brain图标为标准Loader2图标 - 保持与项目其他地方加载图标的一致性 - 使用标准的旋转加载动画效果
- 添加详细的控制台日志来调试聊天框无法传输的问题 - 记录请求开始、URL、请求体、响应状态等关键信息 - 改进错误处理,显示具体错误信息而不是通用提示 - 帮助定位前端到后端的API调用问题
This reverts commit afaeba1.
- 添加请求URL、请求体、token状态的详细日志 - 添加API响应状态、头部信息的调试输出 - 改进错误处理,显示具体的错误响应内容 - 添加分析流程各阶段的状态跟踪 - 帮助排查聊天框无法正常传输到后端的问题
- 更新DEFAULT_LLM_MODEL为deepseek-v3-ensemble - 更新所有AI任务模型配置(summary, key_points, labels, chat, analysis) - 移除content.py中的硬编码模型引用,使用配置的默认模型 - 统一使用DeepSeek V3作为全局默认模型,提升性能和一致性
This reverts commit c829c30.
…lash-05-20",以保持一致性和准确性。
…0-flash"的相关引用,以保持一致性和准确性。
…新按钮和文本的样式,以保持一致性和美观性。
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
User description
通过使用全局 store 和 idempotent load 函数优化 prompts 加载, 防止切换内容卡片时重复 API 调用.
Closes #261
Description
ModernAnalysisInterface
to optimize AI prompts loading using a global store, preventing repeated API calls when switching content cards.loadPrompts
function in the store to enhance performance and prevent unnecessary fetches.Changes walkthrough 📝
ModernAnalysisInterface.test.tsx
Add tests for prompts loading in ModernAnalysisInterface
frontend/tests/components/ai/ModernAnalysisInterface.test.tsx
ModernAnalysisInterface
to ensure prompts loadcorrectly.
ModernAnalysisInterface.tsx
Refactor prompts loading and modernize UI in ModernAnalysisInterface
frontend/components/ai/ModernAnalysisInterface.tsx
ai-chat.tsx
Modernize chat input and button design in AIChat
frontend/components/ui/ai-chat.tsx
Send
toArrowUpRight
.llm-analysis-store.ts
Improve prompt loading logic in LLM analysis store
frontend/lib/stores/llm-analysis-store.ts
loadPrompts
function to prevent redundant API calls.